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

Unified Diff: runtime/vm/raw_object.cc

Issue 2895183002: More compact string representation on 64 bit. (Closed)
Patch Set: Created 3 years, 7 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 | « runtime/vm/raw_object.h ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.cc
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index f4a1bc17618dd1f7de376c95dd4a86f1ee78eac0..66fee3e09bd9dfc9d908e6f1470415df55d6b873 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -821,7 +821,9 @@ intptr_t RawOneByteString::VisitOneByteStringPointers(
RawOneByteString* raw_obj,
ObjectPointerVisitor* visitor) {
ASSERT(!raw_obj->ptr()->length_->IsHeapObject());
+#if !defined(HASH_IN_OBJECT_HEADER)
ASSERT(!raw_obj->ptr()->hash_->IsHeapObject());
+#endif
intptr_t length = Smi::Value(raw_obj->ptr()->length_);
return OneByteString::InstanceSize(length);
}
@@ -831,7 +833,9 @@ intptr_t RawTwoByteString::VisitTwoByteStringPointers(
RawTwoByteString* raw_obj,
ObjectPointerVisitor* visitor) {
ASSERT(!raw_obj->ptr()->length_->IsHeapObject());
+#if !defined(HASH_IN_OBJECT_HEADER)
ASSERT(!raw_obj->ptr()->hash_->IsHeapObject());
+#endif
intptr_t length = Smi::Value(raw_obj->ptr()->length_);
return TwoByteString::InstanceSize(length);
}
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698