Status: Accepted
Owner: [email protected]
CC: [email protected],  [email protected]
Labels: Type-Bug Priority-Medium

New issue 2304 by [email protected]: Introduce a way to disable debug asserts to make V8 faster in debug mode
http://code.google.com/p/v8/issues/detail?id=2304

We already have the "--enable_slow_asserts" flag, but even this this flag off the WebKit layout tests take about 4 hours to complete on Android devices in debug mode. Not passing the DEBUG preprocessor flag to V8 brings that time down to 1.5 hours according to [email protected]

Android team would like to be able to build faster version of V8 in debug mode so that they could run layout tests with Chromium DCHECKs.

At the moment the following straightforward solution produces a lot of "unused variable" compile errors.

#if defined(DEBUG) && !defined(DISABLE_DEBUG_ASSERTS)
#define ASSERT_RESULT(expr)    CHECK(expr)
#define ASSERT(condition)      CHECK(condition)
#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 ASSERT_LT(v1, v2)      CHECK_LT(v1, v2)
#define ASSERT_LE(v1, v2)      CHECK_LE(v1, v2)
#define SLOW_ASSERT(condition) CHECK(!FLAG_enable_slow_asserts || (condition))
#else
#define ASSERT_RESULT(expr)    (expr)
#define ASSERT(condition)      ((void) 0)
#define ASSERT_EQ(v1, v2)      ((void) 0)
#define ASSERT_NE(v1, v2)      ((void) 0)
#define ASSERT_GE(v1, v2)      ((void) 0)
#define ASSERT_LT(v1, v2)      ((void) 0)
#define ASSERT_LE(v1, v2)      ((void) 0)
#define SLOW_ASSERT(condition) ((void) 0)
#endif



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to