Skip to content

Commit

Permalink
Rename '@Fabs' builtin to '@abs'
Browse files Browse the repository at this point in the history
  • Loading branch information
antlilja committed Oct 5, 2023
1 parent 08d68dc commit 3aedb51
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/stage2/AstGen.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2641,7 +2641,7 @@ fn addEnsureResult(gz: *GenZir, maybe_unused_result: Zir.Inst.Ref, statement: As
.log,
.log2,
.log10,
.fabs,
.abs,
.floor,
.ceil,
.trunc,
Expand Down Expand Up @@ -8393,7 +8393,7 @@ fn builtinCall(
.log => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .log),
.log2 => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .log2),
.log10 => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .log10),
.fabs => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .fabs),
.abs => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .abs),
.floor => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .floor),
.ceil => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .ceil),
.trunc => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .trunc),
Expand Down
2 changes: 1 addition & 1 deletion src/stage2/AstRlAnnotate.zig
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ fn builtinCall(astrl: *AstRlAnnotate, block: ?*Block, ri: ResultInfo, node: Ast.
.log,
.log2,
.log10,
.fabs,
.abs,
.floor,
.ceil,
.trunc,
Expand Down
6 changes: 3 additions & 3 deletions src/stage2/BuiltinFn.zig
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub const Tag = enum {
log,
log2,
log10,
fabs,
abs,
floor,
ceil,
trunc,
Expand Down Expand Up @@ -874,9 +874,9 @@ pub const list = list: {
},
},
.{
"@fabs",
"@abs",
.{
.tag = .fabs,
.tag = .abs,
.param_count = 1,
},
},
Expand Down
10 changes: 5 additions & 5 deletions src/stage2/Zir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ pub const Inst = struct {
log2,
/// Implement builtin `@log10`. Uses `un_node`.
log10,
/// Implement builtin `@fabs`. Uses `un_node`.
fabs,
/// Implement builtin `@abs`. Uses `un_node`.
abs,
/// Implement builtin `@floor`. Uses `un_node`.
floor,
/// Implement builtin `@ceil`. Uses `un_node`.
Expand Down Expand Up @@ -1183,7 +1183,7 @@ pub const Inst = struct {
.log,
.log2,
.log10,
.fabs,
.abs,
.floor,
.ceil,
.trunc,
Expand Down Expand Up @@ -1469,7 +1469,7 @@ pub const Inst = struct {
.log,
.log2,
.log10,
.fabs,
.abs,
.floor,
.ceil,
.trunc,
Expand Down Expand Up @@ -1735,7 +1735,7 @@ pub const Inst = struct {
.log = .un_node,
.log2 = .un_node,
.log10 = .un_node,
.fabs = .un_node,
.abs = .un_node,
.floor = .un_node,
.ceil = .un_node,
.trunc = .un_node,
Expand Down

0 comments on commit 3aedb51

Please sign in to comment.