Andrew Kelley
d1820d2a3e
delete enough aro to make it compile
2025-09-24 20:01:18 -07:00
Andrew Kelley
f49a54745b
compiler: update aro and translate-c to latest; delete clang translate-c
2025-09-24 19:57:28 -07:00
Jacob Young
4a344de651
MappedFile: fix the insert range path not updating the root node
2025-09-24 16:09:46 -07:00
Jacob Young
94d319a10f
x86_64: support more in/out forms
...
Closes #25303
2025-09-24 16:09:14 -07:00
Jacob Young
561e556aaf
target: check for backend support for the new linker
...
Closes #25343
2025-09-24 16:08:26 -07:00
Alex Rønne Petersen
26825e9506
Merge pull request #25324 from alexrp/freebsd
...
Some changes to prepare for FreeBSD CI
2025-09-22 05:04:31 +02:00
alexrp
0700ec35bd
compiler: don't use self-hosted backend on any BSD yet
...
There are some blocking bugs in the self-hosted ELF linker.
2025-09-22 01:37:32 +02:00
Jacob Young
f58200e3f2
Elf2: create a new linker from scratch
...
This iteration already has significantly better incremental support.
Closes #24110
2025-09-21 14:09:14 -07:00
Frank Denis
bdc31c9561
aarch64/zonCast: don't return a pointer to a stack element
...
Elements are computed at comptime, so don't declare them as "var".
2025-09-21 05:01:41 -07:00
mlugg
20925f2957
Revert "frontend: another packedStructFieldPtrInfo fix"
...
This reverts commit dedccecda944f88a5278c12c24ffbea46126de63.
2025-09-20 18:33:01 -07:00
Jacob Young
5144f10ec9
aarch64: fix behavior failures
2025-09-20 18:33:01 -07:00
Jacob Young
60cdacaff2
x86_64: rewrite vector element pointer access
2025-09-20 18:33:01 -07:00
Andrew Kelley
5d8c1fb6ab
frontend: another packedStructFieldPtrInfo fix
...
it was calculating host integer size in a wrong way. just use integer
abi size
2025-09-20 18:33:01 -07:00
mlugg
2f9d8d5a9b
Zcu: fix analysis of type of decl with inferred type
...
If the `nav_ty` is resolved by the `nav_val`, then we need to also mark
the `nav_ty` as in progress when we begin resolving the `nav_val`.
2025-09-20 18:33:01 -07:00
Andrew Kelley
725dec6aa7
Sema: add missed logic to checkPtrAttributes
...
It wasn't checking bit pointer data.
2025-09-20 18:33:01 -07:00
Jacob Young
cbbb67c5df
x86_64: fix safety crashes in storeRegs
2025-09-20 18:33:01 -07:00
Andrew Kelley
0681bf06ab
frontend: packed struct field ptr no longer finds byte borders
...
technically breaking, but I doubt anyone will notice.
2025-09-20 18:33:01 -07:00
Andrew Kelley
c0bbddb007
Sema: avoid ptr_add/ptr_sub instructions void elem type
2025-09-20 18:33:00 -07:00
Andrew Kelley
7b8a7989ef
frontend: additionally handle C pointers in ptrOptPayload
2025-09-20 18:33:00 -07:00
Andrew Kelley
f0fe55a9bb
frontend: fix too strict assertion
...
field ptr can be based on C pointer
2025-09-20 18:33:00 -07:00
Jacob Young
f12c4f86fc
aarch64: implement ptr_slice_*_ptr
2025-09-20 18:33:00 -07:00
Andrew Kelley
9b74651cd2
Sema: fix YAGNI violation
2025-09-20 18:33:00 -07:00
Andrew Kelley
4fef90fa92
Sema: more conservative elem_ptr_load implementation
...
like field_ptr_load, this now does byval operations when the lhs is
comptime-known.
2025-09-20 18:33:00 -07:00
Andrew Kelley
9afa6835df
frontend: replace elem_val_node with elem_ptr_load
...
avoids unnecessary copies
2025-09-20 18:33:00 -07:00
Andrew Kelley
354c17869a
frontend: replace field_val and field_val_named
...
with field_ptr_load and field_ptr_named_load.
These avoid doing by-val load operations for structs that are
runtime-known while keeping the previous semantics for comptime-known
values.
2025-09-20 18:33:00 -07:00
Andrew Kelley
3bd62e1bb6
Sema: fix source location of "declared here" note
...
point at the var not at the init expression
2025-09-20 18:33:00 -07:00
Andrew Kelley
d00aee021b
x86 codegen: handle spilled tuples
2025-09-20 18:33:00 -07:00
Andrew Kelley
772793c004
Sema: fix accessing ptr field of double array pointer with sentinel
2025-09-20 18:33:00 -07:00
Andrew Kelley
426af68b7d
compiler: require comptime vector indexes
2025-09-20 18:33:00 -07:00
Andrew Kelley
14bda4130a
llvm backend: remove canElideLoad mechanism
2025-09-20 18:33:00 -07:00
Frank Denis
bc921fec12
Fix duplicate LC_RPATH entries on macOS Tahoe
...
When building on macOS Tahoe, binaries were getting duplicate LC_RPATH
load commands which caused dyld to refuse to run them with a
"duplicate LC_RPATH" error that has become a hard error.
The duplicates occurred when library directories were being added
to rpath_list twice:
- from lib_directories
- from native system paths detection which includes the same dirs
2025-09-19 16:39:00 +02:00
Frank Denis
19943f0f21
zig fmt help: mention that the argument can be a directory
...
I’ve been typing `zig fmt **/.zig` for a long time, until I discovered
that the argument can actually be a directory.
Mention this feature explicitly in the help message.
2025-09-18 22:15:57 +02:00
Silver
65a6bf1267
fix handling of comptime-only union fields in Type.getUnionLayout ( #25182 )
...
Fixes #25180
2025-09-17 21:39:47 -07:00
Jacob Young
09bc118c9f
Elf: implement linksection
...
Closes #24330
2025-09-17 21:16:23 -07:00
Andrew Kelley
8e9f2f02d2
Merge pull request #25201 from jacobly0/x86_64-addsat
...
x86_64: fix strictness edge cases in `+|`
2025-09-17 21:15:03 -07:00
mlugg
580b6d1fad
llvm: fix tagged union payload size in debug info
...
Resolves : #24415
2025-09-16 18:55:19 +01:00
mlugg
8744865425
frontend: fix reference tracking through coerced function bodies
...
This bug was manifesting for user as a nasty link error because they
were calling their application's main entry point as a coerced function,
which essentially broke reference tracking for the entire ZCU, causing
exported symbols to silently not get exported.
I've been a little unsure about how coerced functions should interact
with the unit graph before, but the solution is actually really obvious
now: they shouldn't! `Sema` is now responsible for unwrapping
possibly-coerced functions *before* queuing analysis or marking unit
references. This makes the reference graph optimal (there are no
redundant edges representing coerced versions of the same function) and
simplifies logic elsewhere at the expense of just a few lines in Sema.
2025-09-15 11:29:31 +01:00
Jacob Young
a2ba7dd1c2
x86_64: fix @splat typo
2025-09-10 23:14:10 -04:00
Jacob Young
e313b387a0
x86_64: delete usages of avx2 vpack?s??
...
This instruction actually has fairly useless semantics, and even the
cases that were semantically correct could save 1 cycle of latency by
using a different sequnce involving the avx version instead.
Closes #25174
2025-09-10 22:40:26 -04:00
Jacob Young
1a0a9d7d59
x86_64: fix strictness edge cases in +|
...
Closes #25145
2025-09-10 21:01:13 -04:00
Andrew Kelley
bfda12efcf
Merge pull request #24968 from ifreund/deque
...
std: add a Deque data structure
2025-09-10 14:28:13 -07:00
Andrew Kelley
877d6df8f7
fix linker code writing undefined memory to the output file
...
missing `extern` on a struct.
but also all these instances that call pwriteAll with a `@ptrCast` are
endianness bugs.
this should be changed to use File.Writer and call writeSliceEndian
instead.
this commit fixes one immediate problem but does not fix everything.
2025-09-08 18:23:01 -07:00
Andrew Kelley
6673b47685
frontend: vectors and arrays no longer support in-memory coercion
...
closes #25172
2025-09-07 17:29:36 -07:00
Andrew Kelley
426d65d700
Compilation: fix buildGlibcSharedObjects error handling
...
Oops, this was supposed to be only a temporary troubleshooting patch.
2025-09-06 19:32:27 -07:00
Andrew Kelley
52c6d7a929
Sema: forbid packed unions with mismatched field bit sizes
2025-09-05 18:45:24 -07:00
Alex Rønne Petersen
210b764c03
link.Elf: truncate st_other to u3 before converting to std.elf.STV
...
See 6b6e336e07308fd23f3061b5be11407956b2a460 for context, but note that in
gABI 4.3, 3 bits are reserved for the visibility, up from the previous 2.
2025-09-04 01:16:27 +02:00
Ryan Liptak
bc7955306e
Fix -M and --dep splitting on every = instead of just the first
...
Before this commit, -Mfoo=bar=baz would be incorrectly split into mod_name: `foo` and root_src_orig: `bar`
After this commit, -Mfoo=bar=baz will be correctly split into mod_name: `foo` and root_src_orig: `bar=baz`
Closes #25059
2025-08-31 19:32:07 -07:00
Andrew Kelley
150169f1e0
std.fmt: delete deprecated APIs
...
std.fmt.Formatter -> std.fmt.Alt
std.fmt.format -> std.Io.Writer.print
2025-08-31 12:49:18 -07:00
Alex Rønne Petersen
ab99dd9c5d
zig_clang: fix ZigClangAPValueLValueBase struct layout to match Clang 21
...
Fixes the compiler build for various targets, especially 32-bit.
2025-08-31 20:18:57 +02:00
Andrew Kelley
b7104231af
Merge pull request #25077 from ziglang/GenericReader
...
std.Io: delete GenericReader, AnyReader, FixedBufferStream; and related API breakage
2025-08-30 12:43:52 -07:00