Skip to content

Casting continuations #115

@tlively

Description

@tlively

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions