Building a baseline JIT for Lua automatically(sillycross.github.io) |
Building a baseline JIT for Lua automatically(sillycross.github.io) |
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.