[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: detecting undefined variables--a new mixed approach
- From: "Peter Cawley" <lua@...>
- Date: Tue, 25 Mar 2008 13:21:20 +0000
I would like to see inspection and modification of functions
(instructions, constants, prototypes, etc.) moved in the debug
library. This would potentially open the door to 'edit and continue'
debuggers. Combined with a new "call to debug hook" bytecode, it would
make implementing breakpoints easier and more efficient.
I would also like to see syntax extensions through post-compilation
opcode modification. So, as an example, a function might contain lines
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.
On 25/03/2008, Luiz Henrique de Figueiredo <email@example.com> wrote:
> > All, actually.
> > (BTW, I'm not really sure what else lbci could be used for
> It does allow you to produce bytecode listings without luac -l, for instance.
> > but if it allowed modification of bytecodes, such as an assembler,
> > then things could get more interesting.)
> Sure! One caveat is that this would change all closures of the modified
> function... But it would be fun anyway. And not hard to implement. But
> would there be any interest in such a low-level assembler?