In the register based lua virtual machine are the registers fixed size? Or is it a dynamic structure?
I found an bytecode example here at page 17 where the constant string "hello" is loaded into a register, so it must be dynamic? Isn't this uncommon for registers?
http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf
Each register contains a Lua value. Lua values are implemented in C as tagged unions. See also: The Implementation Of Lua 5.0. This tagged union stores small types (booleans, numbers) by value and everything else (strings, tables, functions, etc.) as a pointer. So the size of a register is constant, though larger than one native machine word.