lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello all,

some context:
I am developping a back end compiler for some specific hardware. Part
of the back end is just an intermediate representation (IR) on which I
am performing instruction selection/scheduling and register
allocation. I am using lua(JIT) for the complete code base.

As executing the code on the HW is somehow difficult, I am starting to
write a translater ASM->LuaJIT which turns the assembly into a lua
string directly executed by the Luajit VM.

To handle all branch instructions, I'll put each basic block into a
function and use tail call recusion to simulate goto.

So, the question is:

does tail call recursion abort traces?

To have a perfect environment, I would like to have most of the code
actually compiled just-in-time :-)

Cheers,
Ben