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' |
| 16 // warning flag and certain versions of GCC due to a bug: |
| 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 |
| 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) |
| 21 # include <limits> // NOLINT |
| 22 # define V8_INFINITY std::numeric_limits<double>::infinity() |
| 23 #elif V8_LIBC_MSVCRT |
| 24 # define V8_INFINITY HUGE_VAL |
| 25 #else |
| 26 # define V8_INFINITY INFINITY |
| 27 #endif |
| 28 |
15 #if V8_TARGET_ARCH_IA32 || (V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_32_BIT) || \ | 29 #if V8_TARGET_ARCH_IA32 || (V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_32_BIT) || \ |
16 V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ | 30 V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ |
17 V8_TARGET_ARCH_MIPS64 | 31 V8_TARGET_ARCH_MIPS64 |
18 #define V8_TURBOFAN_BACKEND 1 | 32 #define V8_TURBOFAN_BACKEND 1 |
19 #else | 33 #else |
20 #define V8_TURBOFAN_BACKEND 0 | 34 #define V8_TURBOFAN_BACKEND 0 |
21 #endif | 35 #endif |
22 #if V8_TURBOFAN_BACKEND | 36 #if V8_TURBOFAN_BACKEND |
23 #define V8_TURBOFAN_TARGET 1 | 37 #define V8_TURBOFAN_TARGET 1 |
24 #else | 38 #else |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 DCHECK(IsValidFunctionKind(kind)); | 808 DCHECK(IsValidFunctionKind(kind)); |
795 return kind & FunctionKind::kDefaultConstructor; | 809 return kind & FunctionKind::kDefaultConstructor; |
796 } | 810 } |
797 | 811 |
798 | 812 |
799 } } // namespace v8::internal | 813 } } // namespace v8::internal |
800 | 814 |
801 namespace i = v8::internal; | 815 namespace i = v8::internal; |
802 | 816 |
803 #endif // V8_GLOBALS_H_ | 817 #endif // V8_GLOBALS_H_ |
OLD | NEW |