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

Unified Diff: runtime/vm/precompiler.cc

Issue 3003253002: [vm, aot] Ensure fixups applied after the world has been compiled are applied to closures in finall… (Closed)
Patch Set: . Created 3 years, 4 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 | runtime/vm/runtime_entry.cc » ('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 787b4b28b454340fe8a56bcb5bad1bb9f9fbf9d2..85e00851d1dc3d1f75ce2f98aea0bc1b57e4861a 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -2186,7 +2186,17 @@ void Precompiler::BindStaticCalls() {
};
BindStaticCallsVisitor visitor(Z);
+
+ // We need both iterations to ensure we visit all the functions that might end
+ // up in the snapshot. The ProgramVisitor will miss closures from duplicated
+ // finally clauses, and not all functions are compiled through the
+ // tree-shaker's queue
ProgramVisitor::VisitFunctions(&visitor);
+ FunctionSet::Iterator it(enqueued_functions_.GetIterator());
+ for (const Function** current = it.Next(); current != NULL;
+ current = it.Next()) {
+ visitor.Visit(**current);
+ }
}
void Precompiler::SwitchICCalls() {
@@ -2274,7 +2284,17 @@ void Precompiler::SwitchICCalls() {
ASSERT(!I->compilation_allowed());
SwitchICCallsVisitor visitor(Z);
+
+ // We need both iterations to ensure we visit all the functions that might end
+ // up in the snapshot. The ProgramVisitor will miss closures from duplicated
+ // finally clauses, and not all functions are compiled through the
+ // tree-shaker's queue
ProgramVisitor::VisitFunctions(&visitor);
+ FunctionSet::Iterator it(enqueued_functions_.GetIterator());
+ for (const Function** current = it.Next(); current != NULL;
+ current = it.Next()) {
+ visitor.Visit(**current);
+ }
#endif
}
« no previous file with comments | « no previous file | runtime/vm/runtime_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698