[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Optimizations during compilation
- From: Mark Hamburg <mhamburg@...>
- Date: Fri, 18 Jun 2004 12:17:07 -0700
on 6/18/04 11:00 AM, Roberto Ierusalimschy at roberto@inf.puc-rio.br wrote:
> A nice project would be a source-code optimizer for Lua (which could be
> used as a pre-processor for luac, for instance). It could easily perform
> constant propagation, common-subexpression ellimination (eventually with
> switches to control how much it could assume about metamethods), loop
> optimizations, etc.
A good starting point might be a Lua-based intermediate format for Lua code
with a parser to generate it and a back end to consume it and convert it to
code for the VM. I probably wouldn't run the compiler through this format
for speed reasons, but it could make an interesting Lua library. How
interesting and where it would rank in the priorities is a different matter.
Mark