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

Functions with custom RTT #99

Closed
rossberg opened this issue Jun 25, 2020 · 4 comments
Closed

Functions with custom RTT #99

rossberg opened this issue Jun 25, 2020 · 4 comments
Assignees

Comments

@rossberg
Copy link
Member

To be able to downcast functions to more than just their exact type, there ought to be a way to define a function with a custom RTT. The existing form of function definition would be considered a shorthand for one with the canonical RTT that's a direct subtype of funcref.

@lukewagner
Copy link
Member

I think one could also use such an extension to create a function that effectively has no runtime type tag by specifying rtt.canon any.

@RossTate
Copy link
Contributor

Do you have an application for downcasting an anyref to a funcref? In #100, there was discussion of how to compile OCaml to the current proposal, e.g. here, and it didn't involve any casts from anyref to funcref. (More generally, it didn't involve casting anything to any sort of function type.)

rossberg pushed a commit that referenced this issue Feb 24, 2021
@tlively
Copy link
Member

tlively commented Feb 16, 2022

This actually seems similar to the ideas in https://github.com/WebAssembly/call-tags, just using "RTT" intead of "call tag." This issue may also become moot depending on the results of #275.

@tlively
Copy link
Member

tlively commented Nov 1, 2022

We no longer have RTTs in the proposal, so this is not something we need to solve for the MVP.

@tlively tlively closed this as completed Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants