lua-users home
lua-l archive

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


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.

http://www.llvm.org is the URL.

Mike

On Nov 20, 2007 8:23 AM, David Jones <drj@pobox.com> 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
>