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