diff options
Diffstat (limited to 'ext/opcache/Optimizer/optimize_temp_vars_5.c')
| -rw-r--r-- | ext/opcache/Optimizer/optimize_temp_vars_5.c | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/ext/opcache/Optimizer/optimize_temp_vars_5.c b/ext/opcache/Optimizer/optimize_temp_vars_5.c index eb0e7686a6..f0e5747dc6 100644 --- a/ext/opcache/Optimizer/optimize_temp_vars_5.c +++ b/ext/opcache/Optimizer/optimize_temp_vars_5.c @@ -39,7 +39,7 @@ max = i; \ } -void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx) +void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx) { int T = op_array->T; int offset = op_array->last_var; @@ -139,13 +139,6 @@ void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *c } } - /* Skip OP_DATA */ - if (opline->opcode == ZEND_OP_DATA && - (opline-1)->opcode == ZEND_ASSIGN_DIM) { - opline--; - continue; - } - if ((ZEND_OP2_TYPE(opline) & (IS_VAR | IS_TMP_VAR))) { currT = VAR_NUM(ZEND_OP2(opline).var) - offset; if (!zend_bitset_in(valid_T, currT)) { @@ -156,19 +149,6 @@ void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *c ZEND_OP2(opline).var = NUM_VAR(map_T[currT] + offset); } - /* Allocate OP_DATA->op2 after "operands", but before "result" */ - if (opline->opcode == ZEND_ASSIGN_DIM && - (opline + 1)->opcode == ZEND_OP_DATA && - ZEND_OP2_TYPE(opline + 1) & (IS_VAR | IS_TMP_VAR)) { - currT = VAR_NUM(ZEND_OP2(opline + 1).var) - offset; - GET_AVAILABLE_T(); - map_T[currT] = i; - zend_bitset_incl(valid_T, currT); - zend_bitset_excl(taken_T, i); - ZEND_OP2(opline + 1).var = NUM_VAR(i + offset); - var_to_free = i; - } - if (ZEND_RESULT_TYPE(opline) & (IS_VAR | IS_TMP_VAR)) { currT = VAR_NUM(ZEND_RESULT(opline).var) - offset; if (zend_bitset_in(valid_T, currT)) { @@ -190,16 +170,11 @@ void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *c } } } - } else { /* Au still needs to be assigned a T which is a bit dumb. Should consider changing Zend */ + } else { + /* Code which gets here is using a wrongly built opcode such as RECV() */ GET_AVAILABLE_T(); - - if (RESULT_UNUSED(opline)) { - zend_bitset_excl(taken_T, i); - } else { - /* Code which gets here is using a wrongly built opcode such as RECV() */ - map_T[currT] = i; - zend_bitset_incl(valid_T, currT); - } + map_T[currT] = i; + zend_bitset_incl(valid_T, currT); ZEND_RESULT(opline).var = NUM_VAR(i + offset); } } |
