3 ms·
> No one has implemented a serious high level systems language, except in a high level systems language, for a long time now. LuaJIT is a prominent counterexa
by divs1210 6y ago
> No one has implemented a serious high level systems language, except in a high level systems language, for a long time now.
LuaJIT is a prominent counterexample. The base interpreter in written in assembly for performance. It comes with its own tradeoffs, especially portability.
- wahern 6y agoLuaJIT uses it's DynASM library for both static and JIT code generation. DynASM is implemented in a mixture of Lua and C, and Lua is of course implemented using C. So LuaJIT actually depends on a C compiler to generate assembly. Plus, not all of LuaJIT is implemented using assembly, only some critical hotspots (e.g. the bytecode interpreter loop). The rest is just C. 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.
- jashmatthews 6y agoLuaJIT 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 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.
- deleted 6y ago[deleted]