[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: detecting undefined variables--a new mixed approach
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 25 Mar 2008 10:29:20 -0300
> So, as an example, a function might contain lines
> like:
> label "loop_reentry"
> ...
> goto "loop_reentry"
> Then after loading, it would be possible to run through the opcodes,
> identify the getglobal/loadk/call of these label and goto constructs,
> and replace them with "move r0 := r0" and "jump offset" respectively.
I did exactly that once. It works fine and is easy to implement. Not that
we want to add goto to Lua... (which is why I never posted the code).
See http://lua-users.org/lists/lua-l/2004-09/msg00244.html