7924 Commits

Author SHA1 Message Date
Jacob Young
b0cf620fe3 x86_64: fix cond_br 2023-10-27 03:33:49 -04:00
Jacob Young
42bca3e2ee x86_64: fix @memset 2023-10-27 01:40:27 -04:00
Jacob Young
434a7db986 x86_64: add missing spill 2023-10-27 01:40:27 -04:00
Jacob Young
6ad22cd964 x86_64: add missing spills 2023-10-26 22:35:38 -04:00
Jacob Young
98cd378208 x86_64: fix behavior of getValue
Old behavior renamed to `getValueIfFree`.
2023-10-26 21:45:58 -04:00
Jacob Young
5e83441096 x86_64: implement @divFloor and @mod for i128 2023-10-26 21:45:57 -04:00
Michael Dusan
da06269d70 std.target: bump some OS max versions
- freebsd, openbsd, macos, ios, watchos, tvos
2023-10-26 19:18:37 -04:00
Krzysztof Wolicki
a9e66ed730 Step.Options: @typeName gives a fully qualified name so the test needs to reflect that 2023-10-26 13:56:43 +03:00
Jakub Konka
cc394431ae
Merge pull request #17699 from ziglang/elf-better-alloc
elf: allocated PHDR table always immediately succeeding the EHDR
2023-10-25 23:25:56 +02:00
Jakub Konka
10ea7accf7
Merge pull request #17706 from ziglang/elf-error-tests
elf: test error generation
2023-10-25 23:20:12 +02:00
frmdstryr
5c5d1f93c4 Update comment on for_range in Ast
The rhs can be omitted eg `0..`
2023-10-25 14:09:34 -04:00
Jacob Young
868d592580 builtin: implement default_panic for plan9
Also disable default panic handler when not using elf.
2023-10-25 08:20:11 -04:00
Jakub Konka
bc081901dc Step.Compile: differentiate between fuzzy and exact matches for compile errors 2023-10-25 11:40:16 +02:00
Jacob Young
b55377a5ab x86_64: pass more tests
* 128-bit integer multiplication with overflow
 * more instruction encodings used by std inline asm
 * implement the `try_ptr` air instruction
 * follow correct stack frame abi
 * enable full panic handler
 * enable stack traces
2023-10-25 04:28:30 -04:00
frmdstryr
f30ab46306 Update comment on Tag value assign_mod in Ast.zig 2023-10-25 09:31:27 +03:00
Nameless
6c9d34bce7
std.Uri: prevent crash with strange authority section 2023-10-25 09:30:24 +03:00
Jakub Konka
89563f07e3 build: match and ignore /?/ in expected compile errors 2023-10-24 22:08:36 +02:00
mlugg
f2814caaf0
Sema: don't allow undef values through resolveDefinedValue in typeof block
This logic is not correct in most cases. If any instruction needs to
operate with different semantics within `@TypeOf`, it should be made to
do so explicitly.

This broke a line in `std.mem`: I have opted to fix this in std for now,
since as far as I know it's not yet been discussed which operations (if
any) should be special-cased like this within `@TypeOf`.
2023-10-24 14:28:34 +01:00
Jacob Young
8f69e977f1 x86_64: implement 128-bit builtins
* `@clz`
 * `@ctz`
 * `@popCount`
 * `@byteSwap`
 * `@bitReverse`
 * various encodings used by std
2023-10-23 22:42:18 -04:00
Jacob Young
fbe8c8938b x86_64: implement @mod for floating-point types 2023-10-23 22:42:18 -04:00
Jacob Young
fe93332ba2 x86_64: implement enough to pass unicode tests
* implement vector comparison
 * implement reduce for bool vectors
 * fix `@memcpy` bug
 * enable passing std tests
2023-10-23 22:42:18 -04:00
Eric Joldasov
6bf554f9a7 std.zig.system.NativeTargetInfo: fix glibc version parsing
In most cases "GLIBC_2.X" strings and `/lib/libc-2.x.so` files do not contain third (`patch`) field,
which causes std.SemanticVersion.parse function to return error. To fix this, we
reuse [now-public] std.zig.CrossTarget.parseVersion function,
which accounts for this third field and makes it 0 in case it was not found.
This new behaviour is similar to std.builtin.Version.parse, which was removed in
6e84f46990

Fixes regression from 6e84f46990
and https://github.com/ziglang/zig/pull/13998 .

Related: https://github.com/ziglang/zig/issues/17626 . Results with `zig end`:

Before: `"target": "x86_64-linux.6.5.7...6.5.7-gnu.2.19",`
After: `"target": "x86_64-linux.6.5.7...6.5.7-gnu.2.36",`

Also, while we are here, write explicit error sets and remove duplicate
logic from std.zig.system.darwin.macos.parseSystemVersion .

Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-10-23 06:00:53 -04:00
Andrew Kelley
b82459fa43
Merge pull request #17407 from truemedian/http-ng
std.http: more proxy support, buffer writes, tls toggle
2023-10-22 17:48:03 -04:00
Jacob Young
33483407a2 std: disable failing test 2023-10-22 16:02:33 -04:00
Jacob Young
27fe945a00 Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22 15:46:43 -04:00
Andrew Kelley
6f0198cadb Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing
changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727.

This caused a CI failure when it landed in master branch due to a
128-bit `@byteSwap` in std.mem.
2023-10-22 12:16:35 -07:00
Jan Philipp Hafer
fd2239bde9 child_process + Build: rename exec to run + all related code
Justification: exec, execv etc are unix concepts and portable version
should be called differently.

Do no touch non-Zig code. Adjust error names as well, if associated.
Closes #5853.
2023-10-22 14:47:20 -04:00
Andrew Kelley
d8c067966f
Merge pull request #17400 from joadnacer/ringbuffer-optim
std.RingBuffer: Implement mem.copy read/write
2023-10-22 13:19:22 -04:00
Jacob Young
ccc9ebf0bd std: slightly improve codegen of std.unicode.utf8ValidateSlice 2023-10-22 12:07:23 -04:00
Jacob Young
0c99ba1eab
Merge pull request #17637 from jacobly0/x86_64-test-std
x86_64: start to enable `test-std` and `test-compiler-rt` testing
2023-10-22 08:06:47 -04:00
Andrew Kelley
e354aac8f2
Merge pull request #14833 from QusaiHroub/optimize_std.fs.Dir.makeOpenPath_12474
#12474: std.fs.Dir.makeOpenPath: optimize case, if path already exists
2023-10-21 23:30:47 -04:00
Nameless
93e1f8c8e5
std.http.Client: documentaion fixes 2023-10-21 20:53:00 -05:00
Nameless
dd010e9e90
std.http.Client: ignore unknown proxies, fix basic proxy auth 2023-10-21 20:53:00 -05:00
Nameless
7dd3099519
std.http: fix crashes found via fuzzing 2023-10-21 20:52:59 -05:00
Nameless
363d0ee5e1
std.http: rename start->send and request->open to be more inline with operation 2023-10-21 20:52:59 -05:00
Nameless
544ed34d99
std.http.Server: improve documentation, do -> start
Response.do was renamed to Response.start to mimic the
naming scheme in http.Client
2023-10-21 20:52:59 -05:00
Nameless
d4cf8ea0b7
std.http.Client: improve documentation 2023-10-21 20:52:59 -05:00
Nameless
c523b5421b
std.http: make encoding fields non-null, store as enum variant 2023-10-21 20:52:59 -05:00
Nameless
16f89eab45
std.http.Client: make transfer-encoding priority over content-length as per spec 2023-10-21 20:52:59 -05:00
Nameless
e11a839760
std.http: use loadDefaultProxies in compiler 2023-10-21 20:52:58 -05:00
Nameless
0eef21d8ec
std.http.Client: add option to disable https
std_options.http_connection_pool_size removed in favor of

```
client.connection_pool.resize(client.allocator, size);
```

std_options.http_disable_tls will remove all https capability from
std.http when true. Any https request will error with
`error.TlsInitializationFailed`.

Solves #17051.
2023-10-21 20:52:58 -05:00
Nameless
e1c37f70d4
std.http.Client: store *Connection instead of a pool node, buffer writes 2023-10-21 20:52:58 -05:00
Nameless
1afeada2d9
std.http.Client: enhance proxy support
adds connectTunnel to form a HTTP CONNECT tunnel to the desired host.
Primarily implemented for proxies, but like connectUnix may be called by
any user.

adds loadDefaultProxies to load proxy information from common
environment variables (http_proxy, HTTP_PROXY, https_proxy, HTTPS_PROXY,
all_proxy, ALL_PROXY).
- no_proxy and NO_PROXY are currently unsupported.

splits proxy into http_proxy and https_proxy, adds headers field for
arbitrary headers to each proxy.
2023-10-21 20:52:58 -05:00
Andrew Kelley
5aa82ed477 std.elf: remove some unneeded @as 2023-10-21 21:38:41 -04:00
Lee Cannon
3cd3052d4d fix std.Build.addAssembly 2023-10-21 20:46:28 -04:00
JustinWayland
c45af2af61
Fix simple doc mistakes. (#17624)
* Add missing period in Stack's description

This looks fine in the source, but looks bad when seen on the documentation website.

* Correct documentation for attachSegfaultHandler()

The description for attachSegfaultHandler() looks pretty bad without indicating that the stuff at the end is code

* Added missing 'the's in Queue.put's documentation

* Fixed several errors in Stack's documentation

`push()` and `pop()` were not styled as code

There was no period after `pop()`, which looks bad on the documentation.

* Fix multiple problems in base64.zig

Both "invalid"s in Base64.decoder were not capitalized.

Missing period in documentation of Base64DecoderWithIgnore.calcSizeUpperBound.

* Fix capitalization typos in bit_set.zig

In DynamicBitSetUnmanaged.deinit's and DynamicBitSet.deinit's documentation, "deinitializes" was uncapitalized.

* Fix typos in fifo.zig's documentation

Added a previously missing period to the end of the first line of LinearFifo.writableSlice's documentation.
Added missing periods to both lines of LinearFifo.pump's documentation.

* Fix typos in fmt.bufPrint's documentation

The starts of both lines were not capitalized.

* Fix minor documentation problems in fs/file.zig

Missing periods in documentation for Permissions.setReadOnly, PermissionsWindows.setReadOnly, MetadataUnix.created, MetadataLinux.created, and MetadataWindows.created.

* Fix a glaring typo in enums.zig

* Correct errors in fs.zig

* Fixed documentation problems in hash_map.zig

The added empty line in verify_context's documentation is needed, otherwise autodoc for some reason assumes that the list hasn't been terminated and continues reading off the rest of the documentation as if it were part of the second list item.

* Added lines between consecutive URLs in http.zig

Makes the documentation conform closer to what was intended.

* Fix wrongfully ended sentence in Uri.zig

* Handle wrongly entered comma in valgrind.zig.

* Add missing periods in wasm.zig's documentation

* Fix odd spacing in event/loop.zig

* Add missing period in http/Headers.zig

* Added missing period in io/limited_reader.zig

This isn't in the documentation due to what I guess is a limitation of autodoc, but it's clearly supposed to be. If it was, it would look pretty bad.

* Correct documentation in math/big/int.zig

* Correct formatting in math/big/rational.zig

* Create an actual link to ZIGNOR's paper.

* Fixed grammatical issues in sort/block.zig

This will not show up in the documentation currently.

* Fix typo in hash_map.zig
2023-10-21 21:24:55 +00:00
joadnacer
a8eb70c9d7 compress: Improve RingBuffer usage 2023-10-21 19:20:12 +01:00
joadnacer
7f9e0f1c56 std.RingBuffer: Implement more efficient read/write methods 2023-10-21 19:19:35 +01:00
Michael Bradshaw
cc56577edf Return zero for NaN-to-int lossy casts
Fixes #15038.

The goal here is to guarantee lossyCast() is panic-free and always safe.
2023-10-21 20:51:51 +03:00
Jacob Young
32e85d44eb x86_64: disable failing tests, enable test-std testing 2023-10-21 10:55:41 -04:00