writeonce/compiler/test/golden/bc/elision.expected
shoney.arickathil 79605cbb4f feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced
- `woc` now emits `.wob` that `wovm` runs: emit.ml lowers the typed,
  owner-annotated AST (scope-stack registers with a >64 WO-E401 diagnostic,
  Lua-style call windows, ICALL by slot, dedup const pool, drop maps, line
  tables, implicit terminators); disasm.ml backs `--dump-bc` goldens.
- Ownership lowering consumes the four owner tables verbatim; RESIDUAL is the
  only source of borrow ops, coalesced per operand. Review caught the emitter
  consuming only 2 of owner.ml's 4 residual producers — an assignment-anchored
  aliasing violation ran to exit 0 instead of trapping; fixed, plus a backstop
  raising WO-E404 for any residual region left unconsumed.
- Conformance harness `scripts/oop-e2e.sh` (`just oop-e2e`): four fixture
  kinds with exact outcomes — byte-exact stdout, one WO-E### anchored on
  `error CODE:`, numeric trap code, gc trace. 25 fixtures incl. pricing-demo
  logic, the ownership suite, and DB_STUB's parse-but-trap. `tests/` un-ignored
  so the corpus is actually tracked.
- `woc build` produces a self-contained binary: wovm copy + appended image +
  20-byte trailer, self-exec via /proc/self/exe. Verified relocated outside
  the repo, argless, and against adversarial trailer corruption.
- Milestone 1's five spec criteria all MET (`just oop-accept`). Criterion 3
  closed by WO-E405 — the entry must return `Int`, since program mode already
  says its return value is the exit code — which deletes the leak class
  without adding return-type metadata to the format. `gc/held-cycle` retired:
  an externally-held cycle is not expressible in a post-exit pump.
- New spec: inferred GC + incremental per-shard tri-color mark-sweep, retiring
  `@gc` and reference counting. Story gains iterations 7b (that work) and 9b
  (`@table`, relations, compiler-checked query); `.dev/reference` gains a
  sparse System.Linq checkout. Priority: 5→6→7 (log-watcher) then 7b, 8, 9, 9b.
2026-08-11 19:31:26 +02:00

50 lines
1.2 KiB
Text

== CONSTANTS ==
k0 TEXT "Cache"
k1 TEXT "Holder"
k2 TEXT "read"
k3 TEXT "proven"
k4 TEXT "main"
k5 INT 41
k6 INT 1
== CLASSES ==
c0 Cache flags=gc fields=[SCALAR]
c1 Holder flags=- fields=[GCREF]
== INTERFACES ==
== VTABLES ==
== METHODS ==
m0 read args=1 regs=2 [free fn]
lines: 0->20
drops: (none)
0000 GETF r1, r0, f0
0001 RET r1
m1 proven args=1 regs=3 [free fn]
lines: 0->24 1->25
drops: pc 1 owned={} gc={r1}
0000 GETF r1, r0, f0
0001 MOVE r2, r1
0002 CALL r2, m0
0003 RET r2
m2 main args=0 regs=6 [free fn] [ENTRY]
lines: 0->29 3->30 7->31 13->28
drops: pc 3 owned={} gc={r0}
drops: pc 7 owned={r1} gc={r0}
drops: pc 14 owned={} gc={r0}
drops: pc 15 owned={} gc={}
0000 NEW r0, c0
0001 LOADK r1, k5
0002 SETF r0, f0, r1
0003 NEW r1, c1
0004 MOVE r2, r0
0005 RC_INC r2
0006 SETF r1, f0, r2
0007 MOVE r4, r1
0008 CALL r4, m1
0009 MOVE r3, r4
0010 LOADK r5, k6
0011 ADD r2, r3, r5
0012 BUILTIN r2, r2, print_int
0013 DROP r1
0014 RC_DEC r0
0015 RET0
== ENTRY ==
m2