| ... | @@ -2153,12 +2153,12 @@ static IrInstruction *ir_build_unwrap_err_payload_from(IrBuilder *irb, IrInstruc | ... | @@ -2153,12 +2153,12 @@ static IrInstruction *ir_build_unwrap_err_payload_from(IrBuilder *irb, IrInstruc |
| 2153 | } | 2153 | } |
| 2154 | | 2154 | |
| 2155 | static IrInstruction *ir_build_fn_proto(IrBuilder *irb, Scope *scope, AstNode *source_node, | 2155 | static IrInstruction *ir_build_fn_proto(IrBuilder *irb, Scope *scope, AstNode *source_node, |
| 2156 | IrInstruction **param_types, IrInstruction *align_value, IrInstruction *return_type, IrInstruction *async_allocator_type_value, bool is_var_args) | 2156 | IrInstruction **param_types, IrInstruction *align_value, IrInstruction *return_type, |
| | 2157 | IrInstruction *async_allocator_type_value, bool is_var_args) |
| 2157 | { | 2158 | { |
| 2158 | IrInstructionFnProto *instruction = ir_build_instruction<IrInstructionFnProto>(irb, scope, source_node); | 2159 | IrInstructionFnProto *instruction = ir_build_instruction<IrInstructionFnProto>(irb, scope, source_node); |
| 2159 | instruction->param_types = param_types; | 2160 | instruction->param_types = param_types; |
| 2160 | instruction->align_value = align_value; | 2161 | instruction->align_value = align_value; |
| 2161 | instruction->async_allocator_type_value = async_allocator_type_value; | | |
| 2162 | instruction->return_type = return_type; | 2162 | instruction->return_type = return_type; |
| 2163 | instruction->async_allocator_type_value = async_allocator_type_value; | 2163 | instruction->async_allocator_type_value = async_allocator_type_value; |
| 2164 | instruction->is_var_args = is_var_args; | 2164 | instruction->is_var_args = is_var_args; |
| ... | @@ -2647,17 +2647,6 @@ static IrInstruction *ir_build_coro_alloc_helper(IrBuilder *irb, Scope *scope, A | ... | @@ -2647,17 +2647,6 @@ static IrInstruction *ir_build_coro_alloc_helper(IrBuilder *irb, Scope *scope, A |
| 2647 | return &instruction->base; | 2647 | return &instruction->base; |
| 2648 | } | 2648 | } |
| 2649 | | 2649 | |
| 2650 | static IrInstruction *ir_build_add_implicit_return_type(IrBuilder *irb, Scope *scope, AstNode *source_node, | | |
| 2651 | IrInstruction *value) | | |
| 2652 | { | | |
| 2653 | IrInstructionAddImplicitReturnType *instruction = ir_build_instruction<IrInstructionAddImplicitReturnType>(irb, scope, source_node); | | |
| 2654 | instruction->value = value; | | |
| 2655 | | | |
| 2656 | ir_ref_instruction(value, irb->current_basic_block); | | |
| 2657 | | | |
| 2658 | return &instruction->base; | | |
| 2659 | } | | |
| 2660 | | | |
| 2661 | static IrInstruction *ir_build_atomic_rmw(IrBuilder *irb, Scope *scope, AstNode *source_node, | 2650 | static IrInstruction *ir_build_atomic_rmw(IrBuilder *irb, Scope *scope, AstNode *source_node, |
| 2662 | IrInstruction *operand_type, IrInstruction *ptr, IrInstruction *op, IrInstruction *operand, | 2651 | IrInstruction *operand_type, IrInstruction *ptr, IrInstruction *op, IrInstruction *operand, |
| 2663 | IrInstruction *ordering, AtomicRmwOp resolved_op, AtomicOrder resolved_ordering) | 2652 | IrInstruction *ordering, AtomicRmwOp resolved_op, AtomicOrder resolved_ordering) |
| ... | @@ -6052,13 +6041,6 @@ static IrInstruction *ir_gen_fn_proto(IrBuilder *irb, Scope *parent_scope, AstNo | ... | @@ -6052,13 +6041,6 @@ static IrInstruction *ir_gen_fn_proto(IrBuilder *irb, Scope *parent_scope, AstNo |
| 6052 | return irb->codegen->invalid_instruction; | 6041 | return irb->codegen->invalid_instruction; |
| 6053 | } | 6042 | } |
| 6054 | | 6043 | |
| 6055 | IrInstruction *async_allocator_type_value = nullptr; | | |
| 6056 | if (node->data.fn_proto.async_allocator_type != nullptr) { | | |
| 6057 | async_allocator_type_value = ir_gen_node(irb, node->data.fn_proto.async_allocator_type, parent_scope); | | |
| 6058 | if (async_allocator_type_value == irb->codegen->invalid_instruction) | | |
| 6059 | return irb->codegen->invalid_instruction; | | |
| 6060 | } | | |
| 6061 | | | |
| 6062 | IrInstruction *return_type; | 6044 | IrInstruction *return_type; |
| 6063 | if (node->data.fn_proto.return_var_token == nullptr) { | 6045 | if (node->data.fn_proto.return_var_token == nullptr) { |
| 6064 | if (node->data.fn_proto.return_type == nullptr) { | 6046 | if (node->data.fn_proto.return_type == nullptr) { |
| ... | @@ -6079,7 +6061,8 @@ static IrInstruction *ir_gen_fn_proto(IrBuilder *irb, Scope *parent_scope, AstNo | ... | @@ -6079,7 +6061,8 @@ static IrInstruction *ir_gen_fn_proto(IrBuilder *irb, Scope *parent_scope, AstNo |
| 6079 | return irb->codegen->invalid_instruction; | 6061 | return irb->codegen->invalid_instruction; |
| 6080 | } | 6062 | } |
| 6081 | | 6063 | |
| 6082 | return ir_build_fn_proto(irb, parent_scope, node, param_types, align_value, return_type, async_allocator_type_value, is_var_args); | 6064 | return ir_build_fn_proto(irb, parent_scope, node, param_types, align_value, return_type, |
| | 6065 | async_allocator_type_value, is_var_args); |
| 6083 | } | 6066 | } |
| 6084 | | 6067 | |
| 6085 | static IrInstruction *ir_gen_cancel(IrBuilder *irb, Scope *parent_scope, AstNode *node) { | 6068 | static IrInstruction *ir_gen_cancel(IrBuilder *irb, Scope *parent_scope, AstNode *node) { |
| ... | @@ -16757,12 +16740,6 @@ static TypeTableEntry *ir_analyze_instruction_fn_proto(IrAnalyze *ira, IrInstruc | ... | @@ -16757,12 +16740,6 @@ static TypeTableEntry *ir_analyze_instruction_fn_proto(IrAnalyze *ira, IrInstruc |
| 16757 | return ira->codegen->builtin_types.entry_invalid; | 16740 | return ira->codegen->builtin_types.entry_invalid; |
| 16758 | } | 16741 | } |
| 16759 | | 16742 | |
| 16760 | if (instruction->async_allocator_type_value != nullptr) { | | |
| 16761 | fn_type_id.async_allocator_type = ir_resolve_type(ira, instruction->async_allocator_type_value->other); | | |
| 16762 | if (type_is_invalid(fn_type_id.async_allocator_type)) | | |
| 16763 | return ira->codegen->builtin_types.entry_invalid; | | |
| 16764 | } | | |
| 16765 | | | |
| 16766 | IrInstruction *return_type_value = instruction->return_type->other; | 16743 | IrInstruction *return_type_value = instruction->return_type->other; |
| 16767 | fn_type_id.return_type = ir_resolve_type(ira, return_type_value); | 16744 | fn_type_id.return_type = ir_resolve_type(ira, return_type_value); |
| 16768 | if (type_is_invalid(fn_type_id.return_type)) | 16745 | if (type_is_invalid(fn_type_id.return_type)) |