Lines Matching refs:ref

156 static void ir_refs_add(ir_refs *refs, ir_ref ref)  in ir_refs_add()  argument
162 ptr[refs->count++] = ref; in ir_refs_add()
263 ir_ref ref; member
469 ir_ref ref = jit->ctx.control; in jit_TLS() local
472 if (ref == jit->tls) { in jit_TLS()
475 insn = &jit->ctx.ir_base[ref]; in jit_TLS()
479 ref = insn->op1; in jit_TLS()
491 ir_ref ref; in jit_CONST_ADDR() local
499 ref = Z_LVAL_P(zv); in jit_CONST_ADDR()
500 ZEND_ASSERT(jit->ctx.ir_base[ref].opt == IR_OPT(IR_ADDR, IR_ADDR)); in jit_CONST_ADDR()
502 ref = ir_unique_const_addr(&jit->ctx, addr); in jit_CONST_ADDR()
503 ZVAL_LONG(zv, ref); in jit_CONST_ADDR()
505 return ref; in jit_CONST_ADDR()
510 ir_ref ref; in jit_CONST_FUNC_PROTO() local
517 ref = Z_LVAL_P(zv); in jit_CONST_FUNC_PROTO()
518 …ZEND_ASSERT(jit->ctx.ir_base[ref].opt == IR_OPT(IR_FUNC_ADDR, IR_ADDR) && jit->ctx.ir_base[ref].pr… in jit_CONST_FUNC_PROTO()
520 ref = ir_unique_const_addr(&jit->ctx, addr); in jit_CONST_FUNC_PROTO()
521 insn = &jit->ctx.ir_base[ref]; in jit_CONST_FUNC_PROTO()
524 ZVAL_LONG(zv, ref); in jit_CONST_FUNC_PROTO()
526 return ref; in jit_CONST_FUNC_PROTO()
554 ir_ref ref = jit->eg_exception_addr; in jit_EG_exception()
556 if (UNEXPECTED(!ref)) { in jit_EG_exception()
557 ref = ir_unique_const_addr(&jit->ctx, (uintptr_t)&EG(exception)); in jit_EG_exception()
558 jit->eg_exception_addr = ref; in jit_EG_exception()
560 return ref; in jit_EG_exception()
566 ir_ref ref = jit->stub_addr[id]; in jit_STUB_ADDR() local
568 if (UNEXPECTED(!ref)) { in jit_STUB_ADDR()
569 ref = ir_unique_const_addr(&jit->ctx, (uintptr_t)zend_jit_stub_handlers[id]); in jit_STUB_ADDR()
570 jit->stub_addr[id] = ref; in jit_STUB_ADDR()
572 return ref; in jit_STUB_ADDR()
577 ir_ref ref = jit->stub_addr[id]; in jit_STUB_FUNC_ADDR() local
580 if (UNEXPECTED(!ref)) { in jit_STUB_FUNC_ADDR()
581 ref = ir_unique_const_addr(&jit->ctx, (uintptr_t)zend_jit_stub_handlers[id]); in jit_STUB_FUNC_ADDR()
582 insn = &jit->ctx.ir_base[ref]; in jit_STUB_FUNC_ADDR()
590 jit->stub_addr[id] = ref; in jit_STUB_FUNC_ADDR()
592 return ref; in jit_STUB_FUNC_ADDR()
641 ir_ref ref = STACK_REF(stack, snapshot_size - 1); in jit_SNAPSHOT() local
643 …if (!ref || ref == IR_NULL || (STACK_FLAGS(stack, snapshot_size - 1) & (/*ZREG_LOAD|*/ZREG_STORE))… in jit_SNAPSHOT()
654 ir_ref ref = STACK_REF(stack, i); in jit_SNAPSHOT() local
656 if (!ref || ref == IR_NULL || (STACK_FLAGS(stack, i) & (/*ZREG_LOAD|*/ZREG_STORE))) { in jit_SNAPSHOT()
657 ref = IR_UNUSED; in jit_SNAPSHOT()
659 ir_SNAPSHOT_SET_OP(snapshot, i + 1, ref); in jit_SNAPSHOT()
740 ir_ref ref = ir_insn_op(snapshot, i); in zend_jit_snapshot_handler() local
742 if (ref) { in zend_jit_snapshot_handler()
761 if (ref > 0) { in zend_jit_snapshot_handler()
767 && (t->stack_map[t->exit_info[exit_point].stack_offset + var].ref != ref in zend_jit_snapshot_handler()
774 t->stack_map[t->exit_info[exit_point].stack_offset + var].ref = ref; in zend_jit_snapshot_handler()
808 int32_t idx = _add_trace_const(t, ctx->ir_base[ref].val.i64); in zend_jit_snapshot_handler()
810 t->stack_map[t->exit_info[exit_point].stack_offset + var].ref = idx; in zend_jit_snapshot_handler()
875 ir_ref ref = jit->ctx.control; in jit_FP() local
878 if (ref == jit->fp) { in jit_FP()
881 insn = &jit->ctx.ir_base[ref]; in jit_FP()
886 ref = insn->op1; in jit_FP()
892 static void jit_STORE_FP(zend_jit_ctx *jit, ir_ref ref) in jit_STORE_FP() argument
894 ir_RSTORE(ZREG_FP, ref); in jit_STORE_FP()
903 static void jit_STORE_IP(zend_jit_ctx *jit, ir_ref ref) in jit_STORE_IP() argument
905 ir_RSTORE(ZREG_IP, ref); in jit_STORE_IP()
913 static void jit_LOAD_IP(zend_jit_ctx *jit, ir_ref ref) in jit_LOAD_IP() argument
916 jit_STORE_IP(jit, ref); in jit_LOAD_IP()
918 ir_STORE(jit_EX(opline), ref); in jit_LOAD_IP()
1009 ir_ref ref; in zend_jit_set_ip() local
1022 ref = jit_IP(jit); in zend_jit_set_ip()
1025 ref = ir_LOAD_A(addr); in zend_jit_set_ip()
1028 ref = ir_ADD_OFFSET(ref, (uintptr_t)target - (uintptr_t)jit->last_valid_opline); in zend_jit_set_ip()
1030 ref = ir_SUB_A(ref, ir_CONST_ADDR((uintptr_t)jit->last_valid_opline - (uintptr_t)target)); in zend_jit_set_ip()
1033 jit_STORE_IP(jit, ref); in zend_jit_set_ip()
1035 ir_STORE(addr, ref); in zend_jit_set_ip()
1097 static ir_ref jit_Z_TYPE_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_TYPE_ref() argument
1099 return ir_LOAD_U8(ir_ADD_OFFSET(ref, offsetof(zval, u1.v.type))); in jit_Z_TYPE_ref()
1123 static ir_ref jit_Z_TYPE_FLAGS_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_TYPE_FLAGS_ref() argument
1125 return ir_LOAD_U8(ir_ADD_OFFSET(ref, offsetof(zval, u1.v.type_flags))); in jit_Z_TYPE_FLAGS_ref()
1149 static ir_ref jit_Z_TYPE_INFO_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_TYPE_INFO_ref() argument
1151 return ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zval, u1.type_info))); in jit_Z_TYPE_INFO_ref()
1175 static void jit_set_Z_TYPE_INFO_ref(zend_jit_ctx *jit, ir_ref ref, ir_ref type_info) in jit_set_Z_TYPE_INFO_ref() argument
1177 ir_STORE(ir_ADD_OFFSET(ref, offsetof(zval, u1.type_info)), type_info); in jit_set_Z_TYPE_INFO_ref()
1212 static ir_ref jit_if_Z_TYPE_ref(zend_jit_ctx *jit, ir_ref ref, ir_ref type) in jit_if_Z_TYPE_ref() argument
1214 return ir_IF(ir_EQ(jit_Z_TYPE_ref(jit, ref), type)); in jit_if_Z_TYPE_ref()
1225 ir_ref ref = jit_Z_TYPE(jit, addr); in jit_if_not_Z_TYPE() local
1228 ref = ir_NE(ref, ir_CONST_U8(type)); in jit_if_not_Z_TYPE()
1230 return ir_IF(ref); in jit_if_not_Z_TYPE()
1235 ir_ref ref = jit_Z_TYPE(jit, addr); in jit_guard_Z_TYPE() local
1238 ir_GUARD(ir_EQ(ref, ir_CONST_U8(type)), ir_CONST_ADDR(exit_addr)); in jit_guard_Z_TYPE()
1240 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in jit_guard_Z_TYPE()
1246 ir_ref ref = jit_Z_TYPE(jit, addr); in jit_guard_not_Z_TYPE() local
1249 ref = ir_NE(ref, ir_CONST_U8(type)); in jit_guard_not_Z_TYPE()
1251 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in jit_guard_not_Z_TYPE()
1264 static ir_ref jit_Z_LVAL_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_LVAL_ref() argument
1266 return ir_LOAD_L(ref); in jit_Z_LVAL_ref()
1269 static ir_ref jit_Z_DVAL_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_DVAL_ref() argument
1271 return ir_LOAD_D(ref); in jit_Z_DVAL_ref()
1325 ZEND_ASSERT(jit->ra && jit->ra[var].ref == IR_NULL); in zend_jit_def_reg()
1331 jit->ra[var].ref = val; in zend_jit_def_reg()
1345 jit->ra[src_var].ref = val; in zend_jit_def_reg()
1357 if (jit->ra[dst_phi->ssa_var].ref > 0) { in zend_jit_def_reg()
1358 ir_insn *phi_insn = &jit->ctx.ir_base[jit->ra[dst_phi->ssa_var].ref]; in zend_jit_def_reg()
1381 ZEND_ASSERT(jit->ra && jit->ra[var].ref); in zend_jit_use_reg()
1382 if (jit->ra[var].ref == IR_NULL) { in zend_jit_use_reg()
1384 ir_ref ref; in zend_jit_use_reg() local
1389 ref = jit_Z_LVAL_ref(jit, jit_ZVAL_ADDR(jit, mem_addr)); in zend_jit_use_reg()
1391 ref = jit_Z_DVAL_ref(jit, jit_ZVAL_ADDR(jit, mem_addr)); in zend_jit_use_reg()
1395 zend_jit_def_reg(jit, addr, ref); in zend_jit_use_reg()
1396 return ref; in zend_jit_use_reg()
1398 return jit->ra[Z_SSA_VAR(addr)].ref; in zend_jit_use_reg()
1408 ZEND_ASSERT(jit->ra[src_var].ref); in zend_jit_gen_pi()
1410 if (jit->ra[src_var].ref == IR_NULL) { in zend_jit_gen_pi()
1436 ir_ref ref; in zend_jit_gen_phi() local
1447 ref = ir_emit_N(&jit->ctx, IR_OPT(IR_PHI, type), n + 1); in zend_jit_gen_phi()
1448 ir_set_op(&jit->ctx, ref, 1, merge); in zend_jit_gen_phi()
1453 ZEND_ASSERT(jit->ra[src_var].ref); in zend_jit_gen_phi()
1454 if (jit->ra[src_var].ref == IR_NULL) { in zend_jit_gen_phi()
1464 ir_set_op(&jit->ctx, ref, i + 2, src_ref); in zend_jit_gen_phi()
1468 ref = same_src_ref; in zend_jit_gen_phi()
1472 zend_jit_def_reg(jit, ZEND_ADDR_REG(dst_var), ref); in zend_jit_gen_phi()
1531 static ir_ref jit_Z_PTR_ref(zend_jit_ctx *jit, ir_ref ref) in jit_Z_PTR_ref() argument
1533 return ir_LOAD_A(ref); in jit_Z_PTR_ref()
1550 static ir_ref jit_GC_REFCOUNT(zend_jit_ctx *jit, ir_ref ref) in jit_GC_REFCOUNT() argument
1552 return ir_LOAD_U32(ref); in jit_GC_REFCOUNT()
1555 static void jit_set_GC_REFCOUNT(zend_jit_ctx *jit, ir_ref ref, uint32_t refcount) in jit_set_GC_REFCOUNT() argument
1557 ir_STORE(ref, ir_CONST_U32(refcount)); in jit_set_GC_REFCOUNT()
1560 static void jit_GC_ADDREF(zend_jit_ctx *jit, ir_ref ref) in jit_GC_ADDREF() argument
1562 ir_STORE(ref, ir_ADD_U32(ir_LOAD_U32(ref), ir_CONST_U32(1))); in jit_GC_ADDREF()
1565 static void jit_GC_ADDREF2(zend_jit_ctx *jit, ir_ref ref) in jit_GC_ADDREF2() argument
1567 ir_ref counter = ir_LOAD_U32(ref); in jit_GC_ADDREF2()
1568 ir_STORE(ref, ir_ADD_U32(counter, ir_CONST_U32(2))); in jit_GC_ADDREF2()
1571 static ir_ref jit_GC_DELREF(zend_jit_ctx *jit, ir_ref ref) in jit_GC_DELREF() argument
1573 ir_ref counter = ir_LOAD_U32(ref); in jit_GC_DELREF()
1575 ir_STORE(ref, counter); in jit_GC_DELREF()
1579 static ir_ref jit_if_GC_MAY_NOT_LEAK(zend_jit_ctx *jit, ir_ref ref) in jit_if_GC_MAY_NOT_LEAK() argument
1583 ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zend_refcounted, gc.u.type_info))), in jit_if_GC_MAY_NOT_LEAK()
1589 ir_ref ref = IR_UNUSED; in jit_ZVAL_COPY_CONST() local
1599 ref = ir_CONST_ADDR(Z_PTR_P(zv)); in jit_ZVAL_COPY_CONST()
1600 jit_set_Z_PTR(jit, dst, ref); in jit_ZVAL_COPY_CONST()
1602 jit_GC_ADDREF(jit, ref); in jit_ZVAL_COPY_CONST()
1617 static ir_ref jit_if_TYPED_REF(zend_jit_ctx *jit, ir_ref ref) in jit_if_TYPED_REF() argument
1619 return ir_IF(ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_reference, sources.ptr)))); in jit_if_TYPED_REF()
1624 ir_ref ref = IR_UNUSED; in jit_ZVAL_COPY() local
1637 ref = jit_Z_PTR(jit, src); in jit_ZVAL_COPY()
1638 jit_set_Z_PTR(jit, dst, ref); in jit_ZVAL_COPY()
1661 jit_GC_ADDREF(jit, ref); in jit_ZVAL_COPY()
1673 ir_ref ref = IR_UNUSED; in jit_ZVAL_COPY_2() local
1677 ref = jit_Z_LVAL(jit, src); in jit_ZVAL_COPY_2()
1678 jit_set_Z_LVAL(jit, dst, ref); in jit_ZVAL_COPY_2()
1679 jit_set_Z_LVAL(jit, dst2, ref); in jit_ZVAL_COPY_2()
1681 ref = jit_Z_DVAL(jit, src); in jit_ZVAL_COPY_2()
1682 jit_set_Z_DVAL(jit, dst, ref); in jit_ZVAL_COPY_2()
1683 jit_set_Z_DVAL(jit, dst2, ref); in jit_ZVAL_COPY_2()
1687 ref = jit_Z_W2(jit, src); in jit_ZVAL_COPY_2()
1688 jit_set_Z_W2(jit, dst, ref); in jit_ZVAL_COPY_2()
1689 jit_set_Z_W2(jit, dst2, ref); in jit_ZVAL_COPY_2()
1692 ref = jit_Z_PTR(jit, src); in jit_ZVAL_COPY_2()
1693 jit_set_Z_PTR(jit, dst, ref); in jit_ZVAL_COPY_2()
1694 jit_set_Z_PTR(jit, dst2, ref); in jit_ZVAL_COPY_2()
1724 jit_GC_ADDREF2(jit, ref); in jit_ZVAL_COPY_2()
1726 jit_GC_ADDREF(jit, ref); in jit_ZVAL_COPY_2()
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
1743 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(_efree), ref); in jit_ZVAL_DTOR()
1750 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_array_destroy), ref); in jit_ZVAL_DTOR()
1752 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_array_free), ref); in jit_ZVAL_DTOR()
1759 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_objects_store_del), ref); in jit_ZVAL_DTOR()
1766 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(rc_dtor_func), ref); in jit_ZVAL_DTOR()
1775 ir_ref ref, ref2; in jit_ZVAL_PTR_DTOR() local
1787 ref = jit_Z_PTR(jit, addr); in jit_ZVAL_PTR_DTOR()
1788 ref2 = jit_GC_DELREF(jit, ref); in jit_ZVAL_PTR_DTOR()
1796 jit_ZVAL_DTOR(jit, ref, op_info, opline); in jit_ZVAL_PTR_DTOR()
1811 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val)); in jit_ZVAL_PTR_DTOR()
1821 ref = ir_PHI_2(IR_ADDR, ref2, ref); in jit_ZVAL_PTR_DTOR()
1824 if_may_not_leak = jit_if_GC_MAY_NOT_LEAK(jit, ref); in jit_ZVAL_PTR_DTOR()
1832 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(gc_possible_root), ref); in jit_ZVAL_PTR_DTOR()
1855 static void jit_OBJ_RELEASE(zend_jit_ctx *jit, ir_ref ref) in jit_OBJ_RELEASE() argument
1861 if_not_zero = ir_IF(jit_GC_DELREF(jit, ref)); in jit_OBJ_RELEASE()
1865 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_objects_store_del), ref); in jit_OBJ_RELEASE()
1869 if_may_not_leak = jit_if_GC_MAY_NOT_LEAK(jit, ref); in jit_OBJ_RELEASE()
1875 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(gc_possible_root), ref); in jit_OBJ_RELEASE()
1883 ir_ref ref = ir_LOAD_U8(jit_EG(vm_interrupt)); in zend_jit_check_timeout() local
1886 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_check_timeout()
1888 ir_GUARD_NOT(ref, jit_STUB_ADDR(jit, jit_stub_interrupt_handler)); in zend_jit_check_timeout()
1890 ir_ref if_timeout = ir_IF(ref); in zend_jit_check_timeout()
1916 ir_ref ref, if_negative; in zend_jit_exception_handler_stub() local
1918 ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(handler), jit_FP(jit)); in zend_jit_exception_handler_stub()
1919 if_negative = ir_IF(ir_LT(ref, ir_CONST_U32(0))); in zend_jit_exception_handler_stub()
1922 ref = ir_PHI_2(IR_I32, ref, ir_CONST_I32(1)); in zend_jit_exception_handler_stub()
1923 ir_RETURN(ref); in zend_jit_exception_handler_stub()
1931 ir_ref ref, result_type, if_result_used; in zend_jit_exception_handler_undef_stub() local
1933 ref = jit_EG(opline_before_exception); in zend_jit_exception_handler_undef_stub()
1934 result_type = ir_LOAD_U8(ir_ADD_OFFSET(ir_LOAD_A(ref), offsetof(zend_op, result_type))); in zend_jit_exception_handler_undef_stub()
1939 ref = ir_LOAD_U32(ir_ADD_OFFSET(ir_LOAD_A(ref), offsetof(zend_op, result.var))); in zend_jit_exception_handler_undef_stub()
1941 ref = ir_ZEXT_A(ref); in zend_jit_exception_handler_undef_stub()
1943 …ir_STORE(ir_ADD_OFFSET(ir_ADD_A(jit_FP(jit), ref), offsetof(zval, u1.type_info)), ir_CONST_U32(IS_… in zend_jit_exception_handler_undef_stub()
1953 ir_ref ref, if_dtor; in zend_jit_exception_handler_free_op1_op2_stub() local
1956 ref = ir_LOAD_A(jit_EG(opline_before_exception)); in zend_jit_exception_handler_free_op1_op2_stub()
1957 if_dtor = ir_IF(ir_AND_U8(ir_LOAD_U8(ir_ADD_OFFSET(ref, offsetof(zend_op, op1_type))), in zend_jit_exception_handler_free_op1_op2_stub()
1960 ref = ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zend_op, op1.var))); in zend_jit_exception_handler_free_op1_op2_stub()
1962 ref = ir_ZEXT_A(ref); in zend_jit_exception_handler_free_op1_op2_stub()
1964 ref = ir_ADD_A(jit_FP(jit), ref); in zend_jit_exception_handler_free_op1_op2_stub()
1965 var_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_exception_handler_free_op1_op2_stub()
1976 ir_ref ref, if_dtor; in zend_jit_exception_handler_free_op2_stub() local
1979 ref = ir_LOAD_A(jit_EG(opline_before_exception)); in zend_jit_exception_handler_free_op2_stub()
1980 if_dtor = ir_IF(ir_AND_U8(ir_LOAD_U8(ir_ADD_OFFSET(ref, offsetof(zend_op, op2_type))), in zend_jit_exception_handler_free_op2_stub()
1983 ref = ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zend_op, op2.var))); in zend_jit_exception_handler_free_op2_stub()
1985 ref = ir_ZEXT_A(ref); in zend_jit_exception_handler_free_op2_stub()
1987 ref = ir_ADD_A(jit_FP(jit), ref); in zend_jit_exception_handler_free_op2_stub()
1988 var_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_exception_handler_free_op2_stub()
2099 ir_ref ref = ir_LOAD_A(jit_FP(jit)); in zend_jit_undefined_function_stub() local
2100 ir_ref arg3 = ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(zend_op, op2.constant))); in zend_jit_undefined_function_stub()
2103 arg3 = ir_LOAD_A(ir_ADD_A(ref, ir_SEXT_A(arg3))); in zend_jit_undefined_function_stub()
2123 ir_ref opline, ref, rx, if_eq, if_tmp; in zend_jit_throw_cannot_pass_by_ref_stub() local
2129 ref = ir_LOAD_U32(ir_ADD_OFFSET(opline, offsetof(zend_op, result.var))); in zend_jit_throw_cannot_pass_by_ref_stub()
2131 ref = ir_ZEXT_A(ref); in zend_jit_throw_cannot_pass_by_ref_stub()
2134 jit_set_Z_TYPE_INFO_ref(jit, ir_ADD_A(rx, ref), ir_CONST_U32(IS_UNDEF)); in zend_jit_throw_cannot_pass_by_ref_stub()
2138 ref = ir_LOAD_A(jit_EX(call)); in zend_jit_throw_cannot_pass_by_ref_stub()
2139 if_eq = ir_IF(ir_EQ(rx, ref)); in zend_jit_throw_cannot_pass_by_ref_stub()
2143 ir_STORE(jit_CALL(rx, prev_execute_data), ref); in zend_jit_throw_cannot_pass_by_ref_stub()
2157 ref = ir_LOAD_U8(ir_ADD_OFFSET(jit_IP(jit), offsetof(zend_op, op1_type))); in zend_jit_throw_cannot_pass_by_ref_stub()
2158 if_tmp = ir_IF(ir_EQ(ref, ir_CONST_U8(IS_TMP_VAR))); in zend_jit_throw_cannot_pass_by_ref_stub()
2162 ref = ir_LOAD_U32(ir_ADD_OFFSET(jit_IP(jit), offsetof(zend_op, op1.var))); in zend_jit_throw_cannot_pass_by_ref_stub()
2164 ref = ir_ZEXT_A(ref); in zend_jit_throw_cannot_pass_by_ref_stub()
2166 ref = ir_ADD_A(jit_FP(jit), ref); in zend_jit_throw_cannot_pass_by_ref_stub()
2168 ZEND_ADDR_REF_ZVAL(ref), in zend_jit_throw_cannot_pass_by_ref_stub()
2276 ir_ref func, jit_extension, addr, ref, if_overflow; in _zend_jit_hybrid_hot_counter_stub() local
2281 ref = ir_SUB_I16(ir_LOAD_I16(addr), ir_CONST_I16(cost)); in _zend_jit_hybrid_hot_counter_stub()
2282 ir_STORE(addr, ref); in _zend_jit_hybrid_hot_counter_stub()
2283 if_overflow = ir_IF(ir_LE(ref, ir_CONST_I16(0))); in _zend_jit_hybrid_hot_counter_stub()
2293 ref = ir_SUB_A(jit_IP(jit), in _zend_jit_hybrid_hot_counter_stub()
2295 ref = ir_DIV_A(ref, ir_CONST_ADDR(sizeof(zend_op) / sizeof(void*))); in _zend_jit_hybrid_hot_counter_stub()
2298 ref); in _zend_jit_hybrid_hot_counter_stub()
2349 ir_ref func, jit_extension, offset, addr, ref, if_overflow, ret, if_halt; in _zend_jit_hybrid_trace_counter_stub() local
2355 ref = ir_SUB_I16(ir_LOAD_I16(addr), ir_CONST_I16(cost)); in _zend_jit_hybrid_trace_counter_stub()
2356 ir_STORE(addr, ref); in _zend_jit_hybrid_trace_counter_stub()
2357 if_overflow = ir_IF(ir_LE(ref, ir_CONST_I16(0))); in _zend_jit_hybrid_trace_counter_stub()
2367 ref = jit_EG(current_execute_data); in _zend_jit_hybrid_trace_counter_stub()
2368 jit_STORE_FP(jit, ir_LOAD_A(ref)); in _zend_jit_hybrid_trace_counter_stub()
2369 ref = ir_LOAD_A(jit_EX(opline)); in _zend_jit_hybrid_trace_counter_stub()
2370 jit_STORE_IP(jit, ref); in _zend_jit_hybrid_trace_counter_stub()
2438 ir_ref ref, ret, if_zero, addr; in zend_jit_trace_exit_stub() local
2452 ref = jit_EG(current_execute_data); in zend_jit_trace_exit_stub()
2453 jit_STORE_FP(jit, ir_LOAD_A(ref)); in zend_jit_trace_exit_stub()
2454 ref = ir_LOAD_A(jit_EX(opline)); in zend_jit_trace_exit_stub()
2455 jit_STORE_IP(jit, ref); in zend_jit_trace_exit_stub()
2465 ref = jit_EG(current_execute_data); in zend_jit_trace_exit_stub()
2466 jit_STORE_FP(jit, ir_LOAD_A(ref)); in zend_jit_trace_exit_stub()
2469 ref = ir_LOAD_A(jit_EX(opline)); in zend_jit_trace_exit_stub()
2470 jit_STORE_IP(jit, ref); in zend_jit_trace_exit_stub()
2483 ref = ir_CALL_1(IR_I32, addr, jit_FP(jit)); in zend_jit_trace_exit_stub()
2484 ir_GUARD(ir_GE(ref, ir_CONST_I32(0)), jit_STUB_ADDR(jit, jit_stub_trace_halt)); in zend_jit_trace_exit_stub()
2516 ir_ref ref, if_result_used; in zend_jit_cannot_add_element_stub() local
2523 ref = ir_LOAD_U32(ir_ADD_OFFSET(opline, offsetof(zend_op, result.var))); in zend_jit_cannot_add_element_stub()
2525 ref = ir_ZEXT_A(ref); in zend_jit_cannot_add_element_stub()
2527 jit_set_Z_TYPE_INFO_ref(jit, ir_ADD_A(jit_FP(jit), ref), ir_CONST_U32(IS_UNDEF)); in zend_jit_cannot_add_element_stub()
2624 ir_ref ref = ir_CALL(IR_ADDR, ir_CONST_FC_FUNC(_zend_new_array_0)); in zend_jit_new_array_stub() local
2626 jit_set_Z_PTR(jit, var_addr, ref); in zend_jit_new_array_stub()
2628 ir_RETURN(ref); in zend_jit_new_array_stub()
3135 ir_ref ref = ir_PARAM(IR_ADDR, "execute_data", 1); in zend_jit_calc_trace_prologue_size() local
3136 jit_STORE_FP(jit, ref); in zend_jit_calc_trace_prologue_size()
3415 ir_ref ref = ir_IF(condition); in jit_IF_ex() local
3421 ir_set_op(&jit->ctx, ref, 3, true_block); in jit_IF_ex()
3422 return ref; in jit_IF_ex()
3438 static void _zend_jit_add_predecessor_ref(zend_jit_ctx *jit, int b, int pred, ir_ref ref) in _zend_jit_add_predecessor_ref() argument
3450 ZEND_ASSERT(*r == IR_UNUSED || *r == ref); in _zend_jit_add_predecessor_ref()
3455 if (jit->ctx.ir_base[ref].op == IR_END) { in _zend_jit_add_predecessor_ref()
3456 jit->ctx.ir_base[ref].op = IR_LOOP_END; in _zend_jit_add_predecessor_ref()
3457 } else if (jit->ctx.ir_base[ref].op == IR_IF) { in _zend_jit_add_predecessor_ref()
3458 jit_IF_TRUE_FALSE_ex(jit, ref, b); in _zend_jit_add_predecessor_ref()
3459 ref = ir_LOOP_END(); in _zend_jit_add_predecessor_ref()
3460 } else if (jit->ctx.ir_base[ref].op == IR_UNREACHABLE) { in _zend_jit_add_predecessor_ref()
3461 ir_BEGIN(ref); in _zend_jit_add_predecessor_ref()
3462 ref = ir_LOOP_END(); in _zend_jit_add_predecessor_ref()
3466 ir_MERGE_SET_OP(header, i + 1, ref); in _zend_jit_add_predecessor_ref()
3468 *r = ref; in _zend_jit_add_predecessor_ref()
3526 ir_ref ref; in _zend_jit_fix_merges() local
3532 ref = *p; in _zend_jit_fix_merges()
3533 if (ref) { in _zend_jit_fix_merges()
3534 insn = &jit->ctx.ir_base[ref]; in _zend_jit_fix_merges()
3635 ir_ref ref = jit->ctx.ir_base[switch_ref].op3; in zend_jit_case_start() local
3637 ZEND_ASSERT(jit->ctx.ir_base[ref].op == IR_END); in zend_jit_case_start()
3638 ir_ref end = ref; in zend_jit_case_start()
3644 list = ref; in zend_jit_case_start()
3661 ir_ref ref, bb_start; in zend_jit_bb_start() local
3673 ref = jit->ctx.control; in zend_jit_bb_start()
3674 ir_insn *insn = &jit->ctx.ir_base[ref]; in zend_jit_bb_start()
3676 ref = insn->op1; in zend_jit_bb_start()
3677 insn = &jit->ctx.ir_base[ref]; in zend_jit_bb_start()
3680 ZEND_ASSERT(ref == 1); in zend_jit_bb_start()
3691 ref = jit->bb_edges[jit->bb_predecessors[b]]; in zend_jit_bb_start()
3692 if (ref == IR_UNUSED) { in zend_jit_bb_start()
3697 ir_op op = jit->ctx.ir_base[ref].op; in zend_jit_bb_start()
3701 jit_IF_TRUE_FALSE_ex(jit, ref, b); in zend_jit_bb_start()
3704 jit_IF_TRUE_FALSE_ex(jit, ref, b); in zend_jit_bb_start()
3708 zend_jit_case_start(jit, pred, b, ref); in zend_jit_bb_start()
3715 jit->ctx.control = ir_emit1(&jit->ctx, IR_BEGIN, ref); in zend_jit_bb_start()
3717 ir_BEGIN(ref); in zend_jit_bb_start()
3720 ir_MERGE_WITH(ref); in zend_jit_bb_start()
3742 ref = jit->bb_edges[jit->bb_predecessors[b] + i]; in zend_jit_bb_start()
3743 if (ref == IR_UNUSED) { in zend_jit_bb_start()
3747 ir_op op = jit->ctx.ir_base[ref].op; in zend_jit_bb_start()
3750 jit_IF_TRUE_FALSE_ex(jit, ref, b); in zend_jit_bb_start()
3753 zend_jit_case_start(jit, pred, b, ref); in zend_jit_bb_start()
3757 pred_refs[i] = ref; in zend_jit_bb_start()
3828 ir_ref ref; in jit_CMP_IP() local
3832 ref = jit_IP32(jit); in jit_CMP_IP()
3834 ref = ir_LOAD_U32(jit_EX(opline)); in jit_CMP_IP()
3836 ref = ir_CMP_OP(op, ref, ir_CONST_U32((uint32_t)(uintptr_t)next_opline)); in jit_CMP_IP()
3839 ref = jit_IP(jit); in jit_CMP_IP()
3841 ref = ir_LOAD_A(jit_EX(opline)); in jit_CMP_IP()
3843 ref = ir_CMP_OP(op, ref, ir_CONST_ADDR(next_opline)); in jit_CMP_IP()
3845 return ref; in jit_CMP_IP()
3854 ir_ref ref, if_ref, cache_result, function_result, phi_result, cache_slot_ref; in zend_jit_jmp_frameless() local
3878 ref = jit_IF_ex(jit, ir_EQ(phi_result, ir_CONST_LONG(ZEND_JMP_FL_HIT)), bb->successors[0]); in zend_jit_jmp_frameless()
3879 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref); in zend_jit_jmp_frameless()
3880 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref); in zend_jit_jmp_frameless()
3889 ir_ref ref; in zend_jit_cond_jmp() local
3903 ref = jit_IF_ex(jit, jit_CMP_IP(jit, IR_NE, next_opline), target_block); in zend_jit_cond_jmp()
3905 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref); in zend_jit_cond_jmp()
3906 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref); in zend_jit_cond_jmp()
3916 ir_ref ref; in zend_jit_set_cond() local
3918 ref = ir_ADD_U32(ir_ZEXT_U32(jit_CMP_IP(jit, IR_EQ, next_opline)), ir_CONST_U32(IS_FALSE)); in zend_jit_set_cond()
3921 ir_STORE(ir_ADD_OFFSET(jit_FP(jit), var + offsetof(zval, u1.type_info)), ref); in zend_jit_set_cond()
3971 ir_ref ref, in zend_jit_zval_check_undef() argument
3978 if_def = ir_IF(jit_Z_TYPE_ref(jit, ref)); in zend_jit_zval_check_undef()
3995 return ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_zval_check_undef()
4002 ir_ref ref; in zend_jit_recv_entry() local
4007 ref = jit->bb_edges[pred]; in zend_jit_recv_entry()
4009 ZEND_ASSERT(ref); in zend_jit_recv_entry()
4010 ZEND_ASSERT(jit->ctx.ir_base[ref].op == IR_END); in zend_jit_recv_entry()
4013 ir_ENTRY(ref, bb->start); in zend_jit_recv_entry()
4021 ir_MERGE_WITH(ref); in zend_jit_recv_entry()
4028 ir_ref ref = ir_END(); in zend_jit_osr_entry() local
4031 ir_ENTRY(ref, bb->start); in zend_jit_osr_entry()
4039 ir_MERGE_WITH(ref); in zend_jit_osr_entry()
4056 ir_ref ref; in zend_jit_handler() local
4068 ref = jit_FP(jit); in zend_jit_handler()
4069 ref = ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(handler), ref); in zend_jit_handler()
4096 ir_ref ref; in zend_jit_tail_handler() local
4112 ref = ir_LOAD_A(jit_IP(jit)); in zend_jit_tail_handler()
4113 ir_TAILCALL(IR_VOID, ref); in zend_jit_tail_handler()
4126 ref = jit_FP(jit); in zend_jit_tail_handler()
4127 ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(handler), ref); in zend_jit_tail_handler()
4130 ref = jit_FP(jit); in zend_jit_tail_handler()
4131 ir_TAILCALL_1(IR_I32, ir_CONST_FC_FUNC(handler), ref); in zend_jit_tail_handler()
4158 ref = jit->ctx.insns_count - 1; in zend_jit_tail_handler()
4159 ZEND_ASSERT(jit->ctx.ir_base[ref].op == IR_UNREACHABLE || jit->ctx.ir_base[ref].op == IR_RETURN); in zend_jit_tail_handler()
4160 ref = zend_jit_continue_entry(jit, ref, jit->ssa->cfg.blocks[succ].start); in zend_jit_tail_handler()
4161 _zend_jit_add_predecessor_ref(jit, succ, jit->b, ref); in zend_jit_tail_handler()
4281 ir_ref ref = jit->ctx.control; in zend_jit_deopt_rload() local
4285 insn = &jit->ctx.ir_base[ref]; in zend_jit_deopt_rload()
4288 return ref; in zend_jit_deopt_rload()
4292 ref = insn->op1; in zend_jit_deopt_rload()
4302 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_const_long()
4315 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_const_double()
4341 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_reg()
4355 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_reg()
4379 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_spill_slot()
4392 if (jit->ra && jit->ra[var].ref == IR_NULL) { in zend_jit_store_spill_slot()
4644 ir_ref ref; in zend_jit_inc_dec() local
4672 ref = ir_BINARY_OP_L(op, op1_lval_ref, ir_CONST_LONG(1)); in zend_jit_inc_dec()
4674 jit_set_Z_LVAL(jit, op1_def_addr, ref); in zend_jit_inc_dec()
4711 ir_GUARD_NOT(ir_OVERFLOW(ref), ir_CONST_ADDR(exit_addr)); in zend_jit_inc_dec()
4715 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4747 if_overflow = ir_IF(ir_OVERFLOW(ref)); in zend_jit_inc_dec()
4749 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4756 ir_GUARD(ir_OVERFLOW(ref), ir_CONST_ADDR(exit_addr)); in zend_jit_inc_dec()
4762 if_overflow = ir_IF(ir_OVERFLOW(ref)); in zend_jit_inc_dec()
4766 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4838 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4866 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_inc_dec()
4871 if_ref = jit_if_Z_TYPE_ref(jit, ref, ir_CONST_U8(IS_REFERENCE)); in zend_jit_inc_dec()
4873 ref2 = jit_Z_PTR_ref(jit, ref); in zend_jit_inc_dec()
4903 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_inc_dec()
4910 ZEND_ADDR_REF_ZVAL(ref), op1_info, 1); in zend_jit_inc_dec()
4915 ir_CALL_2(IR_VOID, ir_CONST_FC_FUNC(zend_jit_pre_inc), ref, arg2); in zend_jit_inc_dec()
4917 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(increment_function), ref); in zend_jit_inc_dec()
4922 ir_CALL_2(IR_VOID, ir_CONST_FC_FUNC(zend_jit_pre_dec), ref, arg2); in zend_jit_inc_dec()
4924 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(decrement_function), ref); in zend_jit_inc_dec()
4931 ref = jit_Z_DVAL(jit, op1_addr); in zend_jit_inc_dec()
4933 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4941 ref = ir_BINARY_OP_D(op, ref, ir_CONST_DOUBLE(1.0)); in zend_jit_inc_dec()
4942 jit_set_Z_DVAL(jit, op1_def_addr, ref); in zend_jit_inc_dec()
4945 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_inc_dec()
4975 ir_ref op1, op2, ref, if_overflow = IR_UNUSED; in zend_jit_math_long_long() local
4988 ref = ir_BINARY_OP_L(op, op1, op2); in zend_jit_math_long_long()
5020 ir_GUARD_NOT(ir_OVERFLOW(ref), ir_CONST_ADDR(exit_addr)); in zend_jit_math_long_long()
5029 ir_GUARD(ir_OVERFLOW(ref), ir_CONST_ADDR(exit_addr)); in zend_jit_math_long_long()
5034 if_overflow = ir_IF(ir_OVERFLOW(ref)); in zend_jit_math_long_long()
5040 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_math_long_long()
5116 ref = ir_BINARY_OP_D(op, op1, op2); in zend_jit_math_long_long()
5117 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_math_long_long()
5137 ir_ref op1, op2, ref; in zend_jit_math_long_double() local
5152 ref = ir_BINARY_OP_D(op, ir_INT2D(op1), op2); in zend_jit_math_long_double()
5153 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_math_long_double()
5171 ir_ref op1, op2, ref; in zend_jit_math_double_long() local
5186 ref = ir_BINARY_OP_D(op, op1, ir_INT2D(op2)); in zend_jit_math_double_long()
5187 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_math_double_long()
5208 ir_ref op1, op2, ref; in zend_jit_math_double_double() local
5223 ref = ir_BINARY_OP_D(op, op1, op2); in zend_jit_math_double_double()
5224 jit_set_Z_DVAL(jit, res_addr, ref); in zend_jit_math_double_double()
5270 if (!has_concrete_type(op2_info & MAY_BE_ANY) && jit->ra[Z_SSA_VAR(op1_addr)].ref == IR_NULL) { in zend_jit_math_helper()
5275 if (!has_concrete_type(op1_info & MAY_BE_ANY) && jit->ra[Z_SSA_VAR(op2_addr)].ref == IR_NULL) { in zend_jit_math_helper()
5553 ir_ref ref; in zend_jit_add_arrays() local
5557 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_add_arrays_helper), arg1, arg2); in zend_jit_add_arrays()
5558 jit_set_Z_PTR(jit, res_addr, ref); in zend_jit_add_arrays()
5584 ir_ref ref = IR_UNUSED; in zend_jit_long_math_helper() local
5594 && jit->ra[Z_SSA_VAR(op1_addr)].ref == IR_NULL) { in zend_jit_long_math_helper()
5600 && jit->ra[Z_SSA_VAR(op2_addr)].ref == IR_NULL) { in zend_jit_long_math_helper()
5620 ref = ir_CONST_LONG(0); in zend_jit_long_math_helper()
5627 ref = ir_CONST_LONG(0); // dead code in zend_jit_long_math_helper()
5631 ref = ir_SHL_L(jit_Z_LVAL(jit, op1_addr), ir_CONST_LONG(op2_lval)); in zend_jit_long_math_helper()
5634 ref = jit_Z_LVAL(jit, op2_addr); in zend_jit_long_math_helper()
5642 if_wrong = ir_IF(ir_UGT(ref, ir_CONST_LONG((SIZEOF_ZEND_LONG * 8) - 1))); in zend_jit_long_math_helper()
5644 if_ok = ir_IF(ir_GE(ref, ir_CONST_LONG(0))); in zend_jit_long_math_helper()
5654 ref = ir_SHL_L(op1_ref, ref); in zend_jit_long_math_helper()
5656 ref = ir_PHI_2(IR_LONG, ref, ref2); in zend_jit_long_math_helper()
5658 ref = ir_SHL_L(jit_Z_LVAL(jit, op1_addr), ref); in zend_jit_long_math_helper()
5667 ref = ir_SAR_L( in zend_jit_long_math_helper()
5676 ref = ir_CONST_LONG(0); // dead code in zend_jit_long_math_helper()
5680 ref = ir_SAR_L(jit_Z_LVAL(jit, op1_addr), ir_CONST_LONG(op2_lval)); in zend_jit_long_math_helper()
5683 ref = jit_Z_LVAL(jit, op2_addr); in zend_jit_long_math_helper()
5690 if_wrong = ir_IF(ir_UGT(ref, ir_CONST_LONG((SIZEOF_ZEND_LONG * 8) - 1))); in zend_jit_long_math_helper()
5692 if_ok = ir_IF(ir_GE(ref, ir_CONST_LONG(0))); in zend_jit_long_math_helper()
5703 ref = ir_PHI_2(IR_LONG, ref, ref2); in zend_jit_long_math_helper()
5705 ref = ir_SAR_L(jit_Z_LVAL(jit, op1_addr), ref); in zend_jit_long_math_helper()
5717 ref = ir_CONST_LONG(0); // dead code in zend_jit_long_math_helper()
5720 ref = ir_AND_L(jit_Z_LVAL(jit, op1_addr), ir_CONST_LONG(op2_lval - 1)); in zend_jit_long_math_helper()
5722 ref = ir_MOD_L(jit_Z_LVAL(jit, op1_addr), ir_CONST_LONG(op2_lval)); in zend_jit_long_math_helper()
5728 ref = jit_Z_LVAL(jit, op2_addr); in zend_jit_long_math_helper()
5730 ir_ref if_ok = ir_IF(ref); in zend_jit_long_math_helper()
5741 ir_ref if_minus_one = ir_IF(ir_EQ(ref, ir_CONST_LONG(-1))); in zend_jit_long_math_helper()
5746 ref = ir_MOD_L(op1_ref, ref); in zend_jit_long_math_helper()
5750 ref = ir_PHI_2(IR_LONG, ref, ir_CONST_LONG(0)); in zend_jit_long_math_helper()
5768 ref = ir_BINARY_OP_L(op, op1, op2); in zend_jit_long_math_helper()
5771 if (ref) { in zend_jit_long_math_helper()
5778 jit_set_Z_LVAL(jit, res_addr, ref); in zend_jit_long_math_helper()
5794 ir_ref ref; in zend_jit_long_math_helper() local
5796 ref = ir_END(); in zend_jit_long_math_helper()
5798 ir_MERGE_2(ref, ir_END()); in zend_jit_long_math_helper()
5806 ir_ref if_def, ref, ref2; in zend_jit_long_math_helper() local
5808 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_long_math_helper()
5817 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_long_math_helper()
5818 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_long_math_helper()
5822 ir_ref if_def, ref, ref2; in zend_jit_long_math_helper() local
5824 ref = jit_ZVAL_ADDR(jit, op2_addr); in zend_jit_long_math_helper()
5833 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_long_math_helper()
5834 op2_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_long_math_helper()
6062 ir_ref ref, ref2, arg2, op1_noref_path; in zend_jit_assign_op() local
6067 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_assign_op()
6068 if_op1_ref = jit_if_Z_TYPE_ref(jit, ref, ir_CONST_U8(IS_REFERENCE)); in zend_jit_assign_op()
6072 ref2 = jit_Z_PTR_ref(jit, ref); in zend_jit_assign_op()
6102 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_assign_op()
6104 op1_def_addr = op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_assign_op()
6143 static ir_ref jit_ZVAL_DEREF_ref(zend_jit_ctx *jit, ir_ref ref) in jit_ZVAL_DEREF_ref() argument
6147 if_ref = ir_IF(ir_EQ(jit_Z_TYPE_ref(jit, ref), ir_CONST_U8(IS_REFERENCE))); in jit_ZVAL_DEREF_ref()
6149 ref2 = ir_ADD_OFFSET(jit_Z_PTR_ref(jit, ref), offsetof(zend_reference, val)); in jit_ZVAL_DEREF_ref()
6151 return ir_PHI_2(IR_ADDR, ref2, ref); in jit_ZVAL_DEREF_ref()
6156 ir_ref ref = jit_ZVAL_ADDR(jit, addr); in jit_ZVAL_DEREF() local
6157 ref = jit_ZVAL_DEREF_ref(jit, ref); in jit_ZVAL_DEREF()
6158 return ZEND_ADDR_REF_ZVAL(ref); in jit_ZVAL_DEREF()
6161 static ir_ref jit_ZVAL_INDIRECT_DEREF_ref(zend_jit_ctx *jit, ir_ref ref) in jit_ZVAL_INDIRECT_DEREF_ref() argument
6165 if_ref = ir_IF(ir_EQ(jit_Z_TYPE_ref(jit, ref), ir_CONST_U8(IS_INDIRECT))); in jit_ZVAL_INDIRECT_DEREF_ref()
6167 ref2 = jit_Z_PTR_ref(jit, ref); in jit_ZVAL_INDIRECT_DEREF_ref()
6169 return ir_PHI_2(IR_ADDR, ref2, ref); in jit_ZVAL_INDIRECT_DEREF_ref()
6174 ir_ref ref = jit_ZVAL_ADDR(jit, addr); in jit_ZVAL_INDIRECT_DEREF() local
6175 ref = jit_ZVAL_INDIRECT_DEREF_ref(jit, ref); in jit_ZVAL_INDIRECT_DEREF()
6176 return ZEND_ADDR_REF_ZVAL(ref); in jit_ZVAL_INDIRECT_DEREF()
6236 ir_ref ref = jit_ZVAL_ADDR(jit, val_addr); in zend_jit_simple_assign() local
6237 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_simple_assign()
6238 val_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_simple_assign()
6240 ir_ref ref, type, if_ref, ref2, refcount, if_not_zero; in zend_jit_simple_assign() local
6242 ref = jit_ZVAL_ADDR(jit, val_addr); in zend_jit_simple_assign()
6243 type = jit_Z_TYPE_ref(jit, ref); in zend_jit_simple_assign()
6247 ref = jit_Z_PTR_ref(jit, ref); in zend_jit_simple_assign()
6248 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val)); in zend_jit_simple_assign()
6262 refcount = jit_GC_DELREF(jit, ref); in zend_jit_simple_assign()
6268 jit_ZVAL_DTOR(jit, ref, val_info, opline); in zend_jit_simple_assign()
6402 if (Z_MODE(val_addr) == IS_REG && jit->ra[Z_SSA_VAR(val_addr)].ref == IR_NULL) { in zend_jit_assign_to_variable()
6420 ir_ref ref = 0, if_ref = 0, ref2, arg2, if_typed, non_ref_path; in zend_jit_assign_to_variable() local
6424 ref = jit_ZVAL_ADDR(jit, var_use_addr); in zend_jit_assign_to_variable()
6425 if_ref = jit_if_Z_TYPE_ref(jit, ref, ir_CONST_U8(IS_REFERENCE)); in zend_jit_assign_to_variable()
6427 ref2 = jit_Z_PTR_ref(jit, ref); in zend_jit_assign_to_variable()
6488 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_assign_to_variable()
6489 var_addr = var_use_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_assign_to_variable()
6496 ir_ref ref, counter, if_not_zero; in zend_jit_assign_to_variable() local
6506 ref = jit_Z_PTR(jit, var_use_addr); in zend_jit_assign_to_variable()
6511 counter = jit_GC_DELREF(jit, ref); in zend_jit_assign_to_variable()
6515 jit_ZVAL_DTOR(jit, ref, var_info, opline); in zend_jit_assign_to_variable()
6522 ir_ref if_may_leak = jit_if_GC_MAY_NOT_LEAK(jit, ref); in zend_jit_assign_to_variable()
6527 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(gc_possible_root), ref); in zend_jit_assign_to_variable()
6550 jit_GC_DELREF(jit, ref); in zend_jit_assign_to_variable()
6552 ir_ref if_may_leak = jit_if_GC_MAY_NOT_LEAK(jit, ref); in zend_jit_assign_to_variable()
6557 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(gc_possible_root), ref); in zend_jit_assign_to_variable()
6745 ir_ref ref; in zend_jit_cmp_long_long() local
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()
6778 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_long_long()
6783 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_long()
6785 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_long()
6789 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_long()
6791 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_long()
6795 return jit_IF_ex(jit, ref, in zend_jit_cmp_long_long()
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() local
6814 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_long_double()
6818 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_double()
6820 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_long_double()
6823 return jit_IF_ex(jit, ref, in zend_jit_cmp_long_double()
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() local
6835 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_double_long()
6839 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_long()
6841 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_long()
6844 return jit_IF_ex(jit, ref, in zend_jit_cmp_double_long()
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() local
6856 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_double_double()
6861 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_double()
6863 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_double()
6867 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_double()
6869 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_double_double()
6873 return jit_IF_ex(jit, ref, 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()
6891 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_cmp_slow()
6895 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_slow()
6897 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_cmp_slow()
6900 return jit_IF_ex(jit, ref, in zend_jit_cmp_slow()
6923 ir_ref ref = IR_UNUSED; in zend_jit_cmp() local
6943 if (!has_concrete_type(op2_info & MAY_BE_ANY) && jit->ra[Z_SSA_VAR(op1_addr)].ref == IR_NULL) { in zend_jit_cmp()
6948 if (!has_concrete_type(op1_info & MAY_BE_ANY) && jit->ra[Z_SSA_VAR(op2_addr)].ref == IR_NULL) { in zend_jit_cmp()
6969ref = zend_jit_cmp_long_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
6970 if (!ref) { in zend_jit_cmp()
6973 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
6979ref = zend_jit_cmp_long_long(jit, opline, op1_range, op1_addr, op2_range, op2_addr, res_addr, smar… in zend_jit_cmp()
6980 if (!ref) { in zend_jit_cmp()
6983 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7000ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7001 if (!ref) { in zend_jit_cmp()
7004 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7016ref = zend_jit_cmp_double_long(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7017 if (!ref) { in zend_jit_cmp()
7020 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7041ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7042 if (!ref) { in zend_jit_cmp()
7045 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7057ref = zend_jit_cmp_double_long(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7058 if (!ref) { in zend_jit_cmp()
7061 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7079ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_cmp()
7080 if (!ref) { in zend_jit_cmp()
7083 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7095ref = zend_jit_cmp_long_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, tar… in zend_jit_cmp()
7096 if (!ref) { in zend_jit_cmp()
7099 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7108 ir_ref op1, op2, ref; in zend_jit_cmp() local
7138 ref = ir_CALL_2(IR_I32, ir_CONST_FC_FUNC(zend_compare), op1, op2); in zend_jit_cmp()
7147ref = zend_jit_cmp_slow(jit, ref, opline, res_addr, smart_branch_opcode, target_label, target_labe… in zend_jit_cmp()
7148 if (!ref) { in zend_jit_cmp()
7151 ir_refs_add(end_inputs, ref); in zend_jit_cmp()
7159 ir_ref ref; in zend_jit_cmp() local
7182 ref = end_inputs->refs[0]; in zend_jit_cmp()
7183 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref); in zend_jit_cmp()
7184 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref); in zend_jit_cmp()
7230 ir_ref ref = IR_UNUSED; in zend_jit_identical() local
7325 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_identical()
7326 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_identical()
7327 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_identical()
7330 ref = jit_ZVAL_ADDR(jit, op2_addr); in zend_jit_identical()
7331 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_identical()
7332 op2_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_identical()
7337ref = zend_jit_cmp_long_long(jit, opline, op1_range, op1_addr, op2_range, op2_addr, res_addr, smar… in zend_jit_identical()
7338 if (!ref) { in zend_jit_identical()
7343ref = zend_jit_cmp_double_double(jit, opline, op1_addr, op2_addr, res_addr, smart_branch_opcode, t… in zend_jit_identical()
7344 if (!ref) { in zend_jit_identical()
7369 ref = ir_EQ(jit_Z_TYPE(jit, op2_addr), ir_CONST_U8(Z_TYPE_P(val))); in zend_jit_identical()
7373 ref = ir_EQ(jit_Z_TYPE(jit, op1_addr), ir_CONST_U8(Z_TYPE_P(val))); in zend_jit_identical()
7393 ref = ir_CALL_2(IR_BOOL, ir_CONST_FC_FUNC(zend_is_identical), in zend_jit_identical()
7401 ir_SUB_U32(ir_CONST_U32(IS_TRUE), ir_ZEXT_U32(ref))); in zend_jit_identical()
7404 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_identical()
7416 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_identical()
7418 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_identical()
7427 ref = jit_IF_ex(jit, ref, in zend_jit_identical()
7440 ir_IF_TRUE(ref); in zend_jit_identical()
7441 ir_MERGE_WITH_EMPTY_FALSE(ref); in zend_jit_identical()
7445 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref); in zend_jit_identical()
7446 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref); in zend_jit_identical()
7461 ir_ref ref, end_inputs = IR_UNUSED, true_inputs = IR_UNUSED, false_inputs = IR_UNUSED; in zend_jit_bool_jmpznz() local
7488 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_bool_jmpznz()
7489 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_bool_jmpznz()
7490 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_bool_jmpznz()
7504 ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_bool_jmpznz()
7505 zend_jit_zval_check_undef(jit, ref, opline->op1.var, opline, 0); in zend_jit_bool_jmpznz()
7601 ir_ref ref; in zend_jit_bool_jmpznz() local
7610 ref = jit_Z_LVAL(jit, op1_addr); in zend_jit_bool_jmpznz()
7612 ref = ir_NE(ref, ir_CONST_LONG(0)); in zend_jit_bool_jmpznz()
7615 ir_SUB_U32(ir_CONST_U32(IS_TRUE), ir_ZEXT_U32(ref))); in zend_jit_bool_jmpznz()
7618 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7624 ir_ADD_U32(ir_ZEXT_U32(ir_NE(ref, ir_CONST_LONG(0))), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7627 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7629 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7633 ir_ref if_val = ir_IF(ref); in zend_jit_bool_jmpznz()
7652 ir_ref ref; in zend_jit_bool_jmpznz() local
7661 ref = ir_NE(jit_Z_DVAL(jit, op1_addr), ir_CONST_DOUBLE(0.0)); in zend_jit_bool_jmpznz()
7665 ir_SUB_U32(ir_CONST_U32(IS_TRUE), ir_ZEXT_U32(ref))); in zend_jit_bool_jmpznz()
7668 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7674 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7677 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7679 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7683 ir_ref if_val = ir_IF(ref); in zend_jit_bool_jmpznz()
7702 ref = ir_CALL_1(IR_BOOL, ir_CONST_FC_FUNC(zend_is_true), jit_ZVAL_ADDR(jit, op1_addr)); in zend_jit_bool_jmpznz()
7710 ir_SUB_U32(ir_CONST_U32(IS_TRUE), ir_ZEXT_U32(ref))); in zend_jit_bool_jmpznz()
7713 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7721 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_bool_jmpznz()
7724 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7726 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_bool_jmpznz()
7732 ir_ref if_val = ir_IF(ref); in zend_jit_bool_jmpznz()
7763 ir_ref ref, ref2, if_set, if_zero, if_set2; in zend_jit_defined() local
7781 ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->extended_value)); in zend_jit_defined()
7783 if_set = ir_IF(ref); in zend_jit_defined()
7789 if_set2 = ir_IF(ir_AND_A(ref, ir_CONST_ADDR(CACHE_SPECIAL))); in zend_jit_defined()
7808 ref = ir_SHR_A(ref, ir_CONST_ADDR(1)); in zend_jit_defined()
7810 ref = ir_TRUNC_U32(ref); in zend_jit_defined()
7812 …ref2 = ir_EQ(ref, ir_LOAD_U32(ir_ADD_OFFSET(ir_LOAD_A(ref2), offsetof(HashTable, nNumOfElements)))… in zend_jit_defined()
7916 ir_ref ref = jit_ZVAL_ADDR(jit, val_addr); in zend_jit_guard_fetch_result_type() local
7945 ref1 = ref; 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()
7956 ref = ir_ADD_OFFSET(jit_Z_PTR(jit, val_addr), offsetof(zend_reference, val)); in zend_jit_guard_fetch_result_type()
7957 val_addr = ZEND_ADDR_REF_ZVAL(ref); 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()
7975 ref = ir_PHI_2(IR_ADDR, ref, ref1); in zend_jit_guard_fetch_result_type()
7978 val_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_guard_fetch_result_type()
7998 ir_ref ref, ref2, if_set, if_special, not_set_path, special_path, fast_path; in zend_jit_fetch_constant() local
8001 ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->extended_value)); in zend_jit_fetch_constant()
8004 if_set = ir_IF(ref); in zend_jit_fetch_constant()
8011 if_special = ir_IF(ir_AND_A(ref, ir_CONST_ADDR(CACHE_SPECIAL))); in zend_jit_fetch_constant()
8031 ref = ir_PHI_2(IR_ADDR, ref2, ref); in zend_jit_fetch_constant()
8035 zend_jit_addr const_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_fetch_constant()
8051 ir_ref const_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_fetch_constant()
8164 ir_ref ref; in zend_jit_type_check() local
8191 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_type_check() local
8192 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_type_check()
8193 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_type_check()
8196 ref = ir_AND_U32(ir_SHL_U32(ir_CONST_U32(1), jit_Z_TYPE(jit, op1_addr)), ir_CONST_U32(mask)); in zend_jit_type_check()
8198 ref = ir_NE(ref, ir_CONST_U32(0)); in zend_jit_type_check()
8201 ref = ir_NE(jit_Z_TYPE(jit, op1_addr), ir_CONST_U8(type)); in zend_jit_type_check()
8203 ref = ir_EQ(jit_Z_TYPE(jit, op1_addr), ir_CONST_U8(type)); in zend_jit_type_check()
8210 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_type_check()
8212 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_type_check()
8218 ir_ref if_val = ir_IF(ref); in zend_jit_type_check()
8225 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_type_check()
8268 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); in zend_jit_isset_isempty_cv() local
8269 ref = jit_ZVAL_DEREF_ref(jit, ref); in zend_jit_isset_isempty_cv()
8270 op1_addr = ZEND_ADDR_REF_ZVAL(ref); in zend_jit_isset_isempty_cv()
8292 ir_ref ref = ir_GT(jit_Z_TYPE(jit, op1_addr), ir_CONST_U8(IS_NULL)); in zend_jit_isset_isempty_cv() local
8295 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_isset_isempty_cv()
8297 ir_GUARD(ref, ir_CONST_ADDR(exit_addr)); in zend_jit_isset_isempty_cv()
8300 ir_ref if_val = ir_IF(ref); in zend_jit_isset_isempty_cv()
8307 ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE))); in zend_jit_isset_isempty_cv()
8371 ir_ref rx, ref, top, if_enough_stack, cold_path = IR_UNUSED; local
8399 ref = ir_SUB_U32(
8407 ref = ir_SUB_U32(
8415 ref = ir_MUL_U32(ref, ir_CONST_U32(sizeof(zval)));
8417 ref = ir_SEXT_A(ref);
8419 ref = ir_SUB_A(used_stack_ref, ref);
8422 used_stack_ref = ref;
8425 used_stack_ref = ir_PHI_2(IR_ADDR, ref, used_stack_ref);
8436 ref = ir_UGE(
8458 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
8460 if_enough_stack = ir_IF(ref);
8469 ref = ir_CALL_1(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_int_extend_stack_helper), used_stack_ref);
8472 ref = func_ref;
8474 ref = ir_ADD_OFFSET(func_ref, offsetof(zend_closure, func));
8477 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_extend_stack_helper),
8478 used_stack_ref, ref);
8480 jit_STORE_IP(jit, ref);
8487 ref = jit_EG(vm_stack_top);
8503 top = jit->ctx.control = ir_emit2(&jit->ctx, IR_OPT(IR_LOAD, IR_ADDR), jit->ctx.control, ref);
8505 ir_STORE(ref, ir_ADD_A(top, used_stack_ref));
8543 ref = jit_CALL(rx, This.u1.type_info);
8545 ir_STORE(ref, ir_CONST_U32( ZEND_CALL_HAS_THIS));
8547 ir_STORE(ref, ir_OR_U32(ir_LOAD_U32(ref), ir_CONST_U32(ZEND_CALL_HAS_THIS)));
8556 ref = jit_CALL(rx, This.u1.type_info);
8558 ir_STORE(ref, ir_CONST_U32( ZEND_CALL_HAS_THIS | ZEND_CALL_RELEASE_THIS));
8560 ir_STORE(ref,
8561 ir_OR_U32(ir_LOAD_U32(ref),
8604 ref = jit_CALL(rx, This.u1.type_info);
8605 ir_STORE(ref, ir_OR_U32(ir_LOAD_U32(ref), call_info));
8736 ir_ref if_func, cache_slot_ref, ref; local
8755 ref = ir_HARD_COPY_A(ir_CONST_ADDR(func)); /* load constant once */
8756 ir_STORE(cache_slot_ref, ref);
8757 ref = ir_CALL_1(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_init_func_run_time_cache_helper), ref);
8762 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_find_func_helper),
8766 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_find_func_helper),
8770 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_find_ns_func_helper),
8785 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
8792 ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_op_array, opcodes))),
8796 ir_GUARD(ir_EQ(ref, ir_CONST_ADDR(func)), ir_CONST_ADDR(exit_addr));
8800 ir_GUARD(ref, jit_STUB_ADDR(jit, jit_stub_undefined_function));
8804 func_ref = ir_PHI_2(IR_ADDR, ref, func_ref);
8879 ir_ref ref, ref2, if_found, fast_path, run_time_cache, this_ref2; local
8888 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); local
8889 ref = jit_ZVAL_DEREF_ref(jit, ref);
8890 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
8943ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(run_time_cache)), opline->result.num + sizeof(void*…
8945 if_found = ir_IF(ref);
8951 ref = ir_EQ(
8954 if_found = ir_IF(ref);
8958 ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->result.num + sizeof(void*)));
8995 func_ref = ir_PHI_2(IR_ADDR, ref2, ref);
9117 ir_ref func_ref, func_ref2, scope_ref, scope_ref2, if_cached, cold_path, ref; local
9231 ref = ir_CALL_3(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_push_this_method_call_frame),
9235 ir_GUARD(ref, jit_STUB_ADDR(jit, jit_stub_exception_handler));
9236 jit_STORE_IP(jit, ref);
9249 scope_ref = ir_LOAD_A(jit_EX(This.value.ref));
9251 …scope_ref = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_EX(This.value.ref)), offsetof(zend_object, ce)));
9297 ir_ref ref; local
9299 ref = jit_Z_PTR(jit, op2_addr);
9312 ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_object, ce))),
9341 ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_closure, func.op_array.opcodes))),
9352 if (!zend_jit_push_call_frame(jit, opline, NULL, func, 1, 0, checked_stack, ref, IR_UNUSED)) {
9485 ir_ref ref, ref2; local
9494 ref = jit_Z_PTR(jit, op1_addr);
9496 jit_GC_ADDREF(jit, ref);
9498 jit_set_Z_PTR(jit, arg_addr, ref);
9506 ref = jit_EMALLOC(jit, sizeof(zend_reference), op_array, opline);
9508 jit_set_GC_REFCOUNT(jit, ref, 2);
9510 …ir_STORE(ir_ADD_OFFSET(ref, offsetof(zend_reference, gc.u.type_info)), ir_CONST_U32(GC_REFERENCE));
9511 ir_STORE(ir_ADD_OFFSET(ref, offsetof(zend_reference, sources.ptr)), IR_NULL);
9512 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
9522 jit_set_Z_PTR(jit, op1_addr, ref);
9526 jit_set_Z_PTR(jit, arg_addr, ref);
9692 ir_ref ref, if_def = IR_UNUSED; local
9701 ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(zend_jit_undefined_op_helper),
9708 ir_GUARD(ref, jit_STUB_ADDR(jit, jit_stub_exception_handler));
9751 ir_ref ref; local
9754 ref = jit_ZVAL_ADDR(jit, op1_addr);
9755 ref = jit_ZVAL_DEREF_ref(jit, ref);
9756 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
9764 ir_ref if_ref, ref, ref2, refcount, if_not_zero, if_refcounted; local
9772 ref = jit_Z_PTR(jit, op1_addr);
9773 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
9783 refcount = jit_GC_DELREF(jit, ref);
9799 jit_EFREE(jit, ref, sizeof(zend_reference), op_array, opline);
9839 ir_ref ref; local
9850 ref = jit_IP(jit);
9852 ref = ir_LOAD_A(jit_EX(call));
9854 ref = jit_CALL(ref, This.u1.type_info);
9855 ir_STORE(ref, ir_OR_U32(ir_LOAD_U32(ref), ir_CONST_U32(ZEND_CALL_SEND_ARG_BY_REF)));
9862 ref = jit_IP(jit);
9864 ref = ir_LOAD_A(jit_EX(call));
9866 ref = jit_CALL(ref, This.u1.type_info);
9867 ir_STORE(ref, ir_AND_U32(ir_LOAD_U32(ref), ir_CONST_U32(~ZEND_CALL_SEND_ARG_BY_REF)));
9881 ref = ir_AND_U32(
9884 if_ref = ir_IF(ref);
9888 ref = jit_CALL(rx, This.u1.type_info);
9889 ir_STORE(ref, ir_OR_U32(ir_LOAD_U32(ref), ir_CONST_U32(ZEND_CALL_SEND_ARG_BY_REF)));
9895 ref = jit_CALL(rx, This.u1.type_info);
9896 ir_STORE(ref, ir_AND_U32(ir_LOAD_U32(ref), ir_CONST_U32(~ZEND_CALL_SEND_ARG_BY_REF)));
10260 ir_ref ref = ir_MUL_U32(num_args, ir_CONST_U32(sizeof(zend_op))); local
10263 ref = ir_ZEXT_A(ref);
10267 jit_STORE_IP(jit, ir_ADD_A(jit_IP(jit), ref));
10271 ir_STORE(addr, ir_ADD_A(ir_LOAD_A(addr), ref));
10395 ir_ref ref; local
10400 ref = jit->ctx.insns_count - 1;
10401 ZEND_ASSERT(jit->ctx.ir_base[ref].op == IR_UNREACHABLE
10402 || jit->ctx.ir_base[ref].op == IR_RETURN
10403 || jit->ctx.ir_base[ref].op == IR_LOOP_END);
10405 ref = zend_jit_continue_entry(jit, ref, jit->ssa->cfg.blocks[succ].start);
10407 _zend_jit_add_predecessor_ref(jit, succ, jit->b, ref);
10410 user_path = ref;
10662 ir_ref ref, fast_path = IR_UNUSED; local
10664 ref = jit_ZVAL_ADDR(jit, res_addr);
10678 ref = jit_ZVAL_DEREF_ref(jit, ref);
10680 ref = jit_Z_PTR_ref(jit, ref);
10681 ref = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
10688 ir_ref if_ok = jit_if_Z_TYPE_ref(jit, ref, ir_CONST_U8(type_code));
10694 ir_SHL_U32(ir_CONST_U32(1), jit_Z_TYPE_ref(jit, ref)),
10703 ref = ir_CALL_2(IR_BOOL, ir_CONST_FC_FUNC(zend_jit_verify_arg_slow),
10704 ref, ir_CONST_ADDR(arg_info));
10707 ir_GUARD(ref, jit_STUB_ADDR(jit, jit_stub_exception_handler));
10772 ir_ref ref, if_fail, skip_path = IR_UNUSED; local
10799 ref = ir_CALL_2(IR_I32, ir_CONST_FC_FUNC(zval_update_constant_ex),
10803 if_fail = ir_IF(ref);
10869 ir_ref ref; local
10872 ref = jit_ZVAL_ADDR(jit, op1_addr);
10874 ref = zend_jit_zval_check_undef(jit, ref, opline->op1.var, NULL, 1);
10878 ref,
10958 ir_ref call_info = IR_UNUSED, ref, cold_path = IR_UNUSED; local
10969 ref = ir_AND_U32(call_info,
10972 ir_ref if_slow = ir_IF(ref);
10976 ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(zend_jit_leave_func_helper), jit_FP(jit));
10992 ir_GUARD(ir_GE(ref, ir_CONST_I32(0)), jit_STUB_ADDR(jit, jit_stub_trace_halt));
11003 ir_GUARD_NOT(ref, jit_STUB_ADDR(jit, jit_stub_leave_function_handler));
11076 ir_ref ref = jit_EX(opline); local
11078 ir_STORE(ref, ir_ADD_OFFSET(ir_LOAD_A(ref), sizeof(zend_op)));
11146 ir_ref ref = jit_EX(opline); local
11148 ir_STORE(ref, ir_ADD_OFFSET(ir_LOAD_A(ref), sizeof(zend_op)));
11173 ir_ref return_value = IR_UNUSED, ref, refcount, if_return_value_used = IR_UNUSED; local
11219 ref = jit_Z_PTR(jit, op1_addr);
11220 refcount = jit_GC_DELREF(jit, ref);
11229 jit_ZVAL_DTOR(jit, ref, op1_info, opline);
11263 ref = jit_ZVAL_ADDR(jit, op1_addr);
11264 ref = jit_ZVAL_DEREF_ref(jit, ref);
11265 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
11292 ref = jit_Z_PTR(jit, op1_addr);
11295 ref2 = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
11298 ref2 = jit_GC_DELREF(jit, ref);
11315 jit_EFREE(jit, ref, sizeof(zend_reference), op_array, opline);
11341 ir_ref cache_slot_ref, idx_ref, num_used_ref, bucket_ref, ref, ref2; local
11374 ref = jit_Z_PTR_ref(jit, bucket_ref);
11375 jit_GC_ADDREF(jit, ref);
11385 ref = ir_PHI_2(IR_ADDR, ref2, ref);
11400 jit_set_Z_PTR(jit, op1_addr, ref);
11435 jit_set_Z_PTR(jit, op1_addr, ref);
11456 ir_ref ref, if_array, if_exists, end_inputs = IR_UNUSED; local
11464 ref = ir_LOAD_U32(ir_ADD_OFFSET(jit_FP(jit), opline->op1.var + offsetof(zval, u2.fe_iter_idx)));
11465 if_exists = ir_IF(ir_EQ(ref, ir_CONST_U32(-1)));
11470 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_hash_iterator_del), ref);
11507 ir_ref ref; local
11513 ref = jit_Z_PTR(jit, op1_addr);
11515 ir_ADD_OFFSET(ref, offsetof(zend_string, val)),
11516 ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_string, len))));
11544 ir_ref ref; local
11548 ref = jit_Z_PTR(jit, op1_addr);
11549 ref = ir_LOAD_L(ir_ADD_OFFSET(ref, offsetof(zend_string, len)));
11550 jit_set_Z_LVAL(jit, res_addr, ref);
11581 ir_ref ref; local
11586 ref = jit_Z_PTR(jit, op1_addr);
11588 ref = ir_LOAD_U32(ir_ADD_OFFSET(ref, offsetof(HashTable, nNumOfElements)));
11589 ref = ir_ZEXT_L(ref);
11591 ref = ir_LOAD_L(ir_ADD_OFFSET(ref, offsetof(HashTable, nNumOfElements)));
11593 jit_set_Z_LVAL(jit, res_addr, ref);
11615 ir_ref ref; local
11622 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_find),
11628 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_find_known_hash),
11634 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
11636 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr));
11644 ref = jit_IF_ex(jit, ref,
11646 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref);
11647 _zend_jit_add_predecessor_ref(jit, bb->successors[1], jit->b, ref);
11651 ir_ADD_U32(ir_ZEXT_U32(ir_NE(ref, IR_NULL)), ir_CONST_U32(IS_FALSE)));
11675 ir_ref ref; local
11679 ref = jit_Z_PTR(jit, op2_addr);
11680 ir_STORE(ir_ADD_OFFSET(jit_FP(jit), offset), ref);
11686 jit_GC_ADDREF(jit, ref);
11696 ir_ref ref; local
11698 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_rope_end),
11702 jit_set_Z_PTR(jit, res_addr, ref);
11814 ir_ref ref = IR_UNUSED, cond, if_found; local
11900 ref = ir_LOAD_U32(ir_ADD_OFFSET(ht_ref, offsetof(zend_array, nNumUsed)));
11905 cond = ir_ULT(ir_TRUNC_U32(h), ref);
11907 cond = ir_ULT(h, ir_ZEXT_L(ref));
11910 cond = ir_ULT(h, ref);
11939 ref = ir_MUL_L(h, ir_CONST_LONG(sizeof(zval)));
11940 ref = ir_BITCAST_A(ref);
11941 ref = ir_ADD_A(ir_LOAD_A(ir_ADD_OFFSET(ht_ref, offsetof(zend_array, arPacked))), ref);
11943 ir_refs_add(test_zval_values, ref);
11961 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(_zend_hash_index_find), ht_ref, h);
11963 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_index_find), ht_ref, h);
11966 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
11968 if_found = ir_IF(ref);
11973 ir_refs_add(test_zval_values, ref);
11983 ir_ref type_ref = jit_Z_TYPE_ref(jit, ref);
11998 ir_refs_add(found_vals, ref);
12011 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(_zend_hash_index_find), ht_ref, h);
12013 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_index_find), ht_ref, h);
12016 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
12018 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12020 if_found = ir_IF(ref);
12025 if_found = ir_IF(ref);
12031 ir_refs_add(found_vals, ref);
12084 ir_refs_add(found_vals, ref);
12086 ir_ref if_def = ir_IF(jit_Z_TYPE_ref(jit, ref));
12089 ir_refs_add(found_vals, ref);
12111 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_hash_index_lookup_rw_no_packed),
12114 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_hash_index_lookup_rw), ht_ref, h);
12117 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12119 if_found = ir_IF(ref);
12125 ir_refs_add(found_vals, ref);
12130 ir_ref if_def = ir_IF(jit_Z_TYPE_ref(jit, ref));
12133 ir_refs_add(found_vals, ref);
12150 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_index_lookup), ht_ref, h);
12152 ir_refs_add(found_vals, ref);
12188 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_symtable_find), ht_ref, key);
12193 ref = ir_PHI_2(IR_ADDR, ref2, ref);
12195 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_find_known_hash), ht_ref, key);
12198 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12200 if_found = ir_IF(ref);
12205 ir_refs_add(test_zval_values, ref);
12219 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_symtable_find), ht_ref, key);
12224 ref = ir_PHI_2(IR_ADDR, ref2, ref);
12226 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_find_known_hash), ht_ref, key);
12229 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
12231 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12233 if_found = ir_IF(ref);
12238 if_found = ir_IF(ref);
12260 ir_refs_add(found_vals, ref);
12264 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_symtable_lookup_rw), ht_ref, key);
12266 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_hash_lookup_rw), ht_ref, key);
12269 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12271 if_found = ir_IF(ref);
12277 ir_refs_add(found_vals, ref);
12281 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_symtable_lookup_w), ht_ref, key);
12283 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_lookup), ht_ref, key);
12286 ir_refs_add(found_vals, ref);
12301 ref = jit_ZVAL_ADDR(jit, op2_addr);
12306 ref,
12311 ref = ir_CALL_2(IR_I32, ir_CONST_FC_FUNC(zend_jit_fetch_dim_isset_helper), ht_ref, ref);
12313 ir_GUARD(ref, ir_CONST_ADDR(not_found_exit_addr));
12316 ir_GUARD_NOT(ref, ir_CONST_ADDR(found_exit_addr));
12319 if_found = ir_IF(ref);
12330 ref,
12335 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_fetch_dim_rw_helper), ht_ref, ref);
12336 if_found = ir_IF(ref);
12339 ir_refs_add(found_vals, ref);
12344 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_fetch_dim_w_helper), ht_ref, ref);
12345 if_found = ir_IF(ref);
12348 ir_refs_add(found_vals, ref);
12367 ref = ir_PHI_N(IR_ADDR, test_zval_values->count, test_zval_values->refs);
12370 ref = jit_ZVAL_DEREF_ref(jit, ref);
12372 cond = ir_GT(jit_Z_TYPE_ref(jit, ref), ir_CONST_U8(IS_NULL));
12489 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); local
12490 ref = jit_ZVAL_DEREF_ref(jit, ref);
12491 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
12495 ir_ref ht_ref, ref; local
12528 ref = ir_PHI_N(IR_ADDR, found_vals->count, found_vals->refs);
12529 val_addr = ZEND_ADDR_REF_ZVAL(ref);
12604 ir_ref ref; local
12607 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_fetch_dim_str_offset_r_helper),
12610 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_fetch_dim_str_r_helper),
12613 jit_set_Z_PTR(jit, res_addr, ref);
12687 ir_ref ref; local
12691 ref = jit_ZVAL_ADDR(jit, orig_op1_addr);
12694 ref = jit_ZVAL_ADDR(jit, op1_addr);
12696 ir_CALL_1(IR_VOID, ir_CONST_FC_FUNC(zend_jit_invalid_array_access), ref);
12747 ir_ref ref = IR_UNUSED; local
12755 ref = jit_ZVAL_ADDR(jit, op1_addr);
12764 array_reference_ref = ir_ADD_OFFSET(jit_Z_PTR_ref(jit, ref), offsetof(zend_reference, val));
12772 ref2 = ir_CALL_1(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_prepare_assign_dim_ref), ref);
12776 ref = ir_PHI_2(IR_ADDR, ref2, ref);
12777 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
12781 ir_ref op1_ref = ref;
12789 op1_ref = ir_PHI_2(IR_ADDR, ref, array_reference_ref);
12792 ref = jit_Z_PTR_ref(jit, op1_ref);
12795 ir_ref if_refcount_1 = ir_IF(ir_EQ(jit_GC_REFCOUNT(jit, ref), ir_CONST_U32(1)));
12798 ir_refs_add(array_values, ref);
12801 ref = ir_CALL_1(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_zval_array_dup), op1_ref);
12805 ir_refs_add(array_values, ref);
12835 ref = ir_CALL_1(IR_ADDR,
12840 ir_refs_add(array_values, ref);
12849 ref = ir_PHI_N(IR_ADDR, array_values->count, array_values->refs);
12852 *ht_ref = ref;
12868 ir_ref ref, if_type = IR_UNUSED, ht_ref; local
12887 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_next_index_insert),
12891 if_ok = ir_IF(ref);
12900 jit_set_Z_PTR(jit, res_addr, ref);
12947 ref = ir_PHI_N(IR_ADDR, found_vals->count, found_vals->refs);
12948 jit_set_Z_PTR(jit, res_addr, ref);
13059 ir_ref ref = jit_ZVAL_ADDR(jit, op1_addr); local
13060 ref = jit_ZVAL_DEREF_ref(jit, ref);
13061 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
13109 ir_ref ref, arg1, arg2, if_true; local
13119 ref = ir_CALL_2(IR_I32, ir_CONST_FC_FUNC(zend_jit_isset_dim_helper), arg1, arg2);
13120 if_true = ir_IF(ref);
13271 ir_ref if_ok, ref; local
13275 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_next_index_insert),
13279 if_ok = ir_IF(ref);
13289 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13296 ir_ref ref; local
13317 ref = ir_PHI_N(IR_ADDR, found_values->count, found_values->refs);
13318 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13437 ir_ref if_ok, ref; local
13440 ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_hash_next_index_insert),
13444 if_ok = ir_IF(ref);
13453 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13455 ir_ref ref; local
13489 ref = ir_PHI_N(IR_ADDR, found_values->count, found_values->refs);
13490 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13498 ir_ref if_ref, if_typed, noref_path, ref_path, ref, reference, ref2, arg2; local
13500 ref = jit_ZVAL_ADDR(jit, var_addr);
13506 reference = jit_Z_PTR_ref(jit, ref);
13520 ref = ir_PHI_2(IR_ADDR, ref, ref2);
13521 var_addr = ZEND_ADDR_REF_ZVAL(ref);
13642 ir_ref ref; local
13648 ref = ir_AND_U32(
13652 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
13654 ir_GUARD_NOT(ref, ir_CONST_ADDR(exit_addr));
13663 …ir_ref ref, ht_ref, hash_pos_ref, packed_pos_ref, hash_p_ref = IR_UNUSED, packed_p_ref = IR_UNUSED… local
13701 ref = ir_AND_U32(
13704 if_packed = ir_IF(ref);
13710 ref = ir_ZEXT_A(hash_pos_ref);
13712 ref = ir_BITCAST_A(hash_pos_ref);
13715 ir_MUL_A(ref, ir_CONST_ADDR(sizeof(Bucket))),
13723 ref = ir_ULT(hash_pos_ref,
13731 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
13733 ir_ref if_fit = ir_IF(ref);
13739 ir_ref if_fit = ir_IF(ref);
13773 ref = ir_ZEXT_A(packed_pos_ref);
13775 ref = ir_BITCAST_A(packed_pos_ref);
13778 ir_MUL_A(ref, ir_CONST_ADDR(sizeof(zval))),
13786 ref = ir_ULT(packed_pos_ref,
13793 ir_GUARD(ref, ir_CONST_ADDR(exit_addr));
13795 ir_ref if_fit = ir_IF(ref);
13801 ir_ref if_fit = ir_IF(ref);
13860 ref = ir_AND_U32(
13863 if_interned = ir_IF(ref);
13885 ref = ir_LOAD_L(ir_ADD_OFFSET(hash_p_ref, offsetof(Bucket, h)));
13886 jit_set_Z_LVAL(jit, res_addr, ref);
13978 ref = exit_inputs;
13981 ref = ir_END();
13983 _zend_jit_add_predecessor_ref(jit, bb->successors[0], jit->b, ref);
13998 ir_ref ref = jit_Z_PTR(jit, this_addr); local
14000 jit_set_Z_PTR(jit, var_addr, ref);
14002 jit_GC_ADDREF(jit, ref);
14201 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG… local
14202 ir_ref if_same = ir_IF(ir_EQ(ref,
14291 ref = jit_Z_PTR(jit, prop_addr);
14292 jit_GC_ADDREF(jit, ref);
14293 jit_set_Z_PTR(jit, res_addr, ref);
14357 ir_ref ref = jit_Z_PTR(jit, prop_addr); local
14358 jit_GC_ADDREF(jit, ref);
14359 jit_set_Z_PTR(jit, res_addr, ref);
14380 ir_ref ref = jit_Z_PTR(jit, prop_addr); local
14381 jit_GC_ADDREF(jit, ref);
14382 jit_set_Z_PTR(jit, res_addr, ref);
14413 ir_ref ref; local
14422 ref = ir_CONST_ADDR(prop_info);
14427 ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)));
14428 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_class_entry, properties_info_table)));
14429 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, prop_info_offset));
14433 ref,
14709 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG… local
14710 ir_ref if_same = ir_IF(ir_EQ(ref, ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)))));
14806 ir_ref ref, arg3, arg4; local
14811 ref = ir_CONST_ADDR(prop_info);
14816 ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)));
14817 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_class_entry, properties_info_table)));
14818 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, prop_info_offset));
14839 ref,
15064 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, (opline+1)->extended_value & ~ZEND_FETCH_OBJ_… local
15065 ir_ref if_same = ir_IF(ir_EQ(ref, ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)))));
15119 ir_ref if_ref, if_typed, noref_path, ref_path, reference, ref, arg2; local
15141 ref = ir_ADD_OFFSET(reference, offsetof(zend_reference, val));
15155 prop_ref = ir_PHI_2(IR_ADDR, prop_ref, ref);
15160 ref = ir_CONST_ADDR(prop_info);
15165 ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)));
15166 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_class_entry, properties_info_table)));
15167 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, prop_info_offset));
15172 ref,
15197 ir_ref if_ref, if_typed, noref_path, ref_path, reference, ref, arg2; local
15207 ref = ir_ADD_OFFSET(reference, offsetof(zend_reference, val));
15232 prop_ref = ir_PHI_2(IR_ADDR, prop_ref, ref);
15487 …ir_ref ref = ir_LOAD_A(ir_ADD_OFFSET(run_time_cache, opline->extended_value & ~ZEND_FETCH_OBJ_FLAG… local
15488 ir_ref if_same = ir_IF(ir_EQ(ref, ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)))));
15544 ir_ref ref; local
15550 ref = ir_CONST_ADDR(prop_info);
15555 ref = ir_LOAD_A(ir_ADD_OFFSET(obj_ref, offsetof(zend_object, ce)));
15556 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, offsetof(zend_class_entry, properties_info_table)));
15557 ref = ir_LOAD_A(ir_ADD_OFFSET(ref, prop_info_offset));
15574 ir_CALL_2(IR_VOID, ir_CONST_FC_FUNC(func), prop_ref, ref);
15594 ref,
15620 ir_ref if_ref, if_typed, noref_path, ref_path, reference, ref; local
15628 ref = ir_ADD_OFFSET(reference, offsetof(zend_reference, val));
15660 prop_ref = ir_PHI_2(IR_ADDR, prop_ref, ref);
15667 ir_ref addr, ref; local
15675 ref = ir_LOAD_L(addr);
15678 jit_set_Z_LVAL(jit, res_addr, ref);
15683 ref = ir_ADD_OV_L(ref, ir_CONST_LONG(1));
15685 ref = ir_SUB_OV_L(ref, ir_CONST_LONG(1));
15688 ir_STORE(addr, ref);
15689 if_overflow = ir_IF(ir_OVERFLOW(ref));
15694 jit_set_Z_LVAL(jit, res_addr, ref);
15854 ir_ref ref, ref2, if_cached, fast_path, cold_path, prop_info_ref, if_typed, if_def; local
15903 ref = ir_LOAD_A(
15907 if_cached = ir_IF(ref);
15916 if_def = ir_IF(jit_Z_TYPE_ref(jit, ref));
15963 IR_NULL, ref, IR_NULL, prop_info_ref, ir_CONST_U32(flags)));
15983 ref = ir_PHI_2(IR_ADDR, ref, ref2);
15987 if (!zend_jit_zval_copy_deref(jit, res_addr, ZEND_ADDR_REF_ZVAL(ref),
15988 jit_Z_TYPE_INFO_ref(jit, ref))) {
15993 jit_set_Z_PTR(jit, res_addr, ref);
16091 ir_ref ref, if_long, fast_path, ref2; local
16093 ref = jit_ZVAL_ADDR(jit, op1_addr);
16122 ref = ir_PHI_2(IR_ADDR, ref, ref2);
16123 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
16134 ir_ref ref = jit_Z_LVAL(jit, op1_addr); local
16137 ref = ir_CALL_2(IR_LONG, ir_CONST_FC_FUNC(zend_hash_index_find),
16138 ir_CONST_ADDR(jumptable), ref);
16139 ref = ir_SUB_L(ref, ir_CONST_LONG((uintptr_t)jumptable->arData));
16142 ref = ir_SHR_L(ref, ir_CONST_LONG(5));
16144 ref = ir_DIV_L(ref, ir_CONST_LONG(sizeof(Bucket)));
16147 ref = ir_SWITCH(ref);
16161 ir_CASE_VAL(ref, idx);
16174 ir_CASE_DEFAULT(ref);
16190 _zend_jit_add_predecessor_ref(jit, b, jit->b, ref);
16193 _zend_jit_add_predecessor_ref(jit, default_b, jit->b, ref);
16218 ir_ref ref, if_string, fast_path, ref2; local
16220 ref = jit_ZVAL_ADDR(jit, op1_addr);
16249 ref = ir_PHI_2(IR_ADDR, ref, ref2);
16250 op1_addr = ZEND_ADDR_REF_ZVAL(ref);
16262 ir_ref ref = jit_Z_PTR(jit, op1_addr); local
16263 ref = ir_CALL_2(IR_LONG, ir_CONST_FC_FUNC(zend_hash_find),
16264 ir_CONST_ADDR(jumptable), ref);
16265 ref = ir_SUB_L(ref, ir_CONST_LONG((uintptr_t)jumptable->arData));
16268 ref = ir_SHR_L(ref, ir_CONST_LONG(5));
16270 ref = ir_DIV_L(ref, ir_CONST_LONG(sizeof(Bucket)));
16272 ref = ir_SWITCH(ref);
16286 ir_CASE_VAL(ref, idx);
16299 ir_CASE_DEFAULT(ref);
16315 _zend_jit_add_predecessor_ref(jit, b, jit->b, ref);
16317 _zend_jit_add_predecessor_ref(jit, default_b, jit->b, ref);
16329 ir_ref if_type = IR_UNUSED, default_input_list = IR_UNUSED, ref = IR_UNUSED; local
16357 ref = jit_Z_LVAL(jit, op1_addr);
16358 ref = ir_CALL_2(IR_LONG, ir_CONST_FC_FUNC(zend_hash_index_find),
16359 ir_CONST_ADDR(jumptable), ref);
16392 ref = ir_PHI_2(IR_LONG, ref2, ref);
16394 ref = ref2;
16398 ref = ir_SUB_L(ref, ir_CONST_LONG((uintptr_t)jumptable->arData));
16402 ref = ir_SHR_L(ref, ir_CONST_LONG(4));
16405 ref = ir_SHR_L(ref, ir_CONST_LONG(5));
16407 ref = ir_DIV_L(ref, ir_CONST_LONG(sizeof(Bucket)));
16410 ref = ir_SWITCH(ref);
16422 ir_CASE_VAL(ref, idx);
16435 ir_CASE_DEFAULT(ref);
16445 _zend_jit_add_predecessor_ref(jit, b, jit->b, ref);
16447 _zend_jit_add_predecessor_ref(jit, default_b, jit->b, ref);
16499 if (jit->ctx.ir_base[ref].op == IR_SWITCH) {
16500 ZEND_ASSERT(jit->ctx.ir_base[ref].op3 == IR_UNUSED);
16501 jit->ctx.ir_base[ref].op3 = default_input_list;
16538 ir_ref ref = ir_PARAM(IR_ADDR, "execute_data", 1); local
16539 jit_STORE_FP(jit, ref);
16651 stack->ref = ir_get_spill_slot_offset(&jit->ctx, stack->ref);
16763 ir_ref ref; local
16773 ref = jit_Z_TYPE(jit, var_addr);
16774 ir_GUARD(ir_EQ(ref, ir_CONST_U8(IS_REFERENCE)), ir_CONST_ADDR(exit_addr));
16777 ref = jit_Z_PTR(jit, var_addr);
16778 *ref_addr_ptr = ZEND_ADDR_REF_ZVAL(ref);
16779 ref = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
16780 var_addr = ZEND_ADDR_REF_ZVAL(ref);
16797 ir_ref ref; local
16809 ref = jit_Z_TYPE(jit, var_addr);
16810 ir_GUARD(ir_EQ(ref, ir_CONST_U8(IS_REFERENCE)), ir_CONST_ADDR(exit_addr));
16818 ref = jit_Z_PTR(jit, var_addr);
16819 ref = ir_ADD_OFFSET(ref, offsetof(zend_reference, val));
16820 var_addr = ZEND_ADDR_REF_ZVAL(ref);
16830 ref = jit_Z_TYPE(jit, var_addr);
16831 ir_GUARD(ir_EQ(ref, ir_CONST_U8(var_type)), ir_CONST_ADDR(exit_addr));
16858 ir_ref ref = IR_UNUSED; local
16868 ref = jit_Z_PTR(jit, var_addr);
16872 ref = jit_Z_PTR(jit, var_addr);
16875 var_addr = ZEND_ADDR_REF_ZVAL(ref);
16916 ir_ref ref; local
16922 ref = jit_FP(jit);
16923 ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(handler), ref);
16966 ir_GUARD(ir_GE(ref, ir_CONST_I32(0)), jit_STUB_ADDR(jit, jit_stub_trace_halt));
17102 ir_ref ref = ir_PARAM(IR_ADDR, "execute_data", 1); local
17103 jit_STORE_FP(jit, ref);
17138 ir_ref ref = ir_RLOAD(type, reg); local
17147 ir_set_op(&jit->ctx, ref, 3, EX_NUM_TO_VAR(i));
17174 ir_ref ref; local
17177 ZEND_ASSERT(jit->ra[src_var].ref != IR_UNUSED && jit->ra[src_var].ref != IR_NULL);
17179 ref = ir_PHI_2(
17184 ZEND_ASSERT(jit->ra[src_var].ref == IR_NULL);
17187 zend_jit_def_reg(jit, ZEND_ADDR_REG(dst_var), ref);
17210 ir_ref ref; local
17216 ref = ir_CALL_1(IR_I32, addr, jit_FP(jit));
17224 ir_RETURN(ref);