lua-users home
lua-l archive

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

> 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).