Reviewers: Vyacheslav Egorov,
Description:
Faster slow asserts.
Please review this at http://codereview.chromium.org/8267004/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/checks.h
Index: src/checks.h
===================================================================
--- src/checks.h (revision 9605)
+++ src/checks.h (working copy)
@@ -257,12 +257,9 @@
SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
-namespace v8 { namespace internal {
+extern bool FLAG_enable_slow_asserts;
-bool EnableSlowAsserts();
-} } // namespace v8::internal
-
// The ASSERT macro is equivalent to CHECK except that it only
// generates code in debug builds.
#ifdef DEBUG
@@ -273,7 +270,7 @@
#define ASSERT_GE(v1, v2) CHECK_GE(v1, v2)
#define ASSERT_LT(v1, v2) CHECK_LT(v1, v2)
#define ASSERT_LE(v1, v2) CHECK_LE(v1, v2)
-#define SLOW_ASSERT(condition) if (EnableSlowAsserts()) CHECK(condition)
+#define SLOW_ASSERT(condition) if (FLAG_enable_slow_asserts)
CHECK(condition)
#else
#define ASSERT_RESULT(expr) (expr)
#define ASSERT(condition) ((void) 0)
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev