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 <ostream> | 11 #include <ostream> |
12 | 12 |
13 #include "src/base/build_config.h" | 13 #include "src/base/build_config.h" |
14 #include "src/base/logging.h" | 14 #include "src/base/logging.h" |
15 #include "src/base/macros.h" | 15 #include "src/base/macros.h" |
16 | 16 |
17 #ifdef V8_OS_WIN | |
18 | |
19 // Setup for Windows shared library export. | |
20 #ifdef BUILDING_V8_SHARED | |
21 #define V8_EXPORT_PRIVATE __declspec(dllexport) | |
22 #elif USING_V8_SHARED | |
23 #define V8_EXPORT_PRIVATE __declspec(dllimport) | |
24 #else | |
25 #define V8_EXPORT_PRIVATE | |
26 #endif // BUILDING_V8_SHARED | |
27 | |
28 #else // V8_OS_WIN | |
29 | |
30 // Setup for Linux shared library export. | |
31 #if V8_HAS_ATTRIBUTE_VISIBILITY | |
32 #ifdef BUILDING_V8_SHARED | |
33 #define V8_EXPORT_PRIVATE __attribute__((visibility("default"))) | |
34 #else | |
35 #define V8_EXPORT_PRIVATE | |
36 #endif | |
37 #else | |
38 #define V8_EXPORT_PRIVATE | |
39 #endif | |
40 | |
41 #endif // V8_OS_WIN | |
42 | |
43 // Unfortunately, the INFINITY macro cannot be used with the '-pedantic' | 17 // Unfortunately, the INFINITY macro cannot be used with the '-pedantic' |
44 // warning flag and certain versions of GCC due to a bug: | 18 // warning flag and certain versions of GCC due to a bug: |
45 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931 | 19 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931 |
46 // For now, we use the more involved template-based version from <limits>, but | 20 // For now, we use the more involved template-based version from <limits>, but |
47 // only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x) | 21 // only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x) |
48 #if V8_CC_GNU && V8_GNUC_PREREQ(2, 96, 0) && !V8_GNUC_PREREQ(4, 1, 0) | 22 #if V8_CC_GNU && V8_GNUC_PREREQ(2, 96, 0) && !V8_GNUC_PREREQ(4, 1, 0) |
49 # include <limits> // NOLINT | 23 # include <limits> // NOLINT |
50 # define V8_INFINITY std::numeric_limits<double>::infinity() | 24 # define V8_INFINITY std::numeric_limits<double>::infinity() |
51 #elif V8_LIBC_MSVCRT | 25 #elif V8_LIBC_MSVCRT |
52 # define V8_INFINITY HUGE_VAL | 26 # define V8_INFINITY HUGE_VAL |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, | 1207 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, |
1234 LIVE_EDIT_CURRENTLY_SET_MODE | 1208 LIVE_EDIT_CURRENTLY_SET_MODE |
1235 }; | 1209 }; |
1236 | 1210 |
1237 } // namespace internal | 1211 } // namespace internal |
1238 } // namespace v8 | 1212 } // namespace v8 |
1239 | 1213 |
1240 namespace i = v8::internal; | 1214 namespace i = v8::internal; |
1241 | 1215 |
1242 #endif // V8_GLOBALS_H_ | 1216 #endif // V8_GLOBALS_H_ |
OLD | NEW |