lua-users home
lua-l archive

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

Humberto, not to mention that LLVM's target is native code and yours is the Lua VM. :) An Lua-to-LLVM JIT is a lot of work, even if you reuse some parts of the Lua interpreter (garbage collector, layout of values, most of the standard library).

A simpler application of LLVM is dynamically generating native code from Lua, like Javier's binding to TinyCC. LLVM is pretty easy to embed, and the native code it generates is comparable to gcc's -O3.

Fabio Mascarenhas

On Nov 20, 2007 4:51 PM, Humberto S. N. dos Anjos <> wrote:
Maybe, but this is for my master's, so I'm supposed to do the optimizations myself :)

On Nov 20, 2007 3:04 PM, Mike Panetta < > wrote:
Would writing a front end to LLVM accomplish what you want?  Its a
compiler that can do both compile time and run time optimization
through running its 'bytecode' in a jit.  I have never used it, only
looked at it, but it seems interesting enough. is the URL.


On Nov 20, 2007 8:23 AM, David Jones <> wrote:
> On 20 Nov 2007, at 09:40, Miles Bader wrote:
> >
> > I suppose an important adjunct to a Lua compiler would be a way for
> > program writers to add annotations declaring their intent about such
> > things (e.g.  common-lisp's "declare" special-form).
> I have thought so for a long time (in fact I think every language
> should have something similar to Common Lisp's "declare"), and
> occasionally I try and think of Lua-like ways of adding it to the
> core language.  To me it seems like the best candidate for a new
> language feature.  A declaration feature that is extensible in a way
> that language processors (like the PUC-Rio compiler, documentation
> tools, test harnesses) can invent declarations for their own use, but
> can still tell when they come across a mandatory declaration that
> they don't understand (so that they can bail).  Like critical chunks
> in PNG.
> drj

Humberto S. N. dos Anjos

<insert witty quote here>