lua-users home
lua-l archive

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

Two ways I see:
a) A bytecode to native (re)compiler with te help runtime lib
b) Lua2C

a) easier to implement, faster
b) harder and would probably lead to slower code but highly portable

BTW. Has somenone already written a LARL parser generator  for lua?
(something similar to C's or python's yacc or perl's yapp).

On 2/22/06, David Given <> wrote:
> On Wednesday 22 February 2006 06:36, Dave Dodge wrote:
> [...]
> > For those who aren't familiar with tcc, the word "fast" is an
> > understatement.  tcc is so fast compared to a typical C compiler that
> > you can hardly believe it's actually compiling the code.  As a
> > demonstration, the author produced a bootloader that could boot the
> > Linux kernel from sourcecode in under 15 seconds.
> It also produces *extremely bad* code. At least for ARM. (I can't read Intel
> assembly.) But it's a very interesting idea.
> Has anyone seen Lightning? It's a run-time machine code generation library
> that allows you to generate, uh, machine code from a MIPS-like abstract
> assembly language. Currently it supports ia32, SPARC and PowerPC. It's a bit
> clunky but it does seem to work.
> I'm currently thinking about a project using Lua for doing very low-level
> stuff --- writing an operating system in it, basically --- and so have been
> looking into this kind of thing as a hardware interface.
> --
> +- David Given --McQ-+ "In America, family has become a code word for
> |    | something that you can put a five-year-old in front
> | ( | of and come back secure in the knowledge that your
> +- --+ child not will not have been exposed to any ideas."

This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan