4 ms·
LuaJIT 2.x only uses Dynasm to generate the bytecode VM and not for actual JIT compilation. Runtime JIT is done differently. Dynasm is actually written in Lua.
by jashmatthews 6y ago
LuaJIT 2.x only uses Dynasm to generate the bytecode VM and not for actual JIT compilation. Runtime JIT is done differently.
Dynasm is actually written in Lua. There's a good guide by Peter Crawley on how to run it here:
https://corsix.github.io/dynasm-doc/tutorial.html#compiling https://corsix.github.io/dynasm-doc/tutorial.html#compiling
- tyingq 6y agoYes, I suppose "in the same way earlier versions of LuaJIT worked" would be more accurate.
- jashmatthews 6y agoLuaJIT 1.x was also an enormous disappointment so it’s a bit perplexing that the PHP team would try something which probably sucks.
- rurban 6y agoDon't believe him. The php jit us entirely different from Lua hit, other than using dynasm. Even raku is using dynasm. The PHP jit is actually much easier to understand. With SSA for all tiers, CFG, but not that much type speculation at all. The advantage of php, Perl, Ruby over JS is that objects don't vary that much, methods are not overridden that much, and arrays and hashes are much easier. The php jit is at least 10x easier and smaller than JSC. Also C, not C++.
- tyingq 6y agoUnderappreciated comment and upvoted.