com php-src: Optimizer support for ZEND_IN_ARRAY: ext/o pcache/Optimizer/block_pass.c ext/opcache/Optimizer/zend _inference.c

[email protected] (Dmitry Stogov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    89b3c9f647abccf41acdca8638882cfb19983318
Author:    Dmitry Stogov <[email protected]>         Wed, 24 May 2017 23:37:35 +0300
Parents:   7c7383067f6719324004407e17c0f5d6c740c39f
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=89b3c9f647abccf41acdca8638882cfb19983318

Log:
Optimizer support for ZEND_IN_ARRAY

Changed paths:
  M  ext/opcache/Optimizer/block_pass.c
  M  ext/opcache/Optimizer/zend_inference.c


Diff:
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 3bd5281..1d50184 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -532,6 +532,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
 							case ZEND_INSTANCEOF:
 							case ZEND_TYPE_CHECK:
 							case ZEND_DEFINED:
+							case ZEND_IN_ARRAY:
 								if (opline->opcode == ZEND_BOOL_NOT) {
 									break;
 								}
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index b3ec0c7..5c064be 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -2185,6 +2185,7 @@ static void zend_update_type_info(const zend_op_array *op_array,
 		case ZEND_ISSET_ISEMPTY_PROP_OBJ:
 		case ZEND_ISSET_ISEMPTY_STATIC_PROP:
 		case ZEND_ASSERT_CHECK:
+		case ZEND_IN_ARRAY:
 			UPDATE_SSA_TYPE(MAY_BE_FALSE|MAY_BE_TRUE, ssa_ops[i].result_def);
 			break;
 		case ZEND_CAST:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.