On 2011/10/13 13:21:19, Kevin Millikin wrote:
http://codereview.chromium.org/8267004/diff/1/src/checks.h
File src/checks.h (right):
http://codereview.chromium.org/8267004/diff/1/src/checks.h#newcode273
src/checks.h:273: #define SLOW_ASSERT(condition) if
(FLAG_enable_slow_asserts)
CHECK(condition)
On 2011/10/13 13:07:00, Sven wrote:
> Although it's a bit late for a comment: Using the ugly, but common "do
{ if
...
> } while(0)" idiom here would be safer...
Yes, we need that, or else the ugly
if (FLAG_enable_slow_asserts) CHECK(condition) else (void)0
as used in the CHECK_OK macro in parser.h.
I've just seen CHECK_OK for the first time... o_O This even beats our usual
2nd
order macros in terms of "readability". +1 for the greatest CPP abuse in
v8! :-)
http://codereview.chromium.org/8267004/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev