OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "src/base/build_config.h" | 11 #include "src/base/build_config.h" |
12 #include "src/base/logging.h" | 12 #include "src/base/logging.h" |
13 #include "src/base/macros.h" | 13 #include "src/base/macros.h" |
14 | 14 |
15 // Unfortunately, the INFINITY macro cannot be used with the '-pedantic' | 15 // Unfortunately, the INFINITY macro cannot be used with the '-pedantic' |
16 // warning flag and certain versions of GCC due to a bug: | 16 // warning flag and certain versions of GCC due to a bug: |
17 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931 | 17 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931 |
18 // For now, we use the more involved template-based version from <limits>, but | 18 // For now, we use the more involved template-based version from <limits>, but |
19 // only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x) | 19 // only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x) |
20 #if V8_CC_GNU && V8_GNUC_PREREQ(2, 96, 0) && !V8_GNUC_PREREQ(4, 1, 0) | 20 #if V8_CC_GNU && V8_GNUC_PREREQ(2, 96, 0) && !V8_GNUC_PREREQ(4, 1, 0) |
21 # include <limits> // NOLINT | 21 # include <limits> // NOLINT |
22 # define V8_INFINITY std::numeric_limits<double>::infinity() | 22 # define V8_INFINITY std::numeric_limits<double>::infinity() |
23 #elif V8_LIBC_MSVCRT | 23 #elif V8_LIBC_MSVCRT |
24 # define V8_INFINITY HUGE_VAL | 24 # define V8_INFINITY HUGE_VAL |
| 25 #elif V8_OS_AIX |
| 26 #define V8_INFINITY (__builtin_inff()) |
25 #else | 27 #else |
26 # define V8_INFINITY INFINITY | 28 # define V8_INFINITY INFINITY |
27 #endif | 29 #endif |
28 | 30 |
29 #if V8_TARGET_ARCH_IA32 || (V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_32_BIT) || \ | 31 #if V8_TARGET_ARCH_IA32 || (V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_32_BIT) || \ |
30 V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ | 32 V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ |
31 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC | 33 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC |
32 #define V8_TURBOFAN_BACKEND 1 | 34 #define V8_TURBOFAN_BACKEND 1 |
33 #else | 35 #else |
34 #define V8_TURBOFAN_BACKEND 0 | 36 #define V8_TURBOFAN_BACKEND 0 |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 DCHECK(IsValidFunctionKind(kind)); | 817 DCHECK(IsValidFunctionKind(kind)); |
816 return kind & FunctionKind::kDefaultConstructor; | 818 return kind & FunctionKind::kDefaultConstructor; |
817 } | 819 } |
818 | 820 |
819 | 821 |
820 } } // namespace v8::internal | 822 } } // namespace v8::internal |
821 | 823 |
822 namespace i = v8::internal; | 824 namespace i = v8::internal; |
823 | 825 |
824 #endif // V8_GLOBALS_H_ | 826 #endif // V8_GLOBALS_H_ |
OLD | NEW |