Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 (__has_attribute(warn_unused_result)) | 227 (__has_attribute(warn_unused_result)) |
| 228 | 228 |
| 229 # define V8_HAS_BUILTIN_EXPECT (__has_builtin(__builtin_expect)) | 229 # define V8_HAS_BUILTIN_EXPECT (__has_builtin(__builtin_expect)) |
| 230 | 230 |
| 231 # define V8_HAS_CXX11_ALIGNAS (__has_feature(cxx_alignas)) | 231 # define V8_HAS_CXX11_ALIGNAS (__has_feature(cxx_alignas)) |
| 232 # define V8_HAS_CXX11_STATIC_ASSERT (__has_feature(cxx_static_assert)) | 232 # define V8_HAS_CXX11_STATIC_ASSERT (__has_feature(cxx_static_assert)) |
| 233 # define V8_HAS_CXX11_DELETE (__has_feature(cxx_deleted_functions)) | 233 # define V8_HAS_CXX11_DELETE (__has_feature(cxx_deleted_functions)) |
| 234 # define V8_HAS_CXX11_FINAL (__has_feature(cxx_override_control)) | 234 # define V8_HAS_CXX11_FINAL (__has_feature(cxx_override_control)) |
| 235 # define V8_HAS_CXX11_OVERRIDE (__has_feature(cxx_override_control)) | 235 # define V8_HAS_CXX11_OVERRIDE (__has_feature(cxx_override_control)) |
| 236 | 236 |
| 237 # if defined(_MSC_VER) | |
|
Benedikt Meurer
2014/01/27 06:25:38
Please add a comment why this is necessary.
| |
| 238 # define V8_CC_MSVC 1 | |
| 239 # endif | |
| 240 | |
| 237 #elif defined(__GNUC__) | 241 #elif defined(__GNUC__) |
| 238 | 242 |
| 239 # define V8_CC_GNU 1 | 243 # define V8_CC_GNU 1 |
| 240 // Intel C++ also masquerades as GCC 3.2.0 | 244 // Intel C++ also masquerades as GCC 3.2.0 |
| 241 # define V8_CC_INTEL (defined(__INTEL_COMPILER)) | 245 # define V8_CC_INTEL (defined(__INTEL_COMPILER)) |
| 242 # define V8_CC_MINGW32 (defined(__MINGW32__)) | 246 # define V8_CC_MINGW32 (defined(__MINGW32__)) |
| 243 # define V8_CC_MINGW64 (defined(__MINGW64__)) | 247 # define V8_CC_MINGW64 (defined(__MINGW64__)) |
| 244 # define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64) | 248 # define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64) |
| 245 | 249 |
| 246 # define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0)) | 250 # define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0)) |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 462 # define V8_ALIGNOF(type) __alignof__(type) | 466 # define V8_ALIGNOF(type) __alignof__(type) |
| 463 #else | 467 #else |
| 464 // Note that alignment of a type within a struct can be less than the | 468 // Note that alignment of a type within a struct can be less than the |
| 465 // alignment of the type stand-alone (because of ancient ABIs), so this | 469 // alignment of the type stand-alone (because of ancient ABIs), so this |
| 466 // should only be used as a last resort. | 470 // should only be used as a last resort. |
| 467 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } | 471 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } |
| 468 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) | 472 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) |
| 469 #endif | 473 #endif |
| 470 | 474 |
| 471 #endif // V8CONFIG_H_ | 475 #endif // V8CONFIG_H_ |
| OLD | NEW |