● M5 complete — and with it, all six milestones. Final just ci is green, just diff-test matches the oracle. #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "M5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
M5 summary
Binary size: 4.4M → 676K. The surprise: the DWARF wasn't coming from -g at all — it rides in from the runtime
archive's object files (Rust std debug info), and the linker copies it unless told otherwise. Release links now
pass -Wl,--strip-debug; --debug builds keep DWARF + -O0. That puts plgc binaries under the patch-seq 730K bar.
Guarded, not just measured: new tests/binary_size.rs in just ci — a 1.3M size ceiling (catches a lost linker
flag or runtime bloat) and an ldd check enforcing the standalone contract: nothing beyond
libc/libm/libgcc/loader, ever.
Script mode: #!/usr/bin/env plgc works end-to-end — ./greet.pl --query "greet(X,Y)" compiles to a temp binary
and execs it. The parser blanks a leading #! line, preserving error line numbers.
Docs trued up: COMPILATION_MODEL.md now honestly states what's inline (dispatch switches, control flow,
constants) vs. runtime calls (head unify, arithmetic eval) with inlining as the named escape hatch; README
rewritten with real numbers; footprint recorded in the ROADMAP.
The project, end to end
┌────────────────┬─────────────────────────┬───────────────────────────────────────────────────────────────┐
│ │ patch-prolog (v1) │ patch-prolog2 │
├────────────────┼─────────────────────────┼───────────────────────────────────────────────────────────────┤
│ "Compile" │ scaffolds cargo │ LLVM IR → clang, needs nothing but clang │
│ │ project, needs Rust │ │
├────────────────┼─────────────────────────┼───────────────────────────────────────────────────────────────┤
│ Execution │ tree-walking │ native code, choice points, musttail TCO │
│ │ interpreter, always │ │
├────────────────┼─────────────────────────┼───────────────────────────────────────────────────────────────┤
│ 5k-chain query │ ~10s │ 3ms (first-arg indexing) │
├────────────────┼─────────────────────────┼───────────────────────────────────────────────────────────────┤
│ hello-world │ n/a (cargo-built │ 676K, libc/libm only │
│ binary │ interpreter) │ │
├────────────────┼─────────────────────────┼───────────────────────────────────────────────────────────────┤
│ Semantics │ the spec │ byte-parity (200-assertion ported corpus + 57-goal diff │
│ │ │ harness), ISO where v1 had bugs — each documented │
└────────────────┴─────────────────────────┴───────────────────────────────────────────────────────────────┘
Test totals: 123 runtime + 48 frontend + 54 shared/compiler unit, 89 ported v1-corpus, 14 M3-suite, 14
integration, 12 golden-IR, 2 binary-hygiene, 1 differential — all green in ~12s of CI test time.
What's deliberately left on the table (ROADMAP "Future"): REPL/LSP (v1 had them; they'd drive the same compiled
runtime now), WAM-level codegen and inline fast paths if performance ever demands, copying GC, bagof/setof. The
reserved_builtin machinery is gone entirely — the language surface is exactly v1's, compiled.