aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/slice.zig
AgeCommit message (Collapse)Author
2023-05-07test: disable by-length slice test on wasm backenddweiller
2023-05-07test: add behavior tests for pointer slice-by-lengthdweiller
2023-05-07test: add behavior tests for slice-by-lengthdweiller
2023-04-07Liveness: defer deaths of externally-scoped instructions in loop bodiesmlugg
2023-03-28Sema: fix empty slice pointer valueJacob Young
We just checked that inst_child_ty was effectively a zero-bit type, so it is certainly not the non-zero alignment we are looking for. Closes #15085
2023-03-25x86_64: implement atomic loopsJacob Young
2023-03-15disable failing aarch64 backend behavior testsAndrew Kelley
2023-03-15behavior: enable passing behavior tests on stage2_x86_64Jacob Young
2023-03-05behavior: disable failing testsJacob Young
2023-03-04add behavior test case for previous commitAndrew Kelley
2023-02-18update existing behavior tests and std lib to new for loop semanticsAndrew Kelley
2022-12-31add tests for fixed stage1 bugsVeikka Tuominen
Closes #4144 Closes #4255 Closes #4372 Closes #4375 Closes #4380 Closes #4417 Closes #4423 Closes #4476 Closes #4528 Closes #4562 Closes #4572 Closes #4597 Closes #4639 Closes #4672 Closes #4782 Closes #4955 Closes #4984 Closes #4997 Closes #5010 Closes #5114 Closes #5166 Closes #5173 Closes #5276
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-27stage2 AArch64: unify callee-preserved regs on all targetsjoachimschmidt557
also enables many passing behavior tests
2022-12-10stage2: sparc64: Skip unimplemented testsKoakuma
2022-12-06remove references to stage1 in behavior testsAndrew Kelley
Good riddance.
2022-10-30behavior: enable fixed cbe testsJacob Young
2022-10-25cbe: implement global assemblyJacob Young
2022-10-25cbe: canonicalize types that have the same C type when emitting typedefsJacob Young
2022-10-25cbe: fix global access fixJacob Young
2022-10-25behavior: enable stage2_c tests that are currently passingJacob Young
Also fix C warnings triggered by these tests.
2022-10-12codegen: add support for lowering .field_ptr on a slicejacobly0
Closes #13068
2022-09-30Sema: use correct ptr ty to check for attributes of slice field ptrVeikka Tuominen
Closes #12870 Closes #13006
2022-09-20Sema: check pointer qualifiers before implicit castVeikka Tuominen
Closes #12881
2022-09-09stage2 ARM: implement basic array_elem_valjoachimschmidt557
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-06-25stage2 ARM: implement basic intCast and error union wrappingjoachimschmidt557
2022-05-27stage2 AArch64: complete genTypedValuejoachimschmidt557
2022-04-28Sema: fix slice field modification at comptimeVeikka Tuominen
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: safety checks for slicing a null C pointerMitchell Hashimoto
2022-03-23stage2: able to slice to sentinel index at comptimeMitchell Hashimoto
The runtime behavior allowed this in both stage1 and stage2, but stage1 fails with index out of bounds during comptime. This behavior makes sense to support, and comptime behavior should match runtime behavior. I implement this fix only in stage2.
2022-03-23stage2: concat/mult of slices yields ptr to arrayCody Tapscott
2022-03-22stage2: slice behavior test passes, just has diff behavior from stage1Mitchell Hashimoto
This is from discussions from #11249. The stage2 behavior is correct and is strictly more accurate, so we'd prefer to keep it. In that case, I modified the behavior tests to have the conditional between stage1/stage2 and get this test passing.
2022-03-19wasm: Enable passing testsLuuk de Gram
This enables the tests that now pass due to the changes to lower parent pointers are lowered, as well as the additional features to unions.
2022-03-17CBE: enable more tests that are currently passingDaniele Cocca
2022-03-16stage2 ARM: genSetStack for stack_argument_offsetjoachimschmidt557
2022-03-13stage2 AArch64: enable mul for ints with <= 64 bitsjoachimschmidt557
2022-03-13stage2: add debug info for locals in the LLVM backendAndrew Kelley
Adds 2 new AIR instructions: * dbg_var_ptr * dbg_var_val Sema no longer emits dbg_stmt AIR instructions when strip=true. LLVM backend: fixed lowerPtrToVoid when calling ptrAlignment on the element type is problematic. LLVM backend: fixed alloca instructions improperly getting debug location annotated, causing chaotic debug info behavior. zig_llvm.cpp: fixed incorrect bindings for a function that should use unsigned integers for line and column. A bunch of C test cases regressed because the new dbg_var AIR instructions caused their operands to be alive, exposing latent bugs. Mostly it's just a problem that the C backend lowers mutable and const slices to the same C type, so we need to represent that in the C backend instead of printing two duplicate typedefs.
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-06Sema: handle peer type resolution of optional slicesAndrew Kelley
2022-03-06wasm: Call `generateSymbol` for updateDeclLuuk de Gram
To unify the wasm backend with the other backends, we will now call `generateSymbol` to lower a Decl into bytes. This means we also have to change some function signatures to comply with the linker interface. Since the general purpose generateSymbol is less featureful than wasm's, some tests are temporarily disabled.
2022-03-05stage2 AArch64: add more slice supportjoachimschmidt557
* airSlice * airArrayToSlice * and initial support for airSlicePtr and co
2022-03-04stage2 ARM: generate less no-op branchesjoachimschmidt557
The checks detecting such no-op branches (essentially instructions that branch to the instruction immediately following the branch) were tightened to catch more of these occurrences.
2022-02-27stage2 ARM: implement slice and array_to_slicejoachimschmidt557
2022-02-27stage2 ARM: enable more behavior testsjoachimschmidt557
2022-02-24Sema: implement tupleFieldVal, fix comptime elem_ptrAndrew Kelley
2022-02-23stage2 AArch64: more support for MCValue.got_load and direct_loadjoachimschmidt557
2022-02-22Port more behavior testsJakub Konka
2022-02-21stage2 AArch64: pass a few more behavior testsjoachimschmidt557