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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // integers. | 279 // integers. |
280 typedef intptr_t word; | 280 typedef intptr_t word; |
281 typedef uintptr_t uword; | 281 typedef uintptr_t uword; |
282 | 282 |
283 // Byte sizes. | 283 // Byte sizes. |
284 const int kWordSize = sizeof(word); | 284 const int kWordSize = sizeof(word); |
285 const int kDoubleSize = sizeof(double); // NOLINT | 285 const int kDoubleSize = sizeof(double); // NOLINT |
286 const int kFloatSize = sizeof(float); // NOLINT | 286 const int kFloatSize = sizeof(float); // NOLINT |
287 const int kQuadSize = 4 * kFloatSize; | 287 const int kQuadSize = 4 * kFloatSize; |
288 const int kSimd128Size = sizeof(simd128_value_t); // NOLINT | 288 const int kSimd128Size = sizeof(simd128_value_t); // NOLINT |
| 289 const int kInt32Size = sizeof(int32_t); // NOLINT |
289 #ifdef ARCH_IS_32_BIT | 290 #ifdef ARCH_IS_32_BIT |
290 const int kWordSizeLog2 = 2; | 291 const int kWordSizeLog2 = 2; |
291 const uword kUwordMax = kMaxUint32; | 292 const uword kUwordMax = kMaxUint32; |
292 #else | 293 #else |
293 const int kWordSizeLog2 = 3; | 294 const int kWordSizeLog2 = 3; |
294 const uword kUwordMax = kMaxUint64; | 295 const uword kUwordMax = kMaxUint64; |
295 #endif | 296 #endif |
296 | 297 |
297 // Bit sizes. | 298 // Bit sizes. |
298 const int kBitsPerByte = 8; | 299 const int kBitsPerByte = 8; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods | 511 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods |
511 // have an implicit 'this' argument, the arguments of such methods | 512 // have an implicit 'this' argument, the arguments of such methods |
512 // should be counted from two, not one." | 513 // should be counted from two, not one." |
513 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ | 514 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ |
514 __attribute__((__format__(__printf__, string_index, first_to_check))) | 515 __attribute__((__format__(__printf__, string_index, first_to_check))) |
515 #else | 516 #else |
516 #define PRINTF_ATTRIBUTE(string_index, first_to_check) | 517 #define PRINTF_ATTRIBUTE(string_index, first_to_check) |
517 #endif | 518 #endif |
518 | 519 |
519 #endif // PLATFORM_GLOBALS_H_ | 520 #endif // PLATFORM_GLOBALS_H_ |
OLD | NEW |