New execution mode: ./run vm <file.j> compiles AST to bytecodes and runs them in a while/switch loop. Ints/floats live on the stack (no heap allocation), ~7.7x faster than the tree-walking interpreter. Implements: opcodes, compiler with backpatching (if/while), stack VM with arithmetic, comparisons, variables, strings, and print/println. Reorganizes backend into src/backend/eval/ and src/backend/bytecode/.
5 lines
53 B
Plaintext
5 lines
53 B
Plaintext
x = 0
|
|
while x < 1000000000:
|
|
x = x + 1
|
|
println(x)
|