Design-first deliverable for iteration 7b (no runtime/compiler code yet). docs/examples/gc-cycle explains, by example, how pointers flow through the heap and the collector's mark-sweep logic: - types.wo: Node (self-referential ?Node -> inferred `gc`/traced) vs Segment (acyclic -> `owned`, deterministically dropped) - main.wo: ring_demo builds a->b->c->a and abandons it; owned_demo shows the drop path with no collector - README.md: the model (ownership frees the 99%, tracing only the cyclic/ aliased residue, inference decides), the 16-byte header rewrite (retire rc+borrow -> 8-byte sweep-list link, colors in flag bits), where a traced pointer lives (root via pc gc-mask / GCREF field / container), and the tri-color incremental algorithm with the Yuasa deletion barrier. Two mermaid step diagrams (heap+roots, collector cycle) + the owned contrast. Grounded in the approved spec (2026-08-11-inferred-gc-mark-sweep-design.md) and the real runtime structures (obj.h/wob.h: wo_hdr, WO_K_GCREF, arena, wo_obj_size). Run status: honest — the sample does NOT build today; woc reports WO-E301 (use-after-move at the ring-closing store), which is exactly the aliasing that "traced classes alias freely" unblocks under 7b. README records this. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
11 lines
480 B
TOML
11 lines
480 B
TOML
name = "gc-cycle"
|
|
version = "0.1.0"
|
|
description = "Iteration 7b target sample: inferred GC + incremental mark-sweep — a cyclic type (traced) vs an acyclic one (owned)"
|
|
|
|
[runtime]
|
|
wo = ">= 0.1"
|
|
|
|
# `woc <dir>` builds target/gc-cycle. No runtime path pinned (portable); an
|
|
# installed woc self-locates wovm, an in-repo build passes WO_RUNTIME.
|
|
# NOTE: this sample targets iteration 7b (inferred GC). It does not build on
|
|
# today's toolchain — see README "Run status".
|