Sure, that’s an interesting thing you can do and get a Lua JIT, but I don’t see how that is going to be close to the original, tracing LuaJIT, where much of the simplicity (AFAICT) comes from how it creatively punts on several hard backend problems: optimizing in the presence of complex control flow (an linear sequence possibly followed by a loop, that’s all you get on the lowest level), tricky monomorphization decisions (the types you traced are the types you codegen for), eliminating allocations (exiled to trace exits as much as possible), etc.