Skip to content

Commit eec81ee

Browse files
Fix JIT in Closure self-reference
1 parent 9b7f62a commit eec81ee

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

Zend/Optimizer/dce.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ static inline bool may_have_side_effects(
125125
case ZEND_FUNC_NUM_ARGS:
126126
case ZEND_FUNC_GET_ARGS:
127127
case ZEND_ARRAY_KEY_EXISTS:
128+
case ZEND_BIND_SELF_REFERENCE:
128129
/* No side effects */
129130
return 0;
130131
case ZEND_ADD_ARRAY_ELEMENT:

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4363,6 +4363,7 @@ static void zend_mark_cv_references(const zend_op_array *op_array, const zend_sc
43634363
case ZEND_SEND_REF:
43644364
case ZEND_SEND_VAR_EX:
43654365
case ZEND_SEND_FUNC_ARG:
4366+
case ZEND_BIND_SELF_REFERENCE:
43664367
break;
43674368
case ZEND_INIT_ARRAY:
43684369
case ZEND_ADD_ARRAY_ELEMENT:

Zend/Optimizer/zend_ssa.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@ static zend_always_inline int _zend_ssa_rename_op(const zend_op_array *op_array,
698698
case ZEND_FETCH_DIM_FUNC_ARG:
699699
case ZEND_FETCH_DIM_UNSET:
700700
case ZEND_FETCH_LIST_W:
701+
case ZEND_BIND_SELF_REFERENCE:
701702
if (opline->op1_type == IS_CV) {
702703
goto add_op1_def;
703704
}

0 commit comments

Comments
 (0)