From: Nikita Popov Date: Mon, 19 Feb 2018 20:38:10 +0000 (+0100) Subject: Simplify code X-Git-Tag: php-7.3.0alpha1~336 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df1439241a660376be6357fa32cd1eda0b75bca7;p=php Simplify code If operator overloading is ignored tmp will be 0 and we can still use |=. No need to separate this into two cases. --- diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 08ae51667e..346958b651 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2161,11 +2161,7 @@ static uint32_t binary_op_result_type( * handling */ break; case ZEND_MOD: - if (ZEND_OPTIMIZER_IGNORE_OVERLOADING & optimization_level) { - tmp = MAY_BE_LONG; - } else { - tmp |= MAY_BE_LONG; - } + tmp |= MAY_BE_LONG; /* Division by zero results in an exception, so it doesn't need any special handling */ break; case ZEND_BW_OR: @@ -2180,11 +2176,7 @@ static uint32_t binary_op_result_type( break; case ZEND_SL: case ZEND_SR: - if (ZEND_OPTIMIZER_IGNORE_OVERLOADING & optimization_level) { - tmp = MAY_BE_LONG; - } else { - tmp |= MAY_BE_LONG; - } + tmp |= MAY_BE_LONG; break; case ZEND_CONCAT: case ZEND_FAST_CONCAT: