Skip to content

More unsubtyping for cont.bind#8506

Merged
tlively merged 5 commits into
mainfrom
fix-stack-switching-unsubtyping
Mar 24, 2026
Merged

More unsubtyping for cont.bind#8506
tlively merged 5 commits into
mainfrom
fix-stack-switching-unsubtyping

Conversation

@tlively

@tlively tlively commented Mar 21, 2026

Copy link
Copy Markdown
Member

We were missing a few type constraints for cont.bind. Add them, and also add more thorough tests for all the stack switching instructions, including the cases where the continuations are null. As a drive-by to get these tests working, fix the parsing of resume and resume_throw* to set the proper type arity when the input is null.

We were missing a few type constraints for cont.bind. Add them, and also add more thorough tests for all the stack switching instructions, including the cases where the continuations are null. As a drive-by to get these tests working, fix the parsing of resume and resume_throw* to set the proper type arity when the input is null.
@tlively tlively requested a review from kripken March 21, 2026 03:13
@tlively tlively requested a review from a team as a code owner March 21, 2026 03:13
Comment thread src/wasm-builder.h Outdated
ret->sentTypes.set(sentTypes);
ret->operands = std::move(operands);
ret->cont = cont;
assert(contType.isContinuation());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the line below will assert on this

Suggested change
assert(contType.isContinuation());
Comment thread src/wasm-builder.h Outdated
ret->sentTypes.set(sentTypes);
ret->operands = std::move(operands);
ret->cont = cont;
assert(contType.isContinuation());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert(contType.isContinuation());
(func $resume-throw-ref
(local $sub (ref null $sub))
;; This does NOT require $sub <: $super because we turn this into a
;; `resume $sub`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
;; `resume $sub`.
;; `resume_throw $sub`.
@tlively tlively enabled auto-merge (squash) March 24, 2026 00:00
@tlively tlively merged commit afae706 into main Mar 24, 2026
16 checks passed
@tlively tlively deleted the fix-stack-switching-unsubtyping branch March 24, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants