Current method of emitting bytecode proved to be unwieldy and a show-stopper for more advanced features in the VM; for example, it prevents the introduction of immediate values, and using multiple register sets in a single instruction.
After a program is tokenised, parsed, linearised to simple opcode stream, statically analysed, and passes compile-time sanity checking it is safe to assume that the resulting token stream can be directly converted to bytecode.
Current method of emitting bytecode proved to be unwieldy and a show-stopper for more advanced features in the VM; for example, it prevents the introduction of immediate values, and using multiple register sets in a single instruction.
After a program is tokenised, parsed, linearised to simple opcode stream, statically analysed, and passes compile-time sanity checking it is safe to assume that the resulting token stream can be directly converted to bytecode.