ReviewOS

zig-utils/zig-js

WebAssembly Core 2.0: implement reference and table types

#271
Closed chris opened this 9 days ago ·
9 days ago

Parent: #263 Depends on: #262 Roadmap: #142, #134

Implement the reference-types-owned value and table surface, preserving precise-GC edges.

Acceptance:

  • Decode and validate funcref value positions, typed select, ref.null, ref.is_null, ref.func, table.get, and table.set.
  • Support multiple tables and explicit table indices where the selected revision requires them.
  • Execute table.get/set plus table.grow/size/fill and preserve null/function identity across instances.
  • Integrate reference stack/local/global/table edges with precise GC and cross-instance linking.
  • Add JavaScript API and focused binary/runtime coverage with stable disabled-feature diagnostics.

Child issue map

  • #274 — typed reference slots and precise-GC publication
  • #275 — reference instructions and multi-table runtime

Implementation order

Land #274 first so every externref location has a sound liveness model before any module can enable reference-type opcodes. Then #275 implements the binary, validator, runtime, and JavaScript surfaces on that substrate.

9 days ago

#274 is complete on main. Tagged numeric/funcref/externref slots now publish through ordinary and no-GIL parallel precise GC, typed calls preserve identity, globals clear roots exactly on overwrite, and return/checkpoint/trap/unregister paths have forced-GC coverage. The focused Wasm suite is 145/145 and the dedicated no-GIL proof is 3/3, both with zero skips, failures, or leaks. Proceeding with #275 for the instruction and multi-table surface.

9 days ago

#271 is complete through its two children: precise reference slots/GC publication in #274 and the full feature-gated instruction, typed multi-table runtime, JS boundary, and cross-instance surface in #275. Focused evidence is 153/153, plus the dedicated no-GIL externref proof and strengthened explicit-table witness, all with zero skips/failures/leaks. README/docs are current at bfb22343.

Sign in to comment on this issue.