Jacob Young
d3fed1a87e
cbe: fix another instance of calling intValue with an error type
2023-06-24 16:22:00 -04:00
Xavier Bouchoux
f10b9e8fd7
update Liveness to detect that safety checks do not modify memory
...
followup to [25d3713b07a100d8fdb349317db97fd9d0c1e366]
Resolves #12215
Previous code didn't account for the extra unreach() that now exists in the air:
```
%29!= block(void, {
%30!= cond_br(%22!, {
%31!= br(%29, @Air.Inst.Ref.void_value)
}, {
%2! %15!
%27!= call(%26, [%19!, %21])
%28!= unreach()
})
} %22!)
```
2023-06-24 12:57:46 -07:00
kcbanner
baa2b62e88
cbe: fix crash caused by calling mod.intValue on type_inferred_error_set
2023-06-24 13:49:24 -04:00
Andrew Kelley
a5e15eced0
LLVM: move many DeclGen methods to Object
...
DeclGen/FuncGen methods are for things that pertain to a particular
declaration or function, while Object methods are for things that
pertain to the entire LLVM Module. Many methods were in the wrong
category, such as type and value lowering.
This is a prerequisite commit for a local branch I am working on, which
needs to be able to call lowerValue() without the context of any
particular function or declaration.
2023-06-24 02:29:49 -07:00
Ali Chraghi
ff0a88b133
spirv: fix a few conflicts caused by intern-pool
2023-06-23 23:52:45 -07:00
Andrew Kelley
5288929ffd
sema.addConstant: remove type parameter
...
Now that InternPool migration is finished, all values have types. So
only the value parameter is required.
2023-06-23 21:59:42 -07:00
kcbanner
5fc5e4fbe0
sema: Fix overflow when analyzing an inline switch prong range that ends on the maximum value of the switched type
2023-06-23 18:28:33 -07:00
kcbanner
9d66481e3d
llvm: fixup elem_count argument of ZigLLVMCreateDebugArrayType to be i64
...
The signature is `getOrCreateSubrange(int64_t Lo, int64_t Count)`, so this updates the bindings to match.
This fixes a crash in `lowerDebugTypeImpl` when analyzing slices that have a length of 2^32 or
larger (up to `2^64 >> 3`, which still crashes, because above that the array size in bits overflows u64).
2023-06-23 14:53:17 -07:00
Jacob Young
6aa88ecc54
Type/Value: garbage collect some methods
2023-06-22 11:45:33 -07:00
Jacob Young
c60896743d
Value: handle more legacy tags when writing extern struct to memory
...
Closes #16130
2023-06-22 08:07:02 -07:00
d18g
991e00c270
objcopy.zig allow outputting zero length sections ( #16121 )
...
Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2023-06-22 01:55:34 -07:00
Jacob Young
1d38817f5d
cbe: key lifetime?
2023-06-22 00:24:26 -04:00
Andrew Kelley
12813d5912
Merge pull request #16105 from jacobly0/intern-pool-opt
...
InternPool: various optimizations
2023-06-21 00:07:49 -07:00
Jacob Young
a257e33fff
Type: remove arbitrary restrictions on param and return types
...
Opaque and `noreturn` makes sense since they don't represent real
values, but `null` and `undefined` are perfectly normal
comptime-only values.
Closes #16088
2023-06-20 21:51:01 -07:00
jacobly0
e2eabbbc51
Merge pull request #16098 from ziglang/musl-v1.2.4
...
update musl from v1.2.3 to v1.2.4
2023-06-20 23:14:22 -04:00
Jacob Young
8875efe548
Sema: fix auto-numbered enums with signed tag types
...
Closes #16095
2023-06-20 20:09:28 -07:00
IntegratedQuantum
3267eb3a28
Fix @enumToInt and @tagName for auto-numbered enums with signed tag type.
2023-06-20 20:09:28 -07:00
Andrew Kelley
b77679039f
Merge pull request #15415 from ehaas/c-char-signedness
...
Set `c_char` signedness based on the target
2023-06-20 16:41:58 -07:00
Jakub Konka
d2b2567119
macho: do not skip scanning relocs if the sym is non-extern
2023-06-21 00:31:01 +02:00
Jakub Konka
7b5bd3a93f
Merge pull request #16097 from ziglang/macho-faster-uuid
...
macho: parallelize UUID hash calculation at the expense of full compatibility with ld64
2023-06-21 00:03:52 +02:00
d18g
939e4d81e1
Update objcopy.zig
...
Fix `--only-section=` handling
2023-06-20 13:12:19 -07:00
Jacob Young
96cdd51c14
Type: delete legacy allocation functions
2023-06-20 14:02:09 -04:00
Jacob Young
52ec121469
Sema: optimize callers of indexToKey
2023-06-20 14:02:09 -04:00
Jacob Young
d7bd4f339c
Sema: optimize value resolution
2023-06-20 14:02:09 -04:00
Jacob Young
6b56f4ff0b
Value: optimize isPtrToThreadLocal
2023-06-20 14:02:09 -04:00
Jacob Young
d69e324eae
Value: optimize isRuntimeValue
2023-06-20 14:02:08 -04:00
Jacob Young
ad3e0e4eb4
Sema: optimize typeHasOnePossibleValue
2023-06-20 14:02:08 -04:00
Jacob Young
3c4b58cea7
Air: optimize around byval struct passing compiler bug
2023-06-20 14:02:08 -04:00
Andrew Kelley
a5d8c310ee
musl: update src files to v1.2.4
2023-06-20 12:55:38 -04:00
Andrew Kelley
cdcfd15d3c
musl: deal with zig rename of i386 to x86
...
musl uses "i386" for this while Zig has switched to "x86".
2023-06-20 12:55:38 -04:00
Jacob Young
51cbb081e9
wasm: fix decl alignment
2023-06-20 11:36:50 -04:00
Jakub Konka
eb1050b83a
macho: fix 32bit compilation issues
2023-06-20 10:08:54 +02:00
Evan Haas
fb9d6b8bd9
codegen: Set c_char signedness based on the target
2023-06-20 00:26:42 -07:00
Andrew Kelley
a72d634b73
Merge pull request #16046 from BratishkaErik/issue-6128
...
Renaming `@xtoy` to `@YfromX`
2023-06-19 22:36:24 -07:00
Jacob Young
8bd07fb1be
Sema: fix type in a @floatToInt safety check
...
Unblocks #15981
2023-06-19 13:53:44 -07:00
Jakub Konka
22540e5402
macho: exclude code signature padding from uuid calculation
2023-06-19 22:50:08 +02:00
Andrew Kelley
7d6fcf0831
Merge pull request #15012 from xxxbxxx/objcpy-elf-compress
...
objcopy: add support for --compress-debug-sections
2023-06-19 13:15:40 -07:00
Jacob Young
8fcc28d302
Module: add support for multiple global asm blocks per decl
...
Closes #16076
2023-06-19 13:12:04 -07:00
Eric Joldasov
50339f595a
all: zig fmt and rename "@XToY" to "@YFromX"
...
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00
Eric Joldasov
a6c8ee5231
compiler: rename "@XToY" to "@YFromX", zig fmt: rewrite them
...
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:24 -07:00
Jakub Konka
ef9d6331fc
macho: clean up hasher interface
2023-06-19 20:33:27 +02:00
Jakub Konka
8087c134db
macho: calculate UUID chunk size based on available thread count
2023-06-19 12:53:26 +02:00
Jakub Konka
10aaf2983d
macho: hash the entire file contents for UUID but calc in parallel
2023-06-19 11:26:56 +02:00
Jakub Konka
b3a2ab3fed
macho: extract parallel hasher into a generic helper struct
2023-06-19 10:29:39 +02:00
Xavier Bouchoux
c39191a086
objcopy: add support for --compress-debug-sections
2023-06-19 08:51:03 +02:00
Xavier Bouchoux
5eacddce99
objcopy: support some more elf file variants
...
"SHT_NOBITS" sections can be easily moved around in the file, they can be anywhere since there is no data...
and remove logic about the categorization of symbol tables:
I don't understand or remember why it was needed,
and, in my tests, it works fine without...
It previouly failed to strip an exe linked with `mold`
2023-06-19 07:29:39 +02:00
Krzysztof Wolicki
e7fd70a951
autodoc: Handle more InternPool.Index types properly in Autodoc
2023-06-18 14:07:09 +00:00
Andrew Kelley
e23d48e61a
Merge pull request #15511 from mikdusan/netbsd-pkgsrc
...
netbsd: pkgsrc
2023-06-17 14:22:43 -07:00
r00ster91
6e84f46990
std: replace builtin.Version with SemanticVersion
2023-06-17 13:17:34 -07:00
Motiejus Jakštys
d41111d7ef
mem: rename align*Generic to mem.align*
...
Anecdote 1: The generic version is way more popular than the non-generic
one in Zig codebase:
git grep -w alignForward | wc -l
56
git grep -w alignForwardGeneric | wc -l
149
git grep -w alignBackward | wc -l
6
git grep -w alignBackwardGeneric | wc -l
15
Anecdote 2: In my project (turbonss) that does much arithmetic and
alignment I exclusively use the Generic functions.
Anecdote 3: we used only the Generic versions in the Macho Man's linker
workshop.
2023-06-17 12:49:13 -07:00