Skip to content

Potential improvements to Wasm brand types #61035

@tlively

Description

@tlively

Hi! I was taking a look at the brand type generation code and I noticed some opportunities for improvement.

  1. The _brandTypeFieldValues could also include nullable and non-nullable references to i31, struct, and array, as well as i8 and i16.
  2. The comments discuss working around structural subtyping issues, but WebAssembly does not have structural subtyping on defined types, so:
    1. It should be fine for a brand type to have zero fields.
    2. It should be fine to use mutable fields in the brand types, doubling the effective digits.

cc @natebiggs

Metadata

Metadata

Assignees

Labels

area-dart2wasmIssues for the dart2wasm compiler.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions