Skip to content

Commit e0ef1f7

Browse files
authored
Merge branch 'master' into file-uris
2 parents e86a53c + c4ad6be commit e0ef1f7

File tree

927 files changed

+7289
-169119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

927 files changed

+7289
-169119
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88

99
# std.Thread
1010
/lib/std/Thread* @kprotty
11+
12+
# resinator
13+
/src/resinator/* @squeek502

doc/langref.html.in

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9421,14 +9421,17 @@ fn doTheTest() !void {
94219421
Supports {#link|Floats#} and {#link|Vectors#} of floats.
94229422
</p>
94239423
{#header_close#}
9424-
{#header_open|@fabs#}
9425-
<pre>{#syntax#}@fabs(value: anytype) @TypeOf(value){#endsyntax#}</pre>
9424+
{#header_open|@abs#}
9425+
<pre>{#syntax#}@abs(value: anytype) anytype{#endsyntax#}</pre>
94269426
<p>
9427-
Returns the absolute value of a floating point number. Uses a dedicated hardware instruction
9427+
Returns the absolute value of an integer or a floating point number. Uses a dedicated hardware instruction
94289428
when available.
9429+
9430+
The return type is always an unsigned integer of the same bit width as the operand if the operand is an integer.
9431+
Unsigned integer operands are supported. The builtin cannot overflow for signed integer operands.
94299432
</p>
94309433
<p>
9431-
Supports {#link|Floats#} and {#link|Vectors#} of floats.
9434+
Supports {#link|Floats#}, {#link|Integers#} and {#link|Vectors#} of floats or integers.
94329435
</p>
94339436
{#header_close#}
94349437
{#header_open|@floor#}
@@ -12370,18 +12373,14 @@ Root <- skip container_doc_comment? ContainerMembers eof
1237012373
# *** Top level ***
1237112374
ContainerMembers <- ContainerDeclarations (ContainerField COMMA)* (ContainerField / ContainerDeclarations)
1237212375

12373-
ContainerDeclarations
12374-
<- TestDecl ContainerDeclarations
12375-
/ ComptimeDecl ContainerDeclarations
12376-
/ doc_comment? KEYWORD_pub? Decl ContainerDeclarations
12377-
/
12376+
ContainerDeclarations <- (TestDecl / ComptimeDecl / doc_comment? KEYWORD_pub? Decl)*
1237812377

1237912378
TestDecl <- KEYWORD_test (STRINGLITERALSINGLE / IDENTIFIER)? Block
1238012379

1238112380
ComptimeDecl <- KEYWORD_comptime Block
1238212381

1238312382
Decl
12384-
<- (KEYWORD_export / KEYWORD_extern STRINGLITERALSINGLE? / (KEYWORD_inline / KEYWORD_noinline))? FnProto (SEMICOLON / Block)
12383+
<- (KEYWORD_export / KEYWORD_extern STRINGLITERALSINGLE? / KEYWORD_inline / KEYWORD_noinline)? FnProto (SEMICOLON / Block)
1238512384
/ (KEYWORD_export / KEYWORD_extern STRINGLITERALSINGLE?)? KEYWORD_threadlocal? GlobalVarDecl
1238612385
/ KEYWORD_usingnamespace Expr SEMICOLON
1238712386

lib/compiler_rt/divc3.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const isNan = std.math.isNan;
33
const isInf = std.math.isInf;
44
const scalbn = std.math.scalbn;
55
const ilogb = std.math.ilogb;
6-
const fabs = std.math.fabs;
76
const maxInt = std.math.maxInt;
87
const minInt = std.math.minInt;
98
const isFinite = std.math.isFinite;
@@ -16,7 +15,7 @@ pub inline fn divc3(comptime T: type, a: T, b: T, c_in: T, d_in: T) Complex(T) {
1615
var d = d_in;
1716

1817
// logbw used to prevent under/over-flow
19-
const logbw = ilogb(@max(fabs(c), fabs(d)));
18+
const logbw = ilogb(@max(@abs(c), @abs(d)));
2019
const logbw_finite = logbw != maxInt(i32) and logbw != minInt(i32);
2120
const ilogbw = if (logbw_finite) b: {
2221
c = scalbn(c, -logbw);

lib/compiler_rt/divxf3_test.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ fn test__divxf3(a: f80, b: f80) !void {
3030
const x_minus_eps: f80 = @bitCast((@as(u80, @bitCast(x)) - 1) | integerBit);
3131

3232
// Make sure result is more accurate than the adjacent floats
33-
const err_x = @fabs(@mulAdd(f80, x, b, -a));
34-
const err_x_plus_eps = @fabs(@mulAdd(f80, x_plus_eps, b, -a));
35-
const err_x_minus_eps = @fabs(@mulAdd(f80, x_minus_eps, b, -a));
33+
const err_x = @abs(@mulAdd(f80, x, b, -a));
34+
const err_x_plus_eps = @abs(@mulAdd(f80, x_plus_eps, b, -a));
35+
const err_x_minus_eps = @abs(@mulAdd(f80, x_minus_eps, b, -a));
3636

3737
try testing.expect(err_x_minus_eps > err_x);
3838
try testing.expect(err_x_plus_eps > err_x);

lib/compiler_rt/float_from_int.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn floatFromInt(comptime T: type, x: anytype) T {
1818
const max_exp = exp_bias;
1919

2020
// Sign
21-
var abs_val = math.absCast(x);
21+
var abs_val = if (@TypeOf(x) == comptime_int or @typeInfo(@TypeOf(x)).Int.signedness == .signed) @abs(x) else x;
2222
const sign_bit = if (x < 0) @as(uT, 1) << (float_bits - 1) else 0;
2323
var result: uT = sign_bit;
2424

lib/libc/darwin/SDKSettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"MinimalDisplayName":"14.0"}

lib/libc/darwin/libSystem.11.tbd

Lines changed: 0 additions & 3703 deletions
This file was deleted.

lib/libc/darwin/libSystem.12.tbd

Lines changed: 0 additions & 3838 deletions
This file was deleted.

lib/libc/darwin/libSystem.13.tbd renamed to lib/libc/darwin/libSystem.tbd

Lines changed: 981 additions & 792 deletions
Large diffs are not rendered by default.

lib/libc/include/aarch64-macos.11-none/arm/_limits.h

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/libc/include/aarch64-macos.11-none/arm/_mcontext.h

Lines changed: 0 additions & 91 deletions
This file was deleted.

lib/libc/include/aarch64-macos.11-none/arm/_param.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

lib/libc/include/aarch64-macos.11-none/arm/_types.h

Lines changed: 0 additions & 98 deletions
This file was deleted.

lib/libc/include/aarch64-macos.11-none/arm/arch.h

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)