Solution found

Posted by s on Dec. 4, 2008, 7:07 p.m.

If it doesn't fit, don't force it

That is a cheap way of saying "I'm too lazy to deal with it now"

Still need to figure shortcircuits

Got break working. Instead of extending the macro system, I extended the code parsing

goto:BREAK@f will transform into the next case of asm jmp BREAK(…)

Now to get brace name mangling to work with nested macros

Shortcircuited the ops

macro && !if{goto:ELSE@f}

macro || if{goto:BEGIF@f}

Which means that if statements now include a label at the beginning too. Yep, lots of labels. If I ever get to tinkering with optimization, I'm going to have to figure out label pruning. Which is a bit hard in ASM, since it might just happen that the label gets pushed on the stack. Assume that people won't use arithmetic on labels that they push?

Comments