Index: pkg/compiler/lib/src/universe/element_world_builder.dart |
diff --git a/pkg/compiler/lib/src/universe/element_world_builder.dart b/pkg/compiler/lib/src/universe/element_world_builder.dart |
index 75ae5c96c8a84775e41d52d73701c546f334ea22..0dc73b239c3f71be9472db79c573574451820cce 100644 |
--- a/pkg/compiler/lib/src/universe/element_world_builder.dart |
+++ b/pkg/compiler/lib/src/universe/element_world_builder.dart |
@@ -64,10 +64,15 @@ class ElementResolutionWorldBuilder extends ResolutionWorldBuilderBase { |
ConstructorElement target = constructor.effectiveTarget; |
ResolutionInterfaceType targetType = |
constructor.computeEffectiveTargetType(instance.type); |
- Instantiation kind = Instantiation.DIRECTLY_INSTANTIATED; |
- if (target.enclosingClass.isAbstract) { |
- // If target is a factory constructor on an abstract class. |
+ ClassElement cls = target.enclosingClass; |
+ bool isNative = _nativeBasicData.isNativeClass(cls); |
+ Instantiation kind; |
+ if (isNative) { |
+ kind = Instantiation.ABSTRACTLY_INSTANTIATED; |
+ } else if (cls.isAbstract) { |
kind = Instantiation.UNINSTANTIATED; |
+ } else { |
+ kind = Instantiation.DIRECTLY_INSTANTIATED; |
} |
infoFor(targetType.element) |
.addInstantiation(target, targetType, kind); |