Open rwy7 opened 7 years ago
Well, you still need 4 bits for 9 bytecodes but you can encode the OpCode two nibbles (4:4 ).
So JMP as JMP:
but essentially the 9 become categories and you will have more than "9" bytecodes.
We should look at the format anyhow, we currently encode it at 8:24 so everything is the same size but the param(24) is unused in many bytecodes, so if we change it to variable size instructions we can get tighter packed instructions.
Right now, the interpreter has a whole pile of conditional jump bytecodes. Can we reduce the number and help get us back to 9 bytecodes?
Possible implementations: