-
Notifications
You must be signed in to change notification settings - Fork 16
Description
I remember at some point @rossberg argued that continuation values should not carry runtime type information and therefore should not be able to be cast via ref.cast or other cast instructions. But this is not mentioned in the explainer.
I would strongly prefer to maintain the invariant that references to all heap types can be cast. Binaryen frequently performs transformations where static type information is lost or where it has otherwise inferred more specific types than is available to validation. In these cases, Binaryen depends on being able to insert a cast to preserve the validity of the program. Being able to use casts to recover more specific type information uniformly for all references is important for keeping this code from being riddled with special cases. Presumably other producers have similar needs.