Skip to content

Commit 3ad91c8

Browse files
committed
Only record for closures
For other functions, $this is trivial to infer.
1 parent 7135a60 commit 3ad91c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/opcache/jit/zend_jit_vm_helpers.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
692692
}
693693
}
694694
op1_type |= flags;
695-
} else if (opline->op1_type == IS_UNUSED) {
695+
} else if (opline->op1_type == IS_UNUSED && (op_array->fn_flags & ZEND_ACC_CLOSURE)) {
696696
uint32_t op1_flags = ZEND_VM_OP1_FLAGS(zend_get_opcode_flags(opline->opcode));
697697
if ((op1_flags & ZEND_VM_OP_MASK) == ZEND_VM_OP_THIS) {
698+
op1_flags = IS_OBJECT;
698699
ce1 = Z_OBJCE(EX(This));
699700
}
700701
}

0 commit comments

Comments
 (0)