Commit 93f99ec0 authored by vegorov@chromium.org's avatar vegorov@chromium.org

Provide fast-path for CHECK macro.

Makes debug build 20% faster.

R=erik.corry@gmail.com

Review URL: http://codereview.chromium.org/8256011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 436fb531
......@@ -63,7 +63,9 @@ static inline void CheckHelper(const char* file,
// The CHECK macro checks that the given condition is true; if not, it
// prints a message to stderr and aborts.
#define CHECK(condition) CheckHelper(__FILE__, __LINE__, #condition, condition)
#define CHECK(condition) do { \
if (!(condition)) CheckHelper(__FILE__, __LINE__, #condition, false); \
} while(0)
// Helper function used by the CHECK_EQ function when given int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment