Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BranchUtils::operateOnScopeNameUsesAndSentValues() on BrOn #6995

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

kripken
Copy link
Member

@kripken kripken commented Oct 9, 2024

BrOn does not always send a value. This is an odd asymmetry in the wasm
spec, where br_on_null does not send the null on the branch (which makes sense,
but the asymmetry does mean we need to special-case it).

Found by fuzzing with some BrOn additions that I will open a PR for later.

@kripken kripken requested a review from aheejin October 9, 2024 20:21
;; CHECK-NEXT: (block
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (br_on_null $loop
;; CHECK-NEXT: (ref.null none)
Copy link
Member

Choose a reason for hiding this comment

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

Why has any changed to none? Does GUFA do that?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is actually something we do automatically all the time (I forgot if in refinalize or in parsing, but one of them). Basically we turn nulls into the most refined types that we can, of the bottom type, because that is always valid and more precise.

@kripken kripken merged commit debd246 into WebAssembly:main Oct 10, 2024
13 checks passed
@kripken kripken deleted the gufa.br_on branch October 10, 2024 15:39
@kripken kripken mentioned this pull request Oct 14, 2024
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