Re:Luvit – Asynchronous I/O for Lua
by s_baby on Saturday March 16, 2013 @04:08PM
(#5386581)
I thought Lua used a register based VM.
[ Parent
| on HN ]
Re:Luvit – Asynchronous I/O for Lua
by wereHamster on Saturday March 16, 2013 @04:26PM
(#5386665)
No, it's a stack machine. See http://www.lua.org/manual/5.1/manual.html#3
Re:Luvit – Asynchronous I/O for Lua
by munificent on Saturday March 16, 2013 @04:34PM
(#5386705)
You're both right. It has a stack that it uses for callframes and local variables, but the opcodes have operands to directly reference variables on it by index. In other words, it treats all of the stack for a given callframe as a set of registers.