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

Unified Diff: runtime/vm/precompiler.cc

Issue 1436243005: Collect closure functions in isolate (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object.h » ('j') | 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 c1bf705fe8fed0204a7d713793612f9cec60b8b7..56e4ffc0dcfe396c9490299450a8e5b0b4521fa8 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -742,26 +742,24 @@ void Precompiler::DropUncompiledFunctions() {
functions.SetAt(j, function);
}
cls.SetFunctions(functions);
+ }
+ }
- closures = cls.closures();
- if (!closures.IsNull()) {
- retained_functions = GrowableObjectArray::New();
- for (intptr_t j = 0; j < closures.Length(); j++) {
- function ^= closures.At(j);
- if (function.HasCode()) {
- retained_functions.Add(function);
- } else {
- dropped_function_count_++;
- if (FLAG_trace_precompiler) {
- THR_Print("Precompilation dropping %s\n",
- function.ToLibNamePrefixedQualifiedCString());
- }
- }
- }
- cls.set_closures(retained_functions);
+ closures = isolate()->object_store()->closure_functions();
+ retained_functions = GrowableObjectArray::New();
+ for (intptr_t j = 0; j < closures.Length(); j++) {
+ function ^= closures.At(j);
+ if (function.HasCode()) {
+ retained_functions.Add(function);
+ } else {
+ dropped_function_count_++;
+ if (FLAG_trace_precompiler) {
+ THR_Print("Precompilation dropping %s\n",
+ function.ToLibNamePrefixedQualifiedCString());
}
}
}
+ isolate()->object_store()->set_closure_functions(retained_functions);
}
@@ -894,16 +892,13 @@ void Precompiler::VisitFunctions(FunctionVisitor* visitor) {
visitor->VisitFunction(function);
}
}
-
- closures = cls.closures();
- if (!closures.IsNull()) {
- for (intptr_t j = 0; j < closures.Length(); j++) {
- function ^= closures.At(j);
- visitor->VisitFunction(function);
- }
- }
}
}
+ closures = isolate()->object_store()->closure_functions();
+ for (intptr_t j = 0; j < closures.Length(); j++) {
+ function ^= closures.At(j);
+ visitor->VisitFunction(function);
+ }
}
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698