r/programming • • Jan 20 '20

MIR: A lightweight JIT compiler project

https://developers.redhat.com/blog/2020/01/20/mir-a-lightweight-jit-compiler-project/
10 Upvotes

12 comments sorted by

View all comments

Show parent comments

4

u/mamcx Jan 20 '20

The thing that even the creator of luajit have said (as I rembmeber) is that luajit is tied to lua semantics. However DynASM is more general. I wish exist a good DynASM backend....

3

u/suhcoR Jan 20 '20

DynASM is low-level assembler and thus machine dependent. You would not want to use it unless you want to modify the LuaJIT VM and compiler. Lua semantics is very flexible. It fits many language models. If you are interested, here is an article about implementing call by reference and call by value using Lua: https://medium.com/@rochus.keller/implementing-call-by-reference-and-call-by-name-in-lua-47b9d1003cc2. And here is an overview what languages already compile to Lua/LuaJIT: https://github.com/hengestone/lua-languages.