aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/while.zig
AgeCommit message (Collapse)Author
2025-07-27aarch64: fix error union constantsJacob Young
2025-07-26aarch64: implement more optional/error union/union supportJacob Young
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-06-16rename spirv backend nameAli Cheraghi
`stage2_spirv64` -> `stage2_spirv`
2025-02-24test: skip failing tests with spirv-vulkanAli Cheraghi
2024-09-01riscv: implement `errunion_payload_ptr_set`David Rubin
2024-07-26riscv: update tests and fix reuse bugDavid Rubin
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: `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-05-11riscv: math progressDavid Rubin
2024-05-11riscv: add stage2_riscv to test matrix and bypass failing testsDavid Rubin
2024-03-18spirv: enable passing testsRobin Voetter
2024-02-09spirv: make rusticl the primary testing implementationAli Chraghi
2024-01-06categorize `behavior/bugs/<issueno>.zig` testsVeikka Tuominen
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-09-23spirv: enable passing testsRobin Voetter
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-03-21x86_64: (re)implement optional opsJacob Young
Note that this commit also changes the layout of optional for all other backends using `src/codegen.zig` without updating them!
2023-03-15behavior: enable passing behavior tests on stage2_x86_64Jacob Young
2022-12-29stage2 AArch64: implement errUnion{Err,Payload} for registersjoachimschmidt557
2022-12-27stage2 AArch64: unify callee-preserved regs on all targetsjoachimschmidt557
also enables many passing behavior tests
2022-12-10stage2: sparc64: Skip unimplemented testsKoakuma
2022-12-06add behavior test for while(true) not needing else unreachableAndrew Kelley
closes #707
2022-11-30LLVM: fix canElideLoad behavior with loopsAndrew Kelley
closes #13546
2022-09-09stage2 ARM: amend implementation of various AIR instructionsjoachimschmidt557
- unwrap_errunion_err for registers - unwrap_errunion_payload for registers - ptr_slice_len_ptr for all MCValues - ptr_slice_ptr_ptr for all MCValues
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-06-25stage2 ARM: implement basic intCast and error union wrappingjoachimschmidt557
2022-03-24AstGen: emit break_inline from inline while loopAndrew Kelley
2022-03-19stage2: add debug info for payload capturesVeikka Tuominen
2022-03-09Sema: implement pointer to tuple to pointer to array coercionAndrew Kelley
This involved an LLVM backend fix for the aggregate_init instruction.
2022-03-08stage2 ARM: implement ret_loadjoachimschmidt557
2022-03-05stage2 AArch64: add more slice supportjoachimschmidt557
* airSlice * airArrayToSlice * and initial support for airSlicePtr and co
2022-02-28x64: pass more behavior testsJakub Konka
2022-02-27stage2 ARM: implement slice and array_to_slicejoachimschmidt557
2022-02-22Skip unsupported while behavior testsJakub Konka
2022-02-22Port more behavior testsJakub Konka
2022-01-17Sema: implement else capture valueAndrew Kelley
The ZIR instructions `switch_capture_else` and `switch_capture_ref` are removed because they are not needed. Instead, the prong index is set to max int for the special prong. Else prong with error sets is not handled yet. Adds a new behavior test because there was not a prior on to cover only the capture value of else on a switch.
2021-12-27AstGen: fix loop result locationsAndrew Kelley
The main problem was that the loop body was treated as an expression that was one of the peer result values of a loop, when in reality the loop body is noreturn and only the `break` operands are the result values of loops. This was solved by introducing an override that prevents rvalue() from emitting a store to result location instruction for loop bodies. An orthogonal change also included in this commit is switching `elem_val` index expressions to using `coerced_ty` and doing the coercion to `usize` inside `Sema`, resulting in smaller ZIR (since the cast becomes implied). I also changed the break operand expression to use `reachableExpr`, introducing a new compile error for double break. This makes a few more behavior tests pass for `while` and `for` loops.
2021-11-27stage2: implement `@typeName`Andrew Kelley
* stage1: change the `@typeName` of `@TypeOf(undefined)`, `@TypeOf(null)`, and `@TypeOf(.foo)` to match stage2. * move passing behavior tests to the passing-for-stage2 section.
2021-10-14stage2: LLVM backend: implement `wrap_optional` AIRAndrew Kelley
and move over some passing tests
2021-10-02AstGen: fix `while` and `for` with unreachable bodiesAndrew Kelley
Companion commit to 61a53a587558ff1fe1b0ec98bb424022885edccf. This commit also moves over a bunch of behavior test cases to the passing-for-stage2 section.
2021-06-21fix code broken from previous commitJacob G-W
2021-05-08Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * doc/langref.html.in * lib/std/enums.zig * lib/std/fmt.zig * lib/std/hash/auto_hash.zig * lib/std/math.zig * lib/std/mem.zig * lib/std/meta.zig * test/behavior/alignof.zig * test/behavior/bitcast.zig * test/behavior/bugs/1421.zig * test/behavior/cast.zig * test/behavior/ptrcast.zig * test/behavior/type_info.zig * test/behavior/vector.zig Master branch added `try` to a bunch of testing function calls, and some lines also had changed how to refer to the native architecture and other `@import("builtin")` stuff.
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.