diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-08-05 08:55:09 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-08-05 08:55:09 +0900 |
commit | d6ac5c53d481b109cb684d818b14ff24afb5b4bb (patch) | |
tree | ef68da970989b56fc496d65061a19126ecba4ae3 /include/ruby/assert.h | |
parent | aaf69a8ba866193863a7eafe5c6044844bd71bc3 (diff) |
Revert "Always evaluate the expression RUBY_ASSERT_MESG_WHEN just once"
It caused a significant benchmark fall. Some assertions seem to
use expressions with side-effects which cannot be inlined.
This reverts commit b452c03a14f943ae25338547bd680fce67399d85.
Diffstat (limited to 'include/ruby/assert.h')
-rw-r--r-- | include/ruby/assert.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/assert.h b/include/ruby/assert.h index bdc0234c58..d19d8e4e32 100644 --- a/include/ruby/assert.h +++ b/include/ruby/assert.h @@ -23,7 +23,7 @@ NORETURN(void rb_assert_failure(const char *, int, const char *, const char *)); ((RUBY_DEBUG+0) ? RUBY_ASSERT_MESG((expr), mesg) : \ __builtin_choose_expr( \ __builtin_constant_p(cond), \ - __builtin_choose_expr(cond, RUBY_ASSERT_MESG(expr, mesg), (void)(expr)), \ + __builtin_choose_expr(cond, RUBY_ASSERT_MESG(expr, mesg), (void)0), \ RUBY_ASSERT_MESG(!(cond) || (expr), mesg))) #else # define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) \ |