| ... | ... | @@ -14934,7 +14934,7 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe |
| 14934 | 14934 | PtrLenSingle, 0, 0, 0, false); |
| 14935 | 14935 | set_up_result_loc_for_inferred_comptime(&alloca_gen->base); |
| 14936 | 14936 | ZigFn *fn_entry = exec_fn_entry(ira->new_irb.exec); |
| 14937 | | if (fn_entry != nullptr) { |
| 14937 | if (fn_entry != nullptr && get_scope_typeof(suspend_source_instr->scope) == nullptr) { |
| 14938 | 14938 | fn_entry->alloca_gen_list.append(alloca_gen); |
| 14939 | 14939 | } |
| 14940 | 14940 | result_loc->written = true; |
| ... | ... | @@ -16058,6 +16058,18 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 16058 | 16058 | } |
| 16059 | 16059 | |
| 16060 | 16060 | FnTypeId *impl_fn_type_id = &impl_fn->type_entry->data.fn.fn_type_id; |
| 16061 | |
| 16062 | if (fn_type_can_fail(impl_fn_type_id)) { |
| 16063 | parent_fn_entry->calls_or_awaits_errorable_fn = true; |
| 16064 | } |
| 16065 | |
| 16066 | size_t impl_param_count = impl_fn_type_id->param_count; |
| 16067 | if (call_instruction->is_async) { |
| 16068 | IrInstruction *result = ir_analyze_async_call(ira, call_instruction, impl_fn, impl_fn->type_entry, |
| 16069 | nullptr, casted_args, impl_param_count, casted_new_stack); |
| 16070 | return ir_finish_anal(ira, result); |
| 16071 | } |
| 16072 | |
| 16061 | 16073 | IrInstruction *result_loc; |
| 16062 | 16074 | if (call_instruction->is_async_call_builtin) { |
| 16063 | 16075 | result_loc = get_async_call_result_loc(ira, call_instruction, impl_fn_type_id->return_type); |
| ... | ... | @@ -16079,17 +16091,6 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 16079 | 16091 | result_loc = nullptr; |
| 16080 | 16092 | } |
| 16081 | 16093 | |
| 16082 | | if (fn_type_can_fail(impl_fn_type_id)) { |
| 16083 | | parent_fn_entry->calls_or_awaits_errorable_fn = true; |
| 16084 | | } |
| 16085 | | |
| 16086 | | size_t impl_param_count = impl_fn_type_id->param_count; |
| 16087 | | if (call_instruction->is_async) { |
| 16088 | | IrInstruction *result = ir_analyze_async_call(ira, call_instruction, impl_fn, impl_fn->type_entry, |
| 16089 | | nullptr, casted_args, impl_param_count, casted_new_stack); |
| 16090 | | return ir_finish_anal(ira, result); |
| 16091 | | } |
| 16092 | | |
| 16093 | 16094 | if (impl_fn_type_id->cc == CallingConventionAsync && parent_fn_entry->inferred_async_node == nullptr) { |
| 16094 | 16095 | parent_fn_entry->inferred_async_node = fn_ref->source_node; |
| 16095 | 16096 | parent_fn_entry->inferred_async_fn = impl_fn; |
| ... | ... | @@ -16100,7 +16101,9 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 16100 | 16101 | false, casted_new_stack, call_instruction->is_async_call_builtin, result_loc, |
| 16101 | 16102 | impl_fn_type_id->return_type); |
| 16102 | 16103 | |
| 16103 | | parent_fn_entry->call_list.append(new_call_instruction); |
| 16104 | if (get_scope_typeof(call_instruction->base.scope) == nullptr) { |
| 16105 | parent_fn_entry->call_list.append(new_call_instruction); |
| 16106 | } |
| 16104 | 16107 | |
| 16105 | 16108 | return ir_finish_anal(ira, &new_call_instruction->base); |
| 16106 | 16109 | } |
| ... | ... | @@ -16243,7 +16246,9 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 16243 | 16246 | IrInstructionCallGen *new_call_instruction = ir_build_call_gen(ira, &call_instruction->base, fn_entry, fn_ref, |
| 16244 | 16247 | call_param_count, casted_args, fn_inline, false, casted_new_stack, |
| 16245 | 16248 | call_instruction->is_async_call_builtin, result_loc, return_type); |
| 16246 | | parent_fn_entry->call_list.append(new_call_instruction); |
| 16249 | if (get_scope_typeof(call_instruction->base.scope) == nullptr) { |
| 16250 | parent_fn_entry->call_list.append(new_call_instruction); |
| 16251 | } |
| 16247 | 16252 | return ir_finish_anal(ira, &new_call_instruction->base); |
| 16248 | 16253 | } |
| 16249 | 16254 | |