aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-12-06 15:49:47 -0500
committerGitHub <noreply@github.com>2019-12-06 15:49:47 -0500
commit525b1e8fb4abc38143a6ae47272fd5d016ba7eeb (patch)
treeee16b05de3828936971df6d977e75d5825b10547 /lib/std/math
parentd28aa38db71a861fd2036efbb22e57c1d34a5615 (diff)
parent656cc33f8d49cb5e79cd3f9f8f56963747d43ed6 (diff)
downloadzig-525b1e8fb4abc38143a6ae47272fd5d016ba7eeb.tar.gz
zig-525b1e8fb4abc38143a6ae47272fd5d016ba7eeb.zip
Merge pull request #3856 from ziglang/builtin-call
introduce `@call` and remove other builtin calls
Diffstat (limited to 'lib/std/math')
-rw-r--r--lib/std/math/big/int.zig14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/std/math/big/int.zig b/lib/std/math/big/int.zig
index 0459b0b158..5c84dc462b 100644
--- a/lib/std/math/big/int.zig
+++ b/lib/std/math/big/int.zig
@@ -811,7 +811,7 @@ pub const Int = struct {
var j: usize = 0;
while (j < a_lo.len) : (j += 1) {
- a_lo[j] = @inlineCall(addMulLimbWithCarry, a_lo[j], y[j], xi, &carry);
+ a_lo[j] = @call(.{ .modifier = .always_inline }, addMulLimbWithCarry, .{ a_lo[j], y[j], xi, &carry });
}
j = 0;
@@ -1214,7 +1214,11 @@ pub const Int = struct {
const dst_i = src_i + limb_shift;
const src_digit = a[src_i];
- r[dst_i] = carry | @inlineCall(math.shr, Limb, src_digit, Limb.bit_count - @intCast(Limb, interior_limb_shift));
+ r[dst_i] = carry | @call(.{ .modifier = .always_inline }, math.shr, .{
+ Limb,
+ src_digit,
+ Limb.bit_count - @intCast(Limb, interior_limb_shift),
+ });
carry = (src_digit << interior_limb_shift);
}
@@ -1254,7 +1258,11 @@ pub const Int = struct {
const src_digit = a[src_i];
r[dst_i] = carry | (src_digit >> interior_limb_shift);
- carry = @inlineCall(math.shl, Limb, src_digit, Limb.bit_count - @intCast(Limb, interior_limb_shift));
+ carry = @call(.{ .modifier = .always_inline }, math.shl, .{
+ Limb,
+ src_digit,
+ Limb.bit_count - @intCast(Limb, interior_limb_shift),
+ });
}
}