aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
AgeCommit message (Collapse)Author
2024-01-03Merge pull request #17431 from castholm/expectEqualAndrew Kelley
Update `std.testing.expectEqual` and friends to use peer type resolution
2024-01-04`@shlExact` fixupsAndrew Kelley
* Add clarification in langref * move test case to behavior tests
2024-01-03Merge pull request #18431 from jacobly0/cbe-externAndrew Kelley
cbe: fix non-msvc externs and exports
2024-01-03Correct expected/actual parameter order of some assertionsCarl Åstholm
2024-01-03Remove some `@as` coercions from assertionsCarl Åstholm
These are some spurious fixes to help illustrate the improved ergonomics of the `expectEqual` change. It is by no means complete.
2024-01-03Fix compile errors from the `expectEqual` changeCarl Åstholm
2024-01-03add missing resolveStructFieldInitsxdBronch
2024-01-03cbe: fix non-msvc externs and exportsJacob Young
Closes #17817
2024-01-03Reapply "Merge pull request #17824 from kcbanner/fixup_msvc_fmax"Jacob Young
This reverts commit 2b589783602c5428ecde9dbb3f41a81f85eb0f25.
2024-01-02Merge pull request #18160 from ziglang/std-build-moduleAndrew Kelley
Move many settings from being per-Compilation to being per-Module
2024-01-02Liveness: fix branch operands becoming aliasedarbrk1
2024-01-01zig build system: change target, compilation, and module APIsAndrew Kelley
Introduce the concept of "target query" and "resolved target". A target query is what the user specifies, with some things left to default. A resolved target has the default things discovered and populated. In the future, std.zig.CrossTarget will be rename to std.Target.Query. Introduces `std.Build.resolveTargetQuery` to get from one to the other. The concept of `main_mod_path` is gone, no longer supported. You have to put the root source file at the module root now. * remove deprecated API * update build.zig for the breaking API changes in this branch * move std.Build.Step.Compile.BuildId to std.zig.BuildId * add more options to std.Build.ExecutableOptions, std.Build.ObjectOptions, std.Build.SharedLibraryOptions, std.Build.StaticLibraryOptions, and std.Build.TestOptions. * remove `std.Build.constructCMacro`. There is no use for this API. * deprecate `std.Build.Step.Compile.defineCMacro`. Instead, `std.Build.Module.addCMacro` is provided. - remove `std.Build.Step.Compile.defineCMacroRaw`. * deprecate `std.Build.Step.Compile.linkFrameworkNeeded` - use `std.Build.Module.linkFramework` * deprecate `std.Build.Step.Compile.linkFrameworkWeak` - use `std.Build.Module.linkFramework` * move more logic into `std.Build.Module` * allow `target` and `optimize` to be `null` when creating a Module. Along with other fields, those unspecified options will be inherited from parent `Module` when inserted into an import table. * the `target` field of `addExecutable` is now required. pass `b.host` to get the host target.
2024-01-01Revert "Merge pull request #17824 from kcbanner/fixup_msvc_fmax"Andrew Kelley
This reverts commit 7161ed79c4abcaccdd56fe0b4fbd3d93472d41b8, reversing changes made to 3f2a65594e1d3c0a4f4943a4ea522e8405db81e0. Unfortunately, this sat in the PR queue too long and the merge broke the zig1.wasm bootstrap process.
2024-01-01Merge pull request #17824 from kcbanner/fixup_msvc_fmaxAndrew Kelley
cbe: add a system for avoiding collisions with C compiler intrinsics
2023-12-23Sema: ensure `slice_ptr` produces the correct typeJacob Young
Closes #18345
2023-12-22use `casted_rhs` instead of `rhs` so `icmp` works correctly for `airShlSat`Stefan Su
2023-12-22test: add coverage for index into comptime-known vector is comptime-knownMeghan Denny
2023-12-04x86_64: fix packed struct field reuseJacob Young
2023-12-04x86_64: fix vector comparisionsJacob Young
2023-12-04x86_64: implement more operations on vectors with 1-bit elementsJacob Young
2023-12-03x86_64: implement movement for pointer vectorsJacob Young
2023-12-03x86_64: "implement" `aggregate_init` for vectorsJacob Young
2023-12-03x86_64: implement some todosJacob Young
2023-12-03x86_64: implement more compliant vectorsJacob Young
2023-12-03x86_64: implement more atomic opsJacob Young
2023-12-01test: test with `-fstrip` and fix failuresJacob Young
Closes #17513
2023-11-29Remove all usages of `std.mem.copy` and remove `std.mem.set` (#18143)David Rubin
2023-11-27value: handle lazy_align and lazy_size in writeToPackedMemoryBogdan Romanyuk
2023-11-25Sema: ensure tuple fields is resolved and fix internal out-of-bounds accessBogdan Romanyuk
2023-11-25Zir: add missing extra index for linksection_or_addspaceTw
Closes #18052 Closes #18104 Signed-off-by: Tw <tw19881113@gmail.com>
2023-11-24spirv: disable failing testsRobin Voetter
2023-11-22std: remove meta.traitAndrew Kelley
In general, I don't like the idea of std.meta.trait, and so I am providing some guidance by deleting the entire namespace from the standard library and compiler codebase. My main criticism is that it's overcomplicated machinery that bloats compile times and is ultimately unnecessary given the existence of Zig's strong type system and reference traces. Users who want this can create a third party package that provides this functionality. closes #18051
2023-11-21Merge pull request #18057 from Vexu/fixesAndrew Kelley
Fix bad error location on field init with field access
2023-11-21translate-c: skip blank macros when translating definesGarrett
2023-11-21InternPool: handle `funcZirBodyInst` for `func_coerced`Veikka Tuominen
Closes #18039
2023-11-19behavior: work around LLVM bugmlugg
See #18034
2023-11-19AstGen: preserve result type in comptime blockmlugg
2023-11-19test: update behavior to silence 'var is never mutated' errorsmlugg
2023-11-16Sema: include sentinel in type of pointer-to-array `ptr` fieldDavid
Resolves: #18007
2023-11-11sema: pass sema through if available for the array_type case in bitSizeAdvancedkcbanner
2023-11-10behavior: add testing for LLVM SROA bugsJacob Young
2023-11-08Sema: do not force resolution of struct field inits when calling function ↵mlugg
pointer field b3462b7 caused a regression in a third-party project, since it forced resolution of field initializers for any field call 'foo.bar()', despite this only being necessary when 'bar' is a comptime field. See https://github.com/ziglang/zig/pull/17692#issuecomment-1802096734.
2023-11-07sema: allow slicing [*]T without enddweiller
2023-11-07Merge pull request #17692 from kcbanner/struct_field_init_passMatthew Lugg
sema: analyze struct field bodies in a second pass, to allow them to use the layout of the struct itself
2023-11-07Sema: emit @intCast safety check correctly for vectorsmlugg
This code was previously tripping an assertion by not making this value used in the safety check a vector.
2023-11-07Sema: allow destructuring vectorsmlugg
This was intended to work when destructuring was first implemented, and was just unintentionally missed out.
2023-11-07sema: analyze field init bodies in a second passkcbanner
This change allows struct field inits to use layout information of their own struct without causing a circular dependency. `semaStructFields` caches the ranges of the init bodies in the `StructType` trailing data. The init bodies are then resolved by `resolveStructFieldInits`, which is called before the inits are actually required. Within the init bodies, the struct decl's instruction is repurposed to refer to the field type itself. This is to allow us to easily rebuild the inst_map mapping required for the init body instructions to refer to the field type. Thanks to @mlugg for the guidance on this one!
2023-11-06x86_64: fix passing register-sized payload as non-reigster-sized unionJacob Young
Closes #17885
2023-11-05cbe: fixup __asm style exports, re-enable 12680 on macos now that alias ↵kcbanner
isn't used
2023-11-05behavior: enable test passing with x86_64 backendJacob Young