OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 10 matching lines...) Expand all Loading... | |
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_GLOBALS_H_ | 28 #ifndef V8_GLOBALS_H_ |
29 #define V8_GLOBALS_H_ | 29 #define V8_GLOBALS_H_ |
30 | 30 |
31 // Define V8_INFINITY | |
32 #define V8_INFINITY INFINITY | |
33 | |
34 // GCC specific stuff | |
35 #ifdef __GNUC__ | |
36 | |
37 #define __GNUC_VERSION_FOR_INFTY__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) | |
38 | |
39 // Unfortunately, the INFINITY macro cannot be used with the '-pedantic' | |
40 // warning flag and certain versions of GCC due to a bug: | |
41 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931 | |
42 // For now, we use the more involved template-based version from <limits>, but | |
43 // only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x) | |
44 // __GNUC_PREREQ is not defined in GCC for Mac OS X, so we define our own macro | |
45 #if __GNUC_VERSION_FOR_INFTY__ >= 29600 && __GNUC_VERSION_FOR_INFTY__ < 40100 | |
Rico
2011/09/07 11:51:31
Chromium requires GCC 4.2 can't we remove this and
Lasse Reichstein
2011/09/07 11:59:14
We probably could, but I'd say that's an executive
| |
46 #include <limits> | |
47 #undef V8_INFINITY | |
48 #define V8_INFINITY std::numeric_limits<double>::infinity() | |
49 #endif | |
50 #undef __GNUC_VERSION_FOR_INFTY__ | |
51 | |
52 #endif // __GNUC__ | |
53 | |
54 #ifdef _MSC_VER | |
55 #undef V8_INFINITY | |
56 #define V8_INFINITY HUGE_VAL | |
57 #endif | |
58 | |
59 | |
31 #include "../include/v8stdint.h" | 60 #include "../include/v8stdint.h" |
32 | 61 |
33 namespace v8 { | 62 namespace v8 { |
34 namespace internal { | 63 namespace internal { |
35 | 64 |
36 // Processor architecture detection. For more info on what's defined, see: | 65 // Processor architecture detection. For more info on what's defined, see: |
37 // http://msdn.microsoft.com/en-us/library/b0084kay.aspx | 66 // http://msdn.microsoft.com/en-us/library/b0084kay.aspx |
38 // http://www.agner.org/optimize/calling_conventions.pdf | 67 // http://www.agner.org/optimize/calling_conventions.pdf |
39 // or with gcc, run: "echo | gcc -E -dM -" | 68 // or with gcc, run: "echo | gcc -E -dM -" |
40 #if defined(_M_X64) || defined(__x86_64__) | 69 #if defined(_M_X64) || defined(__x86_64__) |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
318 // ----------------------------------------------------------------------------- | 347 // ----------------------------------------------------------------------------- |
319 // Forward declarations for frequently used classes | 348 // Forward declarations for frequently used classes |
320 // (sorted alphabetically) | 349 // (sorted alphabetically) |
321 | 350 |
322 class FreeStoreAllocationPolicy; | 351 class FreeStoreAllocationPolicy; |
323 template <typename T, class P = FreeStoreAllocationPolicy> class List; | 352 template <typename T, class P = FreeStoreAllocationPolicy> class List; |
324 | 353 |
325 } } // namespace v8::internal | 354 } } // namespace v8::internal |
326 | 355 |
327 #endif // V8_GLOBALS_H_ | 356 #endif // V8_GLOBALS_H_ |
OLD | NEW |