Skip to content

Commit

Permalink
Add RC flags in init_func_return_info
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Feb 17, 2018
1 parent fd5644c commit 1a50a50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/opcache/Optimizer/zend_inference.c
Original file line number Diff line number Diff line change
Expand Up @@ -3699,6 +3699,8 @@ void zend_init_func_return_info(const zend_op_array *op_array,
ret->type = zend_fetch_arg_info(script, ret_info, &ret->ce);
if (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
ret->type |= MAY_BE_REF;
} else if (ret->type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
ret->type |= MAY_BE_RC1|MAY_BE_RCN;
}
ret->is_instanceof = (ret->ce) ? 1 : 0;
ret->range = tmp_range;
Expand Down

0 comments on commit 1a50a50

Please sign in to comment.