Index: runtime/vm/precompiler.cc |
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc |
index 23b67b1dcc4a7c1661c849bfa38a8fa13022ee2a..039c2bf6a608ae678cd22a1e3154011f9fb83f0d 100644 |
--- a/runtime/vm/precompiler.cc |
+++ b/runtime/vm/precompiler.cc |
@@ -282,6 +282,13 @@ void Precompiler::AddEntryPoints(Dart_QualifiedFunctionName entry_points[]) { |
} |
AddFunction(func); |
+ if (func.IsGenerativeConstructor()) { |
+ // Allocation stubs are referenced from the call site of the constructor, |
+ // not in the constructor itself. So compiling the constructor isn't |
+ // enough for us to discover the class is instantiated if the class isn't |
+ // otherwise instantiated from Dart code and only instantiated from C++. |
+ AddClass(cls); |
srdjan
2015/10/16 20:10:21
Maybe AddInstantiatedClass?
rmacnak
2015/10/16 20:31:02
That's better.
|
+ } |
} |
} |