| Index: src/checks.h
|
| diff --git a/src/checks.h b/src/checks.h
|
| index 5ea59920ac1ee7497d7ee7c252e8906cb47600b6..e0704774ba453ecfee4daaff0de1987869b34a77 100644
|
| --- a/src/checks.h
|
| +++ b/src/checks.h
|
| @@ -30,7 +30,7 @@
|
|
|
| #include <string.h>
|
|
|
| -#include "flags.h"
|
| +#include "../include/v8stdint.h"
|
|
|
| extern "C" void V8_Fatal(const char* file, int line, const char* format, ...);
|
| void API_Fatal(const char* location, const char* format, ...);
|
| @@ -279,6 +279,12 @@ template <int> class StaticAssertionHelper { };
|
| SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
|
|
|
|
|
| +namespace v8 { namespace internal {
|
| +
|
| +bool EnableSlowAsserts();
|
| +
|
| +} } // namespace v8::internal
|
| +
|
| // The ASSERT macro is equivalent to CHECK except that it only
|
| // generates code in debug builds.
|
| #ifdef DEBUG
|
| @@ -287,7 +293,7 @@ template <int> class StaticAssertionHelper { };
|
| #define ASSERT_EQ(v1, v2) CHECK_EQ(v1, v2)
|
| #define ASSERT_NE(v1, v2) CHECK_NE(v1, v2)
|
| #define ASSERT_GE(v1, v2) CHECK_GE(v1, v2)
|
| -#define SLOW_ASSERT(condition) if (FLAG_enable_slow_asserts) CHECK(condition)
|
| +#define SLOW_ASSERT(condition) if (EnableSlowAsserts()) CHECK(condition)
|
| #else
|
| #define ASSERT_RESULT(expr) (expr)
|
| #define ASSERT(condition) ((void) 0)
|
| @@ -303,11 +309,16 @@ template <int> class StaticAssertionHelper { };
|
| // and release compilation modes behaviour.
|
| #define STATIC_ASSERT(test) STATIC_CHECK(test)
|
|
|
| +namespace v8 { namespace internal {
|
| +
|
| +intptr_t HeapObjectTagMask();
|
| +
|
| +} } // namespace v8::internal
|
|
|
| #define ASSERT_TAG_ALIGNED(address) \
|
| - ASSERT((reinterpret_cast<intptr_t>(address) & kHeapObjectTagMask) == 0)
|
| + ASSERT((reinterpret_cast<intptr_t>(address) & HeapObjectTagMask()) == 0)
|
|
|
| -#define ASSERT_SIZE_TAG_ALIGNED(size) ASSERT((size & kHeapObjectTagMask) == 0)
|
| +#define ASSERT_SIZE_TAG_ALIGNED(size) ASSERT((size & HeapObjectTagMask()) == 0)
|
|
|
| #define ASSERT_NOT_NULL(p) ASSERT_NE(NULL, p)
|
|
|
|
|