summaryrefslogtreecommitdiff
path: root/deps/v8/src/checks.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/checks.h')
-rw-r--r--deps/v8/src/checks.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/deps/v8/src/checks.h b/deps/v8/src/checks.h
index 5ea59920a..6b493225a 100644
--- a/deps/v8/src/checks.h
+++ b/deps/v8/src/checks.h
@@ -30,8 +30,6 @@
#include <string.h>
-#include "flags.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 +277,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 +291,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 +307,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)