aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-08-27behavior: import unintentionally excluded file from behavior.zigmlugg
And remove the now-invalid test for the return value of `@branchHint`.
2024-08-27behavior,cases: add `@branchHint` test coveragemlugg
2024-08-27compiler,lib,test,langref: migrate `@setCold` to `@branchHint`mlugg
2024-08-27lib,test,tools,doc: update usages of @exportmlugg
2024-08-25Merge pull request #21177 from alexrp/elf-coff-convAndrew Kelley
`std.{coff,elf}`: Remove the `{MachineType,EM}.toTargetCpuArch()` functions.
2024-08-24incremental: fix adding/removing aggregate fieldsmlugg
I don't recall why I put these checks here -- they aren't correct. We can freely recreate a type even if its fields have changed, because we are going to re-do all type resolution. The only conditions for recreations are (a) the ZIR index must not be lost and (b) the number of captures must be the same. These conditions are permissible because if either is violated, we can guarantee that analysis of a valid `zirStructDecl` (etc) will never reference this type (since the ZIR index has just been tracked, and the captures have just been created based on the ZIR). Adds a corresponding test case. Resolves: #21185
2024-08-23std.{coff,elf}: Remove the {MachineType,EM}.toTargetCpuArch() functions.Alex Rønne Petersen
These are fundamentally incapable of producing accurate information for reasons I've laid out in #20771. Since our only use of these functions is to check that object files have the correct machine type, and since #21020 made `std.Target.to{Coff,Elf}Machine()` more accurate, just switch these checks over to that and compare the machine type tags instead. Closes #20771.
2024-08-22Merge pull request #21170 from jacobly0/more-dwarf-cleanupJacob Young
Dwarf: more cleanup
2024-08-22Merge pull request #21095 from alexrp/mips64-testsAndrew Kelley
Get `mips64(el)-linux` working and start testing it
2024-08-22Type: fix inconsistency between `zig fmt` and `@typeName`Jacob Young
2024-08-22test/macho: simplify testing range extension thunksJakub Konka
2024-08-21link/elf: simplify how we test thunksJakub Konka
2024-08-21test/debugger: test emitting relocs by ELF linkerJakub Konka
2024-08-21Sema: register correct dependencies for inline callsmlugg
And add a corresponding test case.
2024-08-21test: remove accidental hard tabmlugg
2024-08-21test: add incremental compilation test for moving `@src()` callmlugg
2024-08-20Dwarf: fix issues with inline call sitesJacob Young
2024-08-19re-enable emit_asm_and_bin and emit_llvm_no_bin testsRobin Voetter
These were fixed during the last few commits too. The emit_llvm_no_bin test is renamed from the issue_12588 test. Closes #17484
2024-08-19add standalone test for only dependending on the emitted assembly and not ↵Robin Voetter
the bin
2024-08-19Merge pull request #21128 from mlugg/incrementalMatthew Lugg
incremental: more progress
2024-08-18Dwarf: test enumsJacob Young
2024-08-18Dwarf: fix and test unionsJacob Young
2024-08-18test: add incremental casemlugg
2024-08-18test: Add `mips64(el)-linux-(none,musl,gnuabi64)` targets.Alex Rønne Petersen
These take 3-4 minutes to run on my machine, i.e. they're not affected by the LLVM compilation speed bug that affects mips32.
2024-08-18test: Disable `vector reduce operation` on mips64.Alex Rønne Petersen
https://github.com/ziglang/zig/issues/21091
2024-08-18test: Disable `@min/max for floats` on mips64.Alex Rønne Petersen
https://github.com/ziglang/zig/issues/21090
2024-08-17test: add new incremental testmlugg
This case is adapted from #11344, and passes with `-fno-emit-bin`. Resolves: #11344
2024-08-17tools,test: improve incr-check and add new incremental testsmlugg
2024-08-17tools: improve incr-checkmlugg
And add a new incremental test to match!
2024-08-17Dwarf: fix and test error unionsJacob Young
2024-08-17Dwarf: fix and test allowzero pointersJacob Young
2024-08-16Dwarf: fix cross-module inline function line infoJacob Young
2024-08-16Dwarf: rework self-hosted debug info from scratchJacob Young
This is in preparation for incremental and actually being able to debug executables built by the x86_64 backend.
2024-08-16Merge pull request #21065 from ziglang/elf-zig-gotJakub Konka
elf: replace .got.zig with a zig jump table
2024-08-16add an error for stack allocations in naked functions (#21082)David Rubin
closes #72
2024-08-15test/elf: enhance testImportingDataDynamicJakub Konka
2024-08-15elf: fix up riscv for `.got.zig` rewriteDavid Rubin
2024-08-14build/test: Add -Dtest-slow-targets and move mips module tests behind it.Alex Rønne Petersen
The idea is that these tests are just too slow to include by default on a contributor's local machine. If they want to run these, they need to opt in.
2024-08-14build/test: Add -Dtest-target-filter for filtering module tests by target ↵Alex Rønne Petersen
triple. This is useful during porting work where you're not interested in running all targets all the time while iterating on changes.
2024-08-14test: Re-enable mips(el)-linux-gnueabihf tests.Alex Rønne Petersen
Closes #4927.
2024-08-13Merge pull request #21053 from alexrp/mips-testsAndrew Kelley
`test`: Re-enable `mips(el)-linux(-musl)` tests.
2024-08-13test: Re-enable armv8-linux-gnueabihf tests.Alex Rønne Petersen
Closes #3287.
2024-08-12test: Re-enable mips(el)-linux(-musl) tests.Alex Rønne Petersen
Closes #13782. Closes #16846.
2024-08-12test: Partially disable `vector float operators` on mips.Alex Rønne Petersen
https://github.com/ziglang/zig/issues/21051
2024-08-12test: Disable `reinterpret packed union` on mips.Alex Rønne Petersen
https://github.com/ziglang/zig/issues/21050
2024-08-12std.Target: Rename glsl450 Arch tag to opengl.Alex Rønne Petersen
Versions can simply use the normal version range mechanism, or alternatively an Abi tag if that makes more sense. For now, we only care about 4.5 anyway.
2024-08-11compiler: split Decl into Nav and Caumlugg
The type `Zcu.Decl` in the compiler is problematic: over time it has gained many responsibilities. Every source declaration, container type, generic instantiation, and `@extern` has a `Decl`. The functions of these `Decl`s are in some cases entirely disjoint. After careful analysis, I determined that the two main responsibilities of `Decl` are as follows: * A `Decl` acts as the "subject" of semantic analysis at comptime. A single unit of analysis is either a runtime function body, or a `Decl`. It registers incremental dependencies, tracks analysis errors, etc. * A `Decl` acts as a "global variable": a pointer to it is consistent, and it may be lowered to a specific symbol by the codegen backend. This commit eliminates `Decl` and introduces new types to model these responsibilities: `Cau` (Comptime Analysis Unit) and `Nav` (Named Addressable Value). Every source declaration, and every container type requiring resolution (so *not* including `opaque`), has a `Cau`. For a source declaration, this `Cau` performs the resolution of its value. (When #131 is implemented, it is unsolved whether type and value resolution will share a `Cau` or have two distinct `Cau`s.) For a type, this `Cau` is the context in which type resolution occurs. Every non-`comptime` source declaration, every generic instantiation, and every distinct `extern` has a `Nav`. These are sent to codegen/link: the backends by definition do not care about `Cau`s. This commit has some minor technically-breaking changes surrounding `usingnamespace`. I don't think they'll impact anyone, since the changes are fixes around semantics which were previously inconsistent (the behavior changed depending on hashmap iteration order!). Aside from that, this changeset has no significant user-facing changes. Instead, it is an internal refactor which makes it easier to correctly model the responsibilities of different objects, particularly regarding incremental compilation. The performance impact should be negligible, but I will take measurements before merging this work into `master`. Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com> Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2024-08-08Merge pull request #20997 from xxxbxxx/debuglinkAndrew Kelley
std.debug.Dwarf: improve loading debug symbol from separate files
2024-08-08language: add module name field to `@src`Andrew Kelley
closes #20963
2024-08-08std.debug.Dwarf: fix loading external debuginfo in the ".debuglink" case.Xavier Bouchoux
- look up the debuglink file in the directory of the executable file (instead of the cwd) - fix parsing of debuglink section (the 4-byte alignement is within the file, unrelated to the in-memory address)