| ... | ... | @@ -7748,8 +7748,9 @@ static TypeTableEntry *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_nod |
| 7748 | 7748 | static void ir_add_alloca(IrAnalyze *ira, IrInstruction *instruction, TypeTableEntry *type_entry) { |
| 7749 | 7749 | if (type_has_bits(type_entry) && handle_is_ptr(type_entry)) { |
| 7750 | 7750 | FnTableEntry *fn_entry = exec_fn_entry(ira->new_irb.exec); |
| 7751 | | assert(fn_entry); |
| 7752 | | fn_entry->alloca_list.append(instruction); |
| 7751 | if (fn_entry != nullptr) { |
| 7752 | fn_entry->alloca_list.append(instruction); |
| 7753 | } |
| 7753 | 7754 | } |
| 7754 | 7755 | } |
| 7755 | 7756 | |
| ... | ... | @@ -7851,9 +7852,7 @@ static IrInstruction *ir_resolve_cast(IrAnalyze *ira, IrInstruction *source_inst |
| 7851 | 7852 | IrInstruction *result = ir_build_cast(&ira->new_irb, source_instr->scope, source_instr->source_node, wanted_type, value, cast_op); |
| 7852 | 7853 | result->value.type = wanted_type; |
| 7853 | 7854 | if (need_alloca) { |
| 7854 | | FnTableEntry *fn_entry = exec_fn_entry(ira->new_irb.exec); |
| 7855 | | if (fn_entry) |
| 7856 | | fn_entry->alloca_list.append(result); |
| 7855 | ir_add_alloca(ira, result, wanted_type); |
| 7857 | 7856 | } |
| 7858 | 7857 | return result; |
| 7859 | 7858 | } |
| ... | ... | @@ -8287,6 +8286,7 @@ static IrInstruction *ir_analyze_cast_ref(IrAnalyze *ira, IrInstruction *source_ |
| 8287 | 8286 | assert(fn_entry); |
| 8288 | 8287 | fn_entry->alloca_list.append(new_instruction); |
| 8289 | 8288 | } |
| 8289 | ir_add_alloca(ira, new_instruction, child_type); |
| 8290 | 8290 | return new_instruction; |
| 8291 | 8291 | } |
| 8292 | 8292 | } |
| ... | ... | @@ -8330,13 +8330,15 @@ static IrInstruction *ir_get_ref(IrAnalyze *ira, IrInstruction *source_instructi |
| 8330 | 8330 | |
| 8331 | 8331 | TypeTableEntry *ptr_type = get_pointer_to_type_extra(ira->codegen, value->value.type, |
| 8332 | 8332 | is_const, is_volatile, get_abi_alignment(ira->codegen, value->value.type), 0, 0); |
| 8333 | | FnTableEntry *fn_entry = exec_fn_entry(ira->new_irb.exec); |
| 8334 | | assert(fn_entry); |
| 8335 | 8333 | IrInstruction *new_instruction = ir_build_ref(&ira->new_irb, source_instruction->scope, |
| 8336 | 8334 | source_instruction->source_node, value, is_const, is_volatile); |
| 8337 | 8335 | new_instruction->value.type = ptr_type; |
| 8338 | 8336 | new_instruction->value.data.rh_ptr = RuntimeHintPtrStack; |
| 8339 | | fn_entry->alloca_list.append(new_instruction); |
| 8337 | if (type_has_bits(ptr_type)) { |
| 8338 | FnTableEntry *fn_entry = exec_fn_entry(ira->new_irb.exec); |
| 8339 | assert(fn_entry); |
| 8340 | fn_entry->alloca_list.append(new_instruction); |
| 8341 | } |
| 8340 | 8342 | return new_instruction; |
| 8341 | 8343 | } |
| 8342 | 8344 | |