aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
AgeCommit message (Collapse)Author
2025-10-30std.debug.lockStderrWriter: also return ttyconfMatthew Lugg
`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.
2025-10-27feat: init x86_16 arch via CBEGasInfinity
2025-10-23Merge pull request #25640 from alexrp/std-target-more-archesAlex Rønne Petersen
`std.Target`: add tags and info for alpha, hppa, microblaze, sh + some bonus commits
2025-10-23std.builtin: move AddressSpace.Context to std.Target.AddressSpaceContextAlex Rønne Petersen
This type has nothing to do with the language.
2025-10-23std.builtin: add CallingConvention.sh_interruptAlex Rønne Petersen
Only supported in CBE.
2025-10-23std.builtin: add CallingConvention.microblaze_interruptAlex Rønne Petersen
Only supported in CBE.
2025-10-23std.builtin: add CallingConvention.msp430_interruptAlex Rønne Petersen
Supported by LLVM and CBE.
2025-10-23std.builtin: add CallingConvention.x86_64_x32Alex Rønne Petersen
This was forgotten during the refactoring of std.builtin.CallingConvention. It mirrors mips64_n32 for MIPS.
2025-10-23std.Target: add tags and info for alpha, hppa, microblaze, shAlex Rønne Petersen
2025-10-23spir-v: Fix .storage_buffer pointer indexingjonascloud
Renames arePointersLogical to shouldBlockPointerOps for clarity adds capability check to allow pointer ops on .storage_buffer when variable_pointers capability is enabled. Fixes #25638
2025-10-19compiler: add support for arc_interrupt calling conventionAlex Rønne Petersen
Only for use with the C backend at the moment.
2025-10-18Sema: or1k_sysv calling convention supports varargsAlex Rønne Petersen
2025-10-18std.Target: move Cpu.supportsAddressSpace() up to hereAlex Rønne Petersen
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.
2025-10-16detect invalid `@bitCast` with arraysxdBronch
2025-10-08don't make OPV tuple fields `comptime`xdBronch
2025-10-07don't make anonymous tuple fields referencing `comptime var`s `comptime`xdBronch
2025-10-07detect references to `comptime var` in default values and sentinelsxdBronch
2025-10-06don't pass zero-length `@memset` to the backendxdBronch
2025-09-30compiler: better crash handlermlugg
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.
2025-09-24Compilation: re-implement cImportAndrew Kelley
2025-09-21Elf2: create a new linker from scratchJacob Young
This iteration already has significantly better incremental support. Closes #24110
2025-09-20Zcu: fix analysis of type of decl with inferred typemlugg
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-20Sema: add missed logic to checkPtrAttributesAndrew Kelley
It wasn't checking bit pointer data.
2025-09-20frontend: packed struct field ptr no longer finds byte bordersAndrew Kelley
technically breaking, but I doubt anyone will notice.
2025-09-20Sema: avoid ptr_add/ptr_sub instructions void elem typeAndrew Kelley
2025-09-20Sema: fix YAGNI violationAndrew Kelley
2025-09-20Sema: more conservative elem_ptr_load implementationAndrew Kelley
like field_ptr_load, this now does byval operations when the lhs is comptime-known.
2025-09-20frontend: replace elem_val_node with elem_ptr_loadAndrew Kelley
avoids unnecessary copies
2025-09-20frontend: replace field_val and field_val_namedAndrew Kelley
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-20Sema: fix source location of "declared here" noteAndrew Kelley
point at the var not at the init expression
2025-09-20Sema: fix accessing ptr field of double array pointer with sentinelAndrew Kelley
2025-09-20compiler: require comptime vector indexesAndrew Kelley
2025-09-15frontend: fix reference tracking through coerced function bodiesmlugg
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-07frontend: vectors and arrays no longer support in-memory coercionAndrew Kelley
closes #25172
2025-09-05Sema: forbid packed unions with mismatched field bit sizesAndrew Kelley
2025-08-29std.Io: delete GenericReaderAndrew Kelley
and delete deprecated alias std.io
2025-08-28AstGen: forward result type through unary float builtinsDavid Rubin
Uses a new `float_op_result_ty` ZIR instruction tag.
2025-08-15what if we kissed by the extern source bitmlugg
2025-08-13Merge pull request #24674 from Justus2308/undef-shift-bitwiseMatthew Lugg
Sema: Improve comptime arithmetic undef handling
2025-08-13sema: strip `@splat` operand result type before checking itDavid Rubin
2025-08-13Merge pull request #24381 from Justus2308/switch-better-underscoreMatthew Lugg
Enhance switch on non-exhaustive enums
2025-08-13std.io.Writer.Allocating: rename getWritten() to written()Isaac Freund
This "get" is useless noise and was copied from FixedBufferWriter. Since this API has not yet landed in a release, now is a good time to make the breaking change to fix this.
2025-08-12fix: emit vector instead of scalar u1_zero in shl_with_overflow logicJustus Klausecker
2025-08-12add undef shift tests ; mirror `zirShl` logic for `@shlWithOverflow`Justus Klausecker
2025-08-12Sema: replace all remaining aggregate interns related to `@typeInfo`Justus Klausecker
2025-08-12remove redundant test casesJustus Klausecker
2025-08-12replace even more aggregate internsJustus Klausecker
2025-08-12Sema: replace most aggregate interns with pt.aggregateValueJustus Klausecker
2025-08-12address most commentsJustus Klausecker
2025-08-12make `>>` a compile error with any undef arg ; add a bunch of test casesJustus Klausecker