authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-09-28 16:55:57-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-09-28 17:04:19-07:00
log71da169c67ad544bd1d4dfc4bfff9fe302e8284d
treee8280010344941a580c643aa1e7a677ab0c0a400
parent6cb7906394281370173cd1c1fc79ad93562005a0

AstGen: delete dead code


1 files changed, 0 insertions(+), 23 deletions(-)

src/AstGen.zig-23
......@@ -2781,29 +2781,6 @@ fn assignShift(
27812781 _ = try gz.addBin(.store, lhs_ptr, result);
27822782}
27832783
2784fn assignShiftSat(
2785 gz: *GenZir,
2786 scope: *Scope,
2787 infix_node: Ast.Node.Index,
2788 op_inst_tag: Zir.Inst.Tag,
2789) InnerError!void {
2790 try emitDbgNode(gz, infix_node);
2791 const astgen = gz.astgen;
2792 const tree = astgen.tree;
2793 const node_datas = tree.nodes.items(.data);
2794
2795 const lhs_ptr = try lvalExpr(gz, scope, node_datas[infix_node].lhs);
2796 const lhs = try gz.addUnNode(.load, lhs_ptr, infix_node);
2797 const rhs_type = try gz.addUnNode(.typeof, lhs, infix_node);
2798 const rhs = try expr(gz, scope, .{ .ty = rhs_type }, node_datas[infix_node].rhs);
2799
2800 const result = try gz.addPlNode(op_inst_tag, infix_node, Zir.Inst.Bin{
2801 .lhs = lhs,
2802 .rhs = rhs,
2803 });
2804 _ = try gz.addBin(.store, lhs_ptr, result);
2805}
2806
28072784fn boolNot(gz: *GenZir, scope: *Scope, rl: ResultLoc, node: Ast.Node.Index) InnerError!Zir.Inst.Ref {
28082785 const astgen = gz.astgen;
28092786 const tree = astgen.tree;