| 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.
|
|
compiler: rewrite some legalizations, and remove a bunch of dead code
|
|
Resolves: https://github.com/ziglang/zig/issues/25581
|
|
I had tried unrolling the loops to avoid requiring the
`vector_store_elem` instruction, but it's arguably a problem to generate
O(N) code for an operation on `@Vector(N, T)`. In addition, that
lowering emitted a lot of `.aggregate_init` instructions, which is
itself a quite difficult operation to codegen.
This requires reintroducing runtime vector indexing internally. However,
I've put it in a couple of instructions which are intended only for use
by `Air.Legalize`, named `legalize_vec_elem_val` (like `array_elem_val`,
but for indexing a vector with a runtime-known index) and
`legalize_vec_store_elem` (like the old `vector_store_elem`
instruction). These are explicitly documented as *not* being emitted by
Sema, so need only be implemented by backends if they actually use an
`Air.Legalize.Feature` which emits them (otherwise they can be marked as
`unreachable`).
|
|
I started this diff trying to remove a little dead code from the C
backend, but ended up finding a bunch of dead code sprinkled all over
the place:
* `packed` handling in the C backend which was made dead by `Legalize`
* Representation of pointers to runtime-known vector indices
* Handling for the `vector_store_elem` AIR instruction (now removed)
* Old tuple handling from when they used the InternPool repr of structs
* Straightforward unused functions
* TODOs in the LLVM backend for features which Zig just does not support
|
|
beginnings of KVX target support (via CBE)
|
|
|
|
|
|
|
|
`std.Io.tty.Config.detect` may be an expensive check (e.g. involving
syscalls), and doing it every time we need to print isn't really
necessary; under normal usage, we can compute the value once and cache
it for the whole program's execution. Since anyone outputting to stderr
may reasonably want this information (in fact they are very likely to),
it makes sense to cache it and return it from `lockStderrWriter`. Call
sites who do not need it will experience no significant overhead, and
can just ignore the TTY config with a `const w, _` destructure.
|
|
|
|
`std.Target`: add tags and info for alpha, hppa, microblaze, sh + some bonus commits
|
|
This type has nothing to do with the language.
|
|
Only supported in CBE.
|
|
Only supported in CBE.
|
|
Supported by LLVM and CBE.
|
|
This was forgotten during the refactoring of std.builtin.CallingConvention. It
mirrors mips64_n32 for MIPS.
|
|
|
|
Renames arePointersLogical to shouldBlockPointerOps for clarity
adds capability check to allow pointer ops on .storage_buffer when
variable_pointers capability is enabled.
Fixes #25638
|
|
Only for use with the C backend at the moment.
|
|
|
|
This allows us to rule out support for certain address spaces based on the OS.
This commit is just a refactor, however, and doesn't actually make use of that
opportunity yet.
|
|
|
|
|
|
|
|
|
|
|
|
Far simpler, because everything which `crash_report.zig` did is now
handled pretty well by `std.debug` anyway. All we want is to print some
context around panics and segfaults. Using the new ability to override
the default segfault handler while still having std handle the
target-specific bits for us, that's really simple.
|
|
|
|
This iteration already has significantly better incremental support.
Closes #24110
|
|
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`.
|
|
It wasn't checking bit pointer data.
|
|
technically breaking, but I doubt anyone will notice.
|
|
|
|
|
|
like field_ptr_load, this now does byval operations when the lhs is
comptime-known.
|
|
avoids unnecessary copies
|
|
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.
|
|
point at the var not at the init expression
|
|
|
|
|
|
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.
|
|
closes #25172
|
|
|
|
and delete deprecated alias std.io
|