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

Unified Diff: runtime/vm/clustered_snapshot.cc

Issue 2965723002: VM: Reland Inline instance object hash code into object header on 64bit. (Closed)
Patch Set: Fix snapshot incompatibility that sank Flutter Gallery Created 3 years, 6 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/clustered_snapshot.cc
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 56f766f12be9fac832267c510f8fd1b84074f7a3..a5346975c0b9972b38066db3c30421f50ddb3e45 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -40,12 +40,15 @@ void Deserializer::InitializeHeader(RawObject* raw,
bool is_vm_isolate,
bool is_canonical) {
ASSERT(Utils::IsAligned(size, kObjectAlignment));
- uword tags = 0;
+ uint32_t tags = 0;
tags = RawObject::ClassIdTag::update(class_id, tags);
tags = RawObject::SizeTag::update(size, tags);
tags = RawObject::VMHeapObjectTag::update(is_vm_isolate, tags);
tags = RawObject::CanonicalObjectTag::update(is_canonical, tags);
raw->ptr()->tags_ = tags;
+#if defined(HASH_IN_OBJECT_HEADER)
+ raw->ptr()->hash_ = 0;
+#endif
}
« no previous file with comments | « runtime/vm/become.cc ('k') | runtime/vm/freelist.h » ('j') | runtime/vm/intrinsifier.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698