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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1873143003: - Use a hash table to canonicalize instances/arrays to avoid having to iterate over a linear list a… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review Created 4 years, 8 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/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 0ca54d8f33c2282146cd312db1cc2547aa36f4cf..1cefa03f4b5daf0745cce757ca2151f31145026d 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -2293,7 +2293,7 @@ RawInstance* Instance::ReadFrom(SnapshotReader* reader,
Instance::InstanceSize(),
HEAP_SPACE(kind));
if (RawObject::IsCanonical(tags)) {
- obj = obj.CheckAndCanonicalize(NULL);
+ obj = obj.CheckAndCanonicalize(reader->thread(), NULL);
}
}
reader->AddBackRef(object_id, &obj, kIsDeserialized);
@@ -2404,7 +2404,7 @@ RawBigint* Bigint::ReadFrom(SnapshotReader* reader,
// Set the canonical bit.
obj.SetCanonical();
} else {
- obj ^= obj.CheckAndCanonicalize(NULL);
+ obj ^= obj.CheckAndCanonicalize(reader->thread(), NULL);
ASSERT(!obj.IsNull());
ASSERT(obj.IsCanonical());
}
@@ -2831,7 +2831,7 @@ RawImmutableArray* ImmutableArray::ReadFrom(SnapshotReader* reader,
if (kind == Snapshot::kFull) {
array->SetCanonical();
} else {
- *array ^= array->CheckAndCanonicalize(NULL);
+ *array ^= array->CheckAndCanonicalize(reader->thread(), NULL);
}
}
}
@@ -3247,7 +3247,7 @@ RawTypedData* TypedData::ReadFrom(SnapshotReader* reader,
// Set the canonical bit.
result.SetCanonical();
} else {
- result ^= result.CheckAndCanonicalize(NULL);
+ result ^= result.CheckAndCanonicalize(reader->thread(), NULL);
ASSERT(!result.IsNull());
ASSERT(result.IsCanonical());
}
« runtime/vm/object.cc ('K') | « runtime/vm/parser.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698