writeonce/compiler/test/golden/bc/elision.expected
shoney.arickathil 4a62488bc6 feat: retire RC from the emitter and the format — .wob v4 (7b Phase 3b)
The compiler no longer emits reference-counting ops anywhere, and the format
reserves them. With Phase 3a's collector this completes the runtime half of
iteration 7b: spec success criteria 3 (no RC ops in any image, opcodes
reserved) and 6 (corpus ASan-clean) are met — `just oop-accept` is fully green.

- owner.ml: the rc machinery is deleted outright — rc_site/rc_op types, the
  rcs table, fn_rcs/rc_groups/rc_escaped, record_rc, release_gc, gc_escape,
  resolve_rc, and the clobber rule (its only consumer was elision). The
  `push`-of-a-gc-value RC_INC special case is gone (the bug class cannot recur
  without RC). Drop tables (owned + LGc kinds) are untouched — the gc mask is
  what feeds the collector's root maps.
- emit.ml: emit_rc, the v_rc view, the escape-acquire anchor, and every
  caller deleted; assignment displacing a traced value emits nothing (the VM's
  store barrier owns it); scope-ended LGc handles clear their gc-mask bit so
  root maps stay precise.
- .wob v4: WOB_VERSION 3 -> 4 in wob.h + emit.ml + disasm.ml + the runner's
  loader battery; opcodes 27-28 removed from the enum/jump table/interpreter
  and REJECTED by the loader like any unknown opcode.
- dump.ml: the == RC == owner-dump section is gone; 6 goldens re-blessed
  (owner dumps lose the section, elision.wo's bc dump loses its RC ops).
- runner.ml: rc-table/ELIDED assertions deleted; the elision test now asserts
  the WHOLE image contains no RC op; the table-contract sweep asserts rc ops
  never appear.
- test_unwind.c: the rc-opcodes test becomes two — the loader rejects reserved
  opcode 27, and an abandoned traced instance is freed by rt_destroy
  (ASan-proven).

Verified: woc-test 540/0 + test_diag 14/0; runtime test + test-iso all suites
ASan/UBSan (test_unwind 12/0); cli_smoke; oop-e2e 79/0 (v4 images end to end);
employee 8/0; log-watcher 7/0; ring runs + reclaimed (freed=3) with zero RC
ops in its image; `just oop-accept` ALL CRITERIA MET.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 17:07:43 +02:00

50 lines
1.2 KiB
Text

== CONSTANTS ==
k0 TEXT "Cache"
k1 TEXT "Holder"
k2 TEXT "hits"
k3 TEXT "peer"
k4 TEXT "cache"
k5 TEXT "read"
k6 TEXT "proven"
k7 TEXT "main"
k8 INT 41
k9 INT 1
== CLASSES ==
c0 Cache flags=gc fields=[hits:SCALAR, peer:GCREF]
c1 Holder flags=- fields=[cache: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 6->31 12->28
drops: pc 3 owned={} gc={r0}
drops: pc 6 owned={r1} gc={r0}
drops: pc 13 owned={} gc={r0}
0000 NEW r0, c0
0001 LOADK r1, k8
0002 SETF r0, f0, r1
0003 NEW r1, c1
0004 MOVE r2, r0
0005 SETF r1, f0, r2
0006 MOVE r4, r1
0007 CALL r4, m1
0008 MOVE r3, r4
0009 LOADK r5, k9
0010 ADD r2, r3, r5
0011 BUILTIN r2, r2, print_int
0012 DROP r1
0013 RET0
== ENTRY ==
m2