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

Unified Diff: runtime/platform/globals.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 | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 679dad14d3ac5f981597a8daf1feb5cd4c5528d1..cdca889f7bc2a868d9ec5de00435c5d237e5d88e 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -341,8 +341,14 @@ const int64_t kSignBitDouble = DART_INT64_C(0x8000000000000000);
typedef intptr_t word;
typedef uintptr_t uword;
-// Size of a class id. We may make this 32-bit on 64-bit architectures.
+// Size of a class id.
+#if defined(ARCH_IS_32_BIT)
typedef uint16_t classid_t;
+#elif defined(ARCH_IS_64_BIT)
+typedef uint32_t classid_t;
+#else
+#error Unexpected architecture word size
+#endif
// Byte sizes.
const int kWordSize = sizeof(word);
@@ -351,6 +357,7 @@ const int kFloatSize = sizeof(float); // NOLINT
const int kQuadSize = 4 * kFloatSize;
const int kSimd128Size = sizeof(simd128_value_t); // NOLINT
const int kInt32Size = sizeof(int32_t); // NOLINT
+const int kInt16Size = sizeof(int16_t); // NOLINT
#ifdef ARCH_IS_32_BIT
const int kWordSizeLog2 = 2;
const uword kUwordMax = kMaxUint32;
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698