Commit Graph

17795 Commits

Author SHA1 Message Date
xeondev 2b48f559f4 std.Io: move netRead to become an Operation 2026-04-16 22:13:29 +02:00
Andrew Kelley bea4ea5ff8 Merge pull request 'zigc: long double: call double function if long double and double are equivalent' (#31775) from rpkak/zig:zigc-long-double into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31775
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-16 19:57:54 +02:00
Sam Connelly 17e0afd0e5 feat: init eZ80 arch via CBE 2026-04-16 19:21:16 +02:00
Matthew Lugg 84c2d809ec llvm: workaround crash on large inline memset
See https://codeberg.org/ziglang/zig/issues/31701 for details. I am not
re-enabling the disabled compiler-rt module tests here because they are
also affected by https://codeberg.org/ziglang/zig/issues/31702.
2026-04-16 17:00:04 +02:00
mlugg d0226ac301 Merge pull request 'incremental: fix tracking of nested container declarations (and of opaque types)' (#31889) from dont-track-children-if-lost-parent into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31889
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-16 09:50:26 +02:00
rpkak f564a7733c remove code, which is only reached if c_longdouble is only 16 or 32 bits big 2026-04-16 07:05:31 +02:00
Andrew Kelley 67a5b6e5e8 delete @cImport from the language
closes #20630
2026-04-15 17:43:53 -07:00
badayvedat a05a25e2bb zig libc: export fdiml and fdimf (#31759)
Exports `fdiml` and `fdimf` in zig libc and removes from from musl and mingw libc.

Contributes to: https://codeberg.org/ziglang/zig/issues/30978

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31759
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: badayvedat <badayvedat@gmail.com>
Co-committed-by: badayvedat <badayvedat@gmail.com>
2026-04-16 01:11:04 +02:00
Matthew Lugg 6608b65100 incremental: fix tracking of nested container declarations
...but not in the way you'd expect. We were actually tracking them in
cases where we shouldn't have been! We cannot track a declaration if its
parent namespace has been lost, because that will cause analysis
failures immediately, but if we excluded a type from the mapping due to
a major change (such as a struct turning into a union, or a field being
added), we were still including any trackable instructions inside the
container's field expressions (e.g. struct field type expressions). This
meant we were tracking a type declaration while losing tracking on its
parent namespace, with predictably disastrous results.

Oh, also, tracking for opaque types was just totally wrong (I think this
was a typo from a while back). We could map it to things other than
opaque declarations, and we never mapped declarations inside opaques.
So, uh, I fixed that too.
2026-04-16 00:00:44 +01:00
Matthew Lugg 794edc81d0 Zcu.PerThread: make debug logs less noisy
I often go through these logs when debugging issues with incremental
compilation, but the first thing I do is always comment out some of
these lines, because they're just way too noisy. I don't need to know
every time Sema checks that a unit is up-to-date, I only care when
things actually get analyzed! This decreases the size of
`--debug-log zcu` by an order of magnitude (or more) in most cases.
2026-04-16 00:00:44 +01:00
Andrew Kelley e00b5daa1f Merge pull request 'stage2-wasm: finish bigint support' (#31784) from pavelverigo/zig:wasm-bigint-finish into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31784
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-15 23:07:40 +02:00
Pavel Verigo c32f7a4513 stage2-wasm: support assembly 2026-04-15 22:57:41 +02:00
Alex Rønne Petersen 18964c0865 libcxx: disable all warnings 2026-04-15 02:13:26 +02:00
Alex Rønne Petersen 575e21c61a mingw: disable all warnings 2026-04-15 02:02:51 +02:00
Alex Rønne Petersen 9115aee6d7 glibc: disable all warnings 2026-04-15 02:02:37 +02:00
Alex Rønne Petersen ff21acc4ed libunwind: disable all warnings 2026-04-15 02:00:25 +02:00
David Gonzalez Martin 37a20d3984 Allow the user to override unexpected error trace
This is the only bit left in the standard library where stack trace writing
code is pulled to the binary even if the user doesn't want it
2026-04-13 19:58:01 +02:00
rpkak 778f8d557b add cimport file to zcu.alive_files 2026-04-13 13:17:58 +02:00
Andrew Kelley edfc4727e2 Merge pull request 'init objdump subcommand' (#31827) from objdump into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31827
2026-04-12 10:38:19 +02:00
Andrew Kelley 8da2f93bd0 Merge pull request 'update aro and translate-c to latest' (#31826) from aro-sync into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31826
2026-04-12 07:28:18 +02:00
David Rubin 06ab4f702e llvm: correctly bitcast for memset intrinsic path 2026-04-12 05:28:54 +02:00
Andrew Kelley 1809a19c27 add objdump subcommand
does nothing so far
2026-04-11 18:56:51 -07:00
Andrew Kelley 2322d45d80 Merge pull request 'Implement variadic functions for Win64 in the x86_64 backend' (#31672) from kcbanner/zig:win64_varargs into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31672
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-12 01:34:16 +02:00
Andrew Kelley c463bdb93d mingw: update to latest aro API 2026-04-11 16:14:14 -07:00
Andrew Kelley 29225ae11b Merge pull request 'x64_86 fix: RMI can accept imm16 only for imul r16,r/m16' (#31234) from mathk/zig:x64_86-misscompfix-rmi16 into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31234
Reviewed-by: jacobly <jacobly@noreply.codeberg.org>
2026-04-11 18:08:07 +02:00
Andrew Kelley cbe468a787 Merge pull request 'Sema: allow @round, @floor, @ceil, and @trunc to coerce to integer types' (#30906) from adria/zig:sema-rounding-casts into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30906
2026-04-11 16:44:41 +02:00
Alex Rønne Petersen d6f43caadf Merge pull request 'audit: handle process.Child.Term exhaustively and give useful exit information on process exit' (#31018) from murtaza/zig:child.term-audit into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31018
Reviewed-by: Alex Rønne Petersen <alex@alexrp.com>
2026-04-11 00:59:11 +02:00
Adrià Arrufat 4affe94d79 Sema: proper use of .int_from_float_optimized 2026-04-11 00:11:18 +02:00
glowsquid 8111d3d63c fix comptime @ptrcasting from a larger type to a smaller one (#31774)
closes #30180

Note from mlugg: this fix is very much a hack, but it definitely won't break anything and it demonstrably fixes one case, so I'm merging it for now with the expectation that I'll be replacing the broken code soon.

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31774
Reviewed-by: mlugg <mlugg@noreply.codeberg.org>
Co-authored-by: glowsquid <sachabarsayuracko@gmail.com>
Co-committed-by: glowsquid <sachabarsayuracko@gmail.com>
2026-04-10 23:31:21 +02:00
David 2c6e5006ed Sema: fix comptime @ptrCast to optional slices 2026-04-10 23:27:13 +02:00
Jacob Young 9ba9865e51 x86_64: allow positive signed imms to match unsigned imm patterns 2026-04-10 23:23:33 +02:00
Jacob Young 1552bc7ad0 x86_64: fix mir rmi signedness 2026-04-10 23:23:33 +02:00
Mathieu Suen 2c88821c56 x64_86 fix: RMI can accept imm16 only for imul r16,r/m16 2026-04-10 23:23:33 +02:00
Matthew Lugg 998b714708 Sema: push to error trace when returning from inline function
There is no reason `inline fn`s should not be subject to error tracing:
they are still functions! So, push to the error trace when we return
from one, and add a test checking that inline functions do appear in
error traces.

This also changes how we emit error trace pushes: we no longer duplicate
the AIR `ret` instruction in the "error" and "non-error" code paths. I
suspect this will lead to slightly better unoptimized codegen, but I may
be wrong---I'll take some performance measurements before I merge this.
2026-04-10 23:17:22 +02:00
Andrew Kelley c3a862522b std: remove managed array hash map variants
And deprecate all the API names except for:
* `std.array_hash_map.Auto`
* `std.array_hash_map.String`
* `std.array_hash_map.Custom`
2026-04-10 17:39:45 +02:00
Andrew Kelley 0606af509f translate-c build step: remove use_clang field
This no longer does anything.
2026-04-09 14:05:45 -07:00
David Rubin 36e2eaf2bd revert zig libc implementation of pow (#31794)
Partially reverts commit b5fbed986b.

Reverts commit 7aae7dd3f4.

Closes #31207

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31794
Co-authored-by: David Rubin <david@vortan.dev>
Co-committed-by: David Rubin <david@vortan.dev>
2026-04-09 17:38:17 +02:00
Pavel Verigo 773def30c2 stage2-wasm: fix bug in big endian limb64 + tiny fixes 2026-04-09 00:15:33 +02:00
Pavel Verigo ed9b0655f7 stage2-wasm: introduce __u?(div|mod)ei5, revert prev approach
Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
2026-04-09 00:14:09 +02:00
Pavel Verigo 07e3e50fd2 stage2-wasm: enabling bigint blocked tests + final fixes 2026-04-09 00:14:09 +02:00
Pavel Verigo f2a842db5c stage2-wasm: sat ops 2026-04-09 00:14:09 +02:00
Pavel Verigo aa7874657b stage2-wasm: bigint div mod rem 2026-04-09 00:14:09 +02:00
Pavel Verigo fff887874e stage2-wasm: @intFromFloat and @floatFromInt 2026-04-09 00:14:09 +02:00
Pavel Verigo df79ea941b stage2-wasm: bigint abs + test min/max 2026-04-09 00:14:09 +02:00
Pavel Verigo 0ebd270d90 stage2-wasm: bigint mulo 2026-04-09 00:14:08 +02:00
Pavel Verigo 58944586be stage2-wasm: bigint support bitops and intcast 2026-04-09 00:14:08 +02:00
pentuppup 6193470cee error on tuples in extern contexts 2026-04-08 15:22:48 +02:00
murtaza 4a1383d987 process.Child: use std.posix.SIG instead of u32 for Child.Term stopped field 2026-04-07 10:27:21 +02:00
murtaza 07b49c61ff audit: handle process.Child.Term exhaustively and give useful exit information 2026-04-07 10:27:01 +02:00
nektro e73257dec2 lib/std: BitSet,EnumSet: replace initEmpty/initFull with decl literals (#31469)
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31469
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: nektro <hello@nektro.net>
Co-committed-by: nektro <hello@nektro.net>
2026-04-05 05:12:13 +02:00