Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: pkg/compiler/lib/src/resolution/resolution.dart

Issue 1992733002: Handle redirecting factories. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/resolution.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index 0676ba66c21f9a3d7eb36b9cfc922aac72e042be..14068d2e860f82b96243349aaed6e132868001e0 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -418,20 +418,23 @@ class ResolverTask extends CompilerTask {
}
void resolveRedirectionChain(
- ConstructorElementX constructor, Spannable node) {
- ConstructorElementX target = constructor;
+ ConstructorElement constructor, Spannable node) {
+ ConstructorElement target = constructor;
InterfaceType targetType;
List<Element> seen = new List<Element>();
bool isMalformed = false;
// Follow the chain of redirections and check for cycles.
while (target.isRedirectingFactory || target.isPatched) {
- if (target.effectiveTargetInternal != null) {
+ if (target.hasEffectiveTarget) {
// We found a constructor that already has been processed.
- targetType = target.effectiveTargetType;
+ // TODO(johnniwinther): Should `effectiveTargetType` be part of the
+ // interface?
+ targetType = target.computeEffectiveTargetType(
+ target.enclosingClass.thisType);
assert(invariant(target, targetType != null,
message: 'Redirection target type has not been computed for '
'$target'));
- target = target.effectiveTargetInternal;
+ target = target.effectiveTarget;
break;
}
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698