EgonOlsen71 / basicv2

A Commodore (CBM) BASIC V2 interpreter/compiler written in Java
https://egonolsen71.github.io/basicv2/
The Unlicense
86 stars 15 forks source link

Feature/a simpler gosub to goto transform #43

Closed ciplogic closed 1 year ago

ciplogic commented 1 year ago

Went trough all high level optimizations and fixed them or at least they look fixed enough that all games I tried them with PCode optimizations ON, seem to start (I may miss one, but the point remains, that it is more stable now). Especially some transforms were breaking the code, around IF/GOTO pair, but all seem to work now. This MR is built on top of previous MR, so it is a bit larger.

As for now these are mostly restructuring code, so they don't improve performance (yet), excluding that GOSUB is transformed into a GOTO.