Skip to content

[ddc] Make it possible to move all peer native type extension operations to a library link method #55547

Open
@nshahan

Description

@nshahan

There is a need to move all class hierarchy connections into a single method in each library so they can be linked after all class definitions have been evaluated. Initially, this meant removing the use of the extends keyword in compiled output and start stitching together prototype chains manually later in the evaluation of a library.

Types from the SDK that have "native peers" result in other operations that are performed on the class hierarchy and should also be moved to the link method. Including:

  • dart.registerExtension()
  • dart.defineExtensionMethods()
  • dart.defineExtensionAccessors()
  • dart.definePrimitiveHashCode()

These operations are also entangled with generic class representation. It might be easier to change the generic class representation first. #31003.

Mixin applicationa also appear in some of these classes hierarchies so this might need to be addressed at the same time as #55545.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions