Andrew Kelley
616f74ba20
add behavior test for recently fixed wasm backend bug
...
Adds the corresponding behavior test for the fix in
320c4d68f5f40794ae31d5535de9c3a8ff5cb471.
2024-02-11 14:14:59 -07:00
Ali Chraghi
37b0aa600a
spirv: make rusticl the primary testing implementation
2024-02-09 09:27:08 +03:30
John Schmidt
7cb227ab67
Polish a few tests in switch.zig
...
- Return `error.TestFailed` instead of panicing
- Use `comptime assert` for type checks so that errors surface at
compile time
2024-02-08 23:49:03 +01:00
John Schmidt
0d1baf0c61
Improvements after code review
2024-02-08 23:49:03 +01:00
John Schmidt
dbcd53def0
Preserve field alignment in union pointer captures
2024-02-08 23:49:03 +01:00
Jakub Konka
52066bf8e4
x86_64+macho: pass more behavior tests
2024-02-06 19:01:17 +01:00
Andrew Kelley
5cf138e512
delete bad behavior test
...
As pointed out in the issue this behavior test branches on an undefined
value. That's not valid Zig code.
Also behavior tests should not depend on the standard library in this
manner. They need to minimally isolate the specific language thing that
is being tested.
Closes #12681
2024-02-05 23:47:05 -07:00
Robin Voetter
2511106150
spirv: air vector_store_element
2024-02-04 19:09:34 +01:00
Robin Voetter
9fbba0e01a
spirv: update tests
2024-02-04 19:09:33 +01:00
Robin Voetter
1d548aa2aa
spirv: air splat
2024-02-04 19:09:33 +01:00
Robin Voetter
76d5696434
spirv: air abs
2024-02-04 19:09:32 +01:00
Robin Voetter
631d1b63a8
spirv: fix shuffle properly
2024-02-04 19:09:32 +01:00
Robin Voetter
9641d2ebdb
spirv: vectorize max, min
2024-02-04 19:09:31 +01:00
Robin Voetter
9f0227a326
spirv: vectorize int_cast, trunc
2024-02-04 19:09:31 +01:00
Robin Voetter
408c117246
spirv: air is_(non_)null_ptr, optional_payload_ptr
2024-02-04 19:09:30 +01:00
Robin Voetter
7dfd403da1
spirv: air mul_add
2024-02-04 19:09:30 +01:00
Robin Voetter
345d6e280d
spirv: air int_from_bool
2024-02-04 19:09:29 +01:00
Robin Voetter
b67d983abd
spirv: vectorize add/sub overflow
2024-02-04 19:09:27 +01:00
Robin Voetter
761594e226
spirv: reduce, reduce_optimized
2024-02-04 19:09:27 +01:00
Robin Voetter
2f815853dc
spirv: shlWithOverflow
2024-02-04 19:09:26 +01:00
Robin Voetter
15cf5f88c1
spirv: vectors for air not
2024-02-04 19:09:25 +01:00
Robin Voetter
cb9e20da00
spirv: element-wise operation helper
2024-02-04 19:09:00 +01:00
Robin Voetter
747f4ae3f5
spirv: sh[rl](_exact)?
2024-02-04 19:08:59 +01:00
Pavel Verigo
a2ad8517ee
Sema: fix union init with zero size field
2024-01-30 12:20:23 +02:00
Veikka Tuominen
7d75c3d3b8
llvm: ensure returned undef is 0xaa bytes when runtime safety is enabled
...
Closes #13178
2024-01-29 17:35:07 -08:00
SuperAuguste
a479fd3132
Fix some comptime packed struct issues
...
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2024-01-29 13:09:17 -08:00
Andrew Kelley
f4f8036ec0
Merge pull request #18729 from Vexu/fixes
...
Fix some generic{Reader,Writer} related issues
2024-01-29 13:07:37 -08:00
Veikka Tuominen
f93a36c091
llvm: revert bad array access optimization
...
Closes #18723
2024-01-29 08:43:27 -08:00
Veikka Tuominen
78e982f7c3
llvm: fix alignment of array ptr when bitcasting vector
...
Closes #17996
2024-01-29 13:51:57 +02:00
Veikka Tuominen
281b2695c4
Value: expand canMutateComptimeVarState
...
Closes #17761
2024-01-29 13:48:45 +02:00
Veikka Tuominen
f782202910
Sema: do not emit @errorCast safety check when dest is adhoc inferred error set
...
Closes #17354
2024-01-29 13:48:45 +02:00
Meghan Denny
8a0429e885
test: add behavior coverage for global setter in function liveness
2024-01-26 15:26:37 +02:00
Veikka Tuominen
2e7d28dd0d
Sema: replace uses of toUnsignedInt with toUnsignedIntAdvanced
...
During semantic analysis the value may be an unresolved lazy value
which makes using `toUnsignedInt` invalid.
Add assertions to detect similar issues in the future.
Closes #18624
2024-01-20 12:21:05 -08:00
Meghan Denny
46d592e485
do not enforce function parameters to be marked comptime if only called at comptime
2024-01-19 15:31:18 -08:00
David Rubin
100efcf8d3
return optional state to zirPtrCastNoDest
2024-01-19 21:25:05 +02:00
Andrew Kelley
ca8c6dd4d6
Merge pull request #18569 from dweiller/17944-followup
...
17944 followup
2024-01-15 22:59:33 -08:00
dweiller
a219c9faaa
test/behavior: fix test type check for multi-ptr slice
...
The original test was checking the types of irrelevant slices, the test
is for slicing of multi-pointers _without_ an end value, but the types
of slices with an end value were being checked.
2024-01-15 20:55:01 +11:00
dweiller
8108c9f4d2
test/behavior: replace all 'comptime expect' with 'comptime assert'
2024-01-15 20:55:01 +11:00
Jacob Young
03ed3f56cf
Sema: fix @extern decls
...
Closes #18550
2024-01-15 07:39:05 +01:00
dweiller
8afafa717f
sema: allow slicing *T with comptime known [0..1]
2024-01-14 17:26:45 -08:00
Andrew Kelley
30688c341b
LLVM: fix lowering of extern anyopaque
...
closes #18461
2024-01-11 01:00:49 -08:00
dweiller
69ab687156
test: add tests for switch_block_err_union
2024-01-09 14:42:12 +11:00
Andrew Kelley
3176fdc0b9
Merge pull request #18470 from castholm/typeInfo-sentinels
...
Make `@typeInfo` return null-terminated strings
2024-01-07 22:28:24 -08: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
Carl Åstholm
92458094c8
Fix failing type reifications
2024-01-07 16:27:50 +01:00
Veikka Tuominen
804cee3b93
categorize behavior/bugs/<issueno>.zig tests
2024-01-06 16:49:41 -08:00
Carl Åstholm
501a2350ab
sema: Prevent reifying non-empty union with empty tag type
2024-01-04 22:38:31 +02:00
Andrew Kelley
9a16085093
Merge pull request #18376 from amp-59/shl_exact_comptime_int_to_shl
...
Sema: Updated `zirShl` to compute `shl_exact` with `comptime_int` LHS using `shl`
2024-01-04 04:19:26 -08:00
Andrew Kelley
fc79b22a98
Merge pull request #17431 from castholm/expectEqual
...
Update `std.testing.expectEqual` and friends to use peer type resolution
2024-01-03 23:55:59 -08:00
Andrew Kelley
52ebba6bdf
@shlExact fixups
...
* Add clarification in langref
* move test case to behavior tests
2024-01-04 00:44:44 -07:00