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

Unified Diff: runtime/vm/precompiler.cc

Issue 2622283004: Speed up AOT compilation of is-tests. (Closed)
Patch Set: add comment Created 3 years, 11 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 | « no previous file | tests/co19/co19-runtime.status » ('j') | 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 0dd3b18cd5469fa5206f833d8b484376500c3b6e..57381a38de8e2d8349b781c5608624e368057e17 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -245,6 +245,7 @@ bool TypeRangeCache::InstanceOfHasClassRange(const AbstractType& type,
if (!type.IsInstantiated()) return false;
if (type.IsFunctionType()) return false;
+ if (type.IsDartFunctionType()) return false;
Zone* zone = thread_->zone();
const TypeArguments& type_arguments =
@@ -271,6 +272,11 @@ bool TypeRangeCache::InstanceOfHasClassRange(const AbstractType& type,
Class& cls = Class::Handle(zone);
AbstractType& cls_type = AbstractType::Handle(zone);
for (intptr_t cid = kInstanceCid; cid < table->NumCids(); cid++) {
+ // Create local zone because deep hierarchies may allocate lots of handles
+ // within one iteration of this loop.
+ StackZone stack_zone(thread_);
+ HANDLESCOPE(thread_);
+
if (!table->HasValidClassAt(cid)) continue;
if (cid == kVoidCid) continue;
if (cid == kDynamicCid) continue;
@@ -281,7 +287,7 @@ bool TypeRangeCache::InstanceOfHasClassRange(const AbstractType& type,
if (cls.IsTopLevel()) continue;
cls_type = cls.RareType();
- if (cls_type.IsSubtypeOf(type, NULL, NULL, Heap::kOld)) {
+ if (cls_type.IsSubtypeOf(type, NULL, NULL, Heap::kNew)) {
last_matching_cid = cid;
if (*lower_limit == -1) {
// Found beginning of range.
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698