ReviewOS

zig-utils/zig-js

WebAssembly SIMD: v128 type, binary, validator, and runtime foundation

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

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

Establish the complete lane-preserving v128 substrate before instruction families land. Backward compatibility is not a constraint; prefer the clean final representation.

Acceptance:

  • Pin and check in the exact fixed-width-SIMD opcode/type inventory from WebAssembly/simd commit a78b98a.
  • Decode v128 value/block/function/local/global types and all 0xfd immediates with deterministic disabled/invalid diagnostics.
  • Validate v128 signatures, locals, globals, constants, control flow, and instruction stack effects from the inventory.
  • Add an exact 128-bit operand/local/global/result representation that preserves every lane bit and remains distinct from GC references.
  • Define the public-JS boundary behavior for v128 imports, exports, globals, and test-only raw-lane access.
  • Add focused zero-skip/leak tests and update the feature registry/docs.
9 days ago

Foundation checkpoint pushed in 11885483.

  • Added feature-gated v128 value/block/function/local types with deterministic disabled-feature diagnostics.
  • Added a distinct exact u128 Wasm slot, zero-initialized v128 locals, signature matching, and GC root classification that never conflates vector bits with numeric or reference slots.
  • Defined the ordinary JS boundary as opaque: v128 cannot be coerced through numeric/global/function value paths; later corpus evidence will use an explicit test-only raw-lane path.
  • Focused tests: 9/9 combined, zero skips/failures/leaks.

Next: check in the exact pinned 0xfd inventory and make decoding/validation data-driven over that complete surface.

9 days ago

Completed through a3b8ea3. The machine inventory pins all 236 legal 0xfd subopcodes and 56 official SIMD corpus files; the registry verifier locks commit/count/name/immediate drift. v128 types, exact u128 slots, globals/constants/locals/control, all immediate decoders, reserved holes, complete stack signatures, lane/shuffle bounds, and memory alignment validation are implemented. The raw conformance boundary round-trips all 128 bits through functions and Globals while ordinary JS access rejects opaque v128 values. All focused batches and the verifier are green with zero skips/failures/leaks.

Sign in to comment on this issue.