Commit a59d3ba9 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Reland initial bits of "Implement correct OS and CC detection."

This adds the OS and CC detection and cleans up the globals.h to
some degree. It also places all of the C++11 feature detection into
globals.h.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/21223003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 82e4ba6f
......@@ -30,6 +30,8 @@
#include <string.h>
#include "globals.h"
#include "../include/v8stdint.h"
extern "C" void V8_Fatal(const char* file, int line, const char* format, ...);
......@@ -232,7 +234,7 @@ inline void CheckNonEqualsHelper(const char* file,
// Use C++11 static_assert if possible, which gives error
// messages that are easier to understand on first sight.
#if __cplusplus >= 201103L
#if V8_CXX_STATIC_ASSERT
#define STATIC_CHECK(test) static_assert(test, #test)
#else
// This is inspired by the static assertion facility in boost. This
......@@ -254,7 +256,7 @@ template <int> class StaticAssertionHelper { };
typedef \
StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>((test))>)> \
SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
#endif
#endif // V8_CXX_STATIC_ASSERT
extern bool FLAG_enable_slow_asserts;
......
This diff is collapsed.
......@@ -1933,7 +1933,7 @@ void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
// If false, it is returned as a pointer to a preallocated by caller memory
// region. Pointer to this region should be passed to a function as an
// implicit first argument.
#if defined(USING_BSD_ABI) || defined(__MINGW32__) || defined(__CYGWIN__)
#if V8_OS_BSD4 || V8_OS_MINGW32 || V8_OS_CYGWIN
static const bool kReturnHandlesDirectly = true;
#else
static const bool kReturnHandlesDirectly = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment