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.

Relationship between all the heap types #131

Closed
@dcodeIO

Description

@dcodeIO

With reference types, function references, exceptions and GC there are multiple proposals in flight currently that introduce or concretise heap types, and I'd like to understand the relationship the new types will have in the whole picture.

There are the extern and func heap types coming from reference types, and the exn heap type from exception handling. GC introduces any, eq and i31 on top, establishing the following subtyping relationship:

        any
   ┌─────┼────┬─────┐
extern  func  eq   exn
         │    │
   signature* │
              │
        ┌─────┼────────┐
       i31  struct*  array*

with

  • signature* being a concrete function
  • struct* being a concrete struct
  • array* being a concrete array

What I am not sure about is:

  • Is extern a subtype of eq?
  • Are there subtypes of extern?
  • Is exn a subtype of eq?

Or is there perhaps something fundamentally wrong in my understanding?

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