OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // of type F. Used to invoke generated code from within C. | 326 // of type F. Used to invoke generated code from within C. |
327 template <typename F> | 327 template <typename F> |
328 F FUNCTION_CAST(Address addr) { | 328 F FUNCTION_CAST(Address addr) { |
329 return reinterpret_cast<F>(reinterpret_cast<intptr_t>(addr)); | 329 return reinterpret_cast<F>(reinterpret_cast<intptr_t>(addr)); |
330 } | 330 } |
331 | 331 |
332 | 332 |
333 // Compiler feature detection. | 333 // Compiler feature detection. |
334 #if defined(__clang__) | 334 #if defined(__clang__) |
335 | 335 |
336 // Compatibility with older clang versions. | 336 # if __has_feature(cxx_override_control) |
337 # ifndef __has_extension | |
338 # define __has_extension __has_feature | |
339 # endif | |
340 | |
341 # if __has_extension(cxx_override_control) | |
342 # define V8_HAVE_CXX11_FINAL | 337 # define V8_HAVE_CXX11_FINAL |
343 # define V8_HAVE_CXX11_OVERRIDE | 338 # define V8_HAVE_CXX11_OVERRIDE |
344 # endif | 339 # endif |
345 | 340 |
346 #elif defined(__GNUC__) | 341 #elif defined(__GNUC__) |
347 | 342 |
348 // g++ requires -std=c++0x or -std=gnu++0x to support C++11 functionality | 343 // g++ requires -std=c++0x or -std=gnu++0x to support C++11 functionality |
349 // without warnings (functionality used by the macros below). These modes | 344 // without warnings (functionality used by the macros below). These modes |
350 // are detectable by checking whether __GXX_EXPERIMENTAL_CXX0X__ is defined or, | 345 // are detectable by checking whether __GXX_EXPERIMENTAL_CXX0X__ is defined or, |
351 // more standardly, by checking whether __cplusplus has a C++11 or greater | 346 // more standardly, by checking whether __cplusplus has a C++11 or greater |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // the backend, so both modes are represented by the kStrictMode value. | 509 // the backend, so both modes are represented by the kStrictMode value. |
515 enum StrictModeFlag { | 510 enum StrictModeFlag { |
516 kNonStrictMode, | 511 kNonStrictMode, |
517 kStrictMode | 512 kStrictMode |
518 }; | 513 }; |
519 | 514 |
520 | 515 |
521 } } // namespace v8::internal | 516 } } // namespace v8::internal |
522 | 517 |
523 #endif // V8_GLOBALS_H_ | 518 #endif // V8_GLOBALS_H_ |
OLD | NEW |