aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/for.zig
AgeCommit message (Collapse)Author
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-06-16rename spirv backend nameAli Cheraghi
`stage2_spirv64` -> `stage2_spirv`
2025-03-24test: add a behavior test for 0-length loop fixDavid Rubin
2025-02-24test: skip failing tests with spirv-vulkanAli Cheraghi
2024-07-26riscv: update tests and fix reuse bugDavid Rubin
2024-07-26riscv: airAsm rewriteDavid Rubin
with this rewrite we can call functions inside of inline assembly, enabling us to use the default start.zig logic all that's left is to implement lr/sc loops for atomically manipulating 1 and 2 byte values, after which we can use the segfault handler logic.
2024-07-26riscv: implement more operatorsDavid Rubin
we can run `std.debug.print` now, with both run-time strings and integers!
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: add `airAggregateInit` for arraysDavid 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-05-11riscv: math progressDavid Rubin
2024-05-11riscv: add stage2_riscv to test matrix and bypass failing testsDavid Rubin
2024-04-06spirv: implement `@mulWithOverflow`Ali Chraghi
2024-02-04spirv: update testsRobin Voetter
2024-01-06categorize `behavior/bugs/<issueno>.zig` testsVeikka Tuominen
2023-11-29Remove all usages of `std.mem.copy` and remove `std.mem.set` (#18143)David Rubin
2023-11-19test: update behavior to silence 'var is never mutated' errorsmlugg
2023-10-15spirv: update failing / passing testsRobin Voetter
Some tests are now failing due to debug info changes, some tests now pass due to improved compiler functionality.
2023-10-15spirv: fix incorrect repr of some optional operationsRobin Voetter
2023-10-15spirv: make bitcasts between the same spirv type a no-opRobin Voetter
2023-09-23spirv: enable passing testsRobin Voetter
2023-07-26AstGen: fix missing deferred refJacob Young
Closes #16524
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-14Sema: allow indexing tuple and vector pointersmlugg
Resolves: #13852 Resolves: #14705
2023-06-13all: replace `comptime try` with `try comptime`Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-05-20spirv: ptr_elem_valRobin Voetter
Implements the ptr_elem_val air tag. Implementation is unified with ptr_elem_ptr.
2023-05-20spirv: more passing testsRobin Voetter
2023-05-11setup spirv backend in behavior testsAli Chraghi
2023-05-03x86_64: implement slice elem ptr for more MCValue tagsJacob Young
2023-04-20x86_64: rewrite inst trackingJacob Young
2023-04-07Liveness: defer deaths of externally-scoped instructions in loop bodiesmlugg
2023-03-24x86_64: fix value tracking bugsJacob Young
2023-03-15behavior: enable passing behavior tests on stage2_x86_64Jacob Young
2023-02-18Sema: add missing coercion when checking for loop lenAndrew Kelley
2023-02-18implement error for unbounded for loopsAndrew Kelley
2023-02-18omit safety checks for element access in for loopsAndrew Kelley
One of the main points of for loops is that you can safety check the length once, before entering the loop, and then safely assume that every element inside the loop is in bounds. In master branch, the safety checks are incorrectly intact even inside for loops. This commit fixes it. It's especially nice with multi-object loops because the number of elided checks is N * M where N is how many iterations and M is how many objects.
2023-02-18AstGen: add error for discard of unbounded counterAndrew Kelley
2023-02-18disable failing x86_64 backend testsAndrew Kelley
2023-02-18add passing for loop test: two countersAndrew Kelley
2023-02-18Sema: fix for loops with comptime-known int rangesAndrew Kelley
2023-02-18update existing behavior tests and std lib to new for loop semanticsAndrew Kelley
2022-12-29add tests for fixed stage1 bugsVeikka Tuominen
Closes #1957 Closes #1994 Closes #2140 Closes #2746 Closes #2802 Closes #2855 Closes #2895 Closes #2981 Closes #3054 Closes #3158 Closes #3234 Closes #3259 Closes #3371 Closes #3376 Closes #3387 Closes #3529 Closes #3653 Closes #3750 Closes #3778 Closes #3882 Closes #3915 Closes #3929 Closes #3961 Closes #3988 Closes #4123 Closes #7448
2022-12-10stage2: sparc64: Skip unimplemented testsKoakuma
2022-10-25cbe: canonicalize types that have the same C type when emitting typedefsJacob Young
2022-09-09stage2 ARM: implement basic array_elem_valjoachimschmidt557
2022-09-09stage2 ARM: implement struct_field_val for registersjoachimschmidt557
2022-07-13AstGen: fix loop control flow applying to wrong loopAndrew Kelley
In the case of 'continue' or 'break' inside the 'else' block of a 'while' or 'for' loop. Closes #12109
2022-03-29CBE: fix C output after PR #11302, reenable testsDaniele Cocca
Commit 052079c99455d01312d377d72fa1b8b5c0b22aad surfaced two issues with the generated C code: - renderInt128() contained a seemingly unnecessary assertion to verify that the high 64 bits of the number were nonzero, dating back to 9bf1681990fe87a6b2e5fc644a89f1aece304579. I removed it. - renderValue() didn't have any special handling for undefined structs, falling back to printing "{}" which generated invalid expressions such as "return {}" for functions returning structs, whereas "return (S){}" is the correct form. I changed it accordingly. At the same time I'm reenabling the relevant tests.
2022-03-27stage2: runtime safety check integer cast truncating bitsMitchell Hashimoto