ReviewOS

zig-utils/zig-js

WebAssembly tail calls: inventory, decode, and validate return-call opcodes

#288
Closed chris opened this 8 days ago ·
8 days ago

Parent: #266 Roadmap: #142, #134

Implement the exact pinned tail-call binary and validation surface before changing execution.

Acceptance:

  • Inventory every opcode, immediate, stack signature, validation rule, and proposal corpus file at WebAssembly/tail-call@a6003d06aefef41e20a3e36fe2e500062555c895.
  • Decode and feature-gate return_call and return_call_indirect with exact byte-offset diagnostics.
  • Validate direct/indirect type compatibility, table/reference constraints, indices, unreachable-polymorphic stacks, and function-result tail compatibility.
  • Add focused malformed/valid binary tests with deterministic disabled-feature rejection.
  • Check in the machine-readable opcode/file inventory and drift verifier.
8 days ago

Completed in d80c6252 and 2f1238d0.

Delivered:

  • exact 0x12/0x13 feature-gated decoding and immediate order from the pinned proposal;
  • direct and indirect validation for indices, funcref tables, params, exact current-function results, and unreachable-polymorphic stacks;
  • deterministic disabled/truncated-byte diagnostics and focused valid/invalid binary tests;
  • checked-in two-opcode/two-file/119-command inventory plus registry/runtime drift verification;
  • README and WebAssembly status documentation that explicitly leaves frame-replacing execution to #289.

Evidence with exact CI Zig 0.17.0-dev.1417+20befa4e6: 15/15 tail-filtered tests passed, 0 skipped, 0 failed, 0 leaked. The feature-profile/inventory verifier is green.

Sign in to comment on this issue.