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 | |
29 #if V8_TARGET_ARCH_IA32 || (V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_32_BIT) || \ | 15 #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 || \ | 16 V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ |
31 V8_TARGET_ARCH_MIPS64 | 17 V8_TARGET_ARCH_MIPS64 |
32 #define V8_TURBOFAN_BACKEND 1 | 18 #define V8_TURBOFAN_BACKEND 1 |
33 #else | 19 #else |
34 #define V8_TURBOFAN_BACKEND 0 | 20 #define V8_TURBOFAN_BACKEND 0 |
35 #endif | 21 #endif |
36 #if V8_TURBOFAN_BACKEND | 22 #if V8_TURBOFAN_BACKEND |
37 #define V8_TURBOFAN_TARGET 1 | 23 #define V8_TURBOFAN_TARGET 1 |
38 #else | 24 #else |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 DCHECK(IsValidFunctionKind(kind)); | 794 DCHECK(IsValidFunctionKind(kind)); |
809 return kind & FunctionKind::kDefaultConstructor; | 795 return kind & FunctionKind::kDefaultConstructor; |
810 } | 796 } |
811 | 797 |
812 | 798 |
813 } } // namespace v8::internal | 799 } } // namespace v8::internal |
814 | 800 |
815 namespace i = v8::internal; | 801 namespace i = v8::internal; |
816 | 802 |
817 #endif // V8_GLOBALS_H_ | 803 #endif // V8_GLOBALS_H_ |
OLD | NEW |