| ... | @@ -12127,6 +12127,7 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal | ... | @@ -12127,6 +12127,7 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal |
| 12127 | impl_fn->ir_executable.parent_exec = ira->new_irb.exec; | 12127 | impl_fn->ir_executable.parent_exec = ira->new_irb.exec; |
| 12128 | impl_fn->analyzed_executable.source_node = call_instruction->base.source_node; | 12128 | impl_fn->analyzed_executable.source_node = call_instruction->base.source_node; |
| 12129 | impl_fn->analyzed_executable.parent_exec = ira->new_irb.exec; | 12129 | impl_fn->analyzed_executable.parent_exec = ira->new_irb.exec; |
| | 12130 | impl_fn->analyzed_executable.is_generic_instantiation = true; |
| 12130 | | 12131 | |
| 12131 | ira->codegen->fn_defs.append(impl_fn); | 12132 | ira->codegen->fn_defs.append(impl_fn); |
| 12132 | } | 12133 | } |
| ... | @@ -15234,7 +15235,7 @@ static TypeTableEntry *ir_analyze_instruction_type_id(IrAnalyze *ira, | ... | @@ -15234,7 +15235,7 @@ static TypeTableEntry *ir_analyze_instruction_type_id(IrAnalyze *ira, |
| 15234 | static TypeTableEntry *ir_analyze_instruction_set_eval_branch_quota(IrAnalyze *ira, | 15235 | static TypeTableEntry *ir_analyze_instruction_set_eval_branch_quota(IrAnalyze *ira, |
| 15235 | IrInstructionSetEvalBranchQuota *instruction) | 15236 | IrInstructionSetEvalBranchQuota *instruction) |
| 15236 | { | 15237 | { |
| 15237 | if (ira->new_irb.exec->parent_exec != nullptr) { | 15238 | if (ira->new_irb.exec->parent_exec != nullptr && !ira->new_irb.exec->is_generic_instantiation) { |
| 15238 | ir_add_error(ira, &instruction->base, | 15239 | ir_add_error(ira, &instruction->base, |
| 15239 | buf_sprintf("@setEvalBranchQuota must be called from the top of the comptime stack")); | 15240 | buf_sprintf("@setEvalBranchQuota must be called from the top of the comptime stack")); |
| 15240 | return ira->codegen->builtin_types.entry_invalid; | 15241 | return ira->codegen->builtin_types.entry_invalid; |