aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-07-01update test build script to latest APIAndrew Kelley
2024-07-01Add a standalone test to cover the duplicate module bugSashko
2024-06-24stage2-wasm: abs 128 bitPavel Verigo
2024-06-22stage2-wasm: fix div and remPavel Verigo
2024-06-20Merge pull request #20299 from mlugg/the-great-decl-splitMatthew Lugg
The Great Decl Split (preliminary work): refactor source locations and eliminate `Sema.Block.src_decl`.
2024-06-19Merge pull request #20070 from Rexicon226/riscvJakub Konka
more RISC-V backend progress
2024-06-19AstGen: error for redundant `@inComptime()`mlugg
2024-06-18cases: un-regress some notesmlugg
Since we now have source locations for reified types again, some error notes have returned which were previously regressed by this branch.
2024-06-16stage2-wasm: bit_reversePavel Verigo
2024-06-15translate-c: fix translation of "ptr += uint"Devin J. Pohly
The right-hand side was incorrectly cast to a pointer, since only signed ints were being interpreted correctly as pointer arithmetic. Fixes #20285.
2024-06-15stage2-wasm: enum bigint <= 128 bitsPavel Verigo
2024-06-15Zcu: rework source locationsmlugg
`LazySrcLoc` now stores a reference to the "base AST node" to which it is relative. The previous tagged union is `LazySrcLoc.Offset`. To make working with this structure convenient, `Sema.Block` contains a convenience `src` method which takes an `Offset` and returns a `LazySrcLoc`. The "base node" of a source location is no longer given by a `Decl`, but rather a `TrackedInst` representing either a `declaration`, `struct_decl`, `union_decl`, `enum_decl`, or `opaque_decl`. This is a more appropriate model, and removes an unnecessary responsibility from `Decl` in preparation for the upcoming refactor which will split it into `Nav` and `Cau`. As a part of these `Decl` reworks, the `src_node` field is eliminated. This change aids incremental compilation, and simplifies `Decl`. In some cases -- particularly in backends -- the source location of a declaration is desired. This was previously `Decl.srcLoc` and worked for any `Decl`. Now, it is `Decl.navSrcLoc` in reference to the upcoming refactor, since the set of `Decl`s this works for precisely corresponds to what will in future become a `Nav` -- that is, source-level declarations and generic function instantiations, but *not* type owner Decls. This commit introduces more tags to `LazySrcLoc.Offset` so as to eliminate the concept of `error.NeededSourceLocation`. Now, `.unneeded` should only be used to assert that an error path is unreachable. In the future, uses of `.unneeded` can probably be replaced with `undefined`. The `src_decl` field of `Sema.Block` no longer has a role in type resolution. Its main remaining purpose is to handle namespacing of type names. It will be eliminated entirely in a future commit to remove another undue responsibility from `Decl`. It is worth noting that in future, the `Zcu.SrcLoc` type should probably be eliminated entirely in favour of storing `Zcu.LazySrcLoc` values. This is because `Zcu.SrcLoc` is not valid across incremental updates, and we want to be able to reuse error messages from previous updates even if the source file in question changed. The error reporting logic should instead simply resolve the location from the `LazySrcLoc` on the fly.
2024-06-13Change deprecated b.host to b.graph.host in tests and Zig's build.zigKrzysztof Wolicki
2024-06-13std: Convert deprecated aliases to compile errors and fix usagesRyan Liptak
Deprecated aliases that are now compile errors: - `std.fs.MAX_PATH_BYTES` (renamed to `std.fs.max_path_bytes`) - `std.mem.tokenize` (split into `tokenizeAny`, `tokenizeSequence`, `tokenizeScalar`) - `std.mem.split` (split into `splitSequence`, `splitAny`, `splitScalar`) - `std.mem.splitBackwards` (split into `splitBackwardsSequence`, `splitBackwardsAny`, `splitBackwardsScalar`) - `std.unicode` + `utf16leToUtf8Alloc`, `utf16leToUtf8AllocZ`, `utf16leToUtf8`, `fmtUtf16le` (all renamed to have capitalized `Le`) + `utf8ToUtf16LeWithNull` (renamed to `utf8ToUtf16LeAllocZ`) - `std.zig.CrossTarget` (moved to `std.Target.Query`) Deprecated `lib/std/std.zig` decls were deleted instead of made a `@compileError` because the `refAllDecls` in the test block would trigger the `@compileError`. The deleted top-level `std` namespaces are: - `std.rand` (renamed to `std.Random`) - `std.TailQueue` (renamed to `std.DoublyLinkedList`) - `std.ChildProcess` (renamed/moved to `std.process.Child`) This is not exhaustive. Deprecated aliases that I didn't touch: + `std.io.*` + `std.Build.*` + `std.builtin.Mode` + `std.zig.c_translation.CIntLiteralRadix` + anything in `src/`
2024-06-13test: disable-enable riscv testsDavid Rubin
2024-06-13riscv: disable failing testDavid Rubin
2024-06-13riscv: rewrite "binOp"David Rubin
Reorganize how the binOp and genBinOp functions work. I've spent quite a while here reading exactly through the spec and so many tests are enabled because of several critical issues the old design had. There are some regressions that will take a long time to figure out individually so I will ignore them for now, and pray they get fixed by themselves. When we're closer to 100% passing is when I will start diving into them one-by-one.
2024-06-13riscv: implement optional logicDavid Rubin
2024-06-13riscv: integer + float `@abs`David Rubin
2024-06-13riscv: implement more arithmetic instructionsDavid Rubin
2024-06-13riscv: zero registers when using register-wide operationsDavid Rubin
what was happening is that instructions like `lb` were only affecting the lower bytes of the register and leaving the top dirty. this would lead to situtations were `cmp_eq` for example was using `xor`, which was failing because of the left-over stuff in the top of the register. with this commit, we now zero out or truncate depending on the context, to ensure instructions like xor will provide proper results.
2024-06-13riscv: add `airAggregateInit` for arraysDavid Rubin
2024-06-13riscv: first sign of floats!David Rubin
2024-06-13riscv: fix register clobber in certain edge casesDavid Rubin
2024-06-13ZigObject: enforce min function alignement on riscvDavid Rubin
2024-06-13riscv: `std.fmt.format` runningDavid Rubin
- implements `airSlice`, `airBitAnd`, `airBitOr`, `airShr`. - got a basic design going for the `airErrorName` but for some reason it simply returns empty bytes. will investigate further. - only generating `.got.zig` entries when not compiling an object or shared library - reduced the total amount of ops a mnemonic can have to 3, simplifying the logic
2024-06-13riscv: arbitrary sized arraysDavid Rubin
2024-06-13riscv: switch progress + by-ref return progressDavid Rubin
2024-06-10spirv: improve shuffle codegenRobin Voetter
2024-06-10spirv: new vectorization helperRobin Voetter
The old vectorization helper (WipElementWise) was clunky and a bit annoying to use, and it wasn't really flexible enough. This introduces a new vectorization helper, which uses Temporary and Operation types to deduce a Vectorization to perform the operation in a reasonably efficient manner. It removes the outer loop required by WipElementWise so that implementations of AIR instructions are cleaner. This helps with sanity when we start to introduce support for composite integers. airShift, convertToDirect, convertToIndirect, and normalize are initially implemented using this new method.
2024-06-10spirv: disable tests that fail on poclRobin Voetter
Besides the Intel OpenCL CPU runtime, we can now run the behavior tests using the Portable Computing Language. This implementation is open-source, so it will be easier for us to patch in updated versions of spirv-llvm-translator that have bug fixes etc.
2024-06-08Merge pull request #19007 from rootbeer/glibc-c-testAndrew Kelley
test/link/glibc_compat: Add C test case for glibc versions
2024-06-08libcxx: fix building when -fsingle-threadedMichael Dusan
* Skip building libcxx mt-only source files when single-threaded. * This change is required for llvm18 libcxx. * Add standalone test to link a trivial: - mt-executable with libcxx - st-executable with libcxx
2024-06-08Report error on missing values for addConfigHeaderMrDmitry
2024-06-06target.zig: Constrain aarch64 to glibc version 2.17 or laterPat Tullmann
Had constrained the `aarch64_be` target, but not `aarch64`. This constraint is necessary because earlier versions of glibc do not support the aarch64 architecture. Also, skip unsupported test cases.
2024-06-06test/link/glibc_compat: Add C test case for glibc versionsPat Tullmann
glibc_runtime_check.c is a simple test case that exercises glibc functions that might smoke out linking problems with Zig's C compiler. The build.zig compiles it against a variety of glibc versions. Also document and test glibc v2.2.5 (from 2002) as the oldest working glibc target for C binaries.
2024-06-05translate-c: promote macros that reference var decls to inline functionsfreakmangd
2024-06-05Merge pull request #20120 from vahur/move-consts-to-rdataAndrew Kelley
mark anondecls as constants in llvm ir
2024-06-03Merge pull request #20084 from Vexu/missing-errorsVeikka Tuominen
Add missing errors to `@ptrFromInt` and Signal calling convention validation
2024-06-02Replace YES_COLOR with CLICOLOR_FORCECarl Ã…stholm
Instead of introducing YES_COLOR, a completely new standard, into the mix it might make more sense to instead tag along with the CLICOLOR_FORCE env var, which dates back to at least 2000 with FreeBSD 4.1.1 and which is supported by tools like CMake. <https://bixense.com/clicolors/>
2024-06-02Sema: validate function signature for Signal calling conventionVeikka Tuominen
2024-06-02Sema: add missing error for runtime `@ptrFromInt` to comptime-only typeVeikka Tuominen
Closes #20083
2024-06-02pass `-fno-builtin` when testing `lib/c.zig`, `lib/compiler_rt.zig`Veikka Tuominen
2024-05-29rename zig-cache to .zig-cacheAndrew Kelley
closes #20077
2024-05-27translate-c tests: skip_foreign_checks=trueAndrew Kelley
2024-05-27std.Build.Step.Run: account for new environment variableAndrew Kelley
Introduces `disable_zig_progress` which prevents the build runner from assigning the child process a progress node. This is needed for the empty_env test which requires the environment to be completely empty.
2024-05-27update the codebase for the new std.Progress APIAndrew Kelley
2024-05-27test cases: try running foreign binariesAndrew Kelley
You don't know if it's possible to run a binary until you try. The build system already integrates with executors and has the `skip_foreign_checks` for exactly this use case.
2024-05-26std: restructure child process namespaceAndrew Kelley
2024-05-24test/link/macho: add symbol stabs smoke testJakub Konka