| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 #define DART_2PART_UINT64_C(a, b) \ | 327 #define DART_2PART_UINT64_C(a, b) \ |
| 328 (((static_cast<uint64_t>(a) << 32) + 0x##b##u)) | 328 (((static_cast<uint64_t>(a) << 32) + 0x##b##u)) |
| 329 | 329 |
| 330 // Integer constants. | 330 // Integer constants. |
| 331 const int32_t kMinInt32 = 0x80000000; | 331 const int32_t kMinInt32 = 0x80000000; |
| 332 const int32_t kMaxInt32 = 0x7FFFFFFF; | 332 const int32_t kMaxInt32 = 0x7FFFFFFF; |
| 333 const uint32_t kMaxUint32 = 0xFFFFFFFF; | 333 const uint32_t kMaxUint32 = 0xFFFFFFFF; |
| 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 | 338 |
| 338 // 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 |
| 339 // integers. | 340 // integers. |
| 340 typedef intptr_t word; | 341 typedef intptr_t word; |
| 341 typedef uintptr_t uword; | 342 typedef uintptr_t uword; |
| 342 | 343 |
| 343 // Byte sizes. | 344 // Byte sizes. |
| 344 const int kWordSize = sizeof(word); | 345 const int kWordSize = sizeof(word); |
| 345 const int kDoubleSize = sizeof(double); // NOLINT | 346 const int kDoubleSize = sizeof(double); // NOLINT |
| 346 const int kFloatSize = sizeof(float); // NOLINT | 347 const int kFloatSize = sizeof(float); // NOLINT |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 // should be counted from two, not one." | 579 // should be counted from two, not one." |
| 579 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ | 580 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ |
| 580 __attribute__((__format__(__printf__, string_index, first_to_check))) | 581 __attribute__((__format__(__printf__, string_index, first_to_check))) |
| 581 #else | 582 #else |
| 582 #define PRINTF_ATTRIBUTE(string_index, first_to_check) | 583 #define PRINTF_ATTRIBUTE(string_index, first_to_check) |
| 583 #endif | 584 #endif |
| 584 | 585 |
| 585 } // namespace dart | 586 } // namespace dart |
| 586 | 587 |
| 587 #endif // PLATFORM_GLOBALS_H_ | 588 #endif // PLATFORM_GLOBALS_H_ |
| OLD | NEW |