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 e6b73be870 - 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
mlugg
1033d71017
Sema,type: unify type query functions
...
The following pairs of functions have been combined using the "advanced"
pattern used for other type queries:
* `Sema.fnHasRuntimeBits`, `Type.isFnOrHasRuntimeBits`
* `Sema.typeRequiresComptime`, `Type.comptimeOnly`
2023-10-10 21:40:23 -07:00
Andrew Kelley
da7e4fb31a
revert compiler_rt: no need to put it in a static library
...
This mostly reverts 6e09045041 however it
leaves intact the linker supporting both obj and lib files, and the
frontend choosing which one to create.
2023-10-10 11:23:39 -07:00
Andrew Kelley
8679c7a607
Compilation: default to self-hosted backend when not using libllvm
...
When not using libllvm, it means the compiler is not capable of
producing an object file or executable, making the self-hosted backends
be a better default.
2023-10-10 11:17:29 -07:00
Andrew Kelley
6e09045041
compiler_rt: no need to put it in a static library
...
It's simpler to link against compiler_rt.o directly.
2023-10-10 11:17:29 -07:00
Andrew Kelley
2ca7cc46c4
Package.Fetch: fix inclusions not working for directories
...
Oops, the loop was checking the wrong variable! Added a unit test.
2023-10-10 02:29:29 -07:00
Andrew Kelley
aaf46187ab
Merge pull request #17391 from xxxbxxx/load-i4
...
codegen/llvm: truncate padding bits when loading a non-byte-sized value
2023-10-09 22:06:49 -07:00
Andrew Kelley
fa08e49f83
Package.Fetch: allow relative paths outside project root
...
Only for packages that come from the main package. Fetched packages
still cannot depend on paths outside their package root.
2023-10-09 22:01:18 -07:00
Veikka Tuominen
b2c36b14de
Sema: fix dbg_inline instructions not being emitted
...
This broke with #16604 but went unnoticed due to lack of tests.
Closes #17444
2023-10-09 21:00:31 -07:00
Jacob Young
9e341a6da3
Merge pull request #17447 from jacobly0/x86_64
...
x86_64: fix codegen errors when compiling compiler_rt
2023-10-09 16:18:50 -04:00
Jacob Young
922b5b5453
x86_64: implement 128-bit integer multiply and divide
2023-10-09 05:23:23 -04:00
Jacob Young
d559c61902
x86_64: implement @min and @max for 128-bit integers
2023-10-09 03:11:41 -04:00
Jacob Young
21948d7540
x86_64: implement @abs of 128-bit integers
2023-10-09 03:11:41 -04:00
Jacob Young
a96c08c1d1
x86_64: implement struct field value for register pairs
2023-10-09 03:11:40 -04:00
Jacob Young
f28b1657aa
x86_64: implement 128-bit integer shifts in registers
2023-10-09 03:09:01 -04:00
Andrew Kelley
95907cb795
restore progress reporting for package fetching
2023-10-08 21:14:30 -07:00
Andrew Kelley
5eb5d523b5
give modules friendly names for error reporting
2023-10-08 20:58:04 -07:00
Andrew Kelley
cd4397783f
Package.Fetch: improved deletion algorithm
...
Instead of every file deletion being followed by a recursive attempt to
remove the parent directory, while walking the directory, every
directory that will have nonzero files deleted from it is tracked in an
array hash map.
After all the threads have finished deleting and hashing, the parent
thread sorts the "suspicious" directories by length, descending,
ensuring that children appear before parents, and then iterates over the
array hash map, attempting a rmdir operation on each. Any rmdir that
succeeds appends the parent directory to the map so that it will be
removed if empty.
2023-10-08 20:03:40 -07:00
Andrew Kelley
4a2cf38844
Package.Fetch: apply inclusion rules from build.zig.zon
2023-10-08 19:29:17 -07:00
Andrew Kelley
1b372f1872
fix using the wrong allocator for modules
2023-10-08 18:23:38 -07:00
Andrew Kelley
5e7c44a321
Package.Fetch: tighten up check for path outside root
2023-10-08 17:42:49 -07:00
Andrew Kelley
6d84caf727
move some package management related source files around
2023-10-08 17:29:55 -07:00
Andrew Kelley
7bae6d9064
fix dependencies.zig generation with no dependencies
2023-10-08 17:26:02 -07:00
Andrew Kelley
8f20ce74f4
zig fetch: require 'paths' field in the manifest
2023-10-08 17:21:18 -07:00
Andrew Kelley
f0cc6f17a0
Package.Fetch: fix not making directory paths for symlinks
2023-10-08 17:21:08 -07:00
Andrew Kelley
f48ec4b8ee
use long-lived arena for @cImport-generated Module
2023-10-08 16:54:31 -07:00
Andrew Kelley
1ad33f53fe
give build.zig modules access to their dependencies' build.zig modules
2023-10-08 16:54:31 -07:00
Andrew Kelley
ce052d89a8
Manifest: fix not initializing token locations
2023-10-08 16:54:31 -07:00