overflowArithmetic
Function parameters
Parameters
- gz:*GenZir
- scope:*Scope
- node:Ast.Node.Index
- params:[]const Ast.Node.Index
- tag:Zir.Inst.Extended
Functions in this namespace
Functions
Source
Implementation
fn overflowArithmetic(
gz: *GenZir,
scope: *Scope,
ri: ResultInfo,
node: Ast.Node.Index,
params: []const Ast.Node.Index,
tag: Zir.Inst.Extended,
) InnerError!Zir.Inst.Ref {
const lhs = try expr(gz, scope, .{ .rl = .none }, params[0]);
const rhs = try expr(gz, scope, .{ .rl = .none }, params[1]);
const result = try gz.addExtendedPayload(tag, Zir.Inst.BinNode{
.node = gz.nodeIndexToRelative(node),
.lhs = lhs,
.rhs = rhs,
});
return rvalue(gz, ri, result, node);
}