Skip to content

Commit

Permalink
JIT: Eliminate useless exception check
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 24, 2021
1 parent d1a0b93 commit ec0f2c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions ext/opcache/jit/zend_jit_arm64.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -12331,14 +12331,16 @@ static int zend_jit_fetch_obj(dasm_State **Dst,
| EXT_CALL zend_jit_extract_helper, REG0
|1:
} else if (!op1_avoid_refcounting) {
if (on_this) {
op1_info &= ~MAY_BE_RC1;
}
| FREE_OP opline->op1_type, opline->op1, op1_info, 1, opline, ZREG_TMP1, ZREG_TMP2
}
}

if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE
&& prop_info
&& opline->op1_type != IS_VAR
&& opline->op1_type != IS_TMP_VAR) {
&& (!(opline->op1_type & (IS_VAR|IS_TMP_VAR)) || on_this || op1_indirect)) {
may_throw = 0;
}

Expand Down
6 changes: 4 additions & 2 deletions ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -13036,14 +13036,16 @@ static int zend_jit_fetch_obj(dasm_State **Dst,
| EXT_CALL zend_jit_extract_helper, r0
|1:
} else if (!op1_avoid_refcounting) {
if (on_this) {
op1_info &= ~MAY_BE_RC1;
}
| FREE_OP opline->op1_type, opline->op1, op1_info, 1, opline
}
}

if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE
&& prop_info
&& opline->op1_type != IS_VAR
&& opline->op1_type != IS_TMP_VAR) {
&& (!(opline->op1_type & (IS_VAR|IS_TMP_VAR)) || on_this || op1_indirect)) {
may_throw = 0;
}

Expand Down

0 comments on commit ec0f2c6

Please sign in to comment.