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

Unified Diff: runtime/vm/precompiler.cc

Issue 3007603002: [VM generic function reification] Support generic functions in Invocation class. (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
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index fa650c4027686b2d821132965e1e3fd391263353..6c27c195592b824db7671d8cbd3db2a929d33954 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -964,6 +964,8 @@ void Precompiler::AddCalleesOf(const Function& function) {
instance ^= entry.raw();
if (entry.IsAbstractType()) {
AddType(AbstractType::Cast(entry));
+ } else if (entry.IsTypeArguments()) {
+ AddTypeArguments(TypeArguments::Cast(entry));
} else {
AddConstObject(instance);
}
@@ -977,8 +979,6 @@ void Precompiler::AddCalleesOf(const Function& function) {
cls ^= target_code.owner();
AddInstantiatedClass(cls);
}
- } else if (entry.IsTypeArguments()) {
- AddTypeArguments(TypeArguments::Cast(entry));
}
}
}
@@ -1157,7 +1157,7 @@ void Precompiler::AddConstObject(const Instance& instance) {
virtual void VisitPointers(RawObject** first, RawObject** last) {
for (RawObject** current = first; current <= last; current++) {
subinstance_ = *current;
- if (subinstance_.IsInstance()) {
+ if (subinstance_.IsInstance() && !subinstance_.IsTypeArguments()) {
precompiler_->AddConstObject(Instance::Cast(subinstance_));
}
}
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object.h » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698