lua-users home
lua-l archive

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


Hi,

David Jones wrote:
> On May 19, 2006, at 22:49, Mike Pall wrote:
> >I guess this is the old problem with language definition vs.
> >implementation behaviour. There's no alternative implementation
> >of Lua 5.x, so there was never a need for a clear separation.
> 
> Couldn't your own LuaJIT be considered an alternative implementation?

Not really. At least not the current version. LuaJIT tries to
reuse as much as possible of the Lua core. It's closely tied to
the original implementation. The C code and its semantics are the
archetype for the generated machine code.

[
There are many obvious benefits to this approach, but is has
drawbacks, too. The internal structures of the Lua core are
optimized for execution by an interpreter and for maximum
portability. This puts heavy constraints on the design. These in
turn impact performance of JIT compiled code quite a bit.

If I had to implement a pure JIT compiler for Lua from scratch,
I'd use a completely different design.
]

Bye,
     Mike