Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nshahan opened this issue Apr 23, 2024 · 0 comments
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. web-dev-compiler

Comments

@nshahan
Copy link
Contributor

nshahan commented Apr 23, 2024

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.

@nshahan nshahan added area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. web-dev-compiler labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. web-dev-compiler
Projects
None yet
Development

No branches or pull requests

1 participant