Compiler Kickoff
Started working on a bytecode compiler today which is a pretty big deal for the project. Up until now Helix has just been walking the AST directly to run code, but the goal is to eventually compile programs down to bytecode and run them on a virtual machine instead, which should be way faster and more interesting to build.
The first thing that actually works is arithmetic. You can write something like 1 + 2 * 3 and it’ll go through the compiler and come out as a sequence of opcodes. Also threw in a disassembler so you can actually see what bytecode gets generated, which is super useful for debugging.
Next up is getting variables and control flow working through the compiler, and then eventually building the VM that’ll run all of it.