-
v5.2.0 — Native Codegen: Variables, Control Flow & Logical Ops
StableSome checks are pendingCI / build-and-test (push) Waiting to runreleased this
2026-03-16 12:39:45 -03:00 | 127 commits to main since this releaseWhat's New in v5.2.0
Self-Hosted Native Code Generator
Koder can now compile programs to standalone x86_64 ELF binaries (238-439 bytes) via its self-hosted pipeline:
source → tokenize → parse → compile → native x86_64 ELF → executeSupported in native codegen:
- Integer constants and arithmetic (+, -, *, /, %)
- String output (inline sys_write)
- Variables (STORE/LOAD with rbp-relative addressing)
- All comparisons (<, >, ==, !=, <=, >=)
- Logical operators (&&, || with short-circuit)
- If/else with label patching
- While loops with backward branching
- Function definitions and calls (FUNC/CALL/RETURN with stack frames)
- Multiple functions in same binary
- Booleans, nil, POP, DUP
15 Native ELF Tests Passing
Test Program Result Size NT1 puts 4242 238B NT2 1+2*37 260B NT7 fib(10)iterative55 410B NT11 puts "Hello, Koder!"Hello, Koder! 264B NT13 add(3,4)7 346B NT14 square(9)81 325B NT15 double(7) + triple(5)14, 15 439B Bootstrap Self-Hosted Pipeline
- 3800+ lines of Koder processing Koder
- 11 VM bytecode tests + 15 native codegen tests
- Full tokenizer, parser, compiler, VM, and native codegen
Parser Fixes
- Added % (modulo), !=, <=, >= operators
- Added string literal tokenization (double/single quotes)
- Fixed JUMP dispatch operator bug
Infrastructure
- Version 5.2.0
- 20 Rust integration tests passing
- Backlog #035: Native HTTP protocol & server (pending)
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads