Commit Graph

5249 Commits

Author SHA1 Message Date
Veikka Tuominen
6da070c5ac Sema: fix crash with generic function with generic function parameter
Closes #12810
2022-12-20 17:32:04 +02:00
Veikka Tuominen
6511afcfe0 Sema: fix coercion from [:0]T to [*c]T 2022-12-19 20:45:53 +02:00
Veikka Tuominen
22d46e1d77 value: use int tag type when querying for tag value
Closes #13757
2022-12-19 15:08:49 +02:00
Veikka Tuominen
2926d95e6a llvm: handle vectors in packed structs
Closes #13201
2022-12-19 12:19:52 +02:00
Veikka Tuominen
0eddf0cbc0 Sema: fix condition for non-pointer noalias error
Closes #13987
2022-12-19 12:19:25 +02:00
Ryan Liptak
3db8cffa3b spawnWindows: Fix PATH searching when cwd is absolute
Fixes a regression caused by https://github.com/ziglang/zig/pull/13983

From the added comment:

We still search the path if the cwd is absolute because of the
"cwd set in ChildProcess is in effect when choosing the executable path
to match posix semantics" behavior--we don't want to skip searching
the PATH just because we were trying to set the cwd of the child process.
2022-12-19 04:12:46 -05:00
Andrew Kelley
6018a3ad39 add behavior test for empty error set inference
closes #1386
closes #7541
2022-12-18 18:37:12 -07:00
Andrew Kelley
09ee887e9f add behavior test for comptime pointer casting
closes #1150
closes #1292
closes #4093
2022-12-18 18:37:12 -07: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 e0bc5f65b9.

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 c029a98f1c.
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 cf543199ca.
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