Skip to content

[Stack Switching] Fix GUFA on continuations#7824

Merged
kripken merged 19 commits intoWebAssembly:mainfrom
kripken:cont.gufa.2
Aug 13, 2025
Merged

[Stack Switching] Fix GUFA on continuations#7824
kripken merged 19 commits intoWebAssembly:mainfrom
kripken:cont.gufa.2

Conversation

@kripken
Copy link
Copy Markdown
Member

@kripken kripken commented Aug 13, 2025

We must mark the blocks that Resumes target as receiving values, or else
GUFA will think they are unreachable, and optimize them away.

@kripken kripken requested a review from tlively August 13, 2025 20:58
@kripken kripken marked this pull request as draft August 13, 2025 21:00
@kripken kripken removed the request for review from tlively August 13, 2025 21:00
@kripken
Copy link
Copy Markdown
Member Author

kripken commented Aug 13, 2025

(actually, wait, this can be better)

@kripken kripken marked this pull request as ready for review August 13, 2025 21:12
@kripken kripken requested a review from tlively August 13, 2025 21:12
@kripken
Copy link
Copy Markdown
Member Author

kripken commented Aug 13, 2025

Should be ready now. Added a test + more precise computation of the continuation type.

Copy link
Copy Markdown
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

What happens before this change? A crash?

@kripken
Copy link
Copy Markdown
Member Author

kripken commented Aug 13, 2025

When GUFA thinks code is unreachable it will remove it or emit an unreachable after it. So it behaves differently if it is actually reached.

@kripken kripken merged commit 4d9f6f5 into WebAssembly:main Aug 13, 2025
16 checks passed
@kripken kripken deleted the cont.gufa.2 branch August 13, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants