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

Unified Diff: runtime/vm/precompiler.cc

Issue 1405253004: Precompilation: Including generative constructor entry points should mark a class as instantiated. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698