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

Unified Diff: runtime/vm/raw_object.h

Issue 1174173007: Expand the class id to 32 bits and size field to 16 bits on 64-bit platforms. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 0c69b39f82d7178db69aacb59d41b6b695bf1fb0..0dc6aa381492b7f1b9cd68139ed6b843dd2dc03c 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -238,14 +238,27 @@ class RawObject {
kCanonicalBit = 2,
kFromSnapshotBit = 3,
kRememberedBit = 4,
- kReservedTagPos = 5, // kReservedBit{10K,100K,1M,10M}
+#if defined(ARCH_IS_32_BIT)
+ kReservedTagPos = 5, // kReservedBit{100K,1M,10M}
kReservedTagSize = 3,
kSizeTagPos = kReservedTagPos + kReservedTagSize, // = 8
kSizeTagSize = 8,
kClassIdTagPos = kSizeTagPos + kSizeTagSize, // = 16
kClassIdTagSize = 16,
+#elif defined(ARCH_IS_64_BIT)
+ kReservedTagPos = 5, // kReservedBit{100K,1M,10M}
+ kReservedTagSize = 11,
+ kSizeTagPos = kReservedTagPos + kReservedTagSize, // = 16
+ kSizeTagSize = 16,
+ kClassIdTagPos = kSizeTagPos + kSizeTagSize, // = 32
+ kClassIdTagSize = 32,
+#else
+#error Unexpected architecture word size
+#endif
};
+ COMPILE_ASSERT(kClassIdTagSize == (sizeof(classid_t) * kBitsPerByte));
+
// Encodes the object size in the tag in units of object alignment.
class SizeTag {
public:
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698