Re:Building a baseline JIT for Lua automatically
by sillycross on Saturday May 13, 2023 @01:42AM
(#35925928)
That's an interesting approach :)
Though it only works if the control flow in the language is exactly "paired" (no continue/break, no goto, etc), I guess?
This reminds me of how Forth `if` and `then` can be compiled in a single pass -- `if` writes the branch instruction and pushes the current instruction pointer to the stack, and `then` pops it and patches the instruction to point to the current instruction pointer.