Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stack Bug in ZXB 1.2.5-r1489 ?
#5
I've downloaded the new version (1.2.5-r1489f) and tried to compile my last crap game. It compiled OK with version 1.2.5-r1489 and no optimization.

Now, with no optimization I get this message (and it compiles OK):
Code:
> Executing: C:\Archivos de programa\ConTEXT\ConExec.exe -i "C:\Archivos de programa\Boriel Tm\ZX Basic Compiler\zxb.exe" -T -B -a  -S 28000 clash3.bas

memcopy.bas:29: warning: SUB 'memcopy' declared as FASTCALL with 3 parameters
> Execution finished.


With optimization -O 2, or -O 3 I get this message (and it doesn't compile):

Code:
> Executing: C:\Archivos de programa\ConTEXT\ConExec.exe -i "C:\Archivos de programa\Boriel Tm\ZX Basic Compiler\zxb.exe" -T -B -a  -O 2 -S 28000 clash3.bas

INFO: BORDER is not defined. No optimization is done.
INFO: COPY_ATTR is not defined. No optimization is done.
INFO: CLS is not defined. No optimization is done.
INFO: BRIGHT is not defined. No optimization is done.
INFO: BOLD_TMP is not defined. No optimization is done.
INFO: PRINT_STR is not defined. No optimization is done.
INFO: PRINT_EOL_ATTR is not defined. No optimization is done.
INFO: ITALIC_TMP is not defined. No optimization is done.
INFO: BRIGHT_TMP is not defined. No optimization is done.
INFO: INVERSE_TMP is not defined. No optimization is done.
INFO: __FTOU32REG is not defined. No optimization is done.
INFO: __EQ32 is not defined. No optimization is done.
INFO: PRINT_EOL is not defined. No optimization is done.
INFO: __PAUSE is not defined. No optimization is done.
INFO: __EQ16 is not defined. No optimization is done.
INFO: FLASH_TMP is not defined. No optimization is done.
INFO: __AND8 is not defined. No optimization is done.
INFO: __ABS8 is not defined. No optimization is done.
INFO: __STOP is not defined. No optimization is done.
INFO: __MUL8_FAST is not defined. No optimization is done.
INFO: BEEP is not defined. No optimization is done.
memcopy.bas:29: warning: SUB 'memcopy' declared as FASTCALL with 3 parameters
clash3.bas:27: warning: Function 'attr' is never called and has been ignored
clash3.bas:66: warning: Function 'setattr' is never called and has been ignored
clash3.bas:27: warning: Function 'point' is never called and has been ignored
clash3.bas:29: warning: Function 'screen' is never called and has been ignored
clash3.bas:26: warning: Function 'input' is never called and has been ignored
clash3.bas:22: warning: Function 'GetKey' is never called and has been ignored
clash3.bas:59: warning: Function 'GetKeyScanCode' is never called and has been ignored
clash3.bas:1: warning: Function 'psprite' is never called and has been ignored
clash3.bas:19: warning: Function 'orsprite' is never called and has been ignored
clash3.bas:12: warning: Function 'cpattr' is never called and has been ignored
clash3.bas:20: warning: Function 'rstattr' is never called and has been ignored
clash3.bas:29: warning: Variable 'dest' is never used
clash3.bas:29: warning: Variable 'source' is never used
clash3.bas:29: warning: Variable 'length' is never used
clash3.bas:41: warning: Variable 'scancode' is never used
Traceback (most recent call last):
  File "zxb.py", line 244, in <module>
  File "zxb.py", line 209, in main
  File "optimizer.pyc", line 2021, in optimize
  File "optimizer.pyc", line 1316, in update_goes_and_comes
IndexError: list index out of range
> Execution finished.


It's probably my code (I'm so proud of its crapyness...) but maybe the last lines of the optimization message tells you something. I don't want to make you search within a long, untidy, unsorted and crap piece of code, so if you can point me to what should I look for, I'll do. Or if you think it's my code's fault I'll let it as is (it compiles without optimization and that more than enough for me).

Anyway, if you still want to see my code, I'll send you the .bas file, the attachments and also the .tzx file so you can play and delight yourself (or not).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)