lua-users home
lua-l archive

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

I don't know if anyone else would be interested, but I would like to see a dynamic JIT style compiler for LUA opcodes to machine code. It would be callable inside the LUA via a 'JIT_Compile(<function>)' interface perhaps? This is one method I have thought about implementing:

Look through/Learn the LUA internal Opcode C Source.
Bundle TinyCC with LUA.
Write a routine to parse LUA opcodes into one C source program, wrapped as a LUA function.
Pass that program to TinyCC to compile dynamically.
Get the function symbol back from TinyCC and register it with LUA.

Of course, writing the opcodes into assembly would be easier, but I figured TinyCC could offer a nice portable solution since it has support for various architectures.


High-speed Internet access as low as $29.95/month (depending on the local service providers in your area). Click here.