Skip to content

WebAssembly Core 3: execute extended constant expressions #387

Description

@chrisbbreuer

Parent: #366
Related: #263, #267, #134

The exact wg-3.0 audit exposed the remaining extended-constant-expression gap. zig-js now retains, validates, and evaluates the Core 3 integer arithmetic subset in every initializer context.

Exact affected roots at WebAssembly/spec@9d36019973201a19f9c9ebb0f10828b2fe2374aa:

Acceptance:

  • Decode the complete Core 3 integer extended constant-expression subset as bounded expression sequences.
  • Validate operand/result types, imported immutable global.get, index bounds, and constant-expression restrictions exactly.
  • Evaluate globals, data offsets, element offsets, and every other allowed initializer without exposing runtime stack state.
  • Preserve deterministic byte-offset diagnostics and allocation rollback.
  • Pass every command attributable to extended constant expressions in all three exact files with zero runner errors.
  • Add focused units, bounded CI witnesses, registry/inventory evidence, and concise docs.

Evidence:

Landed on main:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions