com php-src: Optimized === and !== with NULL , FALSE, TRUE.: Zend/zend_operators.h
| From: | Dmitry Stogov | Date: | Thu, 14 May 2015 22:11:29 +0000 |
| Subject: | com php-src: Optimized === and !== with NULL , FALSE, TRUE.: Zend/zend_operators.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86764@lists.php.net to get a copy of this message | ||
Commit: 196b9517281aebd972e7f287433aa97af2e06087
Author: Dmitry Stogov <dmitry@zend.com> Fri, 15 May 2015 01:11:29 +0300
Parents: 06693c3d43ac04ffac9a95081ab60ae179a6e568
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=196b9517281aebd972e7f287433aa97af2e06087
Log:
Optimized === and !== with NULL, FALSE, TRUE.
Changed paths:
M Zend/zend_operators.h
Diff:
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index 5e16bf8..c026f23 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -848,6 +848,8 @@ static zend_always_inline int fast_is_identical_function(zval *op1, zval *op2)
{
if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) {
return 0;
+ } else if (Z_TYPE_P(op1) <= IS_TRUE) {
+ return 1;
}
return zend_is_identical(op1, op2);
}
@@ -856,6 +858,8 @@ static zend_always_inline int fast_is_not_identical_function(zval *op1, zval *op
{
if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) {
return 1;
+ } else if (Z_TYPE_P(op1) <= IS_TRUE) {
+ return 0;
}
return !zend_is_identical(op1, op2);
}