Skip to content

Commit

Permalink
More accurate reference counting inference
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Aug 17, 2017
1 parent 30fb70d commit 3866c16
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ext/opcache/Optimizer/zend_inference.c
Original file line number Diff line number Diff line change
Expand Up @@ -2978,13 +2978,10 @@ static int zend_update_type_info(const zend_op_array *op_array,
}
tmp |= MAY_BE_ARRAY | MAY_BE_RC1;
}
if (t1 & MAY_BE_STRING) {
tmp |= MAY_BE_RC1;
}
if (t1 & MAY_BE_ARRAY) {
if (t1 & (MAY_BE_STRING|MAY_BE_ARRAY)) {
tmp |= MAY_BE_RC1;
if (opline->opcode == ZEND_FETCH_DIM_FUNC_ARG) {
tmp |= MAY_BE_RCN;
tmp |= t1 & MAY_BE_RCN;
}
}
if (t1 & (MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
Expand Down

0 comments on commit 3866c16

Please sign in to comment.