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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | runtime/vm/assembler_arm64.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef PLATFORM_GLOBALS_H_ 5 #ifndef PLATFORM_GLOBALS_H_
6 #define PLATFORM_GLOBALS_H_ 6 #define PLATFORM_GLOBALS_H_
7 7
8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to 8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to
9 // enable platform independent printf format specifiers. 9 // enable platform independent printf format specifiers.
10 #ifndef __STDC_FORMAT_MACROS 10 #ifndef __STDC_FORMAT_MACROS
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 const int64_t kMinInt64 = DART_INT64_C(0x8000000000000000); 334 const int64_t kMinInt64 = DART_INT64_C(0x8000000000000000);
335 const int64_t kMaxInt64 = DART_INT64_C(0x7FFFFFFFFFFFFFFF); 335 const int64_t kMaxInt64 = DART_INT64_C(0x7FFFFFFFFFFFFFFF);
336 const uint64_t kMaxUint64 = DART_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF); 336 const uint64_t kMaxUint64 = DART_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF);
337 const int64_t kSignBitDouble = DART_INT64_C(0x8000000000000000); 337 const int64_t kSignBitDouble = DART_INT64_C(0x8000000000000000);
338 338
339 // Types for native machine words. Guaranteed to be able to hold pointers and 339 // Types for native machine words. Guaranteed to be able to hold pointers and
340 // integers. 340 // integers.
341 typedef intptr_t word; 341 typedef intptr_t word;
342 typedef uintptr_t uword; 342 typedef uintptr_t uword;
343 343
344 // Size of a class id. We may make this 32-bit on 64-bit architectures. 344 // Size of a class id.
345 #if defined(ARCH_IS_32_BIT)
345 typedef uint16_t classid_t; 346 typedef uint16_t classid_t;
347 #elif defined(ARCH_IS_64_BIT)
348 typedef uint32_t classid_t;
349 #else
350 #error Unexpected architecture word size
351 #endif
346 352
347 // Byte sizes. 353 // Byte sizes.
348 const int kWordSize = sizeof(word); 354 const int kWordSize = sizeof(word);
349 const int kDoubleSize = sizeof(double); // NOLINT 355 const int kDoubleSize = sizeof(double); // NOLINT
350 const int kFloatSize = sizeof(float); // NOLINT 356 const int kFloatSize = sizeof(float); // NOLINT
351 const int kQuadSize = 4 * kFloatSize; 357 const int kQuadSize = 4 * kFloatSize;
352 const int kSimd128Size = sizeof(simd128_value_t); // NOLINT 358 const int kSimd128Size = sizeof(simd128_value_t); // NOLINT
353 const int kInt32Size = sizeof(int32_t); // NOLINT 359 const int kInt32Size = sizeof(int32_t); // NOLINT
354 #ifdef ARCH_IS_32_BIT 360 #ifdef ARCH_IS_32_BIT
355 const int kWordSizeLog2 = 2; 361 const int kWordSizeLog2 = 2;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // should be counted from two, not one." 588 // should be counted from two, not one."
583 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ 589 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \
584 __attribute__((__format__(__printf__, string_index, first_to_check))) 590 __attribute__((__format__(__printf__, string_index, first_to_check)))
585 #else 591 #else
586 #define PRINTF_ATTRIBUTE(string_index, first_to_check) 592 #define PRINTF_ATTRIBUTE(string_index, first_to_check)
587 #endif 593 #endif
588 594
589 } // namespace dart 595 } // namespace dart
590 596
591 #endif // PLATFORM_GLOBALS_H_ 597 #endif // PLATFORM_GLOBALS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | runtime/vm/assembler_arm64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698