Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
var enclosingLibrary = _emitLibraryName(getLibrary(m));
I'd prefer `_currentLibrary!` here. If this is not the same thing, I unsure about the assignment below. We would be installing this into a different library?
// Create a property accessor for cross-library mixins.
Why do the accessors look different depending on what library they are from? I'd expect `LibraryName.MixinApplicationClassName` in the compile code for both cases even when in the current library to make sure we are always going through the library indirection.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
var enclosingLibrary = _emitLibraryName(getLibrary(m));
I'd prefer `_currentLibrary!` here. If this is not the same thing, I unsure about the assignment below. We would be installing this into a different library?
This should be fine in `emitClass`. We only see cross-module mixins in the super getters. Updated.
// Create a property accessor for cross-library mixins.
Why do the accessors look different depending on what library they are from? I'd expect `LibraryName.MixinApplicationClassName` in the compile code for both cases even when in the current library to make sure we are always going through the library indirection.
True. I added this since it was 'extraneous' if in the same library. But going through the indirection is prob actually correct. Updated.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Reland "[ddc] Overhauling tearoff equality and identity."
This new update adds fixes + tests for cross-module super mixins. Super getters can refer to mixins compiled in other modules, so we need to expose all mixin names to make them accessible from their enclosing library.
This is a reland of commit e4c4d0f839ce4998a46ac3997aea2668d3edd48f
Original change's description:
> [ddc] Overhauling tearoff equality and identity.
>
> Hot reload requires DDC to update how its tearoffs are represented. Tearoffs obey the following conventions:
> * Instance tearoffs are never identical
> * Tearoffs with the same object target and name have the same hash code (even if they resolve to different functions across hot reloads)
> * Two separate tearoffs of the same member are equal
>
> To support this, tearoff equality must not depend on the bound object and method but a composite of the bound object, torn off member name, and the exact class/object from which the member was torn off.
>
> Notable changes:
> * Methods' immediately bound targets are emitted with member signatures. This is required to determine the bound targets for instance and dynamic tearoffs. Bound targets are identified by `libraryUri:class` strings.
> * `applyMixin` passes in a 'true' bound target. This is because mixin applications' members are considered children of their 'on' class (not the mixed in class) wrt equality/hashCode.
> * `bind` is modified to pass in its 'true' bound object to support mixins' super getters.
> * `tearoff` and `staticTearoff` are modified to accept a bound target string (only required for static tearoffs, as they are bound at tearoff-creation-time).
> * Static tearoffs avoid using their bound object for hashcode and equality, as these libraries may be wrapped in proxy objects.
> * Tearoff equality and hashCode are updated to consider bound object, bound name, and its bound method's immediate target.
> * 'noSuchMethod' and 'toString' methods are always accessed through their extension property during signature lookups.
>
>
> Change-Id: Ica5501b6860c605db50aa945bafb6802a7317511
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406723
> Reviewed-by: Nate Biggs <nate...@google.com>
> Reviewed-by: Nicholas Shahan <nsh...@google.com>
> Commit-Queue: Mark Zhou <mark...@google.com>
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |