Skip to content

Commit dba2294

Browse files
committed
ZEND_DEREF can't throw, and doesn't have side-effects
1 parent e38a22d commit dba2294

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-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_GET_ARGS:
126126
case ZEND_ARRAY_KEY_EXISTS:
127127
case ZEND_COPY_TMP:
128+
case ZEND_DEREF:
128129
/* No side effects */
129130
return false;
130131
case ZEND_FREE:

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5033,6 +5033,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
50335033
case ZEND_COPY_TMP:
50345034
case ZEND_JMP_NULL:
50355035
case ZEND_JMP_FRAMELESS:
5036+
case ZEND_DEREF:
50365037
return 0;
50375038
case ZEND_IS_IDENTICAL:
50385039
case ZEND_IS_NOT_IDENTICAL:

0 commit comments

Comments
 (0)