Skip to content

Commit 3626cc0

Browse files
do not collect constants after FRAMELESS calls either
1 parent 1526406 commit 3626cc0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Zend/Optimizer/pass1.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "zend_constants.h"
3434
#include "zend_execute.h"
3535
#include "zend_vm.h"
36+
#include "zend_vm_opcodes.h"
3637

3738
#define TO_STRING_NOWARN(val) do { \
3839
if (Z_TYPE_P(val) < IS_ARRAY) { \
@@ -267,7 +268,11 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
267268
case ZEND_DO_UCALL:
268269
case ZEND_DO_FCALL:
269270
case ZEND_DO_FCALL_BY_NAME:
270-
/* don't collect constants after any UCALL/FCALL */
271+
case ZEND_FRAMELESS_ICALL_0:
272+
case ZEND_FRAMELESS_ICALL_1:
273+
case ZEND_FRAMELESS_ICALL_2:
274+
case ZEND_FRAMELESS_ICALL_3:
275+
/* don't collect constants after any UCALL/FCALL/FRAMELESS ICALL */
271276
collect_constants = 0;
272277
break;
273278
case ZEND_STRLEN:

0 commit comments

Comments
 (0)