com php-src: Revert "Mark incorrectly used arrays and objects as escaping": ext/opcache/Optimizer/escape_analysis.c

From: Date: Wed, 13 Sep 2017 21:08:43 +0000
Subject: com php-src: Revert "Mark incorrectly used arrays and objects as escaping": ext/opcache/Optimizer/escape_analysis.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99426@lists.php.net to get a copy of this message
Commit: 8e2842c30648c9f553702beb51e828176059b029 Author: Dmitry Stogov <dmitry@zend.com> Thu, 14 Sep 2017 00:08:43 +0300 Parents: b7d683c531085a103ab423e2ed835ac21ed8e6a4 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8e2842c30648c9f553702beb51e828176059b029 Log: Revert "Mark incorrectly used arrays and objects as escaping" This reverts commit 9b2d3cce1946d913baba59ddd90fc7a8b3a192a4. Changed paths: M ext/opcache/Optimizer/escape_analysis.c Diff: diff --git a/ext/opcache/Optimizer/escape_analysis.c b/ext/opcache/Optimizer/escape_analysis.c index 7ffdf73..7b3e600 100644 --- a/ext/opcache/Optimizer/escape_analysis.c +++ b/ext/opcache/Optimizer/escape_analysis.c @@ -243,18 +243,11 @@ static int is_escape_use(zend_op_array *op_array, zend_ssa *ssa, int use, int va } break; case ZEND_ISSET_ISEMPTY_DIM_OBJ: + case ZEND_ISSET_ISEMPTY_PROP_OBJ: case ZEND_FETCH_DIM_R: - case ZEND_FETCH_DIM_IS: - if (OP1_INFO() & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_ARRAY)) { - return 1; /* incorrect type */ - } - break; case ZEND_FETCH_OBJ_R: - case ZEND_ISSET_ISEMPTY_PROP_OBJ: + case ZEND_FETCH_DIM_IS: case ZEND_FETCH_OBJ_IS: - if (OP1_INFO() & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_OBJECT)) { - return 1; /* incorrect type */ - } break; case ZEND_ASSIGN_ADD: case ZEND_ASSIGN_SUB: @@ -270,33 +263,15 @@ static int is_escape_use(zend_op_array *op_array, zend_ssa *ssa, int use, int va case ZEND_ASSIGN_POW: if (!opline->extended_value) { return 1; - } else if (opline->extended_value == ZEND_ASSIGN_DIM) { - if (OP1_INFO() & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_ARRAY)) { - return 1; /* incorrect type */ - } - } else if (opline->extended_value == ZEND_ASSIGN_OBJ) { - if (OP1_INFO() & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_OBJECT)) { - return 1; /* incorrect type */ - } } - break; + /* break missing intentionally */ case ZEND_ASSIGN_DIM: - if (OP1_INFO() & (MAY_BE_ANY-(MAY_BE_ARRAY|MAY_BE_NULL|MAY_BE_FALSE))) { - return 1; /* incorrect type */ - } - break; case ZEND_ASSIGN_OBJ: - if (OP1_INFO() & (MAY_BE_ANY-(MAY_BE_OBJECT|MAY_BE_NULL|MAY_BE_FALSE))) { - return 1; /* incorrect type */ - } break; case ZEND_PRE_INC_OBJ: case ZEND_PRE_DEC_OBJ: case ZEND_POST_INC_OBJ: case ZEND_POST_DEC_OBJ: - if (OP1_INFO() & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_OBJECT)) { - return 1; /* incorrect type */ - } break; case ZEND_INIT_ARRAY: case ZEND_ADD_ARRAY_ELEMENT:

« previous php.cvs (#99426) next »