lua-users home
lua-l archive

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




On Thu, Nov 15, 2018 at 7:25 PM Philippe Verdy <verdy_p@wanadoo.fr> wrote: 
anyway I think that what the Lua authors name "registers" is abusive, it is just a frame format, except that it uses a separate store than the call stack, and that the callstack itself is not necessarily represented as a single vector but can as well be a chained list: VM are free to use the represetnation that is more convenient to them and the integration contraint or memory constraints.

The word 'registers' is used to differentiate the PUC Lua interpreter's approach of defining the VM from the typical stack machine instruction set, where most of the time the operands are the top few entries of a stack, and the instructions do not explicitly reference them. At the right level of abstraction (the VM instruction level) they are 'registers'. At the VM implementation level they're arrays of numbers/pointers with tag bits. I have to disagree with the use of the word "abusive" here.