| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 VM_GLOBALS_H_ | 5 #ifndef VM_GLOBALS_H_ |
| 6 #define VM_GLOBALS_H_ | 6 #define VM_GLOBALS_H_ |
| 7 | 7 |
| 8 // __STDC_FORMAT_MACROS has to be defined to enable platform independent printf. | 8 // __STDC_FORMAT_MACROS has to be defined to enable platform independent printf. |
| 9 #ifndef __STDC_FORMAT_MACROS | 9 #ifndef __STDC_FORMAT_MACROS |
| 10 #define __STDC_FORMAT_MACROS | 10 #define __STDC_FORMAT_MACROS |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 // Bit sizes. | 162 // Bit sizes. |
| 163 const int kBitsPerByte = 8; | 163 const int kBitsPerByte = 8; |
| 164 const int kBitsPerByteLog2 = 3; | 164 const int kBitsPerByteLog2 = 3; |
| 165 const int kBitsPerWord = kWordSize * kBitsPerByte; | 165 const int kBitsPerWord = kWordSize * kBitsPerByte; |
| 166 | 166 |
| 167 // System-wide named constants. | 167 // System-wide named constants. |
| 168 const int KB = 1024; | 168 const int KB = 1024; |
| 169 const int MB = KB * KB; | 169 const int MB = KB * KB; |
| 170 const int GB = KB * KB * KB; | 170 const int GB = KB * KB * KB; |
| 171 const intptr_t kIntptrOne = 1; |
| 172 const intptr_t kIntptrMin = (kIntptrOne << (kBitsPerWord - 1)); |
| 173 const intptr_t kIntptrMax = ~kIntptrMin; |
| 171 | 174 |
| 172 // Time constants. | 175 // Time constants. |
| 173 const int kMillisecondsPerSecond = 1000; | 176 const int kMillisecondsPerSecond = 1000; |
| 174 const int kMicrosecondsPerMillisecond = 1000; | 177 const int kMicrosecondsPerMillisecond = 1000; |
| 175 const int kMicrosecondsPerSecond = (kMicrosecondsPerMillisecond * | 178 const int kMicrosecondsPerSecond = (kMicrosecondsPerMillisecond * |
| 176 kMillisecondsPerSecond); | 179 kMillisecondsPerSecond); |
| 177 const int kNanosecondsPerMicrosecond = 1000; | 180 const int kNanosecondsPerMicrosecond = 1000; |
| 178 const int kNanosecondsPerMillisecond = (kNanosecondsPerMicrosecond * | 181 const int kNanosecondsPerMillisecond = (kNanosecondsPerMicrosecond * |
| 179 kMicrosecondsPerMillisecond); | 182 kMicrosecondsPerMillisecond); |
| 180 const int kNanosecondsPerSecond = (kNanosecondsPerMicrosecond * | 183 const int kNanosecondsPerSecond = (kNanosecondsPerMicrosecond * |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // contants are 16 byte aligned. | 354 // contants are 16 byte aligned. |
| 352 #if defined(TARGET_OS_WINDOWS) | 355 #if defined(TARGET_OS_WINDOWS) |
| 353 #define ALIGN16 __declspec(align(16)) | 356 #define ALIGN16 __declspec(align(16)) |
| 354 #else | 357 #else |
| 355 #define ALIGN16 __attribute__((aligned(16))) | 358 #define ALIGN16 __attribute__((aligned(16))) |
| 356 #endif | 359 #endif |
| 357 | 360 |
| 358 } // namespace dart | 361 } // namespace dart |
| 359 | 362 |
| 360 #endif // VM_GLOBALS_H_ | 363 #endif // VM_GLOBALS_H_ |
| OLD | NEW |