Implement bytecode backend #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Recently I implemented a second tree-walk interpreter in the compiler branch (the first interpreter resides in the main branch, and is obsolete in many ways as the language being implemented has changed since then). I had at first intended to keep this interpreter as a source of truth for when I implement the byte code VM and the code generation for it, but now I am moving back on this decision.
The interpreter will soon be removed from the source, and a byte code interpreter should take its place.
A Code Object model is best suited for the language I am implementing. A linear stream of bytes is both more difficult to emit, and less similar to the semantics of the language being implemented.
Further goals for the VM could include an object file format we can serialize the in-memory byte code into, however that is not a priority at this stage.
A working byte code format, along with a backend to emit code, and a VM to execute the code, has been implemented. Further improvements to the byte code will be necessary, however those are beyond the scope of this issue. The interpreter has been fully removed.
As such, closed.