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

Clarification for ref.test instruction #560

Answered by tlively
konsoletyper asked this question in Q&A

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

You must be logged in to vote
1 reply
@konsoletyper

You must be logged in to vote
4 replies
@konsoletyper

@rossberg

@konsoletyper

@rossberg

You must be logged in to vote
5 replies
@konsoletyper

@konsoletyper

@tlively

@konsoletyper

@tlively

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