ReviewOS

zig-utils/zig-js

WebAssembly Core 2.0: implement multi-value functions and control flow

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

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

Implement multi-value end to end without retaining MVP-only single-result shortcuts.

Acceptance:

  • Decode and validate multi-result function types and type-index block signatures.
  • Generalize validator control frames, branches, calls, returns, and unreachable polymorphism to ordered result vectors.
  • Generalize interpreter labels, calls, returns, host imports, and exported JavaScript functions to ordered result vectors.
  • Implement JavaScript API multi-value array results and cross-instance/import behavior.
  • Add focused binary, validator, executor, and API coverage with stable disabled-feature diagnostics.
9 days ago

Implemented and verified on main.

Evidence:

  • Multi-result signatures, type-index blocks, generalized validator/control/runtime, export arrays, and iterable imports: fcae6362
  • Loop parameters, vector branches, exact import arity, and cross-instance behavior: 0abf692c
  • br, br_if, br_table, calls, implicit else, and cross-instance linking: 53a39b0c
  • Explicit multi-result return and registry ownership: 27eafb9d
  • Published status and benchmark applicability: a9e617e5
  • Complete focused WebAssembly suite: 141/141 passed, 0 skipped, 0 failed, 0 leaked
  • Feature-registry drift verifier: 4 profiles / 12 pinned features

The structural parent #263 remains open for reference types (#271), bulk memory (#272), and the exact upstream score (#273).

Sign in to comment on this issue.