Skip to content

Clarification for ref.test instruction #560

Answered by tlively
konsoletyper asked this question in Q&A
Discussion options

You must be logged in to vote

Note that using ref.test instead of checking attached class objects (where possible) significantly reduces binary size. If it was something like TypeScript, I'd turned structural types into nonimal using following trick...

The analogous trick in WebAssembly is to put the structurally identical types into the same recursion group, which forces them to be separate types. This only works when the compiler sees the whole program and knows what types to put into the same rec group, though.

Replies: 3 comments 10 replies

Comment options

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

Comment options

You must be logged in to vote
4 replies
@konsoletyper
Comment options

@rossberg
Comment options

@konsoletyper
Comment options

@rossberg
Comment options

Comment options

You must be logged in to vote
5 replies
@konsoletyper
Comment options

@konsoletyper
Comment options

@tlively
Comment options

@konsoletyper
Comment options

@tlively
Comment options

Answer selected by konsoletyper
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