Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Describe the possible extension with function subtyping and exact types #33

Merged
merged 2 commits into from
Jun 25, 2020

Conversation

rossberg
Copy link
Member

@rossberg rossberg commented Jun 23, 2020

As discussed at some point in the past.

@rossberg rossberg requested a review from lukewagner June 23, 2020 11:16
@tlively
Copy link
Member

tlively commented Jun 23, 2020

Thanks for this writeup, @rossberg! If I understand correctly, exact types are introduced to solve one of the problems that the Dispatch Tags pre-proposal solves as well. Would you be ok with adding a link to that pre-proposal in this new section so that readers are aware that there are multiple solutions in flight?

Copy link
Member

@lukewagner lukewagner left a comment

Choose a reason for hiding this comment

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

lgtm

@lukewagner
Copy link
Member

A good follow-up to this would be a sketch of how one could define functions which can't be cast at all or can only be cast using generative/nominal type tags.

@rossberg
Copy link
Member Author

rossberg commented Jun 25, 2020

@tlively, AFAICS, there is no particular overlap with dispatch tags (which are more closely related to RTTs from the GC proposal). They would extend indirect calls with new functionality (a new call instruction), whereas this one is just about preserving the existing semantics of call_indirect in the presence of function subtyping. You would need to preserve that regardless of whether dispatch tags are added.

@rossberg rossberg merged commit a125cbb into master Jun 25, 2020
@rossberg rossberg deleted the exact branch June 25, 2020 08:17
@rossberg
Copy link
Member Author

@lukewagner:

A good follow-up to this would be a sketch of how one could define functions which can't be cast at all or can only be cast using generative/nominal type tags.

Right. In conjunction with the GC proposal, that should be possible by introducing a new form of function definition that has an explicit RTT value. I created issue WebAssembly/gc#99.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants