Implement bytecode backend #5

Closed
opened 2026-04-07 14:47:51 +00:00 by haxala1r · 1 comment
Owner

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.

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.
haxala1r added this to the olisp project 2026-04-07 15:20:54 +00:00
haxala1r self-assigned this 2026-04-07 15:20:59 +00:00
haxala1r added reference compiler 2026-04-07 15:21:06 +00:00
haxala1r moved this to Done in olisp on 2026-04-25 22:28:17 +00:00
Author
Owner

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.

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.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: haxala1r/olisp#5