[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Any documentation on Lua's bytecode instruction set or VM?
- From: "Leandro Candido" <enclle@...>
- Date: Wed, 17 Dec 2003 00:16:48 -0200
Hello Joe,
...
> which is pretty good, except for the fact that it cannot explain
> a few instructions like getupval and setupval. I may not need
> them anyway.
Eheheh. Ooops. Without GETUPVAL and SETUPVAL opcodes you can't access/see
global variables (level - 1 in the scope - upvalues). Example (see with
luac -l -p):
function returnAfunc()
local x = 10;
return function() print(x) end
end
returnAfunc()();
I'm trying to make a translator of lua bytecode to C code, I think this is
the opposite of you.
Well, I have learned a little, then, you are free to ask me (please in
pvt), and if your questions are related with this little knowledge, I will
try to explain to you.
(PS: To ALL: Roberto Ierusalinsk's Lua Book cover this?).
The God's Peace,
Leandro.