OLD | NEW |
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 const uint32_t kMaxUint32 = 0xFFFFFFFF; | 299 const uint32_t kMaxUint32 = 0xFFFFFFFF; |
300 const int64_t kMinInt64 = DART_INT64_C(0x8000000000000000); | 300 const int64_t kMinInt64 = DART_INT64_C(0x8000000000000000); |
301 const int64_t kMaxInt64 = DART_INT64_C(0x7FFFFFFFFFFFFFFF); | 301 const int64_t kMaxInt64 = DART_INT64_C(0x7FFFFFFFFFFFFFFF); |
302 const uint64_t kMaxUint64 = DART_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF); | 302 const uint64_t kMaxUint64 = DART_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF); |
303 | 303 |
304 // Types for native machine words. Guaranteed to be able to hold pointers and | 304 // Types for native machine words. Guaranteed to be able to hold pointers and |
305 // integers. | 305 // integers. |
306 typedef intptr_t word; | 306 typedef intptr_t word; |
307 typedef uintptr_t uword; | 307 typedef uintptr_t uword; |
308 | 308 |
| 309 typedef uint16_t cid_t; |
| 310 |
309 // Byte sizes. | 311 // Byte sizes. |
310 const int kWordSize = sizeof(word); | 312 const int kWordSize = sizeof(word); |
311 const int kDoubleSize = sizeof(double); // NOLINT | 313 const int kDoubleSize = sizeof(double); // NOLINT |
312 const int kFloatSize = sizeof(float); // NOLINT | 314 const int kFloatSize = sizeof(float); // NOLINT |
313 const int kQuadSize = 4 * kFloatSize; | 315 const int kQuadSize = 4 * kFloatSize; |
314 const int kSimd128Size = sizeof(simd128_value_t); // NOLINT | 316 const int kSimd128Size = sizeof(simd128_value_t); // NOLINT |
315 const int kInt32Size = sizeof(int32_t); // NOLINT | 317 const int kInt32Size = sizeof(int32_t); // NOLINT |
316 #ifdef ARCH_IS_32_BIT | 318 #ifdef ARCH_IS_32_BIT |
317 const int kWordSizeLog2 = 2; | 319 const int kWordSizeLog2 = 2; |
318 const uword kUwordMax = kMaxUint32; | 320 const uword kUwordMax = kMaxUint32; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 // should be counted from two, not one." | 546 // should be counted from two, not one." |
545 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ | 547 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ |
546 __attribute__((__format__(__printf__, string_index, first_to_check))) | 548 __attribute__((__format__(__printf__, string_index, first_to_check))) |
547 #else | 549 #else |
548 #define PRINTF_ATTRIBUTE(string_index, first_to_check) | 550 #define PRINTF_ATTRIBUTE(string_index, first_to_check) |
549 #endif | 551 #endif |
550 | 552 |
551 } // namespace dart | 553 } // namespace dart |
552 | 554 |
553 #endif // PLATFORM_GLOBALS_H_ | 555 #endif // PLATFORM_GLOBALS_H_ |
OLD | NEW |