Lines Matching refs:opline

322                                        const zend_op  *opline,
827 …f jit_EMALLOC(zend_jit_ctx *jit, size_t size, const zend_op_array *op_array, const zend_op *opline) in jit_EMALLOC() argument
833 ir_CONST_U32(opline ? opline->lineno : 0), in jit_EMALLOC()
847 …E(zend_jit_ctx *jit, ir_ref ptr, size_t size, const zend_op_array *op_array, const zend_op *opline) in jit_EFREE() argument
853 ir_CONST_U32(opline ? opline->lineno : 0), in jit_EFREE()
918 ir_STORE(jit_EX(opline), ref); in jit_LOAD_IP()
946 static void zend_jit_set_last_valid_opline(zend_jit_ctx *jit, const zend_op *opline) in zend_jit_set_last_valid_opline() argument
950 jit->last_valid_opline = opline; in zend_jit_set_last_valid_opline()
1024 addr = jit_EX(opline); in zend_jit_set_ip()
1042 ir_STORE(jit_EX(opline), ir_CONST_ADDR(target)); in zend_jit_set_ip()
1054 ir_STORE(jit_EX(opline), ir_HARD_COPY_A(ir_CONST_ADDR(target))); in zend_jit_set_ip_ex()
1066 ir_STORE(jit_EX(opline), jit_IP(jit)); in jit_SET_EX_OPLINE()
1069 ir_STORE(jit_EX(opline), ir_CONST_ADDR(target)); in jit_SET_EX_OPLINE()
1737 static void jit_ZVAL_DTOR(zend_jit_ctx *jit, ir_ref ref, uint32_t op_info, const zend_op *opline) in jit_ZVAL_DTOR() argument
1747 …if (opline && ((op_info) & (MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE|… in jit_ZVAL_DTOR()
1748 jit_SET_EX_OPLINE(jit, opline); in jit_ZVAL_DTOR()
1756 if (opline) { in jit_ZVAL_DTOR()
1757 jit_SET_EX_OPLINE(jit, opline); in jit_ZVAL_DTOR()
1763 if (opline) { in jit_ZVAL_DTOR()
1764 jit_SET_EX_OPLINE(jit, opline); in jit_ZVAL_DTOR()
1773 const zend_op *opline) in jit_ZVAL_PTR_DTOR() argument
1796 jit_ZVAL_DTOR(jit, ref, op_info, opline); in jit_ZVAL_PTR_DTOR()
1829 if (opline) { in jit_ZVAL_PTR_DTOR()
1830 jit_SET_EX_OPLINE(jit, opline); in jit_ZVAL_PTR_DTOR()
1846 const zend_op *opline) in jit_FREE_OP() argument
1851 op_info, 0, opline); in jit_FREE_OP()
1881 static void zend_jit_check_timeout(zend_jit_ctx *jit, const zend_op *opline, const void *exit_addr) in zend_jit_check_timeout() argument
1887 } else if (!opline || jit->last_valid_opline == opline) { in zend_jit_check_timeout()
1893 jit_LOAD_IP_ADDR(jit, opline); in zend_jit_check_timeout()
2003 ir_STORE(jit_EX(opline), jit_IP(jit)); in zend_jit_interrupt_handler_stub()
2020 jit_STORE_IP(jit, ir_LOAD_A(jit_EX(opline))); in zend_jit_interrupt_handler_stub()
2041 ir_LOAD_A(jit_EX(opline))); in zend_jit_leave_function_handler_stub()
2123 ir_ref opline, ref, rx, if_eq, if_tmp; in zend_jit_throw_cannot_pass_by_ref_stub() local
2126 opline = ir_LOAD_A(jit_FP(jit)); in zend_jit_throw_cannot_pass_by_ref_stub()
2129 ref = ir_LOAD_U32(ir_ADD_OFFSET(opline, offsetof(zend_op, result.var))); in zend_jit_throw_cannot_pass_by_ref_stub()
2150 jit_STORE_IP(jit, opline); in zend_jit_throw_cannot_pass_by_ref_stub()
2154 ir_LOAD_U32(ir_ADD_OFFSET(opline, offsetof(zend_op, op2.num)))); in zend_jit_throw_cannot_pass_by_ref_stub()
2183 jit_STORE_IP(jit, ir_LOAD_A(jit_EX(opline))); in zend_jit_icall_throw_stub()
2197 ir_STORE(jit_EX(opline), jit_IP(jit)); in zend_jit_icall_throw_stub()
2210 jit_STORE_IP(jit, ir_LOAD_A(jit_EX(opline))); in zend_jit_leave_throw_stub()
2224 ir_STORE(jit_EX(opline), jit_IP(jit)); in zend_jit_leave_throw_stub()
2331 addr = ir_ADD_A(offset, ir_LOAD_A(jit_EX(opline))); in _zend_jit_orig_opline_handler()
2369 ref = ir_LOAD_A(jit_EX(opline)); in _zend_jit_hybrid_trace_counter_stub()
2442 ir_STORE(jit_EX(opline), jit_IP(jit)); in zend_jit_trace_exit_stub()
2454 ref = ir_LOAD_A(jit_EX(opline)); in zend_jit_trace_exit_stub()
2469 ref = ir_LOAD_A(jit_EX(opline)); in zend_jit_trace_exit_stub()
2515 ir_ref opline = ir_LOAD_A(jit_EX(opline)); in zend_jit_cannot_add_element_stub() local
2519 ir_LOAD_U8(ir_ADD_OFFSET(opline, offsetof(zend_op, result_type))), in zend_jit_cannot_add_element_stub()
2523 ref = ir_LOAD_U32(ir_ADD_OFFSET(opline, offsetof(zend_op, result.var))); in zend_jit_cannot_add_element_stub()
2925 zend_op opline; in zend_jit_setup_disasm() local
2927 memset(&opline, 0, sizeof(opline)); in zend_jit_setup_disasm()
2929 opline.opcode = ZEND_DO_UCALL; in zend_jit_setup_disasm()
2930 opline.result_type = IS_UNUSED; in zend_jit_setup_disasm()
2931 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2932 …ir_disasm_add_symbol("ZEND_DO_UCALL_SPEC_RETVAL_UNUSED_LABEL", (uint64_t)(uintptr_t)opline.handler… in zend_jit_setup_disasm()
2934 opline.opcode = ZEND_DO_UCALL; in zend_jit_setup_disasm()
2935 opline.result_type = IS_VAR; in zend_jit_setup_disasm()
2936 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2937 …ir_disasm_add_symbol("ZEND_DO_UCALL_SPEC_RETVAL_USED_LABEL", (uint64_t)(uintptr_t)opline.handler, … in zend_jit_setup_disasm()
2939 opline.opcode = ZEND_DO_FCALL_BY_NAME; in zend_jit_setup_disasm()
2940 opline.result_type = IS_UNUSED; in zend_jit_setup_disasm()
2941 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2942 …l("ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_UNUSED_LABEL", (uint64_t)(uintptr_t)opline.handler, sizeof(vo… in zend_jit_setup_disasm()
2944 opline.opcode = ZEND_DO_FCALL_BY_NAME; in zend_jit_setup_disasm()
2945 opline.result_type = IS_VAR; in zend_jit_setup_disasm()
2946 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2947 …ir_disasm_add_symbol("ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_LABEL", (uint64_t)(uintptr_t)opline.h… in zend_jit_setup_disasm()
2949 opline.opcode = ZEND_DO_FCALL; in zend_jit_setup_disasm()
2950 opline.result_type = IS_UNUSED; in zend_jit_setup_disasm()
2951 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2952 …ir_disasm_add_symbol("ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_LABEL", (uint64_t)(uintptr_t)opline.handler… in zend_jit_setup_disasm()
2954 opline.opcode = ZEND_DO_FCALL; in zend_jit_setup_disasm()
2955 opline.result_type = IS_VAR; in zend_jit_setup_disasm()
2956 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2957 …ir_disasm_add_symbol("ZEND_DO_FCALL_SPEC_RETVAL_USED_LABEL", (uint64_t)(uintptr_t)opline.handler, … in zend_jit_setup_disasm()
2959 opline.opcode = ZEND_RETURN; in zend_jit_setup_disasm()
2960 opline.op1_type = IS_CONST; in zend_jit_setup_disasm()
2961 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2962 …ir_disasm_add_symbol("ZEND_RETURN_SPEC_CONST_LABEL", (uint64_t)(uintptr_t)opline.handler, sizeof(v… in zend_jit_setup_disasm()
2964 opline.opcode = ZEND_RETURN; in zend_jit_setup_disasm()
2965 opline.op1_type = IS_TMP_VAR; in zend_jit_setup_disasm()
2966 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2967 …ir_disasm_add_symbol("ZEND_RETURN_SPEC_TMP_LABEL", (uint64_t)(uintptr_t)opline.handler, sizeof(voi… in zend_jit_setup_disasm()
2969 opline.opcode = ZEND_RETURN; in zend_jit_setup_disasm()
2970 opline.op1_type = IS_VAR; in zend_jit_setup_disasm()
2971 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2972 …ir_disasm_add_symbol("ZEND_RETURN_SPEC_VAR_LABEL", (uint64_t)(uintptr_t)opline.handler, sizeof(voi… in zend_jit_setup_disasm()
2974 opline.opcode = ZEND_RETURN; in zend_jit_setup_disasm()
2975 opline.op1_type = IS_CV; in zend_jit_setup_disasm()
2976 zend_vm_set_opcode_handler(&opline); in zend_jit_setup_disasm()
2977 …ir_disasm_add_symbol("ZEND_RETURN_SPEC_CV_LABEL", (uint64_t)(uintptr_t)opline.handler, sizeof(void… in zend_jit_setup_disasm()
3600 const zend_op *opline = &jit->op_array->opcodes[bb->start + bb->len - 1]; in zend_jit_case_start() local
3602 if (opline->opcode == ZEND_SWITCH_LONG in zend_jit_case_start()
3603 || opline->opcode == ZEND_SWITCH_STRING in zend_jit_case_start()
3604 || opline->opcode == ZEND_MATCH) { in zend_jit_case_start()
3605 HashTable *jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); in zend_jit_case_start()
3606 const zend_op *default_opline = ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value); in zend_jit_case_start()
3613 const zend_op *target = ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(zv)); in zend_jit_case_start()
3812 const zend_op *opline = &jit->op_array->opcodes[bb->start + bb->len - 1]; in zend_jit_bb_end() local
3815 ZEND_ASSERT(opline->opcode == ZEND_SWITCH_LONG in zend_jit_bb_end()
3816 || opline->opcode == ZEND_SWITCH_STRING in zend_jit_bb_end()
3817 || opline->opcode == ZEND_MATCH in zend_jit_bb_end()
3818 || opline->opcode == ZEND_FE_RESET_R); in zend_jit_bb_end()
3834 ref = ir_LOAD_U32(jit_EX(opline)); in jit_CMP_IP()
3841 ref = ir_LOAD_A(jit_EX(opline)); in jit_CMP_IP()
3850 const zend_op *opline, in zend_jit_jmp_frameless() argument
3858 cache_slot_ref = ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->extended_value); in zend_jit_jmp_frameless()
3864 zval *func_name_zv = RT_CONSTANT(opline, opline->op1); in zend_jit_jmp_frameless()
3934 static void zend_jit_check_exception_undef_result(zend_jit_ctx *jit, const zend_op *opline) in zend_jit_check_exception_undef_result() argument
3938 …(opline->result_type & (IS_TMP_VAR|IS_VAR)) ? jit_stub_exception_handler_undef : jit_stub_exceptio… in zend_jit_check_exception_undef_result()
3944 const zend_op *opline, in zend_jit_type_check_undef() argument
3956 if (opline) { in zend_jit_type_check_undef()
3957 jit_SET_EX_OPLINE(jit, opline); in zend_jit_type_check_undef()
3962 zend_jit_check_exception_undef_result(jit, opline); in zend_jit_type_check_undef()
3973 const zend_op *opline, in zend_jit_zval_check_undef() argument
3981 if (opline) { in zend_jit_zval_check_undef()
3982 jit_SET_EX_OPLINE(jit, opline); in zend_jit_zval_check_undef()
4054 static int zend_jit_handler(zend_jit_ctx *jit, const zend_op *opline, int may_throw) in zend_jit_handler() argument
4059 zend_jit_set_ip(jit, opline); in zend_jit_handler()
4061 handler = zend_get_opcode_handler_func(opline); in zend_jit_handler()
4063 handler = opline->handler; in zend_jit_handler()
4075 switch (opline->opcode) { in zend_jit_handler()
4084 zend_jit_set_last_valid_opline(jit, opline + 2); in zend_jit_handler()
4087 zend_jit_set_last_valid_opline(jit, opline + 1); in zend_jit_handler()
4093 static int zend_jit_tail_handler(zend_jit_ctx *jit, const zend_op *opline) in zend_jit_tail_handler() argument
4099 zend_jit_set_ip(jit, opline); in zend_jit_tail_handler()
4101 if (opline->opcode == ZEND_DO_UCALL || in zend_jit_tail_handler()
4102 opline->opcode == ZEND_DO_FCALL_BY_NAME || in zend_jit_tail_handler()
4103 opline->opcode == ZEND_DO_FCALL || in zend_jit_tail_handler()
4104 opline->opcode == ZEND_RETURN) { in zend_jit_tail_handler()
4107 handler = opline->handler; in zend_jit_tail_handler()
4110 handler = zend_get_opcode_handler_func(opline); in zend_jit_tail_handler()
4116 handler = opline->handler; in zend_jit_tail_handler()
4120 && (opline->opcode == ZEND_CATCH in zend_jit_tail_handler()
4121 || opline->opcode == ZEND_FAST_CALL in zend_jit_tail_handler()
4122 || opline->opcode == ZEND_FAST_RET in zend_jit_tail_handler()
4123 || opline->opcode == ZEND_MATCH_ERROR in zend_jit_tail_handler()
4124 || opline->opcode == ZEND_THROW in zend_jit_tail_handler()
4125 || opline->opcode == ZEND_VERIFY_NEVER_TYPE)) { in zend_jit_tail_handler()
4137 && (opline->opcode == ZEND_DO_FCALL in zend_jit_tail_handler()
4138 || opline->opcode == ZEND_DO_UCALL in zend_jit_tail_handler()
4139 || opline->opcode == ZEND_DO_FCALL_BY_NAME in zend_jit_tail_handler()
4140 || opline->opcode == ZEND_INCLUDE_OR_EVAL in zend_jit_tail_handler()
4141 || opline->opcode == ZEND_GENERATOR_CREATE in zend_jit_tail_handler()
4142 || opline->opcode == ZEND_YIELD in zend_jit_tail_handler()
4143 || opline->opcode == ZEND_YIELD_FROM in zend_jit_tail_handler()
4144 || opline->opcode == ZEND_FAST_CALL)) { in zend_jit_tail_handler()
4153 ZEND_ASSERT(opline->opcode == ZEND_FAST_CALL); in zend_jit_tail_handler()
4169 static int zend_jit_call(zend_jit_ctx *jit, const zend_op *opline, unsigned int next_block) in zend_jit_call() argument
4171 return zend_jit_tail_handler(jit, opline); in zend_jit_call()
4640 static int zend_jit_inc_dec(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_jit_a… in zend_jit_inc_dec() argument
4651 if (opline->opcode == ZEND_POST_INC || opline->opcode == ZEND_POST_DEC) { in zend_jit_inc_dec()
4664 if (opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_POST_INC) { in zend_jit_inc_dec()
4678 …((opline->result_type != IS_UNUSED && (res_info & (MAY_BE_ANY|MAY_BE_GUARD)) == (MAY_BE_LONG|MAY_B… in zend_jit_inc_dec()
4685 old_op1_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->op1.var)); in zend_jit_inc_dec()
4686 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->op1.var), IS_DOUBLE, 0); in zend_jit_inc_dec()
4687 if (opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_POST_INC) { in zend_jit_inc_dec()
4688 …SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->op1.var), ir_CONST_DOUBLE((double)ZEND_LONG_MAX + 1.0)); in zend_jit_inc_dec()
4690 …SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->op1.var), ir_CONST_DOUBLE((double)ZEND_LONG_MIN - 1.0)); in zend_jit_inc_dec()
4692 if (opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4693 old_res_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var)); in zend_jit_inc_dec()
4694 if (opline->opcode == ZEND_PRE_INC) { in zend_jit_inc_dec()
4695 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_DOUBLE, 0); in zend_jit_inc_dec()
4696 …SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var), ir_CONST_DOUBLE((double)ZEND_LONG_MAX + 1.… in zend_jit_inc_dec()
4697 } else if (opline->opcode == ZEND_PRE_DEC) { in zend_jit_inc_dec()
4698 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_DOUBLE, 0); in zend_jit_inc_dec()
4699 …SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var), ir_CONST_DOUBLE((double)ZEND_LONG_MIN - 1.… in zend_jit_inc_dec()
4700 } else if (opline->opcode == ZEND_POST_INC) { in zend_jit_inc_dec()
4701 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_LONG, 0); in zend_jit_inc_dec()
4702 SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var), ir_CONST_LONG(ZEND_LONG_MAX)); in zend_jit_inc_dec()
4703 } else if (opline->opcode == ZEND_POST_DEC) { in zend_jit_inc_dec()
4704 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_LONG, 0); in zend_jit_inc_dec()
4705 SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var), ir_CONST_LONG(ZEND_LONG_MIN)); in zend_jit_inc_dec()
4709 exit_point = zend_jit_trace_get_exit_point(opline + 1, 0); in zend_jit_inc_dec()
4713 if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) && in zend_jit_inc_dec()
4714 opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4721 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->op1.var), old_op1_info); in zend_jit_inc_dec()
4722 if (opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4723 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_res_info); in zend_jit_inc_dec()
4730 …|| (opline->result_type != IS_UNUSED && (res_info & (MAY_BE_ANY|MAY_BE_GUARD)) == (MAY_BE_DOUBLE|… in zend_jit_inc_dec()
4737 if (opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4738 old_res_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var)); in zend_jit_inc_dec()
4739 if (opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) { in zend_jit_inc_dec()
4740 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_LONG, 0); in zend_jit_inc_dec()
4743 exit_point = zend_jit_trace_get_exit_point(opline + 1, 0); in zend_jit_inc_dec()
4745 if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) && in zend_jit_inc_dec()
4746 opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4758 if (opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4759 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_res_info); in zend_jit_inc_dec()
4764 if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) && in zend_jit_inc_dec()
4765 opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4777 if (opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_POST_INC) { in zend_jit_inc_dec()
4802 if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) && in zend_jit_inc_dec()
4803 opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4804 if (opline->opcode == ZEND_PRE_INC) { in zend_jit_inc_dec()
4836 if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) && in zend_jit_inc_dec()
4837 opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4850 jit_SET_EX_OPLINE(jit, opline); in zend_jit_inc_dec()
4858 … ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_undefined_op_helper), ir_CONST_U32(opline->op1.var)); in zend_jit_inc_dec()
4878 if (RETURN_VALUE_USED(opline)) { in zend_jit_inc_dec()
4884 if (opline->opcode == ZEND_PRE_INC) { in zend_jit_inc_dec()
4886 } else if (opline->opcode == ZEND_PRE_DEC) { in zend_jit_inc_dec()
4888 } else if (opline->opcode == ZEND_POST_INC) { in zend_jit_inc_dec()
4890 } else if (opline->opcode == ZEND_POST_DEC) { in zend_jit_inc_dec()
4906 if (opline->opcode == ZEND_POST_INC || opline->opcode == ZEND_POST_DEC) { in zend_jit_inc_dec()
4912 if (opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_POST_INC) { in zend_jit_inc_dec()
4913 if (opline->opcode == ZEND_PRE_INC && opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4920 if (opline->opcode == ZEND_PRE_DEC && opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4932 if (opline->opcode == ZEND_POST_INC || opline->opcode == ZEND_POST_DEC) { in zend_jit_inc_dec()
4936 if (opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_POST_INC) { in zend_jit_inc_dec()
4943 if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) && in zend_jit_inc_dec()
4944 opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4952 …if (!zend_jit_store_var_if_necessary_ex(jit, opline->op1.var, op1_def_addr, op1_def_info, op1_addr… in zend_jit_inc_dec()
4955 if (opline->result_type != IS_UNUSED) { in zend_jit_inc_dec()
4956 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, res_info)) { in zend_jit_inc_dec()
4964 const zend_op *opline, in zend_jit_math_long_long() argument
4998 if (opline->opcode == ZEND_ADD in zend_jit_math_long_long()
5000 old_res_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var)); in zend_jit_math_long_long()
5001 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_DOUBLE, 0); in zend_jit_math_long_long()
5002 …SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var), ir_CONST_DOUBLE((double)ZEND_LONG_MAX + 1.… in zend_jit_math_long_long()
5003 exit_point = zend_jit_trace_get_exit_point(opline + 1, 0); in zend_jit_math_long_long()
5004 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_res_info); in zend_jit_math_long_long()
5005 } else if (opline->opcode == ZEND_SUB in zend_jit_math_long_long()
5007 old_res_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var)); in zend_jit_math_long_long()
5008 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_DOUBLE, 0); in zend_jit_math_long_long()
5009 …SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var), ir_CONST_DOUBLE((double)ZEND_LONG_MIN - 1.… in zend_jit_math_long_long()
5010 exit_point = zend_jit_trace_get_exit_point(opline + 1, 0); in zend_jit_math_long_long()
5011 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_res_info); in zend_jit_math_long_long()
5013 exit_point = zend_jit_trace_get_exit_point(opline, 0); in zend_jit_math_long_long()
5023 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0); in zend_jit_math_long_long()
5237 const zend_op *opline, in zend_jit_math_helper() argument
5295 …if (!zend_jit_math_long_long(jit, opline, opcode, op1_addr, op2_addr, res_addr, res_info, res_use_… in zend_jit_math_helper()
5331 …if (!zend_jit_math_long_long(jit, opline, opcode, op1_addr, op2_addr, res_addr, res_info, res_use_… in zend_jit_math_helper()
5482 jit_SET_EX_OPLINE(jit, opline); in zend_jit_math_helper()
5500 if (opline->opcode == ZEND_ASSIGN_DIM_OP && (opline->op2_type & (IS_VAR|IS_TMP_VAR))) { in zend_jit_math_helper()
5504 zend_jit_check_exception_undef_result(jit, opline); in zend_jit_math_helper()
5538 static int zend_jit_math(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_jit_addr… in zend_jit_math() argument
5542 …lper(jit, opline, opline->opcode, opline->op1_type, opline->op1, op1_addr, op1_info, opline->op2_t… in zend_jit_math()
5545 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, res_info)) { in zend_jit_math()
5551 static int zend_jit_add_arrays(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_ji… in zend_jit_add_arrays() argument
5560 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline); in zend_jit_add_arrays()
5561 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, opline); in zend_jit_add_arrays()
5566 const zend_op *opline, in zend_jit_long_math_helper() argument
5624 jit_SET_EX_OPLINE(jit, opline); in zend_jit_long_math_helper()
5646 jit_SET_EX_OPLINE(jit, opline); in zend_jit_long_math_helper()
5673 jit_SET_EX_OPLINE(jit, opline); in zend_jit_long_math_helper()
5694 jit_SET_EX_OPLINE(jit, opline); in zend_jit_long_math_helper()
5714 jit_SET_EX_OPLINE(jit, opline); in zend_jit_long_math_helper()
5732 jit_SET_EX_OPLINE(jit, opline); in zend_jit_long_math_helper()
5813 … ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_undefined_op_helper), ir_CONST_U32(opline->op1.var)); in zend_jit_long_math_helper()
5829 … ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_undefined_op_helper), ir_CONST_U32(opline->op2.var)); in zend_jit_long_math_helper()
5858 jit_SET_EX_OPLINE(jit, opline); in zend_jit_long_math_helper()
5885 if (opline->opcode == ZEND_ASSIGN_DIM_OP && (opline->op2_type & (IS_VAR|IS_TMP_VAR))) { in zend_jit_long_math_helper()
5889 zend_jit_check_exception_undef_result(jit, opline); in zend_jit_long_math_helper()
5921 static int zend_jit_long_math(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_ssa… in zend_jit_long_math() argument
5925 if (!zend_jit_long_math_helper(jit, opline, opline->opcode, in zend_jit_long_math()
5926 opline->op1_type, opline->op1, op1_addr, op1_info, op1_range, in zend_jit_long_math()
5927 opline->op2_type, opline->op2, op2_addr, op2_info, op2_range, in zend_jit_long_math()
5928 opline->result.var, res_addr, res_info, res_use_info, may_throw)) { in zend_jit_long_math()
5931 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, res_info)) { in zend_jit_long_math()
5938 const zend_op *opline, in zend_jit_concat_helper() argument
5983 jit_FREE_OP(jit, op2_type, op2, op2_info, opline); in zend_jit_concat_helper()
6004 jit_SET_EX_OPLINE(jit, opline); in zend_jit_concat_helper()
6012 if (opline->opcode == ZEND_ASSIGN_DIM_OP && (opline->op2_type & (IS_VAR|IS_TMP_VAR))) { in zend_jit_concat_helper()
6016 zend_jit_check_exception_undef_result(jit, opline); in zend_jit_concat_helper()
6028 static int zend_jit_concat(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, uint32_t op… in zend_jit_concat() argument
6038 …return zend_jit_concat_helper(jit, opline, opline->op1_type, opline->op1, op1_addr, op1_info, opli… in zend_jit_concat()
6042 const zend_op *opline, in zend_jit_assign_op() argument
6058 ZEND_ASSERT(opline->op1_type == IS_CV && opline->result_type == IS_UNUSED); in zend_jit_assign_op()
6065 binary_op_type binary_op = get_binary_op(opline->extended_value); in zend_jit_assign_op()
6078 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var); in zend_jit_assign_op()
6086 jit_SET_EX_OPLINE(jit, opline); in zend_jit_assign_op()
6087 if ((opline->op2_type & (IS_TMP_VAR|IS_VAR)) in zend_jit_assign_op()
6107 switch (opline->extended_value) { in zend_jit_assign_op()
6112 …(jit, opline, opline->extended_value, opline->op1_type, opline->op1, op1_addr, op1_info, opline->o… in zend_jit_assign_op()
6120 result = zend_jit_long_math_helper(jit, opline, opline->extended_value, in zend_jit_assign_op()
6121 opline->op1_type, opline->op1, op1_addr, op1_info, op1_range, in zend_jit_assign_op()
6122 opline->op2_type, opline->op2, op2_addr, op2_info, op2_range, in zend_jit_assign_op()
6123 opline->op1.var, op1_def_addr, op1_def_info, op1_mem_info, may_throw); in zend_jit_assign_op()
6126 …sult = zend_jit_concat_helper(jit, opline, opline->op1_type, opline->op1, op1_addr, op1_info, opli… in zend_jit_assign_op()
6132 …if (!zend_jit_store_var_if_necessary_ex(jit, opline->op1.var, op1_def_addr, op1_def_info, op1_addr… in zend_jit_assign_op()
6180 const zend_op *opline, in zend_jit_simple_assign() argument
6221 jit_SET_EX_OPLINE(jit, opline); in zend_jit_simple_assign()
6268 jit_ZVAL_DTOR(jit, ref, val_info, opline); in zend_jit_simple_assign()
6300 const zend_op *opline, in zend_jit_assign_to_variable_call() argument
6316 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM); in zend_jit_assign_to_variable_call()
6330 jit_SET_EX_OPLINE(jit, opline); in zend_jit_assign_to_variable_call()
6364 if (opline) { in zend_jit_assign_to_variable_call()
6365 jit_SET_EX_OPLINE(jit, opline); in zend_jit_assign_to_variable_call()
6380 const zend_op *opline, in zend_jit_assign_to_variable() argument
6433 jit_SET_EX_OPLINE(jit, opline); in zend_jit_assign_to_variable()
6437 if (opline->opcode == ZEND_ASSIGN_DIM || opline->opcode == ZEND_ASSIGN_OBJ) { in zend_jit_assign_to_variable()
6438 real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (opline+1)->op1.var); in zend_jit_assign_to_variable()
6440 ZEND_ASSERT(opline->opcode == ZEND_ASSIGN); in zend_jit_assign_to_variable()
6441 real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var); in zend_jit_assign_to_variable()
6508 …if (!zend_jit_simple_assign(jit, opline, var_addr, var_info, var_def_info, val_type, val_addr, val… in zend_jit_assign_to_variable()
6515 jit_ZVAL_DTOR(jit, ref, var_info, opline); in zend_jit_assign_to_variable()
6524 if (opline) { in zend_jit_assign_to_variable()
6525 jit_SET_EX_OPLINE(jit, opline); in zend_jit_assign_to_variable()
6554 if (opline) { in zend_jit_assign_to_variable()
6555 jit_SET_EX_OPLINE(jit, opline); in zend_jit_assign_to_variable()
6570 …if (!zend_jit_simple_assign(jit, opline, var_addr, var_info, var_def_info, val_type, val_addr, val… in zend_jit_assign_to_variable()
6615 static int zend_jit_qm_assign(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_jit… in zend_jit_qm_assign() argument
6618 if (!zend_jit_update_regs(jit, opline->op1.var, op1_addr, op1_def_addr, op1_info)) { in zend_jit_qm_assign()
6626 …if (!zend_jit_simple_assign(jit, opline, res_addr, res_use_info, res_info, opline->op1_type, op1_a… in zend_jit_qm_assign()
6629 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, res_info)) { in zend_jit_qm_assign()
6636 const zend_op *opline, in zend_jit_assign() argument
6649 ZEND_ASSERT(opline->op1_type == IS_CV); in zend_jit_assign()
6652 if (!zend_jit_update_regs(jit, opline->op2.var, op2_addr, op2_def_addr, op2_info)) { in zend_jit_assign()
6667 if (!zend_jit_assign_to_variable(jit, opline, op1_use_addr, op1_addr, op1_info, op1_def_info, in zend_jit_assign()
6668 opline->op2_type, op2_addr, op2_info, res_addr, ref_addr, may_throw)) { in zend_jit_assign()
6673 …if (!zend_jit_store_var_if_necessary_ex(jit, opline->op1.var, op1_addr, op1_def_info, op1_use_addr… in zend_jit_assign()
6696 if (opline->result_type != IS_UNUSED) { in zend_jit_assign()
6697 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, res_info)) { in zend_jit_assign()
6705 static ir_op zend_jit_cmp_op(const zend_op *opline) in zend_jit_cmp_op() argument
6709 switch (opline->opcode) { in zend_jit_cmp_op()
6733 const zend_op *opline, in zend_jit_cmp_long_long() argument
6748 …if (zend_jit_is_constant_cmp_long_long(opline, op1_range, op1_addr, op2_range, op2_addr, &result))… in zend_jit_cmp_long_long()
6765 if (opline->opcode != ZEND_IS_IDENTICAL in zend_jit_cmp_long_long()
6766 && opline->opcode != ZEND_IS_NOT_IDENTICAL in zend_jit_cmp_long_long()
6767 && opline->opcode != ZEND_CASE_STRICT) { in zend_jit_cmp_long_long()
6774 ref = ir_CMP_OP(zend_jit_cmp_op(opline), jit_Z_LVAL(jit, op1_addr), jit_Z_LVAL(jit, op2_addr)); in zend_jit_cmp_long_long()
6782 if (opline->opcode != ZEND_IS_NOT_IDENTICAL) { in zend_jit_cmp_long_long()
6788 if (opline->opcode != ZEND_IS_NOT_IDENTICAL) { in zend_jit_cmp_long_long()
6799 if (opline->opcode != ZEND_IS_IDENTICAL in zend_jit_cmp_long_long()
6800 && opline->opcode != ZEND_IS_NOT_IDENTICAL in zend_jit_cmp_long_long()
6801 && opline->opcode != ZEND_CASE_STRICT) { in zend_jit_cmp_long_long()
6808 static ir_ref zend_jit_cmp_long_double(zend_jit_ctx *jit, const zend_op *opline, zend_jit_addr op1_… in zend_jit_cmp_long_double() argument
6810 …ir_ref ref = ir_CMP_OP(zend_jit_cmp_op(opline), ir_INT2D(jit_Z_LVAL(jit, op1_addr)), jit_Z_DVAL(ji… in zend_jit_cmp_long_double()
6829 static ir_ref zend_jit_cmp_double_long(zend_jit_ctx *jit, const zend_op *opline, zend_jit_addr op1_… in zend_jit_cmp_double_long() argument
6831 …ir_ref ref = ir_CMP_OP(zend_jit_cmp_op(opline), jit_Z_DVAL(jit, op1_addr), ir_INT2D(jit_Z_LVAL(jit… in zend_jit_cmp_double_long()
6850 static ir_ref zend_jit_cmp_double_double(zend_jit_ctx *jit, const zend_op *opline, zend_jit_addr op… in zend_jit_cmp_double_double() argument
6852 …ir_ref ref = ir_CMP_OP(zend_jit_cmp_op(opline), jit_Z_DVAL(jit, op1_addr), jit_Z_DVAL(jit, op2_add… in zend_jit_cmp_double_double()
6860 if (opline->opcode != ZEND_IS_NOT_IDENTICAL) { in zend_jit_cmp_double_double()
6866 if (opline->opcode != ZEND_IS_NOT_IDENTICAL) { in zend_jit_cmp_double_double()
6876 if (opline->opcode != ZEND_IS_IDENTICAL in zend_jit_cmp_double_double()
6877 && opline->opcode != ZEND_IS_NOT_IDENTICAL in zend_jit_cmp_double_double()
6878 && opline->opcode != ZEND_CASE_STRICT) { in zend_jit_cmp_double_double()
6885 static ir_ref zend_jit_cmp_slow(zend_jit_ctx *jit, ir_ref ref, const zend_op *opline, zend_jit_addr… in zend_jit_cmp_slow() argument
6887 ref = ir_CMP_OP(zend_jit_cmp_op(opline), ref, ir_CONST_I32(0)); in zend_jit_cmp_slow()
6908 const zend_op *opline, in zend_jit_cmp() argument
6969 …ref = zend_jit_cmp_long_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
6979 …ref = zend_jit_cmp_long_long(jit, opline, op1_range, op1_addr, op2_range, op2_addr, res_addr, smar… in zend_jit_cmp()
7000 …ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7016 …ref = zend_jit_cmp_double_long(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7041 …ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7057 …ref = zend_jit_cmp_double_long(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7079 …ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7095 …ref = zend_jit_cmp_long_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7113 jit_SET_EX_OPLINE(jit, opline); in zend_jit_cmp()
7116 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var); in zend_jit_cmp()
7123 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var); in zend_jit_cmp()
7131 if (opline->op1_type == IS_CV && (op1_info & MAY_BE_UNDEF)) { in zend_jit_cmp()
7132 op1 = zend_jit_zval_check_undef(jit, op1, opline->op1.var, NULL, 0); in zend_jit_cmp()
7135 if (opline->op2_type == IS_CV && (op2_info & MAY_BE_UNDEF)) { in zend_jit_cmp()
7136 op2 = zend_jit_zval_check_undef(jit, op2, opline->op2.var, NULL, 0); in zend_jit_cmp()
7139 if (opline->opcode != ZEND_CASE) { in zend_jit_cmp()
7140 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL); in zend_jit_cmp()
7142 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, NULL); in zend_jit_cmp()
7144 zend_jit_check_exception_undef_result(jit, opline); in zend_jit_cmp()
7147 …ref = zend_jit_cmp_slow(jit, ref, opline, res_addr, smart_branch_opcode, target_label, target_labe… in zend_jit_cmp()
7214 const zend_op *opline, in zend_jit_identical() argument
7232 if (opline->op1_type == IS_CV && (op1_info & MAY_BE_UNDEF)) { in zend_jit_identical()
7234 op1 = zend_jit_zval_check_undef(jit, op1, opline->op1.var, opline, 0); in zend_jit_identical()
7238 if (opline->op2_type == IS_CV && (op2_info & MAY_BE_UNDEF)) { in zend_jit_identical()
7240 op2 = zend_jit_zval_check_undef(jit, op2, opline->op2.var, opline, 0); in zend_jit_identical()
7261 if (opline->opcode != ZEND_CASE_STRICT) { in zend_jit_identical()
7262 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline); in zend_jit_identical()
7264 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, opline); in zend_jit_identical()
7268 jit_set_Z_TYPE_INFO(jit, res_addr, opline->opcode != ZEND_IS_NOT_IDENTICAL ? IS_TRUE : IS_FALSE); in zend_jit_identical()
7280 if (opline->opcode == ZEND_IS_NOT_IDENTICAL) { in zend_jit_identical()
7292 if (opline->opcode != ZEND_CASE_STRICT) { in zend_jit_identical()
7293 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline); in zend_jit_identical()
7295 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, opline); in zend_jit_identical()
7299 jit_set_Z_TYPE_INFO(jit, res_addr, opline->opcode != ZEND_IS_NOT_IDENTICAL ? IS_FALSE : IS_TRUE); in zend_jit_identical()
7311 if (opline->opcode == ZEND_IS_NOT_IDENTICAL) { in zend_jit_identical()
7324 if ((opline->op1_type & (IS_CV|IS_VAR)) && (op1_info & MAY_BE_REF)) { in zend_jit_identical()
7329 if ((opline->op2_type & (IS_CV|IS_VAR)) && (op2_info & MAY_BE_REF)) { in zend_jit_identical()
7337 …ref = zend_jit_cmp_long_long(jit, opline, op1_range, op1_addr, op2_range, op2_addr, res_addr, smar… in zend_jit_identical()
7343 …ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_identical()
7348 if (opline->op1_type != IS_CONST) { in zend_jit_identical()
7350 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var); in zend_jit_identical()
7357 if (opline->op2_type != IS_CONST) { in zend_jit_identical()
7359 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var); in zend_jit_identical()
7376 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var); in zend_jit_identical()
7383 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var); in zend_jit_identical()
7390 jit_SET_EX_OPLINE(jit, opline); in zend_jit_identical()
7399 if (opline->opcode == ZEND_IS_NOT_IDENTICAL) { in zend_jit_identical()
7407 if (opline->opcode != ZEND_CASE_STRICT) { in zend_jit_identical()
7408 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL); in zend_jit_identical()
7410 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, NULL); in zend_jit_identical()
7412 zend_jit_check_exception_undef_result(jit, opline); in zend_jit_identical()
7421 if (opline->opcode == ZEND_IS_NOT_IDENTICAL) { in zend_jit_identical()
7454 static int zend_jit_bool_jmpznz(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_j… in zend_jit_bool_jmpznz() argument
7487 if (opline->op1_type == IS_CV && (op1_info & MAY_BE_REF)) { in zend_jit_bool_jmpznz()
7503 if (opline->op1_type == IS_CV && (op1_info & MAY_BE_UNDEF)) { in zend_jit_bool_jmpznz()
7505 zend_jit_zval_check_undef(jit, ref, opline->op1.var, opline, 0); in zend_jit_bool_jmpznz()
7515 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline); in zend_jit_bool_jmpznz()
7529 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline); in zend_jit_bool_jmpznz()
7551 opline->op1.var, in zend_jit_bool_jmpznz()
7552 opline, 1, 0, 1); in zend_jit_bool_jmpznz()
7701 jit_SET_EX_OPLINE(jit, opline); in zend_jit_bool_jmpznz()
7703 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL); in zend_jit_bool_jmpznz()
7705 zend_jit_check_exception_undef_result(jit, opline); in zend_jit_bool_jmpznz()
7757 static int zend_jit_defined(zend_jit_ctx *jit, const zend_op *opline, uint8_t smart_branch_opcode, … in zend_jit_defined() argument
7761 zval *zv = RT_CONSTANT(opline, opline->op1); in zend_jit_defined()
7781 ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->extended_value)); in zend_jit_defined()
7832 jit_SET_EX_OPLINE(jit, opline); in zend_jit_defined()
7864 …_jit_escape_if_undef(zend_jit_ctx *jit, int var, uint32_t flags, const zend_op *opline, int8_t reg) in zend_jit_escape_if_undef() argument
7877 if ((opline-1)->opcode != ZEND_FETCH_CONSTANT in zend_jit_escape_if_undef()
7878 && (opline-1)->opcode != ZEND_FETCH_LIST_R in zend_jit_escape_if_undef()
7879 && ((opline-1)->op1_type & (IS_VAR|IS_TMP_VAR)) in zend_jit_escape_if_undef()
7881 zend_jit_addr val_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (opline-1)->op1.var); in zend_jit_escape_if_undef()
7886 jit_LOAD_IP_ADDR(jit, opline - 1); in zend_jit_escape_if_undef()
7905 const zend_op *opline, in zend_jit_guard_fetch_result_type() argument
7922 if (opline->op1_type & (IS_VAR|IS_TMP_VAR|IS_CV)) { in zend_jit_guard_fetch_result_type()
7923 old_op1_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->op1.var)); in zend_jit_guard_fetch_result_type()
7925 || ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) in zend_jit_guard_fetch_result_type()
7926 && STACK_FLAGS(stack, EX_VAR_TO_NUM(opline->op1.var)) & (ZREG_ZVAL_ADDREF|ZREG_THIS))) { in zend_jit_guard_fetch_result_type()
7927 SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->op1.var), ZREG_NONE); in zend_jit_guard_fetch_result_type()
7930 old_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var)); in zend_jit_guard_fetch_result_type()
7931 old_ref = STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var)); in zend_jit_guard_fetch_result_type()
7932 CLEAR_STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var)); in zend_jit_guard_fetch_result_type()
7933 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_UNKNOWN, 1); in zend_jit_guard_fetch_result_type()
7938 …if (type == IS_NULL && (opline->opcode == ZEND_FETCH_DIM_IS || opline->opcode == ZEND_FETCH_OBJ_IS… in zend_jit_guard_fetch_result_type()
7948 SET_STACK_REF_EX(stack, EX_VAR_TO_NUM(opline->result.var), ref, ZREG_ZVAL_COPY); in zend_jit_guard_fetch_result_type()
7949 exit_point = zend_jit_trace_get_exit_point(opline+1, flags); in zend_jit_guard_fetch_result_type()
7960 SET_STACK_REF_EX(stack, EX_VAR_TO_NUM(opline->result.var), ref, ZREG_ZVAL_COPY); in zend_jit_guard_fetch_result_type()
7961 exit_point = zend_jit_trace_get_exit_point(opline+1, flags); in zend_jit_guard_fetch_result_type()
7967 …if (!deref && type == IS_NULL && (opline->opcode == ZEND_FETCH_DIM_IS || opline->opcode == ZEND_FE… in zend_jit_guard_fetch_result_type()
7980 SET_STACK_REF(stack, EX_VAR_TO_NUM(opline->result.var), old_ref); in zend_jit_guard_fetch_result_type()
7981 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_info); in zend_jit_guard_fetch_result_type()
7982 if (opline->op1_type & (IS_VAR|IS_TMP_VAR|IS_CV)) { in zend_jit_guard_fetch_result_type()
7983 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->op1.var), old_op1_info); in zend_jit_guard_fetch_result_type()
7990 const zend_op *opline, in zend_jit_fetch_constant() argument
7996 zval *zv = RT_CONSTANT(opline, opline->op2) + 1; in zend_jit_fetch_constant()
8001 ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->extended_value)); in zend_jit_fetch_constant()
8006 if (!zend_jit_is_persistent_constant(zv, opline->op1.num)) { in zend_jit_fetch_constant()
8024 jit_SET_EX_OPLINE(jit, opline); in zend_jit_fetch_constant()
8027 ir_CONST_U32(opline->op1.num)); in zend_jit_fetch_constant()
8037 const_addr = zend_jit_guard_fetch_result_type(jit, opline, const_addr, type, 0, 0, 0); in zend_jit_fetch_constant()
8047 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, res_info)) { in zend_jit_fetch_constant()
8061 static int zend_jit_type_check(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, uint8_t… in zend_jit_type_check() argument
8070 ZEND_ASSERT(opline->extended_value != MAY_BE_RESOURCE); in zend_jit_type_check()
8094 jit_SET_EX_OPLINE(jit, opline); in zend_jit_type_check()
8095 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_undefined_op_helper), ir_CONST_U32(opline->op1.var)); in zend_jit_type_check()
8096 zend_jit_check_exception_undef_result(jit, opline); in zend_jit_type_check()
8097 if (opline->extended_value & MAY_BE_NULL) { in zend_jit_type_check()
8134 mask = opline->extended_value; in zend_jit_type_check()
8136 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline); in zend_jit_type_check()
8150 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline); in zend_jit_type_check()
8206 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline); in zend_jit_type_check()
8244 static int zend_jit_isset_isempty_cv(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, z… in zend_jit_isset_isempty_cv() argument
8251 ZEND_ASSERT(opline->extended_value != MAY_BE_RESOURCE); in zend_jit_isset_isempty_cv()
8332 static int zend_jit_stack_check(zend_jit_ctx *jit, const zend_op *opline, uint32_t used_stack) in zend_jit_stack_check() argument
8334 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM); in zend_jit_stack_check()
8366 static int zend_jit_push_call_frame(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *… argument
8375 used_stack = zend_vm_calc_used_stack(opline->extended_value, func);
8384 …used_stack = (ZEND_CALL_FRAME_SLOT + opline->extended_value + ZEND_OBSERVER_ENABLED) * sizeof(zval…
8397 num_args_ref = ir_CONST_U32(opline->extended_value);
8443 bool may_be_trampoline = !func && (opline->opcode == ZEND_INIT_METHOD_CALL);
8444 int32_t exit_point = zend_jit_trace_get_exit_point(opline,
8466 if (opline->opcode == ZEND_INIT_FCALL && func && func->type == ZEND_INTERNAL_FUNCTION) {
8468 jit_SET_EX_OPLINE(jit, opline);
8476 jit_SET_EX_OPLINE(jit, opline);
8508 if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE || opline->opcode != ZEND_INIT_METHOD_CALL) {
8515 if (opline->opcode == ZEND_INIT_FCALL && func && func->type == ZEND_INTERNAL_FUNCTION) {
8537 if (opline->opcode == ZEND_INIT_METHOD_CALL) {
8541 if (opline->op1_type == IS_UNUSED || delayed_fetch_this) {
8550 if (opline->op1_type == IS_CV) {
8565 } else if (opline->opcode == ZEND_INIT_STATIC_METHOD_CALL) {
8574 if (opline->op2_type == IS_CV) {
8622 ir_STORE(jit_CALL(rx, This.u2.num_args), ir_CONST_U32(opline->extended_value));
8682 static int zend_jit_init_fcall(zend_jit_ctx *jit, const zend_op *opline, uint32_t b, const zend_op_… argument
8697 while (call_info && call_info->caller_init_opline != opline) {
8721 if (opline->opcode == ZEND_INIT_FCALL
8739 cache_slot_ref = ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->result.num);
8744 && opline->opcode != ZEND_INIT_FCALL) {
8751 if (opline->opcode == ZEND_INIT_FCALL
8759 zval *zv = RT_CONSTANT(opline, opline->op2);
8761 if (opline->opcode == ZEND_INIT_FCALL) {
8765 } else if (opline->opcode == ZEND_INIT_FCALL_BY_NAME) {
8769 } else if (opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME) {
8777 int32_t exit_point = zend_jit_trace_get_exit_point(opline,
8784 if (!func || opline->opcode == ZEND_INIT_FCALL) {
8799 jit_SET_EX_OPLINE(jit, opline);
8807 …if (!zend_jit_push_call_frame(jit, opline, op_array, func, 0, 0, checked_stack, func_ref, IR_UNUSE…
8811 if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) {
8824 if (!zend_jit_set_ip(jit, opline + 1)) {
8833 const zend_op *opline, argument
8858 ZEND_ASSERT(opline->op2_type == IS_CONST);
8861 function_name = RT_CONSTANT(opline, opline->op2);
8865 while (call_info && call_info->caller_init_opline != opline) {
8886 if (opline->op1_type == IS_CV) {
8906 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
8919 jit_SET_EX_OPLINE(jit, opline);
8920 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) && !delayed_fetch_this) {
8943 …ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->result.num + sizeof(void*…
8952 ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->result.num)),
8958 ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->result.num + sizeof(void*)));
8964 jit_SET_EX_OPLINE(jit, opline);
8974 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) && !delayed_fetch_this) {
9010 …exit_point = zend_jit_trace_get_exit_point(opline, func ? ZEND_JIT_EXIT_INVALIDATE : ZEND_JIT_EXIT…
9048 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) && !delayed_fetch_this) {
9052 ir_CONST_U32(opline->extended_value));
9057 ir_CONST_U32(opline->extended_value));
9060 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR) && !delayed_fetch_this)) {
9072 …if (!zend_jit_push_call_frame(jit, opline, NULL, func, 0, delayed_fetch_this, checked_stack, func_…
9082 if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) {
9095 if (!zend_jit_set_ip(jit, opline + 1)) {
9104 const zend_op *opline, argument
9122 while (call_info && call_info->caller_init_opline != opline) {
9130 ce = zend_get_known_class(op_array, opline, opline->op1_type, opline->op1);
9132 zval *zv = RT_CONSTANT(opline, opline->op2);
9158 …func_ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->result.num + sizeof(…
9164 jit_SET_EX_OPLINE(jit, opline);
9177 scope_ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->result.num));
9195 exit_point = zend_jit_trace_get_exit_point(opline, func ? ZEND_JIT_EXIT_INVALIDATE : 0);
9234 ir_CONST_U32(opline->extended_value));
9245 if (opline->op1_type == IS_UNUSED
9246 && ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
9247 (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF)) {
9254 …if (!zend_jit_push_call_frame(jit, opline, op_array, func, 0, 0, checked_stack, func_ref, scope_re…
9264 if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) {
9277 if (!zend_jit_set_ip(jit, opline + 1)) {
9286 const zend_op *opline, argument
9296 zend_jit_addr op2_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var);
9303 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
9333 exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_CLOSURE_CALL);
9352 if (!zend_jit_push_call_frame(jit, opline, NULL, func, 1, 0, checked_stack, ref, IR_UNUSED)) {
9356 if (zend_jit_needs_call_chain(NULL, b, op_array, ssa, ssa_op, opline, call_level, trace)) {
9369 if (!zend_jit_set_ip(jit, opline + 1)) {
9377 static int zend_jit_send_val(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_jit_… argument
9379 uint32_t arg_num = opline->op2.num;
9382 ZEND_ASSERT(opline->opcode == ZEND_SEND_VAL || arg_num <= MAX_ARG_FLAG_NUM);
9388 if (opline->opcode == ZEND_SEND_VAL_EX) {
9407 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
9421 zend_jit_addr addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
9424 jit_SET_EX_OPLINE(jit, opline);
9432 arg_addr = ZEND_ADDR_MEM_ZVAL(ZREG_RX, opline->result.var);
9434 if (opline->op1_type == IS_CONST) {
9435 zval *zv = RT_CONSTANT(opline, opline->op1);
9451 static int zend_jit_send_ref(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_arra… argument
9457 arg_addr = ZEND_ADDR_MEM_ZVAL(ZREG_RX, opline->result.var);
9463 if (opline->op1_type == IS_VAR) {
9467 } else if (opline->op1_type == IS_CV) {
9506 ref = jit_EMALLOC(jit, sizeof(zend_reference), op_array, opline);
9534 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
9539 static int zend_jit_send_var(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_arra… argument
9541 uint32_t arg_num = opline->op2.num;
9545 ZEND_ASSERT((opline->opcode != ZEND_SEND_VAR_EX &&
9546 opline->opcode != ZEND_SEND_VAR_NO_REF_EX) ||
9549 arg_addr = ZEND_ADDR_MEM_ZVAL(ZREG_RX, opline->result.var);
9555 if (opline->opcode == ZEND_SEND_VAR_EX) {
9561 if (!zend_jit_send_ref(jit, opline, op_array, op1_info, 0)) {
9575 if (!zend_jit_send_ref(jit, opline, op_array, op1_info, 1)) {
9582 } else if (opline->opcode == ZEND_SEND_VAR_NO_REF_EX) {
9600 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
9648 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
9655 jit_SET_EX_OPLINE(jit, opline);
9664 } else if (opline->opcode == ZEND_SEND_FUNC_ARG) {
9670 if (!zend_jit_send_ref(jit, opline, op_array, op1_info, 0)) {
9682 if (!zend_jit_send_ref(jit, opline, op_array, op1_info, 1)) {
9700 jit_SET_EX_OPLINE(jit, opline);
9702 ir_CONST_U32(opline->op1.var));
9722 if (opline->opcode == ZEND_SEND_VAR_NO_REF) {
9736 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
9743 jit_SET_EX_OPLINE(jit, opline);
9750 if (opline->op1_type == IS_CV) {
9799 jit_EFREE(jit, ref, sizeof(zend_reference), op_array, opline);
9812 if (!zend_jit_update_regs(jit, opline->op1.var, op1_addr, op1_def_addr, op1_info)) {
9824 op1_addr, op1_info, opline->op1_type == IS_CV);
9836 static int zend_jit_check_func_arg(zend_jit_ctx *jit, const zend_op *opline) argument
9838 uint32_t arg_num = opline->op2.num;
9904 static int zend_jit_check_undef_args(zend_jit_ctx *jit, const zend_op *opline) argument
9919 jit_SET_EX_OPLINE(jit, opline);
9927 static int zend_jit_do_fcall(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_arra… argument
9939 prev_opline = opline - 1;
9950 while (call_info && call_info->caller_call_opline != opline) {
9966 ZEND_ASSERT(opline->opcode != ZEND_DO_ICALL);
9969 ZEND_ASSERT(opline->opcode != ZEND_DO_UCALL);
10005 opline->extended_value == ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS &&
10016 jit_SET_EX_OPLINE(jit, opline);
10018 if (opline->opcode == ZEND_DO_FCALL || opline->opcode == ZEND_DO_FCALL_BY_NAME) {
10021 uint32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
10055 if (opline->opcode == ZEND_DO_FCALL || opline->opcode == ZEND_DO_FCALL_BY_NAME) {
10086 && opline->opcode != ZEND_DO_UCALL
10087 && opline->opcode != ZEND_DO_ICALL) {
10094 && opline->opcode != ZEND_DO_ICALL) {
10103 RETURN_VALUE_USED(opline) ?
10104 jit_ZVAL_ADDR(jit, ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var)) :
10269 ir_ref addr = jit_EX(opline);
10320 jit_SET_EX_OPLINE(jit, trace[1].opline);
10323 ir_STORE(jit_EX(opline), jit_IP(jit));
10328 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
10344 if (!func && (opline->opcode != ZEND_DO_UCALL)) {
10406 if (func || (opline->opcode == ZEND_DO_UCALL)) {
10417 && (opline->opcode != ZEND_DO_UCALL)) {
10418 if (!func && (opline->opcode != ZEND_DO_ICALL)) {
10436 if (RETURN_VALUE_USED(opline)) {
10437 res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
10498 jit_ZVAL_PTR_DTOR(jit, var_addr, MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN, 0, opline);
10518 if (opline->opcode == ZEND_DO_FCALL) {
10562 if (!RETURN_VALUE_USED(opline)) {
10576 jit_ZVAL_PTR_DTOR(jit, res_addr, func_info, 1, opline);
10593 if (trace && jit->last_valid_opline != opline) {
10594 int32_t exit_point = zend_jit_trace_get_exit_point(opline + 1, ZEND_JIT_EXIT_TO_VM);
10604 zend_jit_check_timeout(jit, opline + 1, exit_addr);
10607 if ((!trace || !func) && opline->opcode != ZEND_DO_ICALL) {
10608 jit_LOAD_IP_ADDR(jit, opline + 1);
10612 jit_LOAD_IP_ADDR(jit, opline + 1);
10623 static int zend_jit_constructor(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_a… argument
10625 ir_ref if_skip_constructor = jit_IF_ex(jit, jit_CMP_IP(jit, IR_NE, opline), next_block);
10630 if (!zend_jit_tail_handler(jit, opline)) {
10634 if (!zend_jit_do_fcall(jit, opline, op_array, ssa, call_level, next_block, NULL)) {
10658 static int zend_jit_verify_arg_type(zend_jit_ctx *jit, const zend_op *opline, zend_arg_info *arg_in… argument
10660 zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
10669 uint8_t type = STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var));
10677 if (opline->opcode == ZEND_RECV_INIT) {
10702 jit_SET_EX_OPLINE(jit, opline);
10717 static int zend_jit_recv(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_array) argument
10719 uint32_t arg_num = opline->op1.num;
10733 if (arg_info || (opline+1)->opcode != ZEND_RECV) {
10738 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
10751 jit_SET_EX_OPLINE(jit, opline);
10759 if (!zend_jit_verify_arg_type(jit, opline, arg_info, 1)) {
10767 static int zend_jit_recv_init(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_arr… argument
10769 uint32_t arg_num = opline->op1.num;
10770 zval *zv = RT_CONSTANT(opline, opline->op2);
10771 zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
10798 jit_SET_EX_OPLINE(jit, opline);
10805 jit_ZVAL_PTR_DTOR(jit, res_addr, MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN, 1, opline);
10828 if (!zend_jit_verify_arg_type(jit, opline, arg_info, may_throw)) {
10837 static bool zend_jit_verify_return_type(zend_jit_ctx *jit, const zend_op *opline, const zend_op_arr… argument
10871 jit_SET_EX_OPLINE(jit, opline);
10874 ref = zend_jit_zval_check_undef(jit, ref, opline->op1.var, NULL, 1);
10881 ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->op2.num));
10920 static int zend_jit_free_op(zend_jit_ctx *jit, const zend_op *opline, uint32_t info, uint32_t var_o… argument
10923 jit_ZVAL_PTR_DTOR(jit, ZEND_ADDR_MEM_ZVAL(ZREG_FP, var_offset), info, 0, opline);
10930 const zend_op *opline, argument
11070 jit_STORE_IP(jit, ir_ADD_OFFSET(ir_LOAD_A(jit_EX(opline)), sizeof(zend_op)));
11072 jit_STORE_IP(jit, ir_LOAD_A(jit_EX(opline)));
11076 ir_ref ref = jit_EX(opline);
11088 const zend_op *next_opline = trace->opline;
11090 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))
11101 next_opline = trace->opline;
11125 zend_jit_set_last_valid_opline(jit, trace->opline);
11129 (((opline->op1_type & (IS_VAR|IS_TMP_VAR))
11143 jit_STORE_IP(jit, ir_LOAD_A(jit_EX(opline)));
11146 ir_ref ref = jit_EX(opline);
11169 static int zend_jit_return(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_array,… argument
11193 zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
11206 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) &&
11229 jit_ZVAL_DTOR(jit, ref, op1_info, opline);
11255 if (opline->op1_type == IS_CONST) {
11256 zval *zv = RT_CONSTANT(opline, opline->op1);
11259 } else if (opline->op1_type == IS_TMP_VAR) {
11261 } else if (opline->op1_type == IS_CV) {
11315 jit_EFREE(jit, ref, sizeof(zend_reference), op_array, opline);
11337 static int zend_jit_bind_global(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info) argument
11340 zend_string *varname = Z_STR_P(RT_CONSTANT(opline, opline->op2));
11346 cache_slot_ref = ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->extended_value);
11412 jit_ZVAL_DTOR(jit, ref2, op1_info, opline);
11422 if (opline) {
11423 jit_SET_EX_OPLINE(jit, opline);
11447 static int zend_jit_free(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, int may_throw) argument
11453 jit_SET_EX_OPLINE(jit, opline);
11455 if (opline->opcode == ZEND_FE_FREE && (op1_info & (MAY_BE_OBJECT|MAY_BE_REF))) {
11464 ref = ir_LOAD_U32(ir_ADD_OFFSET(jit_FP(jit), opline->op1.var + offsetof(zval, u2.fe_iter_idx)));
11476 jit_ZVAL_PTR_DTOR(jit, op1_addr, op1_info, 0, opline);
11486 static int zend_jit_echo(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info) argument
11488 if (opline->op1_type == IS_CONST) {
11492 zv = RT_CONSTANT(opline, opline->op1);
11499 jit_SET_EX_OPLINE(jit, opline);
11511 jit_SET_EX_OPLINE(jit, opline);
11518 if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) {
11519 jit_ZVAL_PTR_DTOR(jit, op1_addr, op1_info, 0, opline);
11527 static int zend_jit_strlen(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_jit_ad… argument
11529 if (opline->op1_type == IS_CONST) {
11533 zv = RT_CONSTANT(opline, opline->op1);
11540 } else if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, MAY_BE_LONG)) {
11553 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, MAY_BE_LONG)) {
11559 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
11564 static int zend_jit_count(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_jit_add… argument
11566 if (opline->op1_type == IS_CONST) {
11570 zv = RT_CONSTANT(opline, opline->op1);
11577 } else if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, MAY_BE_LONG)) {
11596 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, MAY_BE_LONG)) {
11602 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
11611 static int zend_jit_in_array(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, zend_jit_… argument
11613 HashTable *ht = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2));
11614 zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
11617 ZEND_ASSERT(opline->op1_type != IS_VAR && opline->op1_type != IS_TMP_VAR);
11621 if (opline->op1_type != IS_CONST) {
11626 zend_string *str = Z_STR_P(RT_CONSTANT(opline, opline->op1));
11657 static int zend_jit_rope(zend_jit_ctx *jit, const zend_op *opline, uint32_t op2_info) argument
11661 offset = (opline->opcode == ZEND_ROPE_INIT) ?
11662 opline->result.var :
11663 opline->op1.var + opline->extended_value * sizeof(zend_string*);
11665 if (opline->op2_type == IS_CONST) {
11666 zval *zv = RT_CONSTANT(opline, opline->op2);
11681 if (opline->op2_type == IS_CV) {
11694 if (opline->opcode == ZEND_ROPE_END) {
11699 ir_ADD_OFFSET(jit_FP(jit), opline->op1.var),
11700 ir_CONST_U32(opline->extended_value));
11796 const zend_op *opline, argument
11813 zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
11824 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
11845 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_PACKED_GUARD);
12051 jit_SET_EX_OPLINE(jit, opline);
12180 if (opline->op2_type != IS_CONST) {
12211 if (opline->op2_type != IS_CONST) {
12243 jit_SET_EX_OPLINE(jit, opline);
12263 if (opline->op2_type != IS_CONST) {
12280 if (opline->op2_type != IS_CONST) {
12299 jit_SET_EX_OPLINE(jit, opline);
12392 const zend_op *opline, argument
12410 uint32_t may_be_string = (opline->opcode != ZEND_FETCH_LIST_R) ? MAY_BE_STRING : 0;
12418 if (opline->opcode != ZEND_FETCH_DIM_IS
12421 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
12438 if ((opline->result_type & (IS_VAR|IS_TMP_VAR))
12439 && (opline->opcode == ZEND_FETCH_LIST_R
12440 || !(opline->op1_type & (IS_VAR|IS_TMP_VAR))
12445 && zend_jit_may_avoid_refcounting(opline+1, res_info)) {
12450 if (opline->opcode == ZEND_FETCH_DIM_IS
12458 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))
12462 if ((opline->op2_type & (IS_VAR|IS_TMP_VAR))
12468 old_op1_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->op1.var));
12469 SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->op1.var), ZREG_NONE);
12472 old_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var));
12473 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_NULL, 0);
12474 SET_STACK_REG_EX(stack, EX_VAR_TO_NUM(opline->result.var), ZREG_NONE, ZREG_TYPE_ONLY);
12475 exit_point = zend_jit_trace_get_exit_point(opline+1, flags);
12476 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_info);
12483 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->op1.var), old_op1_info);
12514 (opline->opcode != ZEND_FETCH_DIM_IS && JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE)) {
12518 if (!zend_jit_fetch_dimension_address_inner(jit, opline,
12519 (opline->opcode != ZEND_FETCH_DIM_IS) ? BP_VAR_R : BP_VAR_IS,
12535 if (opline->opcode != ZEND_FETCH_LIST_R
12536 && (opline->op1_type & (IS_VAR|IS_TMP_VAR))
12540 if ((opline->op2_type & (IS_VAR|IS_TMP_VAR))
12545 val_addr = zend_jit_guard_fetch_result_type(jit, opline, val_addr, type,
12559 } else if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, res_info)) {
12589 if (opline->opcode != ZEND_FETCH_LIST_R && (op1_info & MAY_BE_STRING)) {
12601 jit_SET_EX_OPLINE(jit, opline);
12603 if (opline->opcode != ZEND_FETCH_DIM_IS) {
12642 jit_SET_EX_OPLINE(jit, opline);
12643 …if (opline->op2_type == IS_CONST && Z_EXTRA_P(RT_CONSTANT(opline, opline->op2)) == ZEND_EXTRA_VALU…
12650 if (opline->opcode != ZEND_FETCH_DIM_IS) {
12673 …if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF…
12674 jit_SET_EX_OPLINE(jit, opline);
12675 if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
12677 zend_jit_type_check_undef(jit, jit_Z_TYPE(jit, op1_addr), opline->op1.var, NULL, 0, 1, 0);
12682 zend_jit_type_check_undef(jit, jit_Z_TYPE(jit, op2_addr), opline->op2.var, NULL, 0, 1, 0);
12686 if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
12693 jit_SET_EX_OPLINE(jit, opline);
12708 if ((opline->op2_type & (IS_TMP_VAR|IS_VAR)) && (op1_info & MAY_BE_OBJECT)) {
12714 if (opline->op2_type & (IS_TMP_VAR|IS_VAR)) {
12718 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, opline);
12720 if (opline->opcode != ZEND_FETCH_LIST_R && !op1_avoid_refcounting) {
12721 if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) {
12725 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
12740 const zend_op *opline, argument
12769 if (opline->opcode != ZEND_FETCH_DIM_RW && opline->opcode != ZEND_ASSIGN_DIM_OP) {
12770 jit_SET_EX_OPLINE(jit, opline);
12819 && (opline->opcode == ZEND_FETCH_DIM_RW || opline->opcode == ZEND_ASSIGN_DIM_OP)) {
12829 … ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_undefined_op_helper), ir_CONST_U32(opline->op1.var));
12857 const zend_op *opline, argument
12870 if (opline->opcode == ZEND_FETCH_DIM_RW) {
12871 jit_SET_EX_OPLINE(jit, opline);
12874 …op1_addr = zend_jit_prepare_array_update(jit, opline, &op1_info, op1_addr, &if_type, &ht_ref, &may…
12882 if (opline->op2_type == IS_UNUSED) {
12893 if (opline->opcode != ZEND_FETCH_DIM_RW) {
12894 jit_SET_EX_OPLINE(jit, opline);
12907 switch (opline->opcode) {
12926 if (!zend_jit_fetch_dimension_address_inner(jit, opline, type, op1_info,
12966 if (opline->opcode != ZEND_FETCH_DIM_RW) {
12967 jit_SET_EX_OPLINE(jit, opline);
12970 if (opline->op2_type == IS_UNUSED) {
12972 …} else if (opline->op2_type == IS_CONST && Z_EXTRA_P(RT_CONSTANT(opline, opline->op2)) == ZEND_EXT…
12979 switch (opline->opcode) {
13006 …if ((opline->op2_type & (IS_TMP_VAR|IS_VAR)) && (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE…
13012 if ((opline->op2_type & (IS_TMP_VAR|IS_VAR))
13022 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, opline);
13032 const zend_op *opline, argument
13054 ZEND_ASSERT(!(opline->extended_value & ZEND_ISEMPTY));
13056 res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
13079 && (!(opline->op1_type & (IS_TMP_VAR|IS_VAR)) || op1_avoid_refcounting)
13080 …&& (!(opline->op2_type & (IS_TMP_VAR|IS_VAR)) || !(op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_LO…
13087 if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_JIT_IS, op1_info,
13111 jit_SET_EX_OPLINE(jit, opline);
13113 …if (opline->op2_type == IS_CONST && Z_EXTRA_P(RT_CONSTANT(opline, opline->op2)) == ZEND_EXTRA_VALU…
13135 jit_SET_EX_OPLINE(jit, opline);
13136 … ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_undefined_op_helper), ir_CONST_U32(opline->op2.var));
13146 if ((opline->op2_type & (IS_TMP_VAR|IS_VAR)) && (op1_info & MAY_BE_OBJECT)) {
13155 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, opline);
13157 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
13160 zend_jit_check_exception_undef_result(jit, opline);
13162 if (!(opline->extended_value & ZEND_ISEMPTY)) {
13187 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, opline);
13189 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
13192 zend_jit_check_exception_undef_result(jit, opline);
13194 if (!(opline->extended_value & ZEND_ISEMPTY)) {
13227 const zend_op *opline, argument
13245 if (!zend_jit_update_regs(jit, (opline+1)->op1.var, op3_addr, op3_def_addr, val_info)) {
13254 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
13266 …op1_addr = zend_jit_prepare_array_update(jit, opline, &op1_info, op1_addr, &if_type, &ht_ref, &may…
13269 if (opline->op2_type == IS_UNUSED) {
13283 jit_SET_EX_OPLINE(jit, opline);
13290 …if (!zend_jit_simple_assign(jit, opline, var_addr, var_info, -1, (opline+1)->op1_type, op3_addr, v…
13294 uint32_t var_info = zend_array_element_type(op1_info, opline->op1_type, 0, 0);
13302 if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_VAR_W, op1_info,
13321 if (opline->op1_type == IS_VAR
13323 && opline->result_type == IS_UNUSED
13325 …if (!zend_jit_assign_to_variable_call(jit, opline, var_addr, var_addr, var_info, -1, (opline+1)->o…
13329 …if (!zend_jit_assign_to_variable(jit, opline, var_addr, var_addr, var_info, -1, (opline+1)->op1_ty…
13347 jit_SET_EX_OPLINE(jit, opline);
13349 if (opline->op2_type == IS_UNUSED) {
13351 …} else if (opline->op2_type == IS_CONST && Z_EXTRA_P(RT_CONSTANT(opline, opline->op2)) == ZEND_EXT…
13358 if (opline->result_type == IS_UNUSED) {
13370 if (((opline+1)->op1_type & (IS_TMP_VAR|IS_VAR)) && (val_info & MAY_BE_RC1)) {
13376 jit_FREE_OP(jit, (opline+1)->op1_type, (opline+1)->op1, val_info, NULL);
13382 …if ((opline->op2_type & (IS_TMP_VAR|IS_VAR)) && (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE…
13389 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, opline);
13392 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
13403 const zend_op *opline, argument
13424 ZEND_ASSERT(opline->result_type == IS_UNUSED);
13427 jit_SET_EX_OPLINE(jit, opline);
13430 …op1_addr = zend_jit_prepare_array_update(jit, opline, &op1_info, op1_addr, &if_type, &ht_ref, &may…
13433 uint32_t var_def_info = zend_array_element_type(op1_def_info, opline->op1_type, 1, 0);
13435 if (opline->op2_type == IS_UNUSED) {
13461 var_info = zend_array_element_type(op1_info, opline->op1_type, 0, 0);
13474 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
13481 if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_VAR_RW, op1_info,
13497 binary_op_type binary_op = get_binary_op(opline->extended_value);
13529 uint8_t val_op_type = (opline+1)->op1_type;
13536 switch (opline->extended_value) {
13541 …f (!zend_jit_math_helper(jit, opline, opline->extended_value, IS_CV, opline->op1, var_addr, var_in…
13552 if (!zend_jit_long_math_helper(jit, opline, opline->extended_value,
13553 IS_CV, opline->op1, var_addr, var_info, NULL,
13554 val_op_type, (opline+1)->op1, op3_addr, op1_data_info,
13561 …if (!zend_jit_concat_helper(jit, opline, IS_CV, opline->op1, var_addr, var_info, val_op_type, (opl…
13583 if (opline->op2_type == IS_UNUSED) {
13585 …} else if (opline->op2_type == IS_CONST && Z_EXTRA_P(RT_CONSTANT(opline, opline->op2)) == ZEND_EXT…
13591 binary_op = get_binary_op(opline->extended_value);
13604 jit_FREE_OP(jit, (opline+1)->op1_type, (opline+1)->op1, op1_data_info, NULL);
13605 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, NULL);
13607 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL);
13616 static int zend_jit_fe_reset(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info) argument
13618 zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
13621 if (opline->op1_type == IS_CONST) {
13622 zval *zv = RT_CONSTANT(opline, opline->op1);
13626 zend_jit_addr op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
13628 jit_ZVAL_COPY(jit, res_addr, -1, op1_addr, op1_info, opline->op1_type == IS_CV);
13632 …ir_STORE(ir_ADD_OFFSET(jit_FP(jit), opline->result.var + offsetof(zval, u2.fe_pos)), ir_CONST_U32(…
13637 static int zend_jit_packed_guard(zend_jit_ctx *jit, const zend_op *opline, uint32_t var, uint32_t o… argument
13639 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_PACKED_GUARD);
13660 static int zend_jit_fe_fetch(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, uint32_t … argument
13662 zend_jit_addr op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op1.var);
13689 if (!zend_jit_packed_guard(jit, opline, opline->op1.var, op1_info)) {
13695 …hash_pos_ref = packed_pos_ref = ir_LOAD_U32(ir_ADD_OFFSET(jit_FP(jit), opline->op1.var + offsetof(…
13829 zend_jit_addr var_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var);
13833 if (RETURN_VALUE_USED(opline)) {
13843 ir_STORE(ir_ADD_OFFSET(jit_FP(jit), opline->op1.var + offsetof(zval, u2.fe_pos)),
13904 ir_STORE(ir_ADD_OFFSET(jit_FP(jit), opline->op1.var + offsetof(zval, u2.fe_pos)),
13944 ir_STORE(ir_ADD_OFFSET(jit_FP(jit), opline->op1.var + offsetof(zval, u2.fe_pos)),
13960 if (opline->op2_type == IS_CV) {
13962 …if (!zend_jit_assign_to_variable(jit, opline, var_addr, var_addr, op2_info, -1, IS_CV, val_addr, v…
14007 static int zend_jit_fetch_this(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_ar… argument
14017 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
14035 jit_SET_EX_OPLINE(jit, opline);
14043 if (!zend_jit_load_this(jit, opline->result.var)) {
14051 static int zend_jit_class_guard(zend_jit_ctx *jit, const zend_op *opline, ir_ref obj_ref, zend_clas… argument
14053 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
14067 const zend_op *opline, argument
14096 ZEND_ASSERT(opline->op2_type == IS_CONST);
14099 member = RT_CONSTANT(opline, opline->op2);
14107 if (opline->op1_type == IS_VAR
14108 && opline->opcode == ZEND_FETCH_OBJ_W
14118 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
14129 if (opline->opcode != ZEND_FETCH_OBJ_IS) {
14132 jit_SET_EX_OPLINE(jit, opline);
14133 if (opline->opcode != ZEND_FETCH_OBJ_W && (op1_info & MAY_BE_UNDEF)) {
14144 ir_CONST_U32(opline->op1.var));
14152 if (opline->opcode == ZEND_FETCH_OBJ_W) {
14182 } else if (zend_jit_class_guard(jit, opline, obj_ref, ce)) {
14201 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG…
14210 ir_ADD_OFFSET(run_time_cache, (opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) + sizeof(void*)));
14212 …may_be_dynamic = zend_may_be_dynamic_property(ce, Z_STR_P(member), opline->op1_type == IS_UNUSED, …
14215 if (opline->opcode == ZEND_FETCH_OBJ_W) {
14220 jit_SET_EX_OPLINE(jit, opline);
14222 if (opline->opcode != ZEND_FETCH_OBJ_IS) {
14253 if (opline->opcode == ZEND_FETCH_OBJ_W
14255 uint32_t flags = opline->extended_value & ZEND_FETCH_OBJ_FLAGS;
14261 …ir_ADD_OFFSET(run_time_cache, (opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) + sizeof(void*) * 2…
14299 jit_SET_EX_OPLINE(jit, opline);
14315 jit_SET_EX_OPLINE(jit, opline);
14336 if (opline->opcode == ZEND_FETCH_OBJ_W || !(res_info & MAY_BE_GUARD) || !JIT_G(current_frame)) {
14338 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
14354 if (opline->opcode == ZEND_FETCH_OBJ_W && (prop_info->flags & ZEND_ACC_READONLY)) {
14364 jit_SET_EX_OPLINE(jit, opline);
14370 } else if (opline->opcode == ZEND_FETCH_OBJ_W && (prop_info->flags & ZEND_ACC_PPP_SET_MASK)) {
14394 if (opline->opcode == ZEND_FETCH_OBJ_W
14395 && (opline->extended_value & ZEND_FETCH_OBJ_FLAGS)
14397 uint32_t flags = opline->extended_value & ZEND_FETCH_OBJ_FLAGS;
14406 jit_SET_EX_OPLINE(jit, opline);
14443 if (opline->opcode == ZEND_FETCH_OBJ_W) {
14467 SET_STACK_REG(JIT_G(current_frame)->stack, EX_VAR_TO_NUM(opline->op1.var), ZREG_NONE);
14472 jit_SET_EX_OPLINE(jit, opline);
14474 if (opline->opcode == ZEND_FETCH_OBJ_W) {
14477 } else if (opline->opcode != ZEND_FETCH_OBJ_IS) {
14496 ZEND_ASSERT(opline->opcode == ZEND_FETCH_OBJ_R
14497 || opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG
14498 || opline->opcode == ZEND_FETCH_OBJ_IS);
14504 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))
14510 if ((opline->result_type & (IS_VAR|IS_TMP_VAR))
14514 && zend_jit_may_avoid_refcounting(opline+1, res_info)) {
14519 val_addr = zend_jit_guard_fetch_result_type(jit, opline, val_addr, type,
14532 if (!zend_jit_store_var_if_necessary(jit, opline->result.var, res_addr, res_info)) {
14539 if (opline->op1_type != IS_UNUSED && !delayed_fetch_this && !op1_indirect) {
14540 if (opline->op1_type == IS_VAR
14541 && opline->opcode == ZEND_FETCH_OBJ_W
14557 jit_SET_EX_OPLINE(jit, opline);
14565 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
14571 && (opline->opcode != ZEND_FETCH_OBJ_W ||
14572 !(opline->extended_value & ZEND_FETCH_OBJ_FLAGS) ||
14574 && (!(opline->op1_type & (IS_VAR|IS_TMP_VAR)) || on_this || op1_indirect)) {
14586 const zend_op *opline, argument
14617 if (!zend_jit_update_regs(jit, (opline+1)->op1.var, val_addr, val_def_addr, val_info)) {
14625 ZEND_ASSERT(opline->op2_type == IS_CONST);
14628 member = RT_CONSTANT(opline, opline->op2);
14637 if (opline->op1_type == IS_VAR
14647 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
14658 jit_SET_EX_OPLINE(jit, opline);
14663 if (RETURN_VALUE_USED(opline) && Z_MODE(res_addr) != IS_REG) {
14685 } else if (zend_jit_class_guard(jit, opline, obj_ref, ce)) {
14709 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG…
14717 ir_ADD_OFFSET(run_time_cache, (opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) + sizeof(void*)));
14735 …ir_ADD_OFFSET(run_time_cache, (opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) + sizeof(void*) * 2…
14740 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (opline+1)->op1.var);
14749 if (!RETURN_VALUE_USED(opline)) {
14752 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
14758 jit_SET_EX_OPLINE(jit, opline);
14765 if ((opline+1)->op1_type == IS_CONST) {
14771 if (RETURN_VALUE_USED(opline) && Z_MODE(res_addr) == IS_REG) {
14772 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
14792 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
14809 jit_SET_EX_OPLINE(jit, opline);
14821 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (opline+1)->op1.var);
14829 if (!RETURN_VALUE_USED(opline)) {
14832 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
14843 if (RETURN_VALUE_USED(opline) && Z_MODE(res_addr) == IS_REG) {
14844 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
14856 && opline->result_type == IS_UNUSED) {
14857 …if (!zend_jit_assign_to_variable_call(jit, opline, prop_addr, prop_addr, -1, -1, (opline+1)->op1_t…
14861 …if (!zend_jit_assign_to_variable(jit, opline, prop_addr, prop_addr, -1, -1, (opline+1)->op1_type, …
14866 if (((opline+1)->op1_type & (IS_VAR|IS_TMP_VAR))
14882 jit_SET_EX_OPLINE(jit, opline);
14885 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (opline+1)->op1.var);
14893 if (!RETURN_VALUE_USED(opline)) {
14896 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
14908 ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS),
14911 if (RETURN_VALUE_USED(opline) && Z_MODE(res_addr) == IS_REG) {
14912 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
14926 jit_FREE_OP(jit, (opline+1)->op1_type, (opline+1)->op1, val_info, opline);
14933 if (opline->op1_type != IS_UNUSED && !delayed_fetch_this && !op1_indirect) {
14934 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
14945 const zend_op *opline, argument
14968 binary_op_type binary_op = get_binary_op(opline->extended_value);
14974 ZEND_ASSERT(opline->op2_type == IS_CONST);
14976 ZEND_ASSERT(opline->result_type == IS_UNUSED);
14978 member = RT_CONSTANT(opline, opline->op2);
14987 if (opline->op1_type == IS_VAR
14997 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
15008 jit_SET_EX_OPLINE(jit, opline);
15035 } else if (zend_jit_class_guard(jit, opline, obj_ref, ce)) {
15064 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, (opline+1)->extended_value & ~ZEND_FETCH_OBJ_…
15073 …ir_ADD_OFFSET(run_time_cache, ((opline+1)->extended_value & ~ZEND_FETCH_OBJ_FLAGS) + sizeof(void*)…
15081 …ir_ADD_OFFSET(run_time_cache, ((opline+1)->extended_value & ~ZEND_FETCH_OBJ_FLAGS) + sizeof(void*)…
15104 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
15123 jit_SET_EX_OPLINE(jit, opline);
15126 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (opline+1)->op1.var);
15186 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
15213 jit_SET_EX_OPLINE(jit, opline);
15216 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (opline+1)->op1.var);
15238 uint8_t val_op_type = (opline+1)->op1_type;
15244 switch (opline->extended_value) {
15250 if (opline->extended_value != ZEND_ADD ||
15256 …f (!zend_jit_math_helper(jit, opline, opline->extended_value, IS_CV, opline->op1, var_addr, var_in…
15279 Z_TYPE_P(RT_CONSTANT((opline+1), (opline+1)->op1)) != IS_LONG ||
15280 Z_LVAL_P(RT_CONSTANT((opline+1), (opline+1)->op1)) < 0) {
15290 Z_TYPE_P(RT_CONSTANT((opline+1), (opline+1)->op1)) != IS_LONG ||
15291 Z_LVAL_P(RT_CONSTANT((opline+1), (opline+1)->op1)) == 0) {
15295 if (!zend_jit_long_math_helper(jit, opline, opline->extended_value,
15296 IS_CV, opline->op1, var_addr, var_info, NULL,
15297 val_op_type, (opline+1)->op1, val_addr, val_info,
15305 …if (!zend_jit_concat_helper(jit, opline, IS_CV, opline->op1, var_addr, var_info, val_op_type, (opl…
15326 zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, (opline+1)->op1.var);
15334 jit_SET_EX_OPLINE(jit, opline);
15340 ir_ADD_OFFSET(run_time_cache, (opline+1)->extended_value & ~ZEND_FETCH_OBJ_FLAGS),
15355 jit_FREE_OP(jit, (opline+1)->op1_type, (opline+1)->op1, val_info, opline);
15357 if (opline->op1_type != IS_UNUSED && !delayed_fetch_this && !op1_indirect) {
15361 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
15372 const zend_op *opline, argument
15393 uint32_t res_info = (opline->result_type != IS_UNDEF) ? RES_INFO() : 0;
15399 ZEND_ASSERT(opline->op2_type == IS_CONST);
15402 if (opline->result_type != IS_UNUSED) {
15403 res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
15406 member = RT_CONSTANT(opline, opline->op2);
15415 if (opline->op1_type == IS_VAR
15425 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
15436 jit_SET_EX_OPLINE(jit, opline);
15458 } else if (zend_jit_class_guard(jit, opline, obj_ref, ce)) {
15487 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG…
15496 …ir_ADD_OFFSET(run_time_cache, (opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) + sizeof(void*) * 2…
15504 ir_ADD_OFFSET(run_time_cache, (opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS) + sizeof(void*)));
15527 int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
15547 jit_SET_EX_OPLINE(jit, opline);
15560 if (opline->result_type == IS_UNUSED) {
15561 switch (opline->opcode) {
15576 switch (opline->opcode) {
15608 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
15634 switch (opline->opcode) {
15652 jit_SET_EX_OPLINE(jit, opline);
15655 (opline->result_type == IS_UNUSED) ? IR_NULL : jit_ZVAL_ADDR(jit, res_addr));
15676 if (opline->opcode == ZEND_POST_INC_OBJ || opline->opcode == ZEND_POST_DEC_OBJ) {
15677 if (opline->result_type != IS_UNUSED) {
15682 if (opline->opcode == ZEND_PRE_INC_OBJ || opline->opcode == ZEND_POST_INC_OBJ) {
15692 if (opline->opcode == ZEND_PRE_INC_OBJ || opline->opcode == ZEND_PRE_DEC_OBJ) {
15693 if (opline->result_type != IS_UNUSED) {
15708 if (opline->opcode == ZEND_POST_INC_OBJ || opline->opcode == ZEND_POST_DEC_OBJ) {
15711 if (opline->opcode == ZEND_PRE_INC_OBJ || opline->opcode == ZEND_POST_INC_OBJ) {
15712 if (opline->opcode == ZEND_PRE_INC_OBJ && opline->result_type != IS_UNUSED) {
15721 if (opline->opcode == ZEND_PRE_DEC_OBJ && opline->result_type != IS_UNUSED) {
15735 if (opline->opcode == ZEND_PRE_INC_OBJ || opline->opcode == ZEND_POST_INC_OBJ) {
15743 if (opline->opcode == ZEND_PRE_INC_OBJ && opline->result_type != IS_UNUSED) {
15760 if (opline->opcode == ZEND_PRE_DEC_OBJ && opline->result_type != IS_UNUSED) {
15770 if (opline->result_type != IS_UNUSED
15771 && (opline->opcode == ZEND_PRE_INC_OBJ || opline->opcode == ZEND_PRE_DEC_OBJ)
15777 uint32_t old_res_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var));
15781 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_DOUBLE, 0);
15782 exit_point = zend_jit_trace_get_exit_point(opline + 1, 0);
15787 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_res_info);
15802 switch (opline->opcode) {
15820 jit_SET_EX_OPLINE(jit, opline);
15825 ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS),
15826 (opline->result_type == IS_UNUSED) ? IR_NULL : jit_ZVAL_ADDR(jit, res_addr));
15835 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) && !delayed_fetch_this && !op1_indirect) {
15839 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
15849 static int zend_jit_fetch_static_prop(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array… argument
15852 uint32_t cache_slot = opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS;
15859 ce = zend_get_known_class(op_array, opline, opline->op2_type, opline->op2);
15861 zval *zv = RT_CONSTANT(opline, opline->op1);
15882 switch (opline->opcode) {
15932 jit_SET_EX_OPLINE(jit, opline);
15943 flags = opline->extended_value & ZEND_FETCH_OBJ_FLAGS;
15977 jit_SET_EX_OPLINE(jit, opline);
15979 zend_jit_check_exception_undef_result(jit, opline);
16000 static int zend_jit_switch(zend_jit_ctx *jit, const zend_op *opline, const zend_op_array *op_array,… argument
16002 HashTable *jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2));
16010 ZEND_ASSERT(trace->opline != NULL);
16011 next_opline = trace->opline;
16014 if (opline->op1_type == IS_CONST) {
16015 zval *zv = RT_CONSTANT(opline, opline->op1);
16019 if (opline->opcode == ZEND_SWITCH_LONG) {
16023 } else if (opline->opcode == ZEND_SWITCH_STRING) {
16027 } else if (opline->opcode == ZEND_MATCH) {
16040 target = ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(jump_zv));
16042 target = ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value);
16047 b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(jump_zv)) - op_array->opcodes];
16049 b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value) - op_array->opcodes];
16055 zend_ssa_op *ssa_op = ssa->ops ? &ssa->ops[opline - op_array->opcodes] : NULL;
16058 const zend_op *default_opline = ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value);
16077 if (opline->opcode == ZEND_SWITCH_LONG) {
16082 if (next_opline != opline + 1) {
16083 exit_point = zend_jit_trace_get_exit_point(opline + 1, 0);
16154 target = ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(zv));
16188 target = ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(zv));
16204 } else if (opline->opcode == ZEND_SWITCH_STRING) {
16209 if (next_opline != opline + 1) {
16210 exit_point = zend_jit_trace_get_exit_point(opline + 1, 0);
16279 target = ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(zv));
16313 target = ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(zv));
16328 } else if (opline->opcode == ZEND_MATCH) {
16415 target = ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(zv));
16443 target = ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(zv));
16482 jit_SET_EX_OPLINE(jit, opline);
16484 ir_CONST_U32(opline->op1.var));
16485 zend_jit_check_exception_undef_result(jit, opline);
16623 zend_op *opline = (zend_op*)op_array->opcodes; local
16626 while (opline->opcode == ZEND_RECV) {
16627 opline++;
16630 opline->handler = entry;
16699 static int zend_jit_type_guard(zend_jit_ctx *jit, const zend_op *opline, uint32_t var, uint8_t type) argument
16701 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
16713 static int zend_jit_scalar_type_guard(zend_jit_ctx *jit, const zend_op *opline, uint32_t var) argument
16715 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
16727 static bool zend_jit_noref_guard(zend_jit_ctx *jit, const zend_op *opline, zend_jit_addr var_addr) argument
16729 uint32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
16740 static int zend_jit_trace_opline_guard(zend_jit_ctx *jit, const zend_op *opline) argument
16749 ir_GUARD(jit_CMP_IP(jit, IR_EQ, opline), ir_CONST_ADDR(exit_addr));
16750 zend_jit_set_last_valid_opline(jit, opline);
16756 const zend_op *opline, argument
16766 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
16787 const zend_op *opline, argument
16800 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
16812 if (opline->opcode == ZEND_INIT_METHOD_CALL && opline->op1_type == IS_VAR) {
16852 static bool zend_jit_fetch_indirect_var(zend_jit_ctx *jit, const zend_op *opline, uint8_t var_type,… argument
16861 int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
16884 exit_point = zend_jit_trace_get_exit_point(opline, 0);
16909 …handler(zend_jit_ctx *jit, const zend_op_array *op_array, const zend_op *opline, int may_throw, ze… argument
16915 (zend_vm_opcode_handler_t)ZEND_OP_TRACE_INFO(opline, offset)->call_handler;
16918 zend_jit_set_ip(jit, opline);
16926 && opline->opcode != ZEND_RETURN
16927 && opline->opcode != ZEND_RETURN_BY_REF) {
16937 if (opline->opcode == ZEND_RETURN ||
16938 opline->opcode == ZEND_RETURN_BY_REF ||
16939 opline->opcode == ZEND_DO_UCALL ||
16940 opline->opcode == ZEND_DO_FCALL_BY_NAME ||
16941 opline->opcode == ZEND_DO_FCALL ||
16942 opline->opcode == ZEND_GENERATOR_CREATE) {
16950 if (zend_jit_trace_may_exit(op_array, opline)) {
16951 if (opline->opcode == ZEND_RETURN ||
16952 opline->opcode == ZEND_RETURN_BY_REF ||
16953 opline->opcode == ZEND_GENERATOR_CREATE) {
16968 } else if (opline->opcode == ZEND_GENERATOR_RETURN ||
16969 opline->opcode == ZEND_YIELD ||
16970 opline->opcode == ZEND_YIELD_FROM) {
16978 const zend_op *next_opline = trace->opline;
16986 if (zend_is_smart_branch(opline)) {
16988 exit_opline = zend_jit_trace_get_exit_opline(trace, opline + 1, &exit_if_true);
16990 switch (opline->opcode) {
17000 exit_opline = (trace->opline == opline + 1) ?
17001 OP_JMP_ADDR(opline, opline->op2) :
17002 opline + 1;
17006 exit_opline = (trace->opline == opline + 1) ?
17007 ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value) :
17008 opline + 1;
17014 switch (opline->opcode) {
17017 if (opline->op2_type != IS_UNUSED) {
17018 old_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->op2.var));
17019 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->op2.var), IS_UNKNOWN, 1);
17023 if (opline->op1_type == IS_CV) {
17024 old_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->op1.var));
17025 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->op1.var), IS_UNKNOWN, 1);
17029 if (opline->result_type == IS_VAR || opline->result_type == IS_TMP_VAR) {
17030 old_res_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var));
17031 SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_UNKNOWN, 1);
17036 if (opline->result_type == IS_VAR || opline->result_type == IS_TMP_VAR) {
17037 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_res_info);
17039 switch (opline->opcode) {
17042 if (opline->op2_type != IS_UNUSED) {
17043 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->op2.var), old_info);
17047 if (opline->op1_type == IS_CV) {
17048 SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->op1.var), old_info);
17060 zend_jit_set_last_valid_opline(jit, trace->opline);
17200 static int zend_jit_trace_return(zend_jit_ctx *jit, bool original_handler, const zend_op *opline) argument
17217 if (opline &&
17218 (opline->opcode == ZEND_RETURN
17219 || opline->opcode == ZEND_RETURN_BY_REF
17220 || opline->opcode == ZEND_GENERATOR_RETURN
17221 || opline->opcode == ZEND_GENERATOR_CREATE
17222 || opline->opcode == ZEND_YIELD
17223 || opline->opcode == ZEND_YIELD_FROM)) {
17254 …upports_reg(const zend_op_array *op_array, zend_ssa *ssa, const zend_op *opline, const zend_ssa_op… argument
17258 switch (opline->opcode) {
17262 …return (opline->op2_type != IS_CONST) && (opline->opcode != ZEND_SEND_VAL_EX || opline->op2.num <=…
17275 return (opline->op1_type == IS_CV);
17277 if (opline->op1_type != IS_CV || opline->result_type != IS_UNUSED) {
17282 return zend_jit_supported_binary_op(opline->extended_value, op1_info, op2_info);
17322 return opline->op1_type == IS_CV
17327 return (opline->op1_type & (IS_CV|IS_CONST))
17331 return (opline->op1_type & (IS_CV|IS_CONST))
17339 … if (opline > op_array->opcodes + ssa->cfg.blocks[ssa->cfg.map[opline-op_array->opcodes]].start &&
17340 ((opline-1)->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) {
17353 if ((opline->extended_value & ZEND_ISEMPTY)) {
17371 if (opline->result_type != IS_UNUSED) {
17374 if (!zend_jit_supported_binary_op(opline->extended_value, MAY_BE_ANY, OP1_DATA_INFO())) {
17385 if (opline->op1_type == IS_CV) {
17386 if ((opline->opcode == ZEND_ASSIGN_DIM
17387 || opline->opcode == ZEND_ASSIGN_DIM_OP)
17388 && (opline+1)->op1_type == IS_CV
17389 && (opline+1)->op1.var == opline->op1.var) {
17393 } else if (opline->op1_type == IS_VAR) {
17396 || opline->result_type != IS_UNUSED) {
17405 if (opline->op1_type != IS_CV) {
17413 if (opline->result_type != IS_UNUSED) {
17416 if (!zend_jit_supported_binary_op(opline->extended_value, MAY_BE_ANY, OP1_DATA_INFO())) {
17422 if (opline->op2_type != IS_CONST
17423 || Z_TYPE_P(RT_CONSTANT(opline, opline->op2)) != IS_STRING
17424 || Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))[0] == '\0') {
17428 return opline->op1_type == IS_UNUSED || (op1_info & MAY_BE_OBJECT);
17561 static ir_ref jit_frameless_observer(zend_jit_ctx *jit, const zend_op *opline) { argument
17564 zend_function *fbc = ZEND_FLF_FUNC(opline);
17576 static void jit_frameless_icall0(zend_jit_ctx *jit, const zend_op *opline) argument
17578 jit_SET_EX_OPLINE(jit, opline);
17580 void *function = ZEND_FLF_HANDLER(opline);
17587 skip_observer = jit_frameless_observer(jit, opline);
17599 static void jit_frameless_icall1(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info) argument
17601 jit_SET_EX_OPLINE(jit, opline);
17608 void *function = ZEND_FLF_HANDLER(opline);
17614 if (opline->op1_type == IS_CV && (op1_info & MAY_BE_UNDEF)) {
17615 op1_ref = zend_jit_zval_check_undef(jit, op1_ref, opline->op1.var, opline, 1);
17626 skip_observer = jit_frameless_observer(jit, opline);
17635 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL);
17639 static void jit_frameless_icall2(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, uint3… argument
17641 jit_SET_EX_OPLINE(jit, opline);
17651 void *function = ZEND_FLF_HANDLER(opline);
17659 if (opline->op1_type == IS_CV && (op1_info & MAY_BE_UNDEF)) {
17660 op1_ref = zend_jit_zval_check_undef(jit, op1_ref, opline->op1.var, opline, 1);
17665 if (opline->op2_type == IS_CV && (op2_info & MAY_BE_UNDEF)) {
17666 op2_ref = zend_jit_zval_check_undef(jit, op2_ref, opline->op2.var, opline, 1);
17680 skip_observer = jit_frameless_observer(jit, opline);
17689 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL);
17691 …if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) != 0 && (opline->op2_type & (IS_VAR|IS_TMP_VAR)) != 0…
17694 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, NULL);
17698 static void jit_frameless_icall3(zend_jit_ctx *jit, const zend_op *opline, uint32_t op1_info, uint3… argument
17700 jit_SET_EX_OPLINE(jit, opline);
17713 void *function = ZEND_FLF_HANDLER(opline);
17714 uint8_t op_data_type = (opline + 1)->op1_type;
17724 if (opline->op1_type == IS_CV && (op1_info & MAY_BE_UNDEF)) {
17725 op1_ref = zend_jit_zval_check_undef(jit, op1_ref, opline->op1.var, opline, 1);
17730 if (opline->op2_type == IS_CV && (op2_info & MAY_BE_UNDEF)) {
17731 op2_ref = zend_jit_zval_check_undef(jit, op2_ref, opline->op2.var, opline, 1);
17736 if ((opline+1)->op1_type == IS_CV && (op1_data_info & MAY_BE_UNDEF)) {
17737 op3_ref = zend_jit_zval_check_undef(jit, op3_ref, (opline+1)->op1.var, opline, 1);
17754 skip_observer = jit_frameless_observer(jit, opline);
17763 jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, NULL);
17765 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))
17766 && ((opline->op2_type & (IS_VAR|IS_TMP_VAR))
17770 jit_FREE_OP(jit, opline->op2_type, opline->op2, op2_info, NULL);
17773 if (!(opline->op1_type & (IS_VAR|IS_TMP_VAR))
17774 && (opline->op2_type & (IS_VAR|IS_TMP_VAR)) != 0
17778 jit_FREE_OP(jit, (opline+1)->op1_type, (opline+1)->op1, op1_data_info, NULL);