0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std
Andrew Kelley 3264abe3d8 stage2: fixes for error union semantics
* Sema: avoid unnecessary safety checks when an error set is empty.
 * Sema: make zirErrorToInt handle comptime errors that are represented
   as integers.
 * Sema: make empty error sets properly integrate with
   typeHasOnePossibleValue.
 * Type: correct the ABI alignment and size of error unions which have
   both zero-bit error set and zero-bit payload. The previous code did
   not account for the fact that we still need to store a bit for
   whether there is an error.
 * LLVM: lower error unions possibly with the payload first or with the
   error code first, depending on alignment. Previously it always put
   the error code first and used a padding array.
 * LLVM: lower functions which have an empty error set as the return
   type the same as anyerror, so that they can be used where
   fn()anyerror function pointers are expected. In such functions, Zig
   will lower ret to returning zero instead of void.

As a result, one more behavior test is passing.
History 2022-05-24 15:34:52 -07:00
..
atomic std: replace usage of std.meta.bitCount() with @bitSizeOf() 2022-04-27 11:10:52 +02:00
build some fixes to the EnvMap HashContext 2022-05-11 18:41:23 -06:00
c std.os: Add memfd_create for FreeBSD 2022-05-16 17:43:44 -04:00
compress zig fmt: remove trailing whitespace on doc comments 2022-04-05 18:08:33 +03:00
crypto Fixes comptime 'error: cannot assign to constant' error in siphash. 2022-05-16 22:31:09 -04:00
dwarf wasm: Implement debug info for parameters 2022-05-09 18:51:46 +02:00
event std: replace usage of std.meta.bitCount() with @bitSizeOf() 2022-04-27 11:10:52 +02:00
fmt fix aarch64 f16 nan parse test failure 2022-05-03 19:04:16 +12:00
fs std.Thread: ResetEvent improvements (#11523) 2022-04-26 16:48:56 -05:00
hash std: fix crypto and hash benchmark 2022-04-24 23:01:06 -04:00
heap std.Thread: Mutex and Condition improvements (#11497) 2022-04-23 19:35:56 -05:00
http std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
io std: replace usage of std.meta.bitCount() with @bitSizeOf() 2022-04-27 11:10:52 +02:00
json allocgate: renamed getAllocator function to allocator 2021-11-30 23:32:47 +00:00
math std.math: simpler error handling 2022-05-17 22:04:12 +01:00
mem Allocator: correct PanicFree function name 2022-05-02 15:29:27 -04:00
meta std.meta.TrailerFlags: improve init type 2022-05-04 21:26:48 +02:00
net Check for isDarwin() instead of linked libc 2022-01-14 13:44:38 +01:00
os Generate linux syscalls via. the linux source tree 2022-05-16 23:55:11 -04:00
rand std.rand: fixup 'improve random float generation' 2022-05-12 15:39:19 +02:00
target update target CPU features with LLVM 13 rc1 data 2021-08-15 23:09:55 -07:00
testing allocgate: change resize to return optional instead of error 2021-11-30 23:45:01 +00:00
Thread std: replace usage of std.meta.bitCount() with @bitSizeOf() 2022-04-27 11:10:52 +02:00
time std.time.epoch: fix issue in documentation 2021-12-16 19:08:58 -08:00
tz Support legacy TZ format, expose header struct to a potential writer 2022-01-01 12:47:08 +00:00
unicode migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
valgrind remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
x fmt: fix formatting of lib/std/x/net/bpf.zig 2022-04-28 18:34:37 +02:00
zig target: Rename sparcv9 -> sparc64 2022-05-13 16:43:59 -04:00
array_hash_map.zig Sema: solve a false positive "depends on itself" 2022-05-06 22:40:57 -07:00
array_list.zig std.ArrayList: use variable for local mutable state 2022-03-11 22:47:24 -07:00
ascii.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
atomic.zig std.Thread.Futex improvements (#11464) 2022-04-19 19:42:15 -05:00
base64.zig std.base64: upgrade to new function pointer semantics 2022-03-30 20:38:01 -07:00
bit_set.zig std: make IntegerBitSet and ArrayBitSet have defined memory layout 2022-05-10 21:30:58 -04:00
bounded_array.zig std/bounded_array.zig: Add Writer interface 2022-04-14 02:56:40 -04:00
buf_map.zig reverse some of the now unneeded changes from squeek 2022-05-11 18:41:23 -06:00
buf_set.zig std.BufSet.clone: fix key ownership 2022-03-01 13:28:47 -05:00
build.zig Update usages of process.getEnvMap and change BufMap -> EnvMap where applicable 2022-05-11 18:40:53 -06:00
builtin.zig Sema: improve index out of bounds panic message 2022-05-16 17:42:51 -07:00
c.zig stage2: fix bugs preventing stage2 from building stage3 with LLVM 2022-04-15 23:32:26 +03:00
child_process.zig remove extra storage from EnvMap on windows 2022-05-11 18:40:53 -06:00
coff.zig std.coff: parse out codebase and entrypoint from optionalheader 2022-04-28 18:31:20 +03:00
compress.zig compress: add a deflate compressor 2022-01-23 19:30:06 +01:00
comptime_string_map.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
crypto.zig a small crusade against std.meta.declarations 2022-01-31 22:25:49 -07:00
cstr.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
debug.zig stage2: fixes for error union semantics 2022-05-24 15:34:52 -07:00
dwarf.zig dwarf: clean up allocations in std.dwarf module 2022-04-21 00:06:52 +02:00
dynamic_library.zig Pull elf magic string out to re-used constant 2022-04-04 15:33:24 +03:00
elf.zig target: Rename sparcv9 -> sparc64 2022-05-13 16:43:59 -04:00
enums.zig deprecated TypeInfo in favor of Type 2022-03-08 20:38:12 +02:00
event.zig std, compiler-rt: remove test names where applicable 2021-09-01 17:54:06 -07:00
fifo.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
fmt.zig document bufPrint, and format now uses writer not output 2022-05-23 11:58:13 +03:00
fs.zig stage2: Move WASI/Zig-specific selfExePath to introspect.zig 2022-04-18 23:06:49 -07:00
hash.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
hash_map.zig std: fix missing hash map safety 2022-04-20 17:18:06 -07:00
heap.zig stage2: fix pointer arithmetic result type 2022-05-17 23:50:38 -07:00
http.zig std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
io.zig stage2: progress towards stage3 2022-04-14 10:12:45 -07:00
json.zig std.json stringify fix object keys are always is strings 2022-05-10 09:56:49 +02:00
leb128.zig I'm working on a WebAssembly interpreter in zig. WebAssembly uses LEB128 encoding throughout its specification. 2021-09-20 01:58:18 -04:00
linked_list.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
log.zig std lib API deprecations for the upcoming 0.9.0 release 2021-11-30 00:13:07 -07:00
macho.zig macho: set CS_LINKER_SIGNED flag in code signature generated by zld 2022-04-01 14:33:37 +02:00
math.zig Add aliases to math builtins back into std.math (#11666) 2022-05-19 15:04:40 -04:00
mem.zig target: Rename sparcv9 -> sparc64 2022-05-13 16:43:59 -04:00
meta.zig std.meta.TrailerFlags: include in std tests 2022-05-04 20:01:48 +02:00
multi_array_list.zig std.MultiArrayList: add functions addOne, pop, and popOrNull (#11553) 2022-04-29 22:51:53 -04:00
net.zig Merge pull request #10576 from schmee/macos-resolve-ip 2022-01-15 00:47:12 +01:00
once.zig std.Thread.Mutex: change API to lock() and unlock() 2021-11-09 18:31:03 -07:00
os.zig std.os: add timerfd_create, timerfd_settime and timerfd_gettime 2022-05-17 00:56:33 +02:00
packed_int_array.zig zig fmt: remove trailing whitespace on doc comments 2022-04-05 18:08:33 +03:00
pdb.zig std.pdb: fix incorrect use of packed struct 2022-05-02 22:06:02 -07:00
priority_dequeue.zig std.priority_dequeue: allow comparator to take a context parameter 2021-12-15 17:46:10 -08:00
priority_queue.zig Fix bug in PriorityQueue::removeIndex() 2022-04-14 02:54:41 -04:00
process.zig document that on Windows, all key arguments in EnvMap must be valid utf8 2022-05-11 18:41:23 -06:00
Progress.zig std.Progress: activate() calls maybeRefresh() 2022-05-13 14:31:30 -07:00
rand.zig std.rand.float: simplify leading zero calculations 2022-05-12 16:23:39 +02:00
segmented_list.zig std.SegmentedList: add constIterator 2022-04-29 14:48:49 -04:00
SemanticVersion.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
simd.zig zig fmt: remove trailing whitespace on doc comments 2022-04-05 18:08:33 +03:00
sort.zig std: add sort method to ArrayHashMap and MultiArrayList 2022-03-10 13:13:17 -05:00
start.zig target: Rename sparcv9 -> sparc64 2022-05-13 16:43:59 -04:00
start_windows_tls.zig stage1, stage2: rename c_void to anyopaque (#10316) 2021-12-19 00:24:45 -05:00
std.zig std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
target.zig Bump support macOS versions; clean up allocs in llvm.targetTriple 2022-05-22 22:31:41 +02:00
testing.zig std: Do not allocate the result for ChildProcess.init 2022-04-29 22:50:34 -04:00
Thread.zig std.Thread: insert a missing @alignCast 2022-05-17 23:50:38 -07:00
time.zig zig fmt: remove trailing whitespace on doc comments 2022-04-05 18:08:33 +03:00
treap.zig treap: zig fmt 2022-04-15 17:01:01 -05:00
tz.zig Rename mem.bswapAllFields to byteSwapAllFields 2022-01-28 21:03:21 -05:00
unicode.zig reverse some of the now unneeded changes from squeek 2022-05-11 18:41:23 -06:00
valgrind.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
wasm.zig wasm: Implement memset, and sret arguments. 2022-01-04 17:59:05 +01:00
x.zig Add classic BPF library 2022-01-29 13:57:14 +11:00
zig.zig stage2 parser: UTF-8 encode \u{NNNNNN} escape sequences 2022-03-02 14:45:19 -05:00