aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-01-30 17:50:50 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-01-30 17:51:55 -0500
commit17c8f108a4d4c753e087e23ff5722718a6cd7a6a (patch)
treeae936bd071b9675125d6d64b31aec5620d145cbd /src/ir.cpp
parent4d2fed62325d0ef7326c791ab4957154f7ba4c59 (diff)
downloadzig-17c8f108a4d4c753e087e23ff5722718a6cd7a6a.tar.gz
zig-17c8f108a4d4c753e087e23ff5722718a6cd7a6a.zip
drop @newStackCall
this was causing unrelated behavior tests to fail. if this commit is reverted, the docs are good, but `@newStackCall` is already deprecated in favor of `@call`, supplying the `stack` property.
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index ef3426d111..4742d81b23 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -7145,39 +7145,6 @@ static IrInstSrc *ir_gen_builtin_fn_call(IrBuilderSrc *irb, Scope *scope, AstNod
IrInstSrc *offset_of = ir_build_bit_offset_of(irb, scope, node, arg0_value, arg1_value);
return ir_lval_wrap(irb, scope, offset_of, lval, result_loc);
}
- case BuiltinFnIdNewStackCall:
- {
- if (node->data.fn_call_expr.params.length < 2) {
- add_node_error(irb->codegen, node,
- buf_sprintf("expected at least 2 arguments, found %" ZIG_PRI_usize,
- node->data.fn_call_expr.params.length));
- return irb->codegen->invalid_inst_src;
- }
-
- AstNode *new_stack_node = node->data.fn_call_expr.params.at(0);
- IrInstSrc *new_stack = ir_gen_node(irb, new_stack_node, scope);
- if (new_stack == irb->codegen->invalid_inst_src)
- return new_stack;
-
- AstNode *fn_ref_node = node->data.fn_call_expr.params.at(1);
- IrInstSrc *fn_ref = ir_gen_node(irb, fn_ref_node, scope);
- if (fn_ref == irb->codegen->invalid_inst_src)
- return fn_ref;
-
- size_t arg_count = node->data.fn_call_expr.params.length - 2;
-
- IrInstSrc **args = allocate<IrInstSrc*>(arg_count);
- for (size_t i = 0; i < arg_count; i += 1) {
- AstNode *arg_node = node->data.fn_call_expr.params.at(i + 2);
- args[i] = ir_gen_node(irb, arg_node, scope);
- if (args[i] == irb->codegen->invalid_inst_src)
- return args[i];
- }
-
- IrInstSrc *call = ir_build_call_src(irb, scope, node, nullptr, fn_ref, arg_count, args,
- nullptr, CallModifierNone, false, new_stack, result_loc);
- return ir_lval_wrap(irb, scope, call, lval, result_loc);
- }
case BuiltinFnIdCall: {
// Cast the options parameter to the options type
ZigType *options_type = get_builtin_type(irb->codegen, "CallOptions");