Commit Graph

5152 Commits

Author SHA1 Message Date
Veikka Tuominen
d0edaabf9d Value: fix elemValueAdvanced for optional payloads
Closes #13707
2022-12-01 11:49:06 +02:00
Veikka Tuominen
11ec7109c3 cbe: do not memcpy identical integer types when bitcasting 2022-11-30 17:11:06 +02:00
Veikka Tuominen
15cc83e27a cbe: reduce amount of temporary locals 2022-11-30 17:11:06 +02:00
Veikka Tuominen
f4afeb3ffd AstGen: fix incorrect handling of source cursor with shift builtins
Closes #13714
2022-11-30 17:11:06 +02:00
Veikka Tuominen
2dcac348e5 cbe: implement packed unions 2022-11-30 15:14:33 +02:00
Veikka Tuominen
1a1a5702ab cbe: correctly handle pointers to zero bit error union payloads 2022-11-30 15:14:33 +02:00
Veikka Tuominen
4def9c4a9b cbe: operand of address of operator must be an lvalue 2022-11-30 15:14:33 +02:00
Veikka Tuominen
6310186d52 cbe: cast pointer switch target to int 2022-11-30 15:14:33 +02:00
Veikka Tuominen
8af5648015 Sema: make inferred allocs always mutable
Const allocs don't make any sense, make_ptr_const handles making
the pointers not mutable.
2022-11-30 15:14:33 +02:00
Veikka Tuominen
63ae7899ae cbe: ensure test and tagName function names are unique 2022-11-30 15:14:33 +02:00
Andrew Kelley
ceb0a632cf std.mem.Allocator: allow shrink to fail
closes #13535
2022-11-29 23:30:38 -07:00
Andrew Kelley
deda6b5146 LLVM: fix canElideLoad behavior with loops
closes #13546
2022-11-30 00:20:49 -05:00
Veikka Tuominen
b2b1d421c3 Sema: add missing failWithBadMemberAccess to zirExport
The assumption that AstGen would error only holds when exporting
a identifier not a namespace member.
2022-11-29 21:44:08 +02:00
Veikka Tuominen
4b0ef6a409 Sema: make non-existent field error point to field name
Closes #13698
2022-11-29 21:44:08 +02:00
Veikka Tuominen
6f5a438946 AstGen: unstack block scope when creating opaque type
Closes #13697
2022-11-29 21:44:08 +02:00
Veikka Tuominen
ed73429926 Sema: explain why parameter must be declared comptime
Closes #13692
2022-11-29 21:44:08 +02:00
Veikka Tuominen
17ff002bc0 Sema: improve safety panic for access of inactive union field 2022-11-29 21:44:08 +02:00
Veikka Tuominen
6337c04244 Sema: improve panic for slice start index being greater than end index
Closes #13689
2022-11-29 15:47:02 +02:00
Veikka Tuominen
6f9c7e33b9 llvm: implement union_init for packed unions
Closes #13664
2022-11-29 15:47:02 +02:00
Jakub Konka
1829b6eab8
Merge pull request #13625 from kcbanner/windows_disable_symlink_tests
Skip linker tests requiring symlinks on Windows
2022-11-29 02:57:37 +01:00
Jakub Konka
033aa1d761 aarch64-windows: skip failing standalone tests 2022-11-28 19:45:53 -05:00
Jakub Konka
870872dd63 aarch64-windows: skip failing floatop behavior test 2022-11-28 18:10:51 -05:00
Jakub Konka
07bf4de6a9 aarch64-windows: skip failing align behavior test 2022-11-28 18:10:51 -05:00
kcbanner
ea84eda904 'fmt' 2022-11-26 17:16:56 -05:00
Veikka Tuominen
304e828088
Merge pull request #13637 from Vexu/stage2-fixes
Stage2 bug fixes
2022-11-26 22:03:49 +02:00
kcbanner
57bc61ab26 test-link: add -Denable-symlinks-windows to opt-in to using symlinks
Adds a way for standalone tests to declare they need symlinks, and these
tests won't be run on windows unless -Denable-symlinks-windows is set
2022-11-26 14:26:26 -05:00
Veikka Tuominen
71937f75d8 Sema: correctly detect union target in zirSwitchBlock
Closes #13655
2022-11-26 18:05:27 +02:00
Veikka Tuominen
fe38898246 Sema: pass c_import_buf to child block in more places
Closes  #13651
2022-11-26 18:05:27 +02:00
Veikka Tuominen
587ef60a28 Sema: resolve union fields before using getTagType
Closes #13649
2022-11-26 18:05:27 +02:00
Veikka Tuominen
bf62cb453b Sema: handle anytype parameter requiring comptime
Closes #13645
2022-11-26 18:05:27 +02:00
Veikka Tuominen
72fa8d4880 Sema: fix overflow arithmetic with runtime vectors
It should return a a vector of bools for compatibility with scalar
operands and stage1 until #10248 can be implemented.

Closes #13201
2022-11-26 18:05:27 +02:00
Andrew Kelley
30eb2a1753
Merge pull request #13627 from Vexu/tuple-decls
Implement tuple type declarations
2022-11-25 18:06:09 -05:00
Veikka Tuominen
9f055e2eb0 Sema: improve compile error for tuple coercion mismatch 2022-11-23 22:16:31 +02:00
Veikka Tuominen
8eea73fb92 add tests for tuple declarations 2022-11-23 22:16:31 +02:00
Andrew Kelley
4ec27a4e25 C backend: implement vector reduce and overflow intrinsics 2022-11-22 23:33:58 -07:00
Veikka Tuominen
fc5209c139 llvm: fix x86_64 sysV ABI of big vectors on avx512 enabled CPUs
Closes #13629
2022-11-23 00:05:07 +02:00
Andrew Kelley
5e42378227 disable failing C ABI test
see tracking issue #13629
2022-11-22 13:06:09 -07:00
Cody Tapscott
3fa226a80c AstGen: Pop error trace for continue
PR #12837 handled control flow for break and return, but I forgot
about `continue`. This is effectively another break, so we just
need another `.restore_err_ret_index` ZIR instruction.

Resolves #13618.
2022-11-22 14:00:41 +02:00
Andrew Kelley
7829c73ccf disable failing arm-linux non-llvm backend tests
See #13623
2022-11-21 22:56:05 -07:00
Veikka Tuominen
d968d9d103 llvm: add attributes to the arguments of function pointer calls
Closes #13605
2022-11-20 20:25:12 +02:00
Veikka Tuominen
9e276d32f3 Sema: fix memory management of missing field error
Closes #13590
2022-11-20 20:25:12 +02:00
Veikka Tuominen
9e7293619f llvm: aarch64 C ABI: pass byref params as mutable pointers
Closes  #13597
2022-11-20 20:25:12 +02:00
Veikka Tuominen
08a00f0d1c llvm: use alignment of ABI return type when it differs from raw return type
This would previously cause miscompilations when the ABI type had
bigger alignment than the raw type.
2022-11-20 20:25:12 +02:00
Veikka Tuominen
835a1f7f0c Sema: fix missing error on mismatched array init count
Closes #13582
2022-11-20 20:25:12 +02:00
Veikka Tuominen
034507ef7c Module: fix compile error for non-comptime-known global initializer 2022-11-20 20:25:12 +02:00
Veikka Tuominen
98b3734b67 Sema: prioritize Value.variable over OPV when resolving const value
Closes #12275
2022-11-20 20:25:12 +02:00
Veikka Tuominen
bc76873827 Sema: fix type check in zirIntToPtr
Simple fix: don't assume a ptr type before it has been checked.

Closes #13567
2022-11-20 20:25:11 +02:00
Veikka Tuominen
510b891d27 Sema: handle opt_payload in beginComptimePtrLoad 2022-11-20 20:25:11 +02:00
Veikka Tuominen
0616d2966a Sema: allow coercing typed undefined to int
Closes #13556
2022-11-20 20:25:11 +02:00
Veikka Tuominen
44f8714dfb translate-c: cast unsuffixed floats to f64 2022-11-20 16:10:54 +02:00