Align switch/resume_throw result typing with stack-switching spec
Problem
Current wasmstack op surface models switch and resume_throw as producing no normal results. This blocks representation of valid typed result-flow forms described by the official typing rules.
Why this matters
Spec-conformant programs requiring result propagation through switch/resume_throw cannot be represented or validated in the current IR.
Repro
- Test:
test/wasmstack/spec-gap-switch-resume-throw-results.mlir (currently XFAIL)
- Parser/op model rejects SSA-result forms.
Expected behavior
switch and resume_throw should support typed results where permitted by continuation/tag typing rules.
Suggested implementation direction
- Update ODS for
wasmstack.switch and wasmstack.resume_throw result modeling.
- Update verifier stack-effect rules and typing checks.
- Update emitter stack assumptions and binary encoding logic.
- Add conversion coverage from WAMI forms.
Acceptance criteria
test/wasmstack/spec-gap-switch-resume-throw-results.mlir flipped from XFAIL to passing.
- No regressions in existing stack-switching verify/emission suites.
Align switch/resume_throw result typing with stack-switching spec
Problem
Current wasmstack op surface models
switchandresume_throwas producing no normal results. This blocks representation of valid typed result-flow forms described by the official typing rules.Why this matters
Spec-conformant programs requiring result propagation through
switch/resume_throwcannot be represented or validated in the current IR.Repro
test/wasmstack/spec-gap-switch-resume-throw-results.mlir(currentlyXFAIL)Expected behavior
switchandresume_throwshould support typed results where permitted by continuation/tag typing rules.Suggested implementation direction
wasmstack.switchandwasmstack.resume_throwresult modeling.Acceptance criteria
test/wasmstack/spec-gap-switch-resume-throw-results.mlirflipped from XFAIL to passing.