Chromium Code Reviews| Index: runtime/vm/precompiler.cc |
| diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc |
| index fa650c4027686b2d821132965e1e3fd391263353..5085d164dfbc37eab2bbdfe469612624a373915e 100644 |
| --- a/runtime/vm/precompiler.cc |
| +++ b/runtime/vm/precompiler.cc |
| @@ -276,6 +276,7 @@ bool TypeRangeCache::InstanceOfHasClassRange(const AbstractType& type, |
| HANDLESCOPE(thread_); |
| if (!table->HasValidClassAt(cid)) continue; |
| + if (cid == kTypeArgumentsCid) continue; |
| if (cid == kVoidCid) continue; |
| if (cid == kDynamicCid) continue; |
| if (cid == kNullCid) continue; // Instance is not at Bottom like Null type. |
| @@ -673,8 +674,9 @@ void Precompiler::AddRoots(Dart_QualifiedFunctionName embedder_entry_points[]) { |
| if (!isolate()->class_table()->HasValidClassAt(cid)) { |
| continue; |
| } |
| - if ((cid == kDynamicCid) || (cid == kVoidCid) || |
| - (cid == kFreeListElement) || (cid == kForwardingCorpse)) { |
| + if ((cid == kTypeArgumentsCid) || (cid == kDynamicCid) || |
| + (cid == kVoidCid) || (cid == kFreeListElement) || |
| + (cid == kForwardingCorpse)) { |
| continue; |
| } |
| cls = isolate()->class_table()->At(cid); |
| @@ -964,6 +966,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 +981,6 @@ void Precompiler::AddCalleesOf(const Function& function) { |
| cls ^= target_code.owner(); |
| AddInstantiatedClass(cls); |
| } |
| - } else if (entry.IsTypeArguments()) { |
| - AddTypeArguments(TypeArguments::Cast(entry)); |
| } |
| } |
| } |
| @@ -1157,7 +1159,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()) { |
|
rmacnak
2017/08/28 23:48:58
This should do AddTypeArguments if for some reason
regis
2017/08/28 23:56:58
Done.
|
| precompiler_->AddConstObject(Instance::Cast(subinstance_)); |
| } |
| } |