Jacob Young
e5c439a16d
x86_64: implement optional comparisons
...
Closes #18959
2024-02-25 11:22:10 +01:00
Ali Chraghi
37b0aa600a
spirv: make rusticl the primary testing implementation
2024-02-09 09:27:08 +03:30
Robin Voetter
9fbba0e01a
spirv: update tests
2024-02-04 19:09:33 +01:00
Robin Voetter
408c117246
spirv: air is_(non_)null_ptr, optional_payload_ptr
2024-02-04 19:09:30 +01:00
dweiller
8108c9f4d2
test/behavior: replace all 'comptime expect' with 'comptime assert'
2024-01-15 20:55:01 +11:00
Veikka Tuominen
faeb0ef032
llvm: optional slices cannot be passed in parts when they allowzero
...
Closes #18428
2024-01-08 06:57:06 +02:00
Veikka Tuominen
804cee3b93
categorize behavior/bugs/<issueno>.zig tests
2024-01-06 16:49:41 -08:00
mlugg
9c16b2370d
test: update behavior to silence 'var is never mutated' errors
2023-11-19 09:57:03 +00:00
Robin Voetter
4bf27da6a6
Revert "Revert "Merge pull request #17657 from Snektron/spirv-recursive-ptrs""
...
This reverts commit 9f0359d78f in an attempt to
make the tests pass again. The CI failure from that merge should be unrelated
to this commit.
2023-10-23 06:27:12 -04:00
Andrew Kelley
9f0359d78f
Revert "Merge pull request #17657 from Snektron/spirv-recursive-ptrs"
...
This reverts commit b822e841cd , reversing
changes made to 0c99ba1eab .
This caused a CI failure when it landed in master branch.
2023-10-22 12:15:31 -07:00
Robin Voetter
6281ad91df
spirv: self-referential pointers via new fwd_ptr_type
...
Its a little ugly but it works.
2023-10-21 17:46:54 +02:00
Robin Voetter
faad97edff
spirv: update failing / passing tests
...
Some tests are now failing due to debug info changes, some tests
now pass due to improved compiler functionality.
2023-10-15 20:08:18 +02:00
Robin Voetter
d2692af8e2
spirv: override function return type to void if it has no runtime bits
2023-10-15 14:00:04 +02:00
Robin Voetter
79f7481575
spirv: disable failing tests
2023-09-23 12:36:44 -07:00
Jacob Young
66084b6c3f
Sema: remove validateRunTimeType
...
This function does not seem to differ in any interesting way from
`!typeRequiresComptime`, other than the `is_extern` param which is only
used in one place, and some differences did not seem correct anyway.
My reasoning for changing opaque types to be comptime-only is that
`explainWhyTypeIsComptime` is quite happy to explain why they are. :D
2023-08-09 05:46:44 -04:00
Eric Joldasov
d884d7050e
all: replace comptime try with try comptime
...
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-13 23:46:58 +06:00
Luuk de Gram
1042deb86f
enable passing behavior tests
2023-05-31 18:04:33 +02:00
Robin Voetter
65157d30ab
spirv: ptr_elem_val
...
Implements the ptr_elem_val air tag. Implementation is unified
with ptr_elem_ptr.
2023-05-20 17:30:23 +02:00
Robin Voetter
37aa343079
spirv: more passing tests
2023-05-20 17:30:22 +02:00
Jacob Young
57c38f6433
x86_64: implement global payload pointers
2023-05-15 03:07:51 -04:00
Ali Chraghi
ccc490ef68
setup spirv backend in behavior tests
2023-05-11 20:31:52 +02:00
Jacob Young
83a208c355
x86_64: implement large cmp
2023-04-02 04:49:53 -04:00
Jacob Young
677427bc3a
x86_64: implement error name
2023-04-02 04:49:53 -04:00
Jacob Young
1e080e5056
x86_64: implement atomic loops
2023-03-25 16:23:55 -04:00
Jacob Young
f95faac5ae
x86_64: (re)implement optional ops
...
Note that this commit also changes the layout of optional for all
other backends using `src/codegen.zig` without updating them!
2023-03-21 08:49:54 +01:00
Jacob Young
c51930b060
behavior: enable passing behavior tests on stage2_x86_64
2023-03-15 01:04:21 -04:00
Techatrix
47ff57ed7d
wasm: apply request change
2023-01-31 17:01:56 +01:00
Veikka Tuominen
9a0c593a54
add tests for fixed stage1 bugs
...
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-29 12:42:44 +02:00
Koakuma
f9e9ba784f
stage2: sparc64: Skip unimplemented tests
2022-12-10 21:51:46 +07:00
Andrew Kelley
c8aba15c22
remove references to stage1 in behavior tests
...
Good riddance.
2022-12-06 19:06:48 -07:00
Jacob Young
e3b8658e65
cbe: add forward declarations for optionals and error unions
...
Arrays will have to wait for type rewrite.
2022-12-03 21:58:18 -05:00
Veikka Tuominen
1a1a5702ab
cbe: correctly handle pointers to zero bit error union payloads
2022-11-30 15:14:33 +02:00
Jakub Konka
e83590d0e8
aarch64: pass some tests dealing with optionals
2022-11-08 13:59:47 +01:00
Jacob Young
a77d89afe3
behavior: enable fixed cbe tests
2022-10-30 15:38:50 -04:00
Jacob Young
48a2783969
cbe: implement optional slice representation change
2022-10-29 05:58:41 -04:00
Veikka Tuominen
dd437ae399
stage2: optimize size of optional slices
2022-10-27 01:31:17 +03:00
Jacob Young
525dcaecba
behavior: enable stage2_c tests that are currently passing
...
Also fix C warnings triggered by these tests.
2022-10-25 05:11:28 -04:00
Andrew Kelley
d2ad8afff4
LLVM: fix missing alignment on wrapping instructions
...
Previously, when lowering AIR instructions `wrap_errunion_payload`,
`wrap_errunion_err`, and `wrap_optional`, the LLVM backend would create
an alloca instruction to store the result, but did not set the alignment
on it. This caused UB which went undetected for a long time until we
started enabling the stack protector.
Closes #12594
Unblocks #12508
Inspires #12634
Tests passed locally:
* test-behavior
* test-cases
2022-08-25 16:15:48 -07:00
Veikka Tuominen
74c7782c60
Sema: make orelse with C pointers behave like stage1 for now
...
Closes #12537
2022-08-22 11:16:36 +03:00
Veikka Tuominen
db0f372da8
Sema: make optional noreturn behave correctly
2022-08-17 20:10:18 +03:00
joachimschmidt557
ddd5b57045
stage2 AArch64: complete genTypedValue
2022-05-27 16:43:11 -04:00
Veikka Tuominen
7be62f695f
stage2 llvm: fix optional pointers to zero bit payloads
2022-04-15 19:17:50 +03:00
joachimschmidt557
061d6699c0
stage2 AArch64: lower cmp to binOp
2022-03-25 19:21:34 +01:00
Luuk de Gram
5cb16dfa59
wasm: Enable all passing tests
...
All tests have been manually verified which are now passing. This means that any remaining
TODO is an actual to-be-fixed or to-be-implemented test case.
2022-03-23 21:40:33 +01:00
joachimschmidt557
be1cca3416
stage2 ARM: implement comparison of optional pointers
2022-03-22 20:16:05 -07:00
joachimschmidt557
3ecba7d7a2
stage2 ARM: implement slice_elem_ptr, ptr_elem_ptr
2022-03-18 12:12:14 +01:00
joachimschmidt557
ca1ffb0951
stage2 ARM: genSetStack for stack_argument_offset
2022-03-16 20:19:58 +01:00
Cody Tapscott
85610a9aff
stage2 llvm: Lower 0-bit field-ptr as ptr-to-void
2022-03-03 13:08:14 -07:00
Jakub Konka
d35cae551e
x64: rectify and add missing optionals bits
...
Includes changes/additions to:
* `wrap_optional`
* `optional_payload`
* `isNull` helper
2022-03-02 14:05:29 +01:00
Andrew Kelley
6f303c01f3
LLVM: add extra padding to structs and tuples sometimes
...
* Sema: resolve type fully when emitting an alloc AIR instruction to
avoid tripping assertion for checking struct field alignment.
* LLVM backend: keep a reference to the LLVM target data alive during
lowering so that we can ask LLVM what it thinks the ABI alignment
and size of LLVM types are. We need this in order to lower tuples and
structs so that we can put in extra padding bytes when Zig disagrees
with LLVM about the size or alignment of something.
* LLVM backend: make the LLVM struct type packed that contains the most
aligned union field and the padding. This prevents the struct from
being too big according to LLVM. In the future, we may want to
consider instead emitting unions in a "flat" manner; putting the tag,
most aligned union field, and padding all in the same struct field
space.
* LLVM backend: make structs with 2 or fewer fields return isByRef=false.
This results in more efficient codegen. This required lowering of
bitcast to sometimes store the struct into an alloca, ptrcast, and
then load because LLVM does not allow bitcasting structs.
* enable more passing behavior tests.
2022-03-01 18:24:00 -07:00