Skip to content

Commit

Permalink
Merge branch 'master' into file-uris
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGoertz authored Sep 28, 2023
2 parents e86a53c + c4ad6be commit e0ef1f7
Show file tree
Hide file tree
Showing 927 changed files with 7,289 additions and 169,119 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@

# std.Thread
/lib/std/Thread* @kprotty

# resinator
/src/resinator/* @squeek502
19 changes: 9 additions & 10 deletions doc/langref.html.in
Original file line number Diff line number Diff line change
Expand Up @@ -9421,14 +9421,17 @@ fn doTheTest() !void {
Supports {#link|Floats#} and {#link|Vectors#} of floats.
</p>
{#header_close#}
{#header_open|@fabs#}
<pre>{#syntax#}@fabs(value: anytype) @TypeOf(value){#endsyntax#}</pre>
{#header_open|@abs#}
<pre>{#syntax#}@abs(value: anytype) anytype{#endsyntax#}</pre>
<p>
Returns the absolute value of a floating point number. Uses a dedicated hardware instruction
Returns the absolute value of an integer or a floating point number. Uses a dedicated hardware instruction
when available.

The return type is always an unsigned integer of the same bit width as the operand if the operand is an integer.
Unsigned integer operands are supported. The builtin cannot overflow for signed integer operands.
</p>
<p>
Supports {#link|Floats#} and {#link|Vectors#} of floats.
Supports {#link|Floats#}, {#link|Integers#} and {#link|Vectors#} of floats or integers.
</p>
{#header_close#}
{#header_open|@floor#}
Expand Down Expand Up @@ -12370,18 +12373,14 @@ Root <- skip container_doc_comment? ContainerMembers eof
# *** Top level ***
ContainerMembers <- ContainerDeclarations (ContainerField COMMA)* (ContainerField / ContainerDeclarations)

ContainerDeclarations
<- TestDecl ContainerDeclarations
/ ComptimeDecl ContainerDeclarations
/ doc_comment? KEYWORD_pub? Decl ContainerDeclarations
/
ContainerDeclarations <- (TestDecl / ComptimeDecl / doc_comment? KEYWORD_pub? Decl)*

TestDecl <- KEYWORD_test (STRINGLITERALSINGLE / IDENTIFIER)? Block

ComptimeDecl <- KEYWORD_comptime Block

Decl
<- (KEYWORD_export / KEYWORD_extern STRINGLITERALSINGLE? / (KEYWORD_inline / KEYWORD_noinline))? FnProto (SEMICOLON / Block)
<- (KEYWORD_export / KEYWORD_extern STRINGLITERALSINGLE? / KEYWORD_inline / KEYWORD_noinline)? FnProto (SEMICOLON / Block)
/ (KEYWORD_export / KEYWORD_extern STRINGLITERALSINGLE?)? KEYWORD_threadlocal? GlobalVarDecl
/ KEYWORD_usingnamespace Expr SEMICOLON

Expand Down
3 changes: 1 addition & 2 deletions lib/compiler_rt/divc3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const isNan = std.math.isNan;
const isInf = std.math.isInf;
const scalbn = std.math.scalbn;
const ilogb = std.math.ilogb;
const fabs = std.math.fabs;
const maxInt = std.math.maxInt;
const minInt = std.math.minInt;
const isFinite = std.math.isFinite;
Expand All @@ -16,7 +15,7 @@ pub inline fn divc3(comptime T: type, a: T, b: T, c_in: T, d_in: T) Complex(T) {
var d = d_in;

// logbw used to prevent under/over-flow
const logbw = ilogb(@max(fabs(c), fabs(d)));
const logbw = ilogb(@max(@abs(c), @abs(d)));
const logbw_finite = logbw != maxInt(i32) and logbw != minInt(i32);
const ilogbw = if (logbw_finite) b: {
c = scalbn(c, -logbw);
Expand Down
6 changes: 3 additions & 3 deletions lib/compiler_rt/divxf3_test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ fn test__divxf3(a: f80, b: f80) !void {
const x_minus_eps: f80 = @bitCast((@as(u80, @bitCast(x)) - 1) | integerBit);

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

try testing.expect(err_x_minus_eps > err_x);
try testing.expect(err_x_plus_eps > err_x);
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/float_from_int.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn floatFromInt(comptime T: type, x: anytype) T {
const max_exp = exp_bias;

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

Expand Down
1 change: 1 addition & 0 deletions lib/libc/darwin/SDKSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"MinimalDisplayName":"14.0"}
3,703 changes: 0 additions & 3,703 deletions lib/libc/darwin/libSystem.11.tbd

This file was deleted.

3,838 changes: 0 additions & 3,838 deletions lib/libc/darwin/libSystem.12.tbd

This file was deleted.

1,773 changes: 981 additions & 792 deletions lib/libc/darwin/libSystem.13.tbd → lib/libc/darwin/libSystem.tbd

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions lib/libc/include/aarch64-macos.11-none/arm/_limits.h

This file was deleted.

91 changes: 0 additions & 91 deletions lib/libc/include/aarch64-macos.11-none/arm/_mcontext.h

This file was deleted.

22 changes: 0 additions & 22 deletions lib/libc/include/aarch64-macos.11-none/arm/_param.h

This file was deleted.

98 changes: 0 additions & 98 deletions lib/libc/include/aarch64-macos.11-none/arm/_types.h

This file was deleted.

67 changes: 0 additions & 67 deletions lib/libc/include/aarch64-macos.11-none/arm/arch.h

This file was deleted.

Loading

0 comments on commit e0ef1f7

Please sign in to comment.