Andrew Kelley
7161ed79c4
Merge pull request #17824 from kcbanner/fixup_msvc_fmax
...
cbe: add a system for avoiding collisions with C compiler intrinsics
2024-01-01 15:36:16 -08:00
Jacob Young
d312665803
Sema: ensure slice_ptr produces the correct type
...
Closes #18345
2023-12-23 02:08:58 -05:00
Stefan Su
42ddf592dd
use casted_rhs instead of rhs so icmp works correctly for airShlSat
2023-12-22 14:51:41 +00:00
Meghan Denny
cbf2b1fea4
test: add coverage for index into comptime-known vector is comptime-known
2023-12-22 04:44:15 +02:00
Jacob Young
c70c333594
x86_64: fix packed struct field reuse
2023-12-04 13:31:54 -05:00
Jacob Young
bdb6546a8f
x86_64: fix vector comparisions
2023-12-04 13:09:13 -05:00
Jacob Young
50993a8f08
x86_64: implement more operations on vectors with 1-bit elements
2023-12-04 01:29:07 -05:00
Jacob Young
485e20884c
x86_64: implement movement for pointer vectors
2023-12-03 23:07:50 -05:00
Jacob Young
7c85ea65ba
x86_64: "implement" aggregate_init for vectors
2023-12-03 13:55:31 -05:00
Jacob Young
e00f1397e3
x86_64: implement some todos
2023-12-03 10:24:03 -05:00
Jacob Young
014833b61f
x86_64: implement more compliant vectors
2023-12-03 10:22:06 -05:00
Jacob Young
917b4ad5e0
x86_64: implement more atomic ops
2023-12-03 10:22:06 -05:00
Jacob Young
bf5ab54510
test: test with -fstrip and fix failures
...
Closes #17513
2023-12-01 04:34:50 +00:00
David Rubin
1e42a3de89
Remove all usages of std.mem.copy and remove std.mem.set ( #18143 )
2023-11-29 16:03:02 -05:00
Bogdan Romanyuk
7fbbeae617
value: handle lazy_align and lazy_size in writeToPackedMemory
2023-11-27 12:35:29 +00:00
Bogdan Romanyuk
bece97ef24
Sema: ensure tuple fields is resolved and fix internal out-of-bounds access
2023-11-25 14:05:51 +00:00
Tw
2fefc0b5c7
Zir: add missing extra index for linksection_or_addspace
...
Closes #18052
Closes #18104
Signed-off-by: Tw <tw19881113@gmail.com>
2023-11-25 11:39:37 +00:00
Robin Voetter
28e1d82857
spirv: disable failing tests
2023-11-24 01:11:12 +01:00
Andrew Kelley
d5e21a4f1a
std: remove meta.trait
...
In general, I don't like the idea of std.meta.trait, and so I am
providing some guidance by deleting the entire namespace from the
standard library and compiler codebase.
My main criticism is that it's overcomplicated machinery that bloats
compile times and is ultimately unnecessary given the existence of Zig's
strong type system and reference traces.
Users who want this can create a third party package that provides this
functionality.
closes #18051
2023-11-22 13:24:27 -05:00
Andrew Kelley
54d196bb30
Merge pull request #18057 from Vexu/fixes
...
Fix bad error location on field init with field access
2023-11-21 15:12:03 -05:00
Garrett
40b8c993f5
translate-c: skip blank macros when translating defines
2023-11-21 13:54:46 +00:00
Veikka Tuominen
d63298da65
InternPool: handle funcZirBodyInst for func_coerced
...
Closes #18039
2023-11-21 13:59:14 +02:00
mlugg
9cf6c1ad11
behavior: work around LLVM bug
...
See #18034
2023-11-19 11:11:50 +00:00
mlugg
3c585730f2
AstGen: preserve result type in comptime block
2023-11-19 11:11:50 +00:00
mlugg
9c16b2370d
test: update behavior to silence 'var is never mutated' errors
2023-11-19 09:57:03 +00:00
David
673a1efa22
Sema: include sentinel in type of pointer-to-array ptr field
...
Resolves : #18007
2023-11-16 16:08:30 +00:00
kcbanner
3fc6a2f113
sema: pass sema through if available for the array_type case in bitSizeAdvanced
2023-11-11 13:11:51 +00:00
Jacob Young
89cac88e91
behavior: add testing for LLVM SROA bugs
2023-11-10 18:04:09 -05:00
mlugg
997eaf6d87
Sema: do not force resolution of struct field inits when calling function pointer field
...
b3462b7 caused a regression in a third-party project, since it forced
resolution of field initializers for any field call 'foo.bar()', despite
this only being necessary when 'bar' is a comptime field.
See https://github.com/ziglang/zig/pull/17692#issuecomment-1802096734 .
2023-11-08 23:47:10 -07:00
dweiller
81219586bc
sema: allow slicing [*]T without end
2023-11-07 17:01:32 +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
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
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
kcbanner
50e2fb8fd0
cbe: fixup __asm style exports, re-enable 12680 on macos now that alias isn't used
2023-11-05 23:36:11 -05:00
Jacob Young
0ea7189c23
behavior: enable test passing with x86_64 backend
2023-11-05 11:54:29 -05:00
Jacob Young
509be7cf1f
x86_64: fix std test failures
2023-11-03 23:18:21 -04:00
Luuk de Gram
db1825e931
wasm: re-enable regressed tests
2023-11-01 19:47:15 +01:00
Andrew Kelley
3fc6fc6812
std.builtin.Endian: make the tags lower case
...
Let's take this breaking change opportunity to fix the style of this
enum.
2023-10-31 21:37:35 -04:00
Jacob Young
d890e81761
mem: fix ub in writeInt
...
Use inline to vastly simplify the exposed API. This allows a
comptime-known endian parameter to be propogated, making extra functions
for a specific endianness completely unnecessary.
2023-10-31 21:37:35 -04:00
Jacob Young
50cdb65784
Sema: fix incorrect error comptime-mutating empty array
2023-10-31 21:37:35 -04:00
kcbanner
fb523c6283
sema: when guessing union alignment, save the result and check if the guess was correct
2023-10-31 01:35:58 +00:00
Jakub Konka
10d03acdb5
Merge pull request #17773 from ziglang/elf-exports
...
link: implement exporting anon decls
2023-10-30 17:29:05 +01:00
DilithiumNitrate
91e117697a
Fix hasRuntimeBitsAdvanced lazy case for pointers and optionals
...
As suggested by mlugg, always returns `error.NeedLazy`. If this has a
performance impact, it could be replaced by adding lazy handling to
`comptimeOnlyAdvanced`.
2023-10-29 21:12:43 +00:00
Jakub Konka
71dfea1f17
coff: implement exporting anon decls
2023-10-29 18:55:58 +01:00
Jakub Konka
a7a95ce9c4
macho: implement exporting anon decls
2023-10-29 18:55:58 +01:00
Jakub Konka
eaca72534c
elf: implement exporting anon decls
2023-10-29 18:55:58 +01:00
Jakub Konka
209fd8cb93
elf: add partial implementation of exporting anon decls
2023-10-29 18:55:58 +01:00
Jacob Young
f6f2708d82
x86_64: fix compiler rt test failures
2023-10-29 07:20:36 -04:00