zig/lib/std
mlugg c1a5caa454
compiler: combine @intCast safety checks
`castTruncatedData` was a poorly worded error (all shrinking casts
"truncate bits", it's just that we assume those bits to be zext/sext of
the other bits!), and `negativeToUnsigned` was a pointless distinction
which forced the compiler to emit worse code (since two separate safety
checks were required for casting e.g. 'i32' to 'u16') and wasn't even
implemented correctly. This commit combines those safety panics into one
function, `integerOutOfBounds`. The name maybe isn't perfect, but that's
not hugely important; what matters is the new default message, which is
clearer than the old ones: "integer does not fit in destination type".
2025-06-01 12:10:57 +01:00
..
Build compiler: introduce incremental debug server 2025-05-25 04:43:43 +01:00
c c.zig: glibc/musl export 1024-bit sigset_t 2025-04-30 20:32:04 -07:00
compress std.compress.zstd: ensure window size fits into usize 2025-03-31 17:22:44 +11:00
crypto Legalize: implement scalarization of @shuffle 2025-06-01 08:24:01 +01:00
debug compiler: combine @intCast safety checks 2025-06-01 12:10:57 +01:00
dwarf Dwarf: remove redundant debug info 2024-12-19 17:10:03 -05:00
fmt
fs std: Disable fs.test.test.setEndPos on MIPS N32. 2025-05-08 21:32:22 +02:00
hash Legalize: implement scalarization of @shuffle 2025-06-01 08:24:01 +01:00
heap std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
http x86_64: implement integer @reduce(.Add) 2025-05-28 15:10:22 -04:00
io std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
json std.meta.intToEnum -> std.enums.fromInt 2025-05-13 07:28:41 +02:00
math x86_64: rewrite scalar <<| 2025-05-17 18:00:17 -04:00
mem std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
meta std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
net std.net: Implement if_nametoindex for windows (#22555) 2025-04-04 11:40:44 +00:00
os compiler: Scaffold stage2_powerpc backend. 2025-05-20 10:23:16 +02:00
posix Merge pull request #23810 from alexrp/more-test-targets 2025-05-11 20:52:47 +02:00
process support more process creation options on Windows 2025-03-25 23:48:27 +01:00
Random
sort
tar std.tar: pass entry kind to rootDir to avoid setting root_dir to file (#23456) 2025-04-16 19:17:25 +00:00
Target target: auto-generated spirv features 2025-05-21 15:26:18 +03:30
testing FailingAllocator: remove outdated doc comments, move doc comment example to decltest 2025-04-23 19:28:28 -04:00
Thread de-genericify SinglyLinkedList 2025-04-03 14:55:04 -07:00
time std.time.epoch: change getDaysInMonth to accept the year as an argument 2025-03-08 14:25:28 -05:00
tz
unicode
valgrind
zig Legalize: implement scalarization of binary operations 2025-05-31 18:54:28 -04:00
zip std.zip: Add ZIP64 support for local file header extra field 2025-01-17 22:55:55 +01:00
zon x86_64: implement integer @reduce(.Add) 2025-05-28 15:10:22 -04:00
array_hash_map.zig Legalize: implement scalarization of @shuffle 2025-06-01 08:24:01 +01:00
array_list.zig std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
ascii.zig docs(std.ascii): Remove redundant three slashes 2025-04-27 19:37:43 +02:00
atomic.zig std.atomic: make cache_line const a comptime_int 2025-02-22 03:48:09 +01:00
base64.zig docs(std.base64): Add references to RFC 4648 2025-03-24 11:42:28 +00:00
bit_set.zig std: add bit_set.findLastSet() (#22411) 2025-03-24 16:12:23 +01:00
BitStack.zig
bounded_array.zig std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
buf_map.zig
buf_set.zig
Build.zig compiler: introduce incremental debug server 2025-05-25 04:43:43 +01:00
builtin.zig spirv: write error value in an storage buffer 2025-05-21 12:57:40 +03:30
c.zig Add EVFILT_USER and friends for OpenBSD 2025-05-22 04:37:57 +02:00
coff.zig
compress.zig fix typo of anytype to type 2025-02-05 13:58:15 +01:00
crypto.zig std.crypto: add constant-time codecs (#23420) 2025-04-12 20:13:45 +02:00
debug.zig compiler: combine @intCast safety checks 2025-06-01 12:10:57 +01:00
DoublyLinkedList.zig std.DoublyLinkedList: remove length tracking 2025-04-03 15:57:35 -07:00
dwarf.zig
dynamic_library.zig std.DynLib: fix proper type of chain_ptr on GnuHashSection32 2025-03-03 20:01:05 +01:00
elf.zig chore(std.mem): Rename trimLeft and trimRight 2025-04-27 18:03:59 +09:00
enums.zig Revert "Work around stage1 not yet returning null-terminated @typeInfo strings" 2025-05-14 06:47:23 +02:00
fifo.zig runtime page size detection 2025-02-06 14:23:23 -08:00
fmt.zig chore(std.mem): Rename trimLeft and trimRight 2025-04-27 18:03:59 +09:00
fs.zig Merge pull request #23268 from chrboesch/i19875 2025-04-14 22:20:44 +02:00
gpu.zig spirv: error when execution mode is set more than once 2025-05-21 13:01:21 +03:30
hash.zig Add rapidhash (#22085) 2025-02-22 14:32:48 -08:00
hash_map.zig std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
heap.zig std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
http.zig
io.zig Revert "Work around stage1 not yet returning null-terminated @typeInfo strings" 2025-05-14 06:47:23 +02:00
json.zig
leb128.zig std.leb128: Disable two tests on x86-linux-musl with dynamic linkage. 2025-05-19 00:22:19 +02:00
log.zig std.log: fix example 2025-05-24 10:52:56 +02:00
macho.zig
math.zig x86_64: rewrite scalar <<| 2025-05-17 18:00:17 -04:00
mem.zig compiler: Scaffold stage2_powerpc backend. 2025-05-20 10:23:16 +02:00
meta.zig Revert "Work around stage1 not yet returning null-terminated @typeInfo strings" 2025-05-14 06:47:23 +02:00
multi_array_list.zig std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
net.zig std.net: Implement if_nametoindex for windows (#22555) 2025-04-04 11:40:44 +00:00
once.zig
os.zig std.os: handle ENOENT for fnctl on macos 2025-05-09 11:20:42 +02:00
pdb.zig
pie.zig start: Don't artificially limit some posixCallMainAndExit() logic to Linux. 2025-05-18 17:14:09 +02:00
posix.zig std.posix: Add sigrtmin() and sigrtmax() 2025-05-09 15:10:25 +02:00
priority_dequeue.zig
priority_queue.zig std.priority_queue: add useful functions from ArrayList API 2025-02-01 19:02:39 +01:00
process.zig std: add os.linux.sysinfo(), use it for process.totalSystemMemory() 2025-04-15 20:08:59 +02:00
Progress.zig std.Progress: fix many bugs 2025-05-03 20:09:51 +01:00
Random.zig Allocator/Random: document that comparing ptr may result in illegal behavior 2025-02-03 17:07:28 -08:00
RingBuffer.zig
segmented_list.zig
SemanticVersion.zig
simd.zig Legalize: implement scalarization of overflow intrinsics 2025-06-01 08:24:01 +01:00
SinglyLinkedList.zig de-genericify SinglyLinkedList 2025-04-03 14:55:04 -07:00
sort.zig
start.zig compiler: Scaffold stage2_powerpc backend. 2025-05-20 10:23:16 +02:00
static_string_map.zig
std.zig start: Don't artificially limit some posixCallMainAndExit() logic to Linux. 2025-05-18 17:14:09 +02:00
tar.zig chore(std.mem): Rename trimLeft and trimRight 2025-04-27 18:03:59 +09:00
Target.zig Legalize: implement scalarization of @shuffle 2025-06-01 08:24:01 +01:00
testing.zig compiler: Scaffold stage2_powerpc backend. 2025-05-20 10:23:16 +02:00
Thread.zig std: Add support for SerenityOS in various places 2025-03-11 14:59:42 +00:00
time.zig std.time: Make Instant.since() work on UEFI 2025-03-02 23:16:34 +00:00
treap.zig
tz.zig
unicode.zig
Uri.zig
valgrind.zig std.valgrind: Port doClientRequest() to all archs supported by Valgrind. 2024-11-04 12:39:48 +01:00
wasm.zig wasm linker: implement @tagName for sparse enums 2025-01-15 15:11:36 -08:00
zig.zig std.Target: Remove ObjectFormat.nvptx (and associated linker code). 2025-05-10 12:21:57 +02:00
zip.zig runtime page size detection 2025-02-06 14:23:23 -08:00
zon.zig compiler,std: implement ZON support 2025-02-03 09:14:37 +00:00