OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_BASE_MACROS_H_ | 5 #ifndef V8_BASE_MACROS_H_ |
6 #define V8_BASE_MACROS_H_ | 6 #define V8_BASE_MACROS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 # else | 339 # else |
340 # define V8_UINT64_C(x) (x ## UL) | 340 # define V8_UINT64_C(x) (x ## UL) |
341 # define V8_INT64_C(x) (x ## L) | 341 # define V8_INT64_C(x) (x ## L) |
342 # endif | 342 # endif |
343 # define V8_INTPTR_C(x) (x ## L) | 343 # define V8_INTPTR_C(x) (x ## L) |
344 # define V8_PTR_PREFIX "l" | 344 # define V8_PTR_PREFIX "l" |
345 #else | 345 #else |
346 # define V8_UINT64_C(x) (x ## ULL) | 346 # define V8_UINT64_C(x) (x ## ULL) |
347 # define V8_INT64_C(x) (x ## LL) | 347 # define V8_INT64_C(x) (x ## LL) |
348 # define V8_INTPTR_C(x) (x) | 348 # define V8_INTPTR_C(x) (x) |
| 349 #if V8_OS_AIX |
| 350 #define V8_PTR_PREFIX "l" |
| 351 #else |
349 # define V8_PTR_PREFIX "" | 352 # define V8_PTR_PREFIX "" |
350 #endif | 353 #endif |
| 354 #endif |
351 | 355 |
352 #define V8PRIxPTR V8_PTR_PREFIX "x" | 356 #define V8PRIxPTR V8_PTR_PREFIX "x" |
353 #define V8PRIdPTR V8_PTR_PREFIX "d" | 357 #define V8PRIdPTR V8_PTR_PREFIX "d" |
354 #define V8PRIuPTR V8_PTR_PREFIX "u" | 358 #define V8PRIuPTR V8_PTR_PREFIX "u" |
355 | 359 |
356 // Fix for Mac OS X defining uintptr_t as "unsigned long": | 360 // Fix for Mac OS X defining uintptr_t as "unsigned long": |
357 #if V8_OS_MACOSX | 361 #if V8_OS_MACOSX |
358 #undef V8PRIxPTR | 362 #undef V8PRIxPTR |
359 #define V8PRIxPTR "lx" | 363 #define V8PRIxPTR "lx" |
360 #endif | 364 #endif |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 } | 413 } |
410 | 414 |
411 template <> | 415 template <> |
412 inline bool is_fundamental<uint8_t>() { | 416 inline bool is_fundamental<uint8_t>() { |
413 return true; | 417 return true; |
414 } | 418 } |
415 } | 419 } |
416 } // namespace v8::base | 420 } // namespace v8::base |
417 | 421 |
418 #endif // V8_BASE_MACROS_H_ | 422 #endif // V8_BASE_MACROS_H_ |
OLD | NEW |