Skip to content

TypeGeneralizing: Handle exact casts without Custom Descriptors enabled - #9397

Merged
kripken merged 6 commits into
WebAssembly:mainfrom
kripken:tg.exact
Nov 16, 2026
Merged

kripken merged 6 commits into
WebAssembly:mainfrom
kripken:tg.exact

Conversation

@kripken

@kripken kripken commented Nov 16, 2026

Copy link
Copy Markdown
Member

Without CD, only trivial exact casts are allowed, so we must be
carefully to not make trivial ones non-trivial.

@kripken
kripken requested a review from tlively November 16, 2026 22:12

@tlively tlively left a comment

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.

LGTM % comment on tests.

This would be fixed "for free" if TypeGeneralizing generalized casts. Is that on your near-term roadmap?

Comment on lines +220 to +221
;; enabled, $x generalizes to (ref $foo). Without custom descriptors, $x
;; cannot become (ref (exact $foo)) (not a supertype of (ref (exact $bar)))

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.

This makes it sound like generalizing to (ref (exact $foo)) is something we would want to do if we could, but of course that would never be correct. Let's drop or reword that part of the comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@kripken

kripken commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

This would be fixed "for free" if TypeGeneralizing generalized casts. Is that on your near-term roadmap?

Hmm, I hadn't been thinking about that. My immediate goal is just to fuzz this and get it ready for use. But I'll take a look at casts after, thanks.

@kripken
kripken enabled auto-merge (squash) November 16, 2026 23:19
@kripken
kripken merged commit 06468a9 into WebAssembly:main Nov 16, 2026
18 checks passed
@kripken
kripken deleted the tg.exact branch November 17, 2026 00:00
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