6994 Commits

Author SHA1 Message Date
David CARLIER
e8f76b452b std.c: adding freebsd's domainset api 2023-05-09 14:24:03 +03:00
David Carlier
1585ed637d std.c: openbsd sigcontext/ucontext for arm64. 2023-05-09 14:23:46 +03:00
David CARLIER
3dd0afe787 std.c: adding freebsd's kinfo_proc type. 2023-05-09 12:04:53 +03:00
Jacob Young
0bd92da0e2 target: fix typos in x86 feature descriptions 2023-05-08 07:36:20 -04:00
Jayden
b18b4db709
parse_float: Error when a float is attempted to be parsed into an invalid type
Co-authored-by: Ryan Liptak <squeek502@hotmail.com>
2023-05-08 10:42:24 +00:00
Dominic
5a3eca5d4c
Disallow named test decls with duplicate names 2023-05-08 10:59:06 +03:00
Jacob Young
bac3a28214 fmt: avoid canonicalizing enum fields named @"_" to _
This can be used to escape the usual meaning of `_` to indicate a
non-exhaustive enum and create an enum tag that is a literal underscore,
so zig fmt should allow this syntax.

Before, zig fmt changes

    const E = enum { @"_" };

to the semantically different

    const E = enum { _ };

After, it remains the same.
2023-05-08 10:58:31 +03:00
David CARLIER
ff59c45840 std.c: darwin add host_info based data. 2023-05-07 17:05:03 +03:00
Dominic
e1f5ad3cc8
Fix parsing of hexadecimal literals 2023-05-07 08:05:53 +00:00
Jakub Konka
49c1384bac elf: fix typo in def of SHT_LLVM_ADDRSIG 2023-05-07 09:09:19 +02:00
Jakub Konka
66ff7d9161 elf: add more missing defs for SHT_* and SHF_* 2023-05-07 09:05:18 +02:00
David CARLIER
4bfd37ddb4 std.c: adding cpu affinity api for macOs (mainly x86_64) 2023-05-06 00:55:20 +03:00
Veikka Tuominen
a111130977
Merge pull request #15317 from devnexen/darwin_rand_nativegen
std: add CCRandomGenerateBytes macOs native api.
2023-05-05 19:52:05 +03:00
David CARLIER
012f9a97eb std.c: add os_proc_available_memory for darwin 2023-05-04 10:13:11 +03:00
Veikka Tuominen
3f3b1a6808 std.Build: use Step.* instead of *Step
Follow up to 13eb7251d37759bd47403db304c6120c706fe353
2023-05-03 20:55:29 -07:00
Jonathan Marler
5def162391 fix bug and simplify std.crypto.tls.Client.limitVecs 2023-05-03 20:52:18 -07:00
Carl Åstholm
8d6336420b std.log.defaultLog: remove freestanding compile error 2023-05-03 11:19:37 +03:00
Nicolas Sterchele
13eb7251d3 build: rename std.Build.*Step to std.Build.Step.*
Follow-up actions from #14647

Fixes #14947
2023-05-03 08:39:24 +03:00
Tw
855493bb8b bpf: correct return type of ringbuf_output helper
Signed-off-by: Tw <weii.tan>
2023-05-03 08:37:40 +03:00
David CARLIER
b9841750f9 std.c: adding freebsd's CPU_COUNT macro portage. 2023-05-03 08:19:46 +03:00
DraagrenKirneh
e9cbdb2cfd Add a random generated prefix to the unix socket_path to guard against multiple tests/threads running the same test at the same time 2023-05-02 23:31:29 +03:00
Jacob Young
10a4c2269d x86_64: enable normal start/test_runner logic on more targets 2023-05-01 19:22:52 -04:00
jcalabro
2892347440 Fix PBKDF2 docstring comment 2023-05-01 22:14:51 +03:00
Mason Remaley
e963793e37
Updates std.meta.intToEnum to support non-exhaustive enums (#15491)
This was preventing `std.json` from deserializing non-exhaustive enums.
2023-05-01 05:03:46 +00:00
David CARLIER
6ae19fa48d std.c: add essential freebsd's capsicum api subset. 2023-04-30 19:44:10 -07:00
Linus Groh
94e30a756e std: fix a bunch of typos
The majority of these are in comments, some in doc comments which might
affect the generated documentation, and a few in parameter names -
nothing that should be breaking, however.
2023-04-30 18:16:04 -07:00
dweiller
1b432072b5 std.Build: detect and disallow top-level step name clashes 2023-04-30 16:34:34 -07:00
David CARLIER
3fb93fc8f2 std.c: freebsd add procctl exclusive x86_64 flags 2023-04-30 12:28:36 +03:00
David CARLIER
4f248e1b51 std.c:complete further more netbsd's mmap flags 2023-04-30 12:21:35 +03:00
Andrew Kelley
c83ab7cc6a
Merge pull request #15503 from r00ster91/noinline
Sema: emit error for always_inline call of noinline function
2023-04-29 11:13:51 -07:00
David CARLIER
05f9608115 std.c: add mincore api to darwin. 2023-04-29 14:25:37 +03:00
r00ster91
0c9c9117ba std.builtin.CallModifier: add missing word 2023-04-29 03:35:37 +02:00
Andrew Kelley
e3bb06a984 std.Build.RunStep: show test name on process termination
This is a small change to help when reading failure logs which makes the
"exited with code 1" and similar message include the test name.

Further enhancements could do the following:
 * even if one unit test crashes the process, the parent process
   continues running the other unit tests
 * ability to test for expected panics (#1356)
 * timeouts on individual tests
2023-04-28 13:29:39 -07:00
Andrew Kelley
624c3069b4 std.os.windows: fix overlapping copy 2023-04-28 13:24:43 -07:00
Andrew Kelley
0794e48b91 update a couple more callsites to @memset 2023-04-28 13:24:43 -07:00
Andrew Kelley
125221cce9 std: update to use @memcpy directly 2023-04-28 13:24:43 -07:00
Andrew Kelley
6261c13731 update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
Andrew Kelley
57ea6207d3 std.ArrayList: mark the appendNTimes methods inline
The previous commit introduced an optimization to the LLVM backend that
makes `@memset` lower more optimally when the element is comptime-known
and has a repeating byte pattern.

By making these functions inline, if the element parameter is
comptime-known at the callsite, it will be comptime-known in the
`@memset` call, causing more use of the LLVM `memset` intrinsic rather
than an inline for loop when using the LLVM backend.

This affects, for example, std.crypto.argon2, which calls
appendNTimesAssumeCapacity with a `[128]u64` as the element. This is now
lowered with a single `memset` call.
2023-04-28 13:24:43 -07:00
Jacob Young
8c52c6ec6c std: prevent the possibility of deadlocks in some threaded tests 2023-04-27 08:24:32 -07:00
朕与将军解战袍
363269a2a9
fix incorrect struct definition 2023-04-27 11:10:38 +03:00
xEgoist
1a455b2dd8 test: Fix windows_spawn tmp directory cleanup
On Windows, a directory that's set as the current working directory is
not allowed to be removed. This can cause error on `deleteTree` if the
CWD is set to the file to be removed and will cause `error.FileBusy`.
However, due to `tmp.cleanup()` ignoring the errors, the folder removal error will
be ignored. The only test violating this is `windows_spawn`. As a
solution, setting the parent directory to be the CWD before deletion
will allow the cleanup to pass.
2023-04-27 11:01:02 +03:00
Andrew Kelley
396bd51c48 enable debugging infrastructure when using C backend
Thanks to @jacobly0's recent enhancements to the C backend, this stuff
works now.
2023-04-26 20:56:21 -07:00
Meghan
66da64d77c
std.http: fix name of Status field to better match RFC name (#15455)
.header_fields_too_large -> .request_header_fields_too_large
2023-04-26 14:02:55 -04:00
Andrew Kelley
3c66850e42
Merge pull request #15278 from ziglang/memcpy-memset
change semantics of `@memcpy` and `@memset`
2023-04-26 10:01:54 -07:00
Nameless
7285eedcd2 std.http: do -> wait, fix redirects 2023-04-26 00:02:55 -07:00
Janne Hellsten
61236c2aa1
std: @Vector support for std.json.parse 2023-04-26 00:52:17 +03:00
Andrew Kelley
401b7f6f53 zig fmt 2023-04-25 11:23:41 -07:00
Andrew Kelley
792bbfa301 Sema: fix memcpy alias safety incorrect math
Previously it was not multiplying by the element ABI size. Now, it uses
ptr_add instructions which do math based on the element type.
2023-04-25 11:23:41 -07:00
Andrew Kelley
1ba72bcf9a update test cases for new memcpy/memset semantics 2023-04-25 11:23:41 -07:00
Andrew Kelley
58fabbc903 x86_64 backend: support @memset with slices 2023-04-25 11:23:41 -07:00