| ... | @@ -330,6 +330,8 @@ static bool ir_should_inline(IrExecutable *exec, Scope *scope) { | ... | @@ -330,6 +330,8 @@ static bool ir_should_inline(IrExecutable *exec, Scope *scope) { |
| 330 | while (scope != nullptr) { | 330 | while (scope != nullptr) { |
| 331 | if (scope->id == ScopeIdCompTime) | 331 | if (scope->id == ScopeIdCompTime) |
| 332 | return true; | 332 | return true; |
| | 333 | if (scope->id == ScopeIdTypeOf) |
| | 334 | return false; |
| 333 | if (scope->id == ScopeIdFnDef) | 335 | if (scope->id == ScopeIdFnDef) |
| 334 | break; | 336 | break; |
| 335 | scope = scope->parent; | 337 | scope = scope->parent; |
| ... | @@ -16075,11 +16077,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c | ... | @@ -16075,11 +16077,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 16075 | } | 16077 | } |
| 16076 | | 16078 | |
| 16077 | IrInstruction *result_loc; | 16079 | IrInstruction *result_loc; |
| 16078 | if (call_instruction->is_async_call_builtin) { | 16080 | if (handle_is_ptr(impl_fn_type_id->return_type)) { |
| 16079 | result_loc = get_async_call_result_loc(ira, call_instruction, impl_fn_type_id->return_type); | | |
| 16080 | if (result_loc != nullptr && type_is_invalid(result_loc->value.type)) | | |
| 16081 | return ira->codegen->invalid_instruction; | | |
| 16082 | } else if (handle_is_ptr(impl_fn_type_id->return_type)) { | | |
| 16083 | result_loc = ir_resolve_result(ira, &call_instruction->base, call_instruction->result_loc, | 16081 | result_loc = ir_resolve_result(ira, &call_instruction->base, call_instruction->result_loc, |
| 16084 | impl_fn_type_id->return_type, nullptr, true, true, false); | 16082 | impl_fn_type_id->return_type, nullptr, true, true, false); |
| 16085 | if (result_loc != nullptr) { | 16083 | if (result_loc != nullptr) { |
| ... | @@ -16091,6 +16089,10 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c | ... | @@ -16091,6 +16089,10 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 16091 | result_loc = nullptr; | 16089 | result_loc = nullptr; |
| 16092 | } | 16090 | } |
| 16093 | } | 16091 | } |
| | 16092 | } else if (call_instruction->is_async_call_builtin) { |
| | 16093 | result_loc = get_async_call_result_loc(ira, call_instruction, impl_fn_type_id->return_type); |
| | 16094 | if (result_loc != nullptr && type_is_invalid(result_loc->value.type)) |
| | 16095 | return ira->codegen->invalid_instruction; |
| 16094 | } else { | 16096 | } else { |
| 16095 | result_loc = nullptr; | 16097 | result_loc = nullptr; |
| 16096 | } | 16098 | } |
| ... | @@ -16231,11 +16233,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c | ... | @@ -16231,11 +16233,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 16231 | } | 16233 | } |
| 16232 | | 16234 | |
| 16233 | IrInstruction *result_loc; | 16235 | IrInstruction *result_loc; |
| 16234 | if (call_instruction->is_async_call_builtin) { | 16236 | if (handle_is_ptr(return_type)) { |
| 16235 | result_loc = get_async_call_result_loc(ira, call_instruction, return_type); | | |
| 16236 | if (result_loc != nullptr && type_is_invalid(result_loc->value.type)) | | |
| 16237 | return ira->codegen->invalid_instruction; | | |
| 16238 | } else if (handle_is_ptr(return_type)) { | | |
| 16239 | result_loc = ir_resolve_result(ira, &call_instruction->base, call_instruction->result_loc, | 16237 | result_loc = ir_resolve_result(ira, &call_instruction->base, call_instruction->result_loc, |
| 16240 | return_type, nullptr, true, true, false); | 16238 | return_type, nullptr, true, true, false); |
| 16241 | if (result_loc != nullptr) { | 16239 | if (result_loc != nullptr) { |
| ... | @@ -16247,6 +16245,10 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c | ... | @@ -16247,6 +16245,10 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 16247 | result_loc = nullptr; | 16245 | result_loc = nullptr; |
| 16248 | } | 16246 | } |
| 16249 | } | 16247 | } |
| | 16248 | } else if (call_instruction->is_async_call_builtin) { |
| | 16249 | result_loc = get_async_call_result_loc(ira, call_instruction, return_type); |
| | 16250 | if (result_loc != nullptr && type_is_invalid(result_loc->value.type)) |
| | 16251 | return ira->codegen->invalid_instruction; |
| 16250 | } else { | 16252 | } else { |
| 16251 | result_loc = nullptr; | 16253 | result_loc = nullptr; |
| 16252 | } | 16254 | } |