| 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 RUNTIME_PLATFORM_GLOBALS_H_ | 5 #ifndef RUNTIME_PLATFORM_GLOBALS_H_ |
| 6 #define RUNTIME_PLATFORM_GLOBALS_H_ | 6 #define RUNTIME_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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 const uword kUwordMax = kMaxUint32; | 451 const uword kUwordMax = kMaxUint32; |
| 452 #else | 452 #else |
| 453 const int kWordSizeLog2 = 3; | 453 const int kWordSizeLog2 = 3; |
| 454 const uword kUwordMax = kMaxUint64; | 454 const uword kUwordMax = kMaxUint64; |
| 455 #endif | 455 #endif |
| 456 | 456 |
| 457 // Bit sizes. | 457 // Bit sizes. |
| 458 const int kBitsPerByte = 8; | 458 const int kBitsPerByte = 8; |
| 459 const int kBitsPerByteLog2 = 3; | 459 const int kBitsPerByteLog2 = 3; |
| 460 const int kBitsPerInt32 = kInt32Size * kBitsPerByte; | 460 const int kBitsPerInt32 = kInt32Size * kBitsPerByte; |
| 461 const int kBitsPerInt64 = kInt64Size * kBitsPerByte; |
| 461 const int kBitsPerWord = kWordSize * kBitsPerByte; | 462 const int kBitsPerWord = kWordSize * kBitsPerByte; |
| 462 const int kBitsPerWordLog2 = kWordSizeLog2 + kBitsPerByteLog2; | 463 const int kBitsPerWordLog2 = kWordSizeLog2 + kBitsPerByteLog2; |
| 463 | 464 |
| 464 // System-wide named constants. | 465 // System-wide named constants. |
| 465 const intptr_t KB = 1024; | 466 const intptr_t KB = 1024; |
| 466 const intptr_t KBLog2 = 10; | 467 const intptr_t KBLog2 = 10; |
| 467 const intptr_t MB = KB * KB; | 468 const intptr_t MB = KB * KB; |
| 468 const intptr_t MBLog2 = KBLog2 + KBLog2; | 469 const intptr_t MBLog2 = KBLog2 + KBLog2; |
| 469 const intptr_t GB = MB * KB; | 470 const intptr_t GB = MB * KB; |
| 470 const intptr_t GBLog2 = MBLog2 + KBLog2; | 471 const intptr_t GBLog2 = MBLog2 + KBLog2; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 // tag in the ICData and check it when recreating the flow graph in | 716 // tag in the ICData and check it when recreating the flow graph in |
| 716 // optimizing compiler. Enable it for other modes (product, release) if needed | 717 // optimizing compiler. Enable it for other modes (product, release) if needed |
| 717 // for debugging. | 718 // for debugging. |
| 718 #if defined(DEBUG) | 719 #if defined(DEBUG) |
| 719 #define TAG_IC_DATA | 720 #define TAG_IC_DATA |
| 720 #endif | 721 #endif |
| 721 | 722 |
| 722 } // namespace dart | 723 } // namespace dart |
| 723 | 724 |
| 724 #endif // RUNTIME_PLATFORM_GLOBALS_H_ | 725 #endif // RUNTIME_PLATFORM_GLOBALS_H_ |
| OLD | NEW |