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

Canonicalisation of host function types #580

Answered by jakobkummerow
CharlieTap asked this question in Q&A
Discussion options

You must be logged in to vote

I just came upon this topic in the context of Custom Descriptors. The conclusion I've arrived at (which is perhaps obvious in retrospect) is:

  • The "canonical" RTTs introduced (implicitly) by the GC proposal are convenient to share across the entire "store" (or process, or similar). That allows for easy and efficient type checks of values flowing around between different instances. For host functions and other builtin things, you can pre-create them whenever they're first needed.
  • The RTTs implied by Custom Descriptors are not cached or automatically shared: they are entirely under the module's control, so they're allocated when userspace requests it, and passed around explicitly by userspa…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tlively
Comment options

Answer selected by CharlieTap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants