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

Unified Diff: runtime/vm/precompiler.cc

Issue 3003183003: Fix inlining annotations for AOT. (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 | « runtime/vm/precompiler.h ('k') | 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 85e00851d1dc3d1f75ce2f98aea0bc1b57e4861a..91b553cce4378aad05ee7d8309f80cd2f74f744f 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -482,6 +482,7 @@ void Precompiler::DoCompileAll(
I->object_store()->set_async_star_move_next_helper(null_function);
I->object_store()->set_complete_on_async_return(null_function);
I->object_store()->set_async_star_stream_controller(null_class);
+ DropMetadata();
DropLibraryEntries();
}
DropClasses();
@@ -1968,6 +1969,35 @@ void Precompiler::TraceTypesFromRetainedClasses() {
}
}
+void Precompiler::DropMetadata() {
+ Library& lib = Library::Handle(Z);
+ GrowableObjectArray& null_growable_list = GrowableObjectArray::Handle(Z);
siva 2017/08/24 21:35:50 const GrowableObjec......
rmacnak 2017/08/24 23:31:53 Done.
+ Array& dependencies = Array::Handle(Z);
+ Namespace& ns = Namespace::Handle(Z);
+ Field& null_field = Field::Handle(Z);
siva 2017/08/24 21:35:50 const Field& null_field
rmacnak 2017/08/24 23:31:53 Done.
+
+ for (intptr_t i = 0; i < libraries_.Length(); i++) {
+ lib ^= libraries_.At(i);
+ lib.set_metadata(null_growable_list);
+
+ dependencies = lib.imports();
+ for (intptr_t j = 0; j < dependencies.Length(); j++) {
+ ns ^= dependencies.At(j);
+ if (!ns.IsNull()) {
+ ns.set_metadata_field(null_field);
+ }
+ }
+
+ dependencies = lib.exports();
+ for (intptr_t j = 0; j < dependencies.Length(); j++) {
+ ns ^= dependencies.At(j);
+ if (!ns.IsNull()) {
+ ns.set_metadata_field(null_field);
+ }
+ }
+ }
+}
+
void Precompiler::DropLibraryEntries() {
Library& lib = Library::Handle(Z);
Array& dict = Array::Handle(Z);
« no previous file with comments | « runtime/vm/precompiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698