Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: include/v8config.h

Issue 23557002: Fix definition of V8_*_C() macros. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #endif 86 #endif
87 87
88 88
89 // ----------------------------------------------------------------------------- 89 // -----------------------------------------------------------------------------
90 // Compiler detection 90 // Compiler detection
91 // 91 //
92 // V8_CC_CLANG - Clang 92 // V8_CC_CLANG - Clang
93 // V8_CC_GNU - GNU C++ 93 // V8_CC_GNU - GNU C++
94 // V8_CC_INTEL - Intel C++ 94 // V8_CC_INTEL - Intel C++
95 // V8_CC_MINGW - Minimalist GNU for Windows 95 // V8_CC_MINGW - Minimalist GNU for Windows
96 // V8_CC_MINGW32 - Minimalist GNU for Windows (mingw32)
97 // V8_CC_MINGW64 - Minimalist GNU for Windows (mingw-w64)
96 // V8_CC_MSVC - Microsoft Visual C/C++ 98 // V8_CC_MSVC - Microsoft Visual C/C++
97 // 99 //
98 // C++11 feature detection 100 // C++11 feature detection
99 // 101 //
100 // V8_HAS_CXX11_ALIGNAS - alignas specifier supported 102 // V8_HAS_CXX11_ALIGNAS - alignas specifier supported
101 // V8_HAS_CXX11_ALIGNOF - alignof(type) operator supported 103 // V8_HAS_CXX11_ALIGNOF - alignof(type) operator supported
102 // V8_HAS_CXX11_STATIC_ASSERT - static_assert() supported 104 // V8_HAS_CXX11_STATIC_ASSERT - static_assert() supported
103 // V8_HAS_CXX11_DELETE - deleted functions supported 105 // V8_HAS_CXX11_DELETE - deleted functions supported
104 // V8_HAS_CXX11_FINAL - final marker supported 106 // V8_HAS_CXX11_FINAL - final marker supported
105 // V8_HAS_CXX11_OVERRIDE - override marker supported 107 // V8_HAS_CXX11_OVERRIDE - override marker supported
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 158
157 #elif defined(__GNUC__) 159 #elif defined(__GNUC__)
158 160
159 # define V8_GNUC_PREREQ(major, minor, patchlevel) \ 161 # define V8_GNUC_PREREQ(major, minor, patchlevel) \
160 ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \ 162 ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \
161 ((major) * 10000 + (minor) * 100 + (patchlevel))) 163 ((major) * 10000 + (minor) * 100 + (patchlevel)))
162 164
163 # define V8_CC_GNU 1 165 # define V8_CC_GNU 1
164 // Intel C++ also masquerades as GCC 3.2.0 166 // Intel C++ also masquerades as GCC 3.2.0
165 # define V8_CC_INTEL (defined(__INTEL_COMPILER)) 167 # define V8_CC_INTEL (defined(__INTEL_COMPILER))
166 # define V8_CC_MINGW (defined(__MINGW32__)) 168 # define V8_CC_MINGW32 (defined(__MINGW32__))
169 # define V8_CC_MINGW64 (defined(__MINGW64__))
170 # define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64)
167 171
168 # define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0)) 172 # define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0))
169 173
170 # define V8_HAS_ATTRIBUTE_ALIGNED (V8_GNUC_PREREQ(2, 95, 0)) 174 # define V8_HAS_ATTRIBUTE_ALIGNED (V8_GNUC_PREREQ(2, 95, 0))
171 // always_inline is available in gcc 4.0 but not very reliable until 4.4. 175 // always_inline is available in gcc 4.0 but not very reliable until 4.4.
172 // Works around "sorry, unimplemented: inlining failed" build errors with 176 // Works around "sorry, unimplemented: inlining failed" build errors with
173 // older compilers. 177 // older compilers.
174 # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (V8_GNUC_PREREQ(4, 4, 0)) 178 # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (V8_GNUC_PREREQ(4, 4, 0))
175 # define V8_HAS_ATTRIBUTE_DEPRECATED (V8_GNUC_PREREQ(3, 4, 0)) 179 # define V8_HAS_ATTRIBUTE_DEPRECATED (V8_GNUC_PREREQ(3, 4, 0))
176 # define V8_HAS_ATTRIBUTE_VISIBILITY (V8_GNUC_PREREQ(4, 3, 0)) 180 # define V8_HAS_ATTRIBUTE_VISIBILITY (V8_GNUC_PREREQ(4, 3, 0))
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 # define V8_ALIGNOF(type) __alignof__(type) 359 # define V8_ALIGNOF(type) __alignof__(type)
356 #else 360 #else
357 // Note that alignment of a type within a struct can be less than the 361 // Note that alignment of a type within a struct can be less than the
358 // alignment of the type stand-alone (because of ancient ABIs), so this 362 // alignment of the type stand-alone (because of ancient ABIs), so this
359 // should only be used as a last resort. 363 // should only be used as a last resort.
360 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } 364 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; }
361 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) 365 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type))
362 #endif 366 #endif
363 367
364 #endif // V8CONFIG_H_ 368 #endif // V8CONFIG_H_
OLDNEW
« no previous file with comments | « no previous file | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698