▲ | alexisread 2 days ago | |
In my spare time I'm looking at JIT from a different perspective. https://github.com/dan4thewin/FreeForth2/tree/master This is a Forth with a few tricks, namely using flow control instead of a compilation switch flag. This, always compiling into an eval buffer before execution, and use of macros, allows you to unroll a function/word/expression before execution, which makes it fast. Macros can be used to do stack caching (though it doesn't here) and cross compilation etc. Lastly, Freeforth caches the top two stack items in registers, so at compile time it avoids swap by register renaming. This all is quite a different approach and somewhat language specific. Just wanted to highlight the variety, as uxn is not actually that far from forth and has such a different approach. |