nosuchtim / keykit

KeyKit - an algorithmic MIDI scripting language and GUI system
Other
98 stars 7 forks source link

Optimize2 #3451

Closed pbarada closed 9 months ago

pbarada commented 9 months ago

Two changes: 1) Add builtin keyerrfile() to intersperse debug messages from .k code with debug messages from .c code into bin/key.dbg. 2) Fix Optimization "I" that reverses a conditional branch over a goto, updates the conditional branch to the target of the goto, and removes the goto instruction. It failed to remove the goto instruction from instnode branch list, and also failed to update the instnode branch target of the conditional to be that of the goto instruction.

pbarada commented 9 months ago

Tim, I've added a test to verify the fix. Test fails on current dev branch and succeeds on optimize2.