@@ -6661,6 +6661,24 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, int b,
6661
6661
| SAVE_VALID_OPLINE opline
6662
6662
| EXT_CALL zend_is_true, r0
6663
6663
6664
+ if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) &&
6665
+ (op1_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) {
6666
+ op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
6667
+
6668
+ | IF_NOT_ZVAL_REFCOUNTED op1_addr, >3
6669
+ | GET_ZVAL_PTR FCARG1a, op1_addr
6670
+ | GC_DELREF FCARG1a
6671
+ | jnz >3
6672
+ | mov aword T1, r0 // save
6673
+ | ZVAL_DTOR_FUNC op1_info, opline
6674
+ | mov r0, aword T1 // restore
6675
+ |3:
6676
+ }
6677
+ if (zend_may_throw(opline, op_array, ssa)) {
6678
+ | MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r1
6679
+ | jne ->exception_handler_undef
6680
+ }
6681
+
6664
6682
if (set_bool) {
6665
6683
if (set_bool_not) {
6666
6684
| neg eax
@@ -6669,12 +6687,6 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, int b,
6669
6687
| add eax, 2
6670
6688
}
6671
6689
| SET_ZVAL_TYPE_INFO res_addr, eax
6672
- | FREE_OP opline->op1_type, opline->op1, op1_info, !(op1_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG)), op_array, opline
6673
- if (zend_may_throw(opline, op_array, ssa)) {
6674
- if (!zend_jit_check_exception_undef_result(Dst, opline)) {
6675
- return 0;
6676
- }
6677
- }
6678
6690
if (true_label != (uint32_t)-1 || false_label != (uint32_t)-1) {
6679
6691
| CMP_ZVAL_TYPE res_addr, IS_FALSE
6680
6692
if (true_label != (uint32_t)-1) {
@@ -6693,25 +6705,6 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, int b,
6693
6705
|.code
6694
6706
}
6695
6707
} else {
6696
-
6697
- if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) &&
6698
- (op1_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) {
6699
- op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
6700
-
6701
- | IF_NOT_ZVAL_REFCOUNTED op1_addr, >3
6702
- | GET_ZVAL_PTR FCARG1a, op1_addr
6703
- | GC_DELREF FCARG1a
6704
- | jnz >3
6705
- | mov aword T1, r0 // save
6706
- | ZVAL_DTOR_FUNC op1_info, opline
6707
- | mov r0, aword T1 // restore
6708
- |3:
6709
- }
6710
- if (zend_may_throw(opline, op_array, ssa)) {
6711
- | MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r1
6712
- | jne ->exception_handler_undef
6713
- }
6714
-
6715
6708
| test r0, r0
6716
6709
if (true_label != (uint32_t)-1) {
6717
6710
| jne =>true_label
0 commit comments