David CARLIER
64f0059cd3
std.c: update netbsd/openbsd mman constants
2023-06-22 10:21:48 +00:00
Niles Salter
82470d4f89
[priority_dequeue] Fix out-of-bounds access
...
This makes it so `first_child_index` will not be accessed when it is equal to `self.len`. (i.e. `self.items[self.len]` will not happen) The access itself was "safe" (as in, `self.len < self.items.len`) because we were only calling `doSiftDown` in the case where there was a stale value at `self.items[self.len]`. However, it is still technically a bug, and can manifest by an unnecessary comparison of a value to a copy of itself.
2023-06-22 02:03:53 -07:00
Niles Salter
ff5850183e
[priority_deque] simplify & optimize isMinLayer
...
LLVM has trouble compiling the old implementation, (presumably) because `leading_zeros` is thought to be a `u7` rather than a `u6`, which means `63 - clz` is not equivalent to `63 ^ clz`, which means it can't deduce that the final condition can simply be flipped. (I am assuming `usize` is a `u64` here for ease of understanding, but it's the same for any power of 2)
https://zig.godbolt.org/z/Pbj4P7ob3
The new version is slightly better too because `isMinLayer(maxInt(usize))` is now well-defined behavior.
2023-06-22 01:57:28 -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
Piotr Sarna
438d680913
http: fix getting Transfer-Encoding value
...
The 'Content-Length' header was inspected by mistake,
which makes it effectively impossible to use chunked
Transfer-Encoding when using the http client.
Tested locally with a HTTP server - data is properly sent
with POST method and the proper encoding declared, after the fix.
2023-06-22 11:44:46 +03:00
Jacob Young
1d38817f5d
cbe: key lifetime?
2023-06-22 00:24:26 -04:00
Andrew Kelley
128fd7dd02
CI: -x86_64-macos-debug, +aarch64-macos-debug
...
It's easier to get M1 hardware for testing than x86_64-macos. This
addresses the current bottleneck in our CI pipeline.
2023-06-21 00:37:58 -07: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
Josh Wolfe
0f2339f55b
std: json.parseFromValue() ( #15981 )
2023-06-20 19:01:34 -04: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
begly
da1f457e3b
Fix Typo in langref.html.in
2023-06-20 11:51:11 -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
Jacob Young
9eb008717b
std: prevent random CI failures
2023-06-20 10:56:23 -07:00
Andrew Kelley
09c7f1bd7c
musl: update libc.S to v1.2.4
2023-06-20 12:55:38 -04:00
Andrew Kelley
b20ccff515
std.os: update logic for 64-bit symbol choice
...
musl v1.2.4 dropped the "64"-suffixed aliases for legacy "LFS64" ("large
file support") interfaces, so this commit changes the corresponding Zig
logic to call the correct names.
2023-06-20 12:55:38 -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
Andrew Kelley
928c4c9bd3
musl: update headers to v1.2.4
2023-06-20 12:55:38 -04:00
Jacob Young
51cbb081e9
wasm: fix decl alignment
2023-06-20 11:36:50 -04:00
Evan Haas
c205521aea
std.Target: c_char is unsigned on RISC-V
2023-06-20 08:27:55 -07: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
Evan Haas
657fe55711
std.Target: Add a function for determining char signedess
...
Copied from arocc c1955a4742/src/target.zig (L7)
2023-06-20 00:26:40 -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
dweiller
c6e2e1ae4b
std.fmt: fix error set of formatDuration
2023-06-19 15:20:49 -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
a4d1edac8d
stage1: update zig1.wasm after renaming "@XtoY" to "YfromX"
...
Note from Andrew: I re-ran update-zig1 on my pc and replaced this
commit.
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Signed-off-by: Andrew Kelley <andrew@ziglang.org>
2023-06-19 12:45:01 -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
Andrew Kelley
e6e8cacab9
std.mem.order: use for loop syntax
...
Not only does it look nicer, it's a performance enhancement for debug
builds since the safety checks are eliminated.
2023-06-19 12:07:32 -07:00
Jakub Konka
ef9d6331fc
macho: clean up hasher interface
2023-06-19 20:33:27 +02:00
Josh Wolfe
32cb9462ff
std: Support user-provided jsonParse method. Unify json.Parser and json.parse* ( #15705 )
2023-06-19 11:21:37 -04:00
Jakub Konka
8087c134db
macho: calculate UUID chunk size based on available thread count
2023-06-19 12:53:26 +02:00
Jakub Konka
c2554cf0f1
link-test: remove now obsolete UUID test for MachO
2023-06-19 11:33:06 +02:00