TypeRefiningGUFA: Avoid bottom continuation casts#8513
Merged
kripken merged 4 commits intoWebAssembly:mainfrom Mar 24, 2026
Merged
TypeRefiningGUFA: Avoid bottom continuation casts#8513kripken merged 4 commits intoWebAssembly:mainfrom
kripken merged 4 commits intoWebAssembly:mainfrom
Conversation
Member
Author
|
Diff on tests is smaller without whitespace. |
tlively
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The pass already checked
isContinuationand did not refine a field tosuch a type, if we know we need a cast to fix things up (we can't do it
in such cases, as the type can't be cast). However, we did not handle
a cast to the bottom type nullcontref.
Avoid a cast there by emitting a null. That is, before we did
(ref.cast nullcontref VALUE )and now we do
The null has the right type for where we are writing.
For a non-nullable bottom type, emit an unreachable.
As a drive by, remove
That code cannot work in module code anyhow (it emits casts,
blocks, drops, etc.).