return 0;
}
-//static void ZEND_FASTCALL zend_jit_verify_arg_slow(zval *arg, const zend_op_array *op_array, uint32_t arg_num, zend_arg_info *arg_info, void **cache_slot)
-static int ZEND_FASTCALL zend_jit_verify_arg_slow(zval *arg, zend_arg_info *arg_info)
+static zend_bool ZEND_FASTCALL zend_jit_verify_arg_slow(zval *arg, zend_arg_info *arg_info)
{
zend_execute_data *execute_data = EG(current_execute_data);
const zend_op *opline = EX(opline);
void **cache_slot = CACHE_ADDR(opline->extended_value);
+ zend_bool ret;
- if (UNEXPECTED(!zend_jit_verify_type_common(arg, arg_info, cache_slot))) {
+ ret = zend_jit_verify_type_common(arg, arg_info, cache_slot);
+ if (UNEXPECTED(!ret)) {
zend_verify_arg_error(EX(func), arg_info, opline->op1.num, cache_slot, arg);
return 0;
}
- return 1;
+ return ret;
}
static void ZEND_FASTCALL zend_jit_verify_return_slow(zval *arg, const zend_op_array *op_array, zend_arg_info *arg_info, void **cache_slot)
| SAVE_VALID_OPLINE opline, r0
| EXT_CALL zend_jit_prepare_assign_dim_ref, r0
| test r0, r0
- | jz ->exception_handler_undef
| mov FCARG1a, r0
- | jmp >1
+ | jne >1
+ | jmp ->exception_handler_undef
|.code
|1:
op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FCARG1a, 0);
| SAVE_VALID_OPLINE opline, r0
| EXT_CALL zend_jit_prepare_assign_dim_ref, r0
| test r0, r0
- | jz ->exception_handler_undef
| mov FCARG1a, r0
- | jmp >1
+ | jne >1
+ | jmp ->exception_handler_undef
|.code
|1:
op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FCARG1a, 0);
| mov FCARG1a, RX
}
| EXT_CALL zend_jit_deprecated_helper, r0
- | MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r0
- | jne ->exception_handler
+ | test al, al
| mov r0, EX:RX->func // reload
- | jmp >1
+ | jne >1
+ | jmp ->exception_handler
|.code
|1:
}
| mov FCARG1a, RX
}
| EXT_CALL zend_jit_deprecated_helper, r0
- | MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r0
- | jne ->exception_handler
+ | test al, al
+ | je ->exception_handler
}
}
| mov FCARG1a, RX
}
| EXT_CALL zend_jit_deprecated_helper, r0
- | MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r0
- | jne ->exception_handler
+ | test al, al
| mov r0, EX:RX->func // reload
- | jmp >1
+ | jne >1
+ | jmp ->exception_handler
|.code
|1:
}
| mov FCARG1a, RX
}
| EXT_CALL zend_jit_deprecated_helper, r0
- | MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r0
- | jne ->exception_handler
+ | test al, al
+ | je ->exception_handler
| mov r0, EX:RX->func // reload
}
}
| EXT_CALL zend_jit_verify_arg_slow, r0
if (check_exception) {
- | test eax, eax
- | jz ->exception_handler
- }
-
- if (in_cold) {
+ | test al, al
+ if (in_cold) {
+ | jnz >1
+ | jmp ->exception_handler
+ |.code
+ |1:
+ } else {
+ | jz ->exception_handler
+ }
+ } else if (in_cold) {
| jmp >1
|.code
|1:
if (!ZEND_TYPE_IS_SET(arg_info->type)) {
break;
}
- if (!zend_jit_verify_arg_type(Dst, opline, arg_info, 0)) {
+ if (!zend_jit_verify_arg_type(Dst, opline, arg_info, may_throw)) {
return 0;
}
} while (0);
}
- if (may_throw) {
- if (!zend_jit_check_exception(Dst)) {
- return 0;
- }
- }
-
if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) {
if (is_last) {
| LOAD_IP_ADDR (opline + 1)