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 "include/v8stdint.h" | 8 #include "include/v8stdint.h" |
9 | 9 |
10 #include "src/base/build_config.h" | 10 #include "src/base/build_config.h" |
11 #include "src/base/logging.h" | 11 #include "src/base/logging.h" |
12 #include "src/base/macros.h" | 12 #include "src/base/macros.h" |
13 | 13 |
14 // Unfortunately, the INFINITY macro cannot be used with the '-pedantic' | 14 // Unfortunately, the INFINITY macro cannot be used with the '-pedantic' |
15 // warning flag and certain versions of GCC due to a bug: | 15 // warning flag and certain versions of GCC due to a bug: |
16 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931 | 16 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931 |
17 // For now, we use the more involved template-based version from <limits>, but | 17 // For now, we use the more involved template-based version from <limits>, but |
18 // only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x) | 18 // only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x) |
19 #if V8_CC_GNU && V8_GNUC_PREREQ(2, 96, 0) && !V8_GNUC_PREREQ(4, 1, 0) | 19 #if V8_CC_GNU && V8_GNUC_PREREQ(2, 96, 0) && !V8_GNUC_PREREQ(4, 1, 0) |
20 # include <limits> // NOLINT | 20 # include <limits> // NOLINT |
21 # define V8_INFINITY std::numeric_limits<double>::infinity() | 21 # define V8_INFINITY std::numeric_limits<double>::infinity() |
22 #elif V8_LIBC_MSVCRT | 22 #elif V8_LIBC_MSVCRT |
23 # define V8_INFINITY HUGE_VAL | 23 # define V8_INFINITY HUGE_VAL |
24 #else | 24 #else |
25 # define V8_INFINITY INFINITY | 25 # define V8_INFINITY INFINITY |
26 #endif | 26 #endif |
27 | 27 |
| 28 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM || \ |
| 29 V8_TARGET_ARCH_ARM64 |
| 30 #define V8_TURBOFAN_BACKEND 1 |
| 31 #else |
| 32 #define V8_TURBOFAN_BACKEND 0 |
| 33 #endif |
| 34 #if V8_TURBOFAN_BACKEND && !V8_TARGET_ARCH_ARM64 && \ |
| 35 !(V8_OS_WIN && V8_TARGET_ARCH_X64) |
| 36 #define V8_TURBOFAN_TARGET 1 |
| 37 #else |
| 38 #define V8_TURBOFAN_TARGET 0 |
| 39 #endif |
| 40 |
28 namespace v8 { | 41 namespace v8 { |
29 | 42 |
30 namespace base { | 43 namespace base { |
31 class Mutex; | 44 class Mutex; |
32 class RecursiveMutex; | 45 class RecursiveMutex; |
33 class VirtualMemory; | 46 class VirtualMemory; |
34 } | 47 } |
35 | 48 |
36 namespace internal { | 49 namespace internal { |
37 | 50 |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 enum MinusZeroMode { | 747 enum MinusZeroMode { |
735 TREAT_MINUS_ZERO_AS_ZERO, | 748 TREAT_MINUS_ZERO_AS_ZERO, |
736 FAIL_ON_MINUS_ZERO | 749 FAIL_ON_MINUS_ZERO |
737 }; | 750 }; |
738 | 751 |
739 } } // namespace v8::internal | 752 } } // namespace v8::internal |
740 | 753 |
741 namespace i = v8::internal; | 754 namespace i = v8::internal; |
742 | 755 |
743 #endif // V8_GLOBALS_H_ | 756 #endif // V8_GLOBALS_H_ |
OLD | NEW |