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

Unified Diff: runtime/vm/precompiler.cc

Issue 1732323005: Toward a green tools/build.py -cprecompiler -rdart_precompiled: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index a02c459a26c59e353434ec30b8d9c4899b02ded9..2f876e09dffec936f0220d4f43b4cd304f284ffc 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -590,6 +590,15 @@ void Precompiler::AddTypesOf(const Function& function) {
}
}
}
+ // A function can always be inlined and have only a nested local function
+ // remain.
+ const Function& parent = Function::Handle(Z, function.parent_function());
+ if (!parent.IsNull()) {
+ AddTypesOf(parent);
+ }
+ // A class may have all functions inlined except a local function.
+ const Class& owner = Class::Handle(Z, function.Owner());
+ AddTypesOf(owner);
}
@@ -623,6 +632,13 @@ void Precompiler::AddType(const AbstractType& abstype) {
AbstractType& type = AbstractType::Handle(Z);
type = TypeRef::Cast(abstype).type();
AddType(type);
+ } else if (abstype.IsTypeParameter()) {
+ const AbstractType& type =
+ AbstractType::Handle(Z, TypeParameter::Cast(abstype).bound());
+ AddType(type);
+ const Class& cls =
+ Class::Handle(Z, TypeParameter::Cast(abstype).parameterized_class());
+ AddTypesOf(cls);
}
}
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698