Skip to content

Handle exact types on JS boundary in Unsubtyping#8451

Merged
tlively merged 2 commits intomainfrom
unsubtyping-exactjs-exposed
Mar 11, 2026
Merged

Handle exact types on JS boundary in Unsubtyping#8451
tlively merged 2 commits intomainfrom
unsubtyping-exactjs-exposed

Conversation

@tlively
Copy link
Member

@tlively tlively commented Mar 11, 2026

By considering exactness of types flowing in from JS, we can optimize
more precisely because exact casts require fewer subtype relationships
to be kept.

By considering exactness of types flowing in from JS, we can optimize
more precisely because exact casts require fewer subtype relationships
to be kept.
@tlively tlively requested a review from kripken March 11, 2026 19:11
(func $test-out (result (ref null $super))
(local $sub-out (ref null $sub-out))
;; This requires that $sub-out is a subtype of $super. Since $super flows
;; out to JS, $sub-out will have to keep its descriptor.
Copy link
Member

Choose a reason for hiding this comment

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

On line 991 it did not keep the descriptor...

Copy link
Member Author

Choose a reason for hiding this comment

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

Aha, the optimization is smarter than I was. Comments updated.

@tlively tlively enabled auto-merge (squash) March 11, 2026 23:02
@tlively tlively merged commit ee4f82d into main Mar 11, 2026
17 checks passed
@tlively tlively deleted the unsubtyping-exactjs-exposed branch March 11, 2026 23:31
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