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

Are inline heap types allowed in the text format? #42

Closed

Description

@tlively

Is this valid?

(module
  (func $foo (param (ref null (func (param i32)))))
)

Or would it have to be written like this:

(module
  (type $takes_i32 (func (param i32)))
  (func $foo (param (ref null $takes_i32)))
)

The abstract syntax given in the overview defines heaptype as heaptype ::= <typeidx> | func | extern, which would imply that the first option is invalid, but I'm not sure if that's meant to apply to the concrete text format as well.

cc @kripken

Activity

  1. rossberg commented on Nov 26, 2020

    @rossberg
    Member

    We could go either way. For now I'd have a slight preference not to introduce much extra sugar in the text format. If you use a concrete reference type, you'll probably have to write it in multiple places, in which case you want a name for it anyway. Do you think the sugar is worth it?

  2. tlively commented on Nov 28, 2020

    @tlively
    MemberAuthor

    Thanks, @rossberg! FWIW, I share your slight preference :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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