Skip to content

Commit 75d7e60

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Avoid unnecessary checks
2 parents c4f97a1 + db34491 commit 75d7e60

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3489,7 +3489,9 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra
34893489
| mov FCARG1a, FP
34903490
}
34913491
| EXT_CALL handler, r0
3492-
if (may_throw) {
3492+
if (may_throw
3493+
&& opline->opcode != ZEND_RETURN
3494+
&& opline->opcode != ZEND_RETURN_BY_REF) {
34933495
| MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r1
34943496
| jne ->exception_handler
34953497
}
@@ -3511,14 +3513,16 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra
35113513
}
35123514

35133515
if (zend_jit_trace_may_exit(op_array, opline)) {
3514-
// TODO: try to avoid this check ???
35153516
if (opline->opcode == ZEND_RETURN ||
35163517
opline->opcode == ZEND_RETURN_BY_REF ||
35173518
opline->opcode == ZEND_GENERATOR_CREATE) {
35183519

35193520
if (zend_jit_vm_kind == ZEND_VM_KIND_HYBRID) {
3521+
#if 0
3522+
/* this check should be handled by the following OPLINE guard or jmp [IP] */
35203523
| cmp IP, zend_jit_halt_op
35213524
| je ->trace_halt
3525+
#endif
35223526
} else if (GCC_GLOBAL_REGS) {
35233527
| test IP, IP
35243528
| je ->trace_halt

0 commit comments

Comments
 (0)