Skip to content

[DDC] Implement function canonicalization corner cases #46486

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

Closed
eernstg opened this issue Jun 28, 2021 · 1 comment
Closed

[DDC] Implement function canonicalization corner cases #46486

eernstg opened this issue Jun 28, 2021 · 1 comment
Assignees
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. web-dev-compiler

Comments

@eernstg
Copy link
Member

eernstg commented Jun 28, 2021

This is the DDC specific issue for #46485, which has the details.

@eernstg eernstg added web-dev-compiler area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. labels Jun 28, 2021
@leafpetersen
Copy link
Member

I believe this change is gated on some further discussion, see comment here.

@nshahan nshahan self-assigned this Jul 9, 2021
dart-bot pushed a commit that referenced this issue Jul 20, 2021
Previously all functions objects returned by `dart.gbind()` would
contain the same 3 properties: name, length, and runtimeType. For
two distinct functions, if these three properties were the same
our constant canonicalization would incorrectly canonicalize to the
same value. Attaching the original function and the type arguments
used in instantiation ensures the const canonicalization will treat
different functions or instantiations as different values.

These values will also be used for equality checks proposed here:
dart-lang/language#1712

Fixes: #46568
Issue: #46486
Change-Id: I65111df9af80d878eb3127c5e3dfac1ffba95535
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206423
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. web-dev-compiler
Projects
None yet
Development

No branches or pull requests

3 participants