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

Unified Diff: runtime/vm/precompiler.cc

Issue 3003183003: Fix inlining annotations for AOT. (Closed)
Patch Set: const 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..0a9040f89dc97417d453daba5720a6a52b4679ec 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,36 @@ void Precompiler::TraceTypesFromRetainedClasses() {
}
}
+void Precompiler::DropMetadata() {
+ Library& lib = Library::Handle(Z);
+ const GrowableObjectArray& null_growable_list =
+ GrowableObjectArray::Handle(Z);
+ Array& dependencies = Array::Handle(Z);
+ Namespace& ns = Namespace::Handle(Z);
+ const Field& null_field = Field::Handle(Z);
+
+ 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