r00ster91
7e3591bedd
std.json.parseInternal: use switches instead of ifs
2023-03-08 19:25:53 +01:00
John Schmidt
ecc0108cea
astgen: fill result location with void value if no other value
...
With this change, `break` and `break :blk` will fill the result location
with `.void_value`, ensuring that the value will be type checked.
The same will happen for a for loop that contains no `break`s in it's body.
Closes https://github.com/ziglang/zig/issues/14686 .
2023-03-08 16:35:53 +02:00
Frank Denis
fea14c78d1
wasm-linker: emit build_id section ( #14820 )
...
The Build ID is a value that uniquely identifies a build.
It is intended to capture the "meaning" or inputs of the build,
and is usually associated with debug info.
Reference: https://github.com/WebAssembly/tool-conventions/blob/main/BuildId.md
2023-03-08 13:50:06 +00:00
Jacob Young
e3cf9d1650
Module: rewrite zir caching logic
...
Multiple processes can sit waiting for the exclusive lock at the same
time, so we want to recheck whether it needs to be updated whenever
we get an exclusive lock.
This also fixes a race condition between one process truncating the
cache file and another process reading it without atomic locking.
2023-03-08 00:00:52 -05:00
Andrew Kelley
6fc1621cbd
Merge pull request #14828 from jacobly0/fix-big-div
...
compiler_rt: fix rare case in udivei4
2023-03-07 19:32:32 -05:00
Gaëtan
bbba701a41
std.os.windows.advapi32: Add RegCloseKey
2023-03-07 18:14:37 -05:00
Frank Denis
8da6b393fb
std.fmt: add bytesToHex() to encode bytes as hex digits
...
We already had `hexToBytes()`, but not the reverse operation
(at least not without using formatters).
2023-03-07 17:45:31 -05:00
Jacob Young
e33dfc300e
zig.h: implement zig_breakpoint and zig_trap for more targets
2023-03-07 12:46:35 -05:00
Frank Denis
36d47dd199
std.crypto.hash.sha3: add TurboSHAKE ( #14824 )
2023-03-07 10:04:45 +01:00
Jacob Young
77d06012c2
CBE: implement unsigned big int div and mod
2023-03-07 03:03:35 -05:00
Jacob Young
c1d16a2b80
compiler_rt: fix rare case in udivei4
...
Unsigned integers are never less than zero, and so zig
helpfully deleted the entire case. :D
Closes #14816
2023-03-07 03:00:08 -05:00
r00ster91
6218e40046
Zir: fix outdated comment
2023-03-06 18:18:52 -05:00
r00ster91
70cbe5ac7c
AstGen: remove unnecessary pubs
...
I think it helps when you know that something is entirely
self-contained, which AstGen is. The only function public is `generate`.
2023-03-06 18:18:52 -05:00
Eric Milliken
ccf00ccdf7
crypto.25519.field: de-inline mul for small builds ( #14775 )
2023-03-06 17:28:11 -05:00
jim price
6ab04b5941
std.os: Allow write functions to return INVAL errors
...
In Linux when interacting with the virtual file system when writing
in invalid value to a file the OS will return errno 22 (INVAL).
Instead of triggering an unreachable, this change now returns a
newly introduced error.InvalidArgument.
2023-03-06 15:59:18 -05:00
Jacob Young
2770159606
std: reenable vectorized code with the C backend
2023-03-06 08:09:32 -05:00
Jacob Young
c29c4c6f70
tools: add lldb pretty printer for std.MultiArrayList.Slice
2023-03-06 05:58:46 -05:00
Andrew Kelley
ac1b0e832b
Merge pull request #14799 from ziglang/update-zig1
...
`@trap` fixups
2023-03-06 01:29:56 -05:00
Andrew Kelley
8558983c86
std.os.abort: take advantage of @trap
2023-03-05 17:29:28 -07:00
Andrew Kelley
cdb9cc8f6b
update zig1.wasm
2023-03-05 17:29:28 -07:00
Andrew Kelley
c839c180ef
stage2: add zig_backend to ZIR cache namespace
2023-03-05 17:23:09 -07:00
Andrew Kelley
48e72960a4
llvm: fix lowering of @trap
...
It needed an unreachable instruction after it.
2023-03-05 17:23:09 -07:00
Andrew Kelley
fb04ff45cd
langref: small clarification to @trap
2023-03-05 17:11:46 -07:00
Andrew Kelley
34a23db664
zig.h: lower trap to SIGTRAP instead of SIGILL
2023-03-05 17:11:46 -07:00
Andrew Kelley
2641feb9b9
Merge pull request #14789 from jacobly0/ditype
...
llvm: fix use after free with pointers to optional slices
2023-03-05 16:32:51 -05:00
r00ster91
f1ae688d37
AstGen: ensure certain builtin functions return void
...
Fixes #14779
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2023-03-05 23:01:17 +02:00
jiacai2050
29c56a8aa7
fix package redeclaration when cache is not found
2023-03-05 14:59:34 -05:00
Andrew Kelley
7b01af2bfd
Merge pull request #14745 from jacobly0/bigint
...
CBE: add support for integers larger than 128 bits (and apparently vectors too)
2023-03-05 14:48:06 -05:00
jim price
a63134a4a5
std.os: Add DeviceBusy as a possible write error
...
In Linux when writing to various files in the virtual file system,
for example /sys/fs/cgroup, if you write an invalid value to a file
you'll get errno 16.
This change allows for these specific cases to be caught instead of
being lumped together in UnexpectedError.
2023-03-05 17:56:44 +02:00
Jacob Young
1efd36cd5c
CBE: fix reduce of emulated integers
2023-03-05 06:32:55 -05:00
Jacob Young
8ea1c1932e
behavior: disable failing tests
2023-03-05 04:25:04 -05:00
Jacob Young
7352d461cf
behavior: fix comptime issue and disable failing test
2023-03-05 03:34:57 -05:00
Jacob Young
33fa25ba44
CBE: ensure uniqueness of more internal identifiers
2023-03-05 02:59:02 -05:00
Jacob Young
0b0298aff2
CBE: implement select and shuffle
2023-03-05 02:59:02 -05:00
Jacob Young
aac4707902
CBE: implement splat
2023-03-05 02:59:02 -05:00
Jacob Young
ba69ee488b
CBE: implement vector truncate
2023-03-05 02:59:02 -05:00
Jacob Young
8f6da78fb1
CBE: implement vector element pointers
2023-03-05 02:59:02 -05:00
Jacob Young
c478c7609e
CBE: implement vector operations
...
Also, bigint add and sub which is all I was actually trying to do.
2023-03-05 02:59:02 -05:00
Jacob Young
b2e9c0d0ff
Sema: fix cmp_vector type
2023-03-05 02:59:02 -05:00
Jacob Young
9e3a5ecd39
CBE: fix behavior test failures on msvc
2023-03-05 02:59:02 -05:00
Jacob Young
e96a0fd0a1
CBE: "compute" max int alignment the lazy way
2023-03-05 02:59:01 -05:00
Jacob Young
93d696e84e
CBE: implement some big integer and vector unary operations
2023-03-05 02:59:01 -05:00
Jacob Young
a8f4ac2b94
CBE: implement big integer and vector comparisons
2023-03-05 02:59:01 -05:00
Jacob Young
874ae81f1b
CBE: implement big integer literals
2023-03-05 02:59:01 -05:00
Andrew Kelley
e7f128c205
Merge pull request #14782 from r00ster91/trap
...
add `@trap` builtin
2023-03-04 16:20:31 -05:00
tranquillity-codes
c9d990d790
fix doc Build Mode
2023-03-04 23:13:15 +02:00
Andrew Kelley
16302578d5
add behavior test case for previous commit
2023-03-04 14:04:58 -07:00
r00ster91
010596c930
AstGen: compile-error on primitive value export
...
Fixes #14778
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2023-03-04 22:52:57 +02:00
Jacob Young
2cf27c5718
llvm: fix incorrectly annotated DIType
...
Closes #14715
Closes #14783
2023-03-04 13:52:47 -07:00
r00ster91
4eb3f50fcf
Wasm @breakpoint: emit unreachable
...
This should improve the developer debugging experience.
2023-03-04 12:08:23 +01:00