Bogdan Romanyuk
ebde525cce
Sema: fix @extern error on function pointer
2023-10-16 01:30:39 +00:00
Robin Voetter
0552e504d0
spirv: work around OpSource parsing issue in llvm-spirv
...
The Khronos SPIRV-LLVM translator does not parse OpSource correctly. This
was causing tests to fail and other mysterious issues.
These are resolved by only generating a single OpSource instruction for now,
which does not have the source file locations also.
See https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/2188
2023-10-15 17:07:39 +02:00
Ali Chraghi
45a1945dc4
spirv: simple binary and comparison vector operations
2023-10-15 14:00:33 +02:00
Robin Voetter
9c20449cc5
wasm: lower min/max for floats to compiler_rt
...
The min and max builtins in Zig have some intricate behavior
related to floats, that is not replicated with the min and max
wasm instructions or using simple select operations. By lowering
these instructions to compiler_rt, handling around NaNs is done
correctly.
See also https://github.com/WebAssembly/design/issues/214
2023-10-15 14:00:32 +02:00
Ali Chraghi
2fe16e072a
spirv: emit vectors as arrays
2023-10-15 14:00:32 +02:00
Robin Voetter
f4064d98e2
spirv: optional comparison
2023-10-15 14:00:31 +02:00
Robin Voetter
10b8171466
spirv: handle errors in switch
2023-10-15 14:00:30 +02:00
Robin Voetter
e2e4e1f8b4
spirv: intcast, trunc for strange ints
2023-10-15 14:00:10 +02:00
Robin Voetter
b1499df1b8
spirv: sign-extension for strange integers
2023-10-15 14:00:09 +02:00
Robin Voetter
839a93a101
intern pool: fix float equality
...
We need to perform bitwise equality here, otherwise we get
two different entries for nan values.
2023-10-15 14:00:08 +02:00
Robin Voetter
4f279078c8
spirv: air min/max
2023-10-15 14:00:07 +02:00
Robin Voetter
f858bf1616
spirv: air bitcast for non-numeric non-pointer types
2023-10-15 14:00:07 +02:00
Robin Voetter
0af16a58a0
spirv: fix air is_null optional slice field type
2023-10-15 14:00:06 +02:00
Robin Voetter
d0e7a3596b
spirv: allow generation of *i0
2023-10-15 14:00:06 +02:00
Robin Voetter
2d52fc762d
spirv: handle zero-sized arrays
2023-10-15 14:00:05 +02:00
Ali Chraghi
d8b591766a
spirv: fpext and fptrunc instructions
2023-10-15 14:00:04 +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
ae3efab226
spirv: generate *void as pointer to opaque
2023-10-15 14:00:03 +02:00
Robin Voetter
fe51ff9fc1
spirv: make air is_null not emit OpPtr(Not)Equal
2023-10-15 14:00:03 +02:00
Robin Voetter
15cf1315bb
spirv: fix incorrect repr of some optional operations
2023-10-15 14:00:01 +02:00
Robin Voetter
0a3e566f57
spirv: make bitcasts between the same spirv type a no-op
2023-10-15 14:00:01 +02:00
Robin Voetter
c6c5fb40de
spirv: fix float unequality
2023-10-15 14:00:00 +02:00
Robin Voetter
4a6a024a4b
spirv: properly skip comptime function parameters
2023-10-15 14:00:00 +02:00
Robin Voetter
89b1dafa78
spirv: aggregate_init for structs
2023-10-15 13:59:55 +02:00
Robin Voetter
28dda3bf89
spirv: put linkery bits in Object
...
This structure is used to group information that needs to
persist between decls in codegen.
2023-10-15 13:59:26 +02:00
Robin Voetter
31ad2d72a7
spirv: use CacheString for source_file_names instead of []const u8
2023-10-15 13:59:26 +02:00
Robin Voetter
a3d77bdba9
spirv: get rid of SpvModule arena
2023-10-15 13:59:25 +02:00
Robin Voetter
ab701c3d37
spirv: anon decl refs
2023-10-15 13:59:24 +02:00
Robin Voetter
08ea9a9ff6
spirv: cast result of .elem pointers to right type if needed
2023-10-15 13:59:23 +02:00
Robin Voetter
a7c3d5e4ec
spirv: constant elem ptr fix
2023-10-15 13:59:22 +02:00
Robin Voetter
4ea361f6dc
spirv: lower pointers to zero-bit types as undef
2023-10-15 13:59:22 +02:00
Robin Voetter
4e22f811e7
spirv: opaque types
2023-10-15 13:59:20 +02:00
Luuk de Gram
b0f031f573
Merge pull request #17523 from xxxbxxx/wasm-codegen
...
wasm codegen fixes
2023-10-15 05:51:41 +02:00
Peng He
a126afa1c3
translate-c: fix crash when last stmt of stmt expr is a decl
2023-10-14 17:09:54 +00:00
Xavier Bouchoux
d5991ee7ca
codegen/wasm: fix non-byte-sized signed integer comparison
2023-10-14 10:23:36 +02:00
Xavier Bouchoux
27a19908ed
codegen/wasm: fix tuple member offset computation
...
It didn't account for field alignement.
2023-10-14 10:23:36 +02:00
Andrew Kelley
ab4d6bf468
LLVM: work around @floatFromInt bug
...
see #17381
2023-10-14 00:33:46 -07:00
Andrew Kelley
2d7d037c48
Merge pull request #17510 from Vexu/vector
...
Fix `@Vector` source locations being swapped
2023-10-13 16:04:47 -07:00
Andrew Kelley
7aa85691b0
Merge pull request #17504 from ziglang/fix-var-args-coercion
...
Sema: fix crash when coercion dest is var args
2023-10-13 08:16:55 -07:00
Veikka Tuominen
f09313dbc4
Sema: fix @Vector source locations being swapped
2023-10-13 16:58:05 +03:00
Andrew Kelley
027aabf497
drop for loop syntax upgrade mechanisms
2023-10-13 03:43:54 -07:00
Andrew Kelley
69dc1a6bb2
llvm: fix incorrect file paths in debug info
...
The previous code incorrectly added `sub_path` twice.
Also for the compilation unit, it was passing empty string to realpath,
resulting in the error handling codepath being used.
closes #17482
2023-10-13 03:07:50 -07:00
Andrew Kelley
b6762c2473
Sema: fix crash when ref coercion dest is var args
...
When analyzing the `validate_ref_ty` ZIR instruction, an assertion would
trip if the result type was a var args function argument. The fix is the
same as e6b73be870a39f4da7a08a40da23e38b5e9613da - inline the logic of
`resolveType` and handle the case of var args.
Closes #17494
2023-10-13 00:31:22 -07:00
Andrew Kelley
e6b73be870
Sema: fix crash when coercion dest is var args
...
When analyzing the `as` ZIR instruction, an assertion would trip if the
result type was a var args function argument. The fix is simple: inline
a little bit of the `resolveType` logic into `analyzeAs` to make it
detect this situation - which it was already attempting to do.
Closes #16197
2023-10-12 22:03:39 -07:00
Ryan Liptak
2769215b90
Add zig rc subcommand, a drop-in replacement for rc.exe
...
Uses resinator under-the-hood (see https://github.com/ziglang/zig/pull/17069 )
Closes #9564
2023-10-12 16:19:34 -07:00
Andrew Kelley
b9f75a39d3
Package.Manifest: fix error message for paths
...
closes #17491
2023-10-12 10:47:22 -07:00
Andrew Kelley
1d1e5a8617
Package.Fetch: fix empty path and "." not including all
...
Related to #17491
2023-10-12 10:47:22 -07:00
Krzysztof Wolicki
8c6b0271cc
Package.Fetch: wrap operations involving tmp_directory in a block
...
This makes tmp_directory close before calling renameTmpIntoCache which fixes occurences of those AccessDenied errors that aren't synonymous with PathAlreadyExists on Windows
2023-10-11 20:28:07 -07:00
Andrew Kelley
5722261e64
Merge pull request #17465
...
Compilation: default to self-hosted backends when not using libllvm
2023-10-11 00:53:07 -07:00
Ryan Liptak
42998e637b
Package: Fix path separator not being escaped between root_dir and sub_path
...
Fixes a package fetching regression on Windows. Closes #17477
2023-10-10 23:02:03 -07:00