| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Moves a premature check that allowed pointers to mutable pointers to coerce
to any other pointer to a mutable pointer.
|
|
|
|
Resolves: https://github.com/ziglang/zig/issues/25581
|
|
|
|
This fixes an endless loop in the compiler.
|
|
|
|
This was forgotten during the refactoring of std.builtin.CallingConvention. It
mirrors mips64_n32 for MIPS.
|
|
|
|
|
|
progress towards #25312
|
|
tracked by #24061 - these should be re-enabled once that is solved.
|
|
|
|
The latest bugfix reverted this case to its old behavior (which is a
reasonable behavior to have).
|
|
This reverts commit ba4d4602ab9bb0dc17fc0d57141d9324bdbb356d.
|
|
It wasn't checking bit pointer data.
|
|
Matthew can revert this commit when he's ready to tackle the assertion
failure
|
|
|
|
point at the var not at the init expression
|
|
|
|
generic_function_returning_opaque_type.zig was salvaged as it's still worth
having.
|
|
backend=auto (now the default if backend is omitted) means to let the compiler
pick whatever backend it wants as the default. This is important for platforms
where we don't yet have a self-hosted backend, such as loongarch64.
Also purge a bunch of redundant target=native.
|
|
|
|
|
|
In the best case, this is redundant work, because we aren't actually
going to emit a working binary this update. In the worst case, it causes
bugs because the linker may not have *seen* the thing being exported due
to the compile errors.
Resolves: #24417
|
|
Co-authored-by: Matthew Lugg <mlugg@mlugg.co.uk>
|
|
Sema: Improve comptime arithmetic undef handling
|
|
|
|
|
|
|
|
|
|
|
|
This commit expands on the foundations laid by https://github.com/ziglang/zig/pull/23177
and moves even more `Sema`-only functionality from `Value`
to `Sema.arith`. Specifically all shift and bitwise operations,
`@truncate`, `@bitReverse` and `@byteSwap` have been moved and
adapted to the new rules around `undefined`.
Especially the comptime shift operations have been basically
rewritten, fixing many open issues in the process.
New rules applied to operators:
* `<<`, `@shlExact`, `@shlWithOverflow`, `>>`, `@shrExact`: compile error if any operand is undef
* `<<|`, `~`, `^`, `@truncate`, `@bitReverse`, `@byteSwap`: return undef if any operand is undef
* `&`, `|`: Return undef if both operands are undef, turn undef into actual `0xAA` bytes otherwise
Additionally this commit canonicalizes the representation of
aggregates with all-undefined members in the `InternPool` by
disallowing them and enforcing the usage of a single typed
`undef` value instead. This reduces the amount of edge cases
and fixes a bunch of bugs related to partially undefined vecs.
List of operations directly affected by this patch:
* `<<`, `<<|`, `@shlExact`, `@shlWithOverflow`
* `>>`, `@shrExact`
* `&`, `|`, `~`, `^` and their atomic rmw + reduce pendants
* `@truncate`, `@bitReverse`, `@byteSwap`
|
|
|
|
If both are used, 'else' handles named members and '_' handles
unnamed members. In this case the 'else' prong will be unrolled
to an explicit case containing all remaining named values.
|
|
Mainly affects ZIR representation of switch_block[_ref]
and special prong (detection) logic for switch.
Adds a new SpecialProng tag 'absorbing_under' that allows
specifying additional explicit tags in a '_' prong which
are respected when checking that every value is handled
during semantic analysis but are not transformed into AIR
and instead 'absorbed' by the '_' branch.
|
|
|
|
|
|
|
|
|
|
Part of #22353
Resolves: #24273
Co-Authored-By: Matthew Lugg <mlugg@mlugg.co.uk>
|
|
Sema: compile error on lossy int to float coercion
|
|
|
|
This change prevents adding or changing the sentinel in the type of a
many-item pointer via the slicing syntax `ptr[a.. :S]`.
|
|
Resolves: #21586
|
|
|
|
atomic fixes and clarification
|
|
|
|
also fix the struct test
|