Faster slow asserts.
Review URL: http://codereview.chromium.org/8267004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
1cca5468aa
commit
6f6d744115
@ -257,11 +257,8 @@ template <int> class StaticAssertionHelper { };
|
||||
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.
|
||||
@ -273,7 +270,7 @@ bool EnableSlowAsserts();
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user