Skip to content

Commit ec0f2c6

Browse files
committed
JIT: Eliminate useless exception check
1 parent d1a0b93 commit ec0f2c6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12331,14 +12331,16 @@ static int zend_jit_fetch_obj(dasm_State **Dst,
1233112331
| EXT_CALL zend_jit_extract_helper, REG0
1233212332
|1:
1233312333
} else if (!op1_avoid_refcounting) {
12334+
if (on_this) {
12335+
op1_info &= ~MAY_BE_RC1;
12336+
}
1233412337
| FREE_OP opline->op1_type, opline->op1, op1_info, 1, opline, ZREG_TMP1, ZREG_TMP2
1233512338
}
1233612339
}
1233712340

1233812341
if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE
1233912342
&& prop_info
12340-
&& opline->op1_type != IS_VAR
12341-
&& opline->op1_type != IS_TMP_VAR) {
12343+
&& (!(opline->op1_type & (IS_VAR|IS_TMP_VAR)) || on_this || op1_indirect)) {
1234212344
may_throw = 0;
1234312345
}
1234412346

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13036,14 +13036,16 @@ static int zend_jit_fetch_obj(dasm_State **Dst,
1303613036
| EXT_CALL zend_jit_extract_helper, r0
1303713037
|1:
1303813038
} else if (!op1_avoid_refcounting) {
13039+
if (on_this) {
13040+
op1_info &= ~MAY_BE_RC1;
13041+
}
1303913042
| FREE_OP opline->op1_type, opline->op1, op1_info, 1, opline
1304013043
}
1304113044
}
1304213045

1304313046
if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE
1304413047
&& prop_info
13045-
&& opline->op1_type != IS_VAR
13046-
&& opline->op1_type != IS_TMP_VAR) {
13048+
&& (!(opline->op1_type & (IS_VAR|IS_TMP_VAR)) || on_this || op1_indirect)) {
1304713049
may_throw = 0;
1304813050
}
1304913051

0 commit comments

Comments
 (0)