Revision: 9607
Author: [email protected]
Date: Thu Oct 13 04:54:19 2011
Log: Faster slow asserts.
Review URL: http://codereview.chromium.org/8267004
http://code.google.com/p/v8/source/detail?r=9607
Modified:
/branches/bleeding_edge/src/checks.h
=======================================
--- /branches/bleeding_edge/src/checks.h Mon Aug 29 04:41:23 2011
+++ /branches/bleeding_edge/src/checks.h Thu Oct 13 04:54:19 2011
@@ -257,11 +257,8 @@
SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
-namespace v8 { namespace internal {
-
-bool EnableSlowAsserts();
-
-} } // namespace v8::internal
+extern bool FLAG_enable_slow_asserts;
+
// The ASSERT macro is equivalent to CHECK except that it only
// generates code in debug builds.
@@ -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