tison
ee47643b6e
std.math.big: fix sqrt with bits > limb_bits
...
Signed-off-by: tison <wander4096@gmail.com >
2023-11-08 08:39:08 +02:00
Andrew Kelley
77bc8e7b67
Merge pull request #17771 from ehaas/mingw-aro
...
mingw: Use aro instead of clang for preprocessing import libs
2023-11-07 14:47:05 -05:00
dweiller
81219586bc
sema: allow slicing [*]T without end
2023-11-07 17:01:32 +02:00
David Rubin
03abac3824
fix sqrt(0)
2023-11-07 14:37:43 +02:00
Matthew Lugg
b3462b7cec
Merge pull request #17692 from kcbanner/struct_field_init_pass
...
sema: analyze struct field bodies in a second pass, to allow them to use the layout of the struct itself
2023-11-07 07:44:32 +00:00
mlugg
d78eda34c5
Sema: emit @intCast safety check correctly for vectors
...
This code was previously tripping an assertion by not making this value
used in the safety check a vector.
2023-11-07 06:42:15 +00:00
mlugg
9b394a200a
Sema: allow destructuring vectors
...
This was intended to work when destructuring was first implemented, and
was just unintentionally missed out.
2023-11-07 06:11:01 +00:00
Jakub Konka
bf0387b6bb
Merge pull request #17873 from ziglang/elf-archive
...
elf: implement archiving input object files
2023-11-07 03:22:14 +01:00
kcbanner
1acb6a53d0
wasm: support rendering unions using their backing type if they have no defined tag type
2023-11-07 00:49:39 +00:00
kcbanner
35c86984a6
cbe: support rendering union values that have no defined tag type
...
This was regressed in d657b6c0e2 , when
the comptime memory model for unions was changed to allow them to have
no defined tag type.
2023-11-07 00:49:39 +00:00
kcbanner
f10499be0a
sema: analyze field init bodies in a second pass
...
This change allows struct field inits to use layout information
of their own struct without causing a circular dependency.
`semaStructFields` caches the ranges of the init bodies in the `StructType`
trailing data. The init bodies are then resolved by `resolveStructFieldInits`,
which is called before the inits are actually required.
Within the init bodies, the struct decl's instruction is repurposed to refer
to the field type itself. This is to allow us to easily rebuild the inst_map
mapping required for the init body instructions to refer to the field type.
Thanks to @mlugg for the guidance on this one!
2023-11-07 00:49:35 +00:00
Andrew Kelley
234693bcbb
tests: skip native CPU std tests on Windows
...
See tracking issue #17902
2023-11-06 16:03:04 -07:00
XXIV
5ea973dc39
langref: fix malloc return type
2023-11-06 23:46:17 +02:00
Jakub Konka
261db02018
CheckObject: support parsing and dumping archive symtab for ELF
2023-11-06 21:18:26 +01:00
Jacob Young
9ced27dace
x86_64: fix passing register-sized payload as non-reigster-sized union
...
Closes #17885
2023-11-06 14:11:31 -05:00
Bogdan Romanyuk
62e67a2b56
Sema: emit error when pointer to extern function is called
2023-11-06 15:26:28 +00:00
Jakub Konka
6490e2ed82
test/link/elf: improve test linking with static lib
2023-11-06 14:47:01 +01:00
Jakub Konka
1b69b0c621
elf: clearly separate updating and writing symtab from only ZigObject
2023-11-06 14:26:35 +01:00
Jakub Konka
281dabaa88
Compilation: unconditionally close open file handles for writable dance
2023-11-06 13:47:39 +01:00
Andrew Kelley
e74ced21b7
frontend: fix -fsingle-threaded default detection logic
...
The logic in 509be7cf1f assumed that
`use_llvm` meant that the LLVM backend would be used, however, use_llvm
is false when there are no zig files to compile, which is the case for
zig cc. This logic resulted in `-fsingle-threaded` which made libc++
fail to compile for C++ code that includes the threading abstractions
(such as LLVM).
2023-11-06 01:16:09 -05:00
Andrew Kelley
1b0b46a8a9
Merge pull request #17871 from jacobly0/x86_64
...
x86_64: get a compiler compiled with the x86_64 backend passing x86_64 backend tests
2023-11-05 18:45:21 -05:00
Andrew Kelley
702b809ea3
Merge pull request #17815 from Luukdegram/wasm-no-entry
...
wasm-linker: implement `-fno-entry` and correctly pass `--shared` and `--pie` when given
2023-11-05 18:44:12 -05:00
Igor Anić
bec36aa7c0
io_uring: add multishot accept operation
...
Server networking application typically accept multiple connections. Multishot
accept simplifies handling these situations. Applications submits once and
receives CQE whenever a new connection request comes in.
Multishot is active until it is canceled or experience error. While active, and
further notification are expected CQE completion will have IORING_CQE_F_MORE set
in the flags. If this flag isn't set, the application must re-arm this request
by submitting a new one.
Reference: [io_uring and networking in 2023](https://github.com/axboe/liburing/wiki/io_uring-and-networking-in-2023#multi-shot )
2023-11-06 00:12:39 +02:00
Jacob Young
0ea7189c23
behavior: enable test passing with x86_64 backend
2023-11-05 11:54:29 -05:00
Jacob Young
c2cda947c9
src: fix memory leaks
2023-11-05 11:54:29 -05:00
Jacob Young
7b9f8782c8
build: add option to specify whether to use the llvm backend
2023-11-05 09:30:28 -05:00
Jakub Konka
205f8214d8
test/link/elf: enable our ELF archiver
2023-11-05 13:42:26 +01:00
Jakub Konka
8142925c7e
elf: hook up saving object files in an archive
2023-11-05 13:37:13 +01:00
Jakub Konka
55fa8a04f1
elf: add hooks for archiving Objects
2023-11-05 12:56:17 +01:00
Jakub Konka
5c48236103
elf: init objects after parsing them
2023-11-05 12:37:15 +01:00
Jacob Young
8311fac7e8
x86_64: fix indirect return of f80
2023-11-05 06:09:06 -05:00
Jakub Konka
8d7ec05070
elf: actually save correct object names in the archive
2023-11-05 12:08:15 +01:00
Jacob Young
803ea10107
x86_64: fix tracking during br
2023-11-05 06:08:06 -05:00
Bogdan Romanyuk
e9a6197a8e
Sema: fix error notes with wrong extern type
2023-11-05 12:36:06 +02:00
Andrew Kelley
33644546a0
Sema: fix memory leak in zirTypeInfo
2023-11-05 04:48:34 -05:00
Andrew Kelley
dc63426b1e
Merge pull request #17866 from ziglang/reduce-inline-import
...
zig reduce: support inlining `@import` and more
2023-11-05 03:39:01 -05:00
Andrew Kelley
a9002156a0
zig reduce: add reduction for removing var decls
2023-11-04 20:27:15 -07:00
Andrew Kelley
c4dddcbadb
std.zig.render: ability to omit variable declarations
2023-11-04 20:26:39 -07:00
Andrew Kelley
e93d3a3cdb
zig reduce: don't try to remove discard statements
...
those are handled separately
2023-11-04 19:27:46 -07:00
Andrew Kelley
9e81222d92
zig reduce: some adjustments to make it go faster
...
* don't reset the rng. it seems like it was getting stuck trying the
same transforms over and over again.
* slide the window over after failing a large transform set, idea being
that transformations in the failed set are more likely to be
problematic.
2023-11-04 18:48:08 -07:00
Andrew Kelley
88acdb9aa6
zig reduce: delete statements from blocks
2023-11-04 18:06:11 -07:00
Andrew Kelley
212aa717d7
zig reduce: add transformation for removing container fields
2023-11-04 17:57:43 -07:00
Andrew Kelley
75efb736ce
zig reduce: run results through astgen
...
and use that to fix up usused variable declarations and parameters that
are caused by transformations.
also add a transformation to replace global variable init with
`undefined`.
2023-11-04 17:38:10 -07:00
Andrew Kelley
31ad3af956
std.zig.render: support fixing unused parameter
2023-11-04 17:37:34 -07:00
Andrew Kelley
fc1e7a5644
zig reduce: rename identifiers when inlining an @import
2023-11-04 15:48:28 -07:00
Andrew Kelley
802c82b072
std.ArrayHashMap: add init function
...
for when you have keys and values array
2023-11-04 15:46:30 -07:00
Andrew Kelley
8bd01d2d9b
zig reduce: add transformation for inlining file-based @import
...
One thing is missing for it to be useful, however, which is dealing with
ambiguous reference errors introduced by the inlining process.
2023-11-04 13:57:29 -07:00
Jakub Konka
f24ceec35a
Merge pull request #17844 from ziglang/elf-object
...
elf: handle emitting relocatables and static libraries - humble beginnings
2023-11-04 20:58:15 +01:00
Andrew Kelley
98dc28bbe2
Merge pull request #17852 from ziglang/zig-reduce
...
introduce `zig reduce` subcommand
2023-11-04 14:25:50 -04:00
Andrew Kelley
a7d8cd591c
Merge pull request #17788 from jacobly0/x86_64
...
x86_64: pass more tests
2023-11-04 14:24:59 -04:00