aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-14 10:51:59 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-14 10:51:59 -0500
commitc58b80203443dcbf8b737ebdaa1f17fb20c77711 (patch)
treeb1e9af991951c68e1fa7042b2f75091a61c0c8cf /src/ir.cpp
parenta4e32d9fb143dbfb622a5097ea4a1e4bcad03463 (diff)
downloadzig-c58b80203443dcbf8b737ebdaa1f17fb20c77711.tar.gz
zig-c58b80203443dcbf8b737ebdaa1f17fb20c77711.zip
remove the "top of the comptime stack" compile error
It's still best practice to put `@setEvalBranchQuota` at the top of the comptime stack, but as Jimmi notes in #1949, when a function can be called at comptime and also can be the top of the comptime stack, this compile error is fundamentally unsound. So now it's gone. closes #1949
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 5d4013b4b9..03dea10b10 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -18172,12 +18172,6 @@ static IrInstruction *ir_analyze_instruction_type_id(IrAnalyze *ira,
static IrInstruction *ir_analyze_instruction_set_eval_branch_quota(IrAnalyze *ira,
IrInstructionSetEvalBranchQuota *instruction)
{
- if (ira->new_irb.exec->parent_exec != nullptr && !ira->new_irb.exec->is_generic_instantiation) {
- ir_add_error(ira, &instruction->base,
- buf_sprintf("@setEvalBranchQuota must be called from the top of the comptime stack"));
- return ira->codegen->invalid_instruction;
- }
-
uint64_t new_quota;
if (!ir_resolve_usize(ira, instruction->new_quota->child, &new_quota))
return ira->codegen->invalid_instruction;