Update README.md

Dibyendu Majumdar 9 years ago
parent 97419b7bf9
commit 6412e87780

@ -142,8 +142,8 @@ I will probably need to augment some existing types such as functions and tables
I intend to first add the opcodes to the VM before starting work on the parser and code generator.
Challenges with Lua Bytecode structure
--------------------------------------
Modifications to Lua Bytecode structure
---------------------------------------
An immediate issue is that the Lua bytecode structure has a 6-bit opcode which is insufficient to hold the various opcodes that I will need. Simply extending the size of this is problematic as then it reduces the space available to the operands A B and C. Furthermore the way Lua bytecodes work means that B and C operands must be 1-bit larger than A - as the extra bit is used to flag whether the operand refers to a constant or a register. (Thanks to Dirk Laurie for pointing this out).
If I change the sizes of the components it will make the new bytecode incompatible with Lua. Although this doesn't matter so much as long as source level compatibility is retained - I would like a solution that allows me to maintain full compatibility at bytecode level. An obvious solution is to allow extended 64-bit instructions - while retaining the existing 32-bit instructions.

Loading…
Cancel
Save