cp-14 · Runtime Systems
cp-01..cp-13 produce code. cp-14 builds the runtime that the code
calls into: a tagged value representation, a mark-sweep garbage
collector, and high-level operations (add, print, array indexing).
Build & run
cmake -S src/cpp -B build
cmake --build build
./build/tests/test_runtime # → 36/36 checks passed
./build/mlrt-demo # → hello, world [0, 1, 4] ...
What lives here
src/cpp/src/
value.hpp — tagged 64-bit Value
heap.hpp/.cpp — Object header + mark-sweep GC
runtime.hpp/.cpp — add / sub / mul / print / array ops
main.cpp — demo binary
tests/
test_runtime.cpp — 14 tests, 36 checks
The runtime is standalone — no LLVM, no IR. cp-17's capstone wires it into the JIT from cp-12.