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

Side by Side Diff: include/v8config.h

Issue 23295034: Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix windows build. 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/api.cc » ('j') | src/time/elapsed-timer.h » ('J')
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 161
160 #elif defined(__GNUC__) 162 #elif defined(__GNUC__)
161 163
162 # define V8_GNUC_PREREQ(major, minor, patchlevel) \ 164 # define V8_GNUC_PREREQ(major, minor, patchlevel) \
163 ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \ 165 ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \
164 ((major) * 10000 + (minor) * 100 + (patchlevel))) 166 ((major) * 10000 + (minor) * 100 + (patchlevel)))
165 167
166 # define V8_CC_GNU 1 168 # define V8_CC_GNU 1
167 // Intel C++ also masquerades as GCC 3.2.0 169 // Intel C++ also masquerades as GCC 3.2.0
168 # define V8_CC_INTEL (defined(__INTEL_COMPILER)) 170 # define V8_CC_INTEL (defined(__INTEL_COMPILER))
169 # define V8_CC_MINGW (defined(__MINGW32__)) 171 # define V8_CC_MINGW32 (defined(__MINGW32__))
172 # define V8_CC_MINGW64 (defined(__MINGW64__))
173 # define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64)
170 174
171 # define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0)) 175 # define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0))
172 176
173 # define V8_HAS_ATTRIBUTE_ALIGNED (V8_GNUC_PREREQ(2, 95, 0)) 177 # define V8_HAS_ATTRIBUTE_ALIGNED (V8_GNUC_PREREQ(2, 95, 0))
174 // always_inline is available in gcc 4.0 but not very reliable until 4.4. 178 // always_inline is available in gcc 4.0 but not very reliable until 4.4.
175 // Works around "sorry, unimplemented: inlining failed" build errors with 179 // Works around "sorry, unimplemented: inlining failed" build errors with
176 // older compilers. 180 // older compilers.
177 # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (V8_GNUC_PREREQ(4, 4, 0)) 181 # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (V8_GNUC_PREREQ(4, 4, 0))
178 # define V8_HAS_ATTRIBUTE_DEPRECATED (V8_GNUC_PREREQ(3, 4, 0)) 182 # define V8_HAS_ATTRIBUTE_DEPRECATED (V8_GNUC_PREREQ(3, 4, 0))
179 # define V8_HAS_ATTRIBUTE_NOINLINE (V8_GNUC_PREREQ(3, 4, 0)) 183 # define V8_HAS_ATTRIBUTE_NOINLINE (V8_GNUC_PREREQ(3, 4, 0))
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 # define V8_ALIGNOF(type) __alignof__(type) 375 # define V8_ALIGNOF(type) __alignof__(type)
372 #else 376 #else
373 // Note that alignment of a type within a struct can be less than the 377 // Note that alignment of a type within a struct can be less than the
374 // alignment of the type stand-alone (because of ancient ABIs), so this 378 // alignment of the type stand-alone (because of ancient ABIs), so this
375 // should only be used as a last resort. 379 // should only be used as a last resort.
376 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } 380 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; }
377 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) 381 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type))
378 #endif 382 #endif
379 383
380 #endif // V8CONFIG_H_ 384 #endif // V8CONFIG_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/time/elapsed-timer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698