Index: pkg/compiler/lib/src/serialization/modelz.dart |
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart |
index f721eb17d400258bff929f4cc35f82eb832f9cb1..75bdbf357ac7c51f4b718f5c8aa02c89706cb7f3 100644 |
--- a/pkg/compiler/lib/src/serialization/modelz.dart |
+++ b/pkg/compiler/lib/src/serialization/modelz.dart |
@@ -10,6 +10,7 @@ |
library dart2js.serialization.modelz; |
import '../common.dart'; |
+import '../common/names.dart'; |
import '../common/resolution.dart' show Resolution; |
import '../constants/constructors.dart'; |
import '../constants/expressions.dart'; |
@@ -772,7 +773,10 @@ abstract class FunctionTypedElementMixin |
List<DartType> get typeVariables => functionSignature.typeVariables; |
} |
-abstract class ClassElementMixin implements ElementZ, ClassElement { |
+abstract class ClassElementMixin |
+ implements ElementZ, ClassElement, class_members.ClassMemberMixin { |
+ bool _isResolved = false; |
+ |
InterfaceType _createType(List<DartType> typeArguments) { |
return new InterfaceType(this, typeArguments); |
} |
@@ -806,7 +810,12 @@ abstract class ClassElementMixin implements ElementZ, ClassElement { |
@override |
void ensureResolved(Resolution resolution) { |
- resolution.registerClass(this); |
+ if (!_isResolved) { |
+ _isResolved = true; |
+ class_members.MembersCreator |
+ .computeClassMembersByName(resolution, this, Identifiers.call); |
+ resolution.registerClass(this); |
+ } |
} |
} |
@@ -903,6 +912,7 @@ class ClassElementZ extends DeserializedElementZ |
@override |
FunctionType get callType { |
_ensureSuperHierarchy(); |
+ // TODO(johnniwinther): Why can't this always be computed in ensureResolved? |
return _callType; |
} |
} |
@@ -967,8 +977,11 @@ class UnnamedMixinApplicationElementZ extends ElementZ |
for (ConstructorElement definingConstructor in superclass.constructors) { |
if (definingConstructor.isGenerativeConstructor && |
definingConstructor.memberName.isAccessibleFrom(library)) { |
- builder.addLast( |
- new ForwardingConstructorElementZ(this, definingConstructor)); |
+ ForwardingConstructorElementZ constructor = |
+ new ForwardingConstructorElementZ(this, definingConstructor); |
+ constructor.resolvedAst = new SynthesizedResolvedAst( |
+ constructor, ResolvedAstKind.FORWARDING_CONSTRUCTOR); |
+ builder.addLast(constructor); |
} |
} |
_constructors = builder.toLink(); |