Re: [ANN] llvm-lua 1.0
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [ANN] llvm-lua 1.0
- From: Florian Weimer <fw@...>
- Date: 2009年6月12日 21:40:12 +0200
* Mike Pall:
> I guess it would be easiest to do this in the parser. Whenever a
> chain of table lookups starting with a global is made, do this
> lookup in parallel on the global environment which is active during
> parsing. If the endpoint of the lookup is one of the builtin
> functions, put it into the constant table and emit a simple load
> from the constant table (instead of the chain of table lookups).
Or you could perform a special metatable lookup ("__compileindex", but
this would still have to be controlled by a flag). If you figure out
how to pass context from the compilation to the metamethod, you've got
a macro system (it's probably closer to Forth immediate words,
though).