Jacob Young
0e3feebb04
codegen: fix taking the address of a zero-bit field in a zero-bit struct
...
Normally when we want a pointer to the end of a struct we just add 1 to
the struct pointer. However, when it is a zero-bit struct, the pointer
type being used during lowering is often a dummy pointer type that
actually points to a non-zero-bit type, so we actually want to add 0
instead, since a zero-bit struct begins and ends at the same address.
2022-12-18 22:11:26 -05:00
Jacob Young
e96f65db77
llvm: fix lowering pointer to final zero-width field of a comptime value
...
* Handle a `null` return from `llvmFieldIndex`.
* Add a behavior test to test this code path.
* Reword this test name, which incorrectly described how pointers to
zero-bit fields behave, and instead describe the actual test.
2022-12-18 22:11:26 -05:00
Andrew Kelley
aca9c74e80
Merge pull request #13914 from Vexu/variadic
...
implement defining C variadic functions
2022-12-18 16:24:13 -05:00
Andrew Kelley
d93edadead
Merge pull request #13993 from squeek502/windows-childprocess-perf
...
`spawnWindows`: Improve worst-case performance considerably + tests
2022-12-18 16:22:19 -05:00
Andrew Kelley
6ed0910d6d
Revert "llvm: fix lowering pointer to final zero-width field of a comptime value"
...
This reverts commit e0bc5f65b98d154b4318027d56f780b55605e33c.
Caused an assertion failure when running the behavior tests:
```
zig: llvm/lib/IR/Type.cpp:729: static llvm::PointerType* llvm::PointerType::get(llvm::Type*, unsigned int): Assertion `isValidElementType(EltTy) && "Invalid type for pointer element!"' failed.
Aborted (core dumped)
```
2022-12-18 13:51:15 -07:00
Veikka Tuominen
40ed6ae846
Merge pull request #13930 from r00ster91/renamings
...
std.builtin: renamings
2022-12-18 19:33:15 +02:00
shwqf
11a81e1b29
Call ensureResultUsed before comptime .call is evaluated.
...
Fixes #12580
2022-12-18 16:04:33 +02:00
r00ster91
ceff03f3e9
std.builtin: remove layout field from Type.Enum
2022-12-18 13:31:38 +01:00
Ryan Liptak
0cbc59f227
standalone tests: Add windows spawn test
...
Tests a decent amount of edge cases dealing with how PATH and PATHEXT searching is handled.
2022-12-18 03:55:28 -08:00
Jacob Young
e0bc5f65b9
llvm: fix lowering pointer to final zero-width field of a comptime value
...
* Handle a `null` return from `llvmFieldIndex`.
* Add a behavior test to test this code path.
* Reword this test name, which incorrectly described how pointers to
zero-bit fields behave, and instead describe the actual test.
2022-12-18 02:17:11 -05:00
Veikka Tuominen
901c3e9636
Merge pull request #13552 from hryx/comparus-tautologicus
...
Sema: elide integer comparisons with guaranteed outcomes
2022-12-18 01:57:49 +02:00
r00ster91
aac2d6b56f
std.builtin: rename Type.UnionField and Type.StructField's field_type to type
2022-12-17 14:11:33 +01:00
r00ster91
7350ea3e2d
std.builtin: rename Type.Fn's args to params
...
This was a poor naming choice; these are parameters, not arguments.
Parameters specify what kind of arguments are expected, whereas the arguments are the actual values passed.
2022-12-17 14:11:33 +01:00
r00ster91
20d3fd901e
std.builtin: rename Type.Fn.Param's arg_type to type
...
It's the type of a parameter, not an argument, but the prefix is redundant either way.
2022-12-17 14:11:33 +01:00
Veikka Tuominen
9bb1104e37
implement defining C variadic functions
2022-12-17 13:22:09 +02:00
Veikka Tuominen
728dd29f1a
Type: fix incorrect usage of hasRuntimeBits
...
Closes #13962
2022-12-17 13:22:09 +02:00
Veikka Tuominen
58caed1c71
Sema: make is_non_{null,err} stricter about types
...
Closes #13023
2022-12-17 13:22:09 +02:00
Jakub Konka
270b6c4c2f
Merge pull request #13964 from ziglang/issue-11737
...
Misc MachO linker improvements and link-tests refactor
2022-12-17 10:26:56 +01:00
Jakub Konka
b20a610f03
link-tests: force cross-comp to exclude host differences
2022-12-17 00:53:47 +01:00
yujiri8
68d2f68ed8
zig fmt: fix extra whitespace with multiline strings
...
Fixes #13937
2022-12-17 00:24:58 +02:00
Jakub Konka
9ad24a4aee
macho: add uuid link test
2022-12-16 18:31:48 +01:00
Evin Yulo
8c8f6bfa64
Add test for #13366
...
Closes #13366
2022-12-16 18:21:56 +02:00
Evin Yulo
b5d1df091b
Add test for #12571
...
Closes #12571
2022-12-16 18:19:32 +02:00
Travis Staloch
1ebb761244
codegen - lower str_lit to vector
2022-12-16 06:08:10 -05:00
Veikka Tuominen
8a0a6b7387
port packed vector elem ptr logic from stage1
...
Closes #12812
Closes #13925
2022-12-15 21:06:35 -05:00
Stevie Hryciw
e57e835904
Sema: elide integer comparisons with guaranteed outcomes
2022-12-15 00:56:27 -08:00
Veikka Tuominen
bc97a5662d
Sema: display cimport errors from clang
2022-12-14 14:08:22 +02:00
Veikka Tuominen
886fa455fa
Sema: avoid analyzing functions which failed when inlining
2022-12-14 14:08:21 +02:00
Veikka Tuominen
e6588857df
Sema: fix memory management of union enum tag int tag
...
This likely went unnoticed due to all power of two integer types being special cased.
Closes #13812
2022-12-14 14:08:21 +02:00
Veikka Tuominen
41913ddb1a
remove no longer relevant stage1 compile errors
2022-12-14 14:08:21 +02:00
Veikka Tuominen
927d20b46b
Sema: implement missing stage1 errors
2022-12-14 14:08:21 +02:00
Veikka Tuominen
423d7a74a4
move async compile errors into their own folder
2022-12-14 14:05:57 +02:00
Veikka Tuominen
327fb798c3
move stage2 compile errors out of special folder
2022-12-14 14:05:57 +02:00
IntegratedQuantum
0b4461d97b
Fix tautological big_int tests.
2022-12-14 00:29:25 +00:00
Andrew Kelley
6378644d4e
Merge pull request #13907 from Vexu/call-merge
...
Remove `stack` option from `@call`
2022-12-13 18:15:18 -05:00
Andrew Kelley
2e66b3be6e
Merge pull request #13910 from Luukdegram/wasm-simd
2022-12-13 14:11:22 -05:00
Meghan
3318611618
re-enable "signed zeros are represented properly" beahvior tests for f80 and c_longdouble
2022-12-13 13:33:16 +02:00
Veikka Tuominen
08b2d491bc
update usages of @call
2022-12-13 13:14:20 +02:00
Luuk de Gram
37561a920b
wasm: enable passing vector tests
2022-12-12 17:42:09 +01:00
Coin
5e111098e5
Revert "compiler_c test: skip build modes on aarch64-windows"
...
This reverts commit c029a98f1c601f4ff1369b49a4402d5c94fbb168.
2022-12-12 04:58:10 +08:00
Coin
ed0ecd9bff
Revert "mix_c_files: skip build modes on aarch64-windows due to bug"
...
This reverts commit cf543199cad033b9739ce1b623d95fd30c973791.
2022-12-12 04:57:55 +08:00
IntegratedQuantum
15a6336bb4
Add a helpful note when using ** on number types. ( #13871 )
2022-12-11 14:41:42 -05:00
Andrew Kelley
74718a1183
disable failing CBE behavior tests failing on aarch64-windows
...
Also start to move redundant tests next to each other to make them
slightly more obvious that they need to be cleaned up.
See tracking issue #13876
2022-12-10 16:28:49 -07:00
Jakub Konka
c029a98f1c
compiler_c test: skip build modes on aarch64-windows
2022-12-10 16:00:59 -07:00
Jakub Konka
cf543199ca
mix_c_files: skip build modes on aarch64-windows due to bug
2022-12-10 16:00:59 -07:00
Andrew Kelley
cffbb32d31
Merge pull request #13872 from koachan/sparc64-codegen
...
stage2: sparc64: Some Air lowerings + skip unbuildable tests
2022-12-10 15:10:21 -05:00
Koakuma
f9e9ba784f
stage2: sparc64: Skip unimplemented tests
2022-12-10 21:51:46 +07:00
Koakuma
fb9357f06c
stage2: sparc64: Implement atomic ops
2022-12-10 21:11:14 +07:00
r00ster91
654e30069d
behavior and cases: more test coverage for old issues
...
Closes #2622
Closes #2727
Closes #6047
Closes #6947
Closes #6656
2022-12-10 12:34:42 +01:00
r00ster91
bf863878ac
behavior: add test coverage for slice and array-related issues
...
Closes #10684
Closes #6905
Closes #8646
2022-12-10 12:34:42 +01:00