Re:Dennis Ritchie’s first C compiler (c. 1972)
by jashmatthews on Thursday March 11, 2021 @04:48AM
(#26422197)
LuaJIT 1.x uses DynASM for JIT but LuaJIT 2.x doesn't and instead uses the IR to ASM compiler in https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_asm.c
A program using DynASM doesn't depend on Lua or a C compiler to generate assembly at runtime but you need both to build it.
DynASM is actually really cool.
I almost forgot: apropos bootstrapping, because LuaJIT requires Lua to build, it includes a single-file, stripped down version of PUC Lua 5.1 which it can build to bootstrap itself if the host lacks a Lua interpreter.