zig/lib/std
Andrew Kelley 795e7c64d5 wasm linker: aggressive DODification
The goals of this branch are to:
* compile faster when using the wasm linker and backend
* enable saving compiler state by directly copying in-memory linker
  state to disk.
* more efficient compiler memory utilization
* introduce integer type safety to wasm linker code
* generate better WebAssembly code
* fully participate in incremental compilation
* do as much work as possible outside of flush(), while continuing to do
  linker garbage collection.
* avoid unnecessary heap allocations
* avoid unnecessary indirect function calls

In order to accomplish this goals, this removes the ZigObject
abstraction, as well as Symbol and Atom. These abstractions resulted
in overly generic code, doing unnecessary work, and needless
complications that simply go away by creating a better in-memory data
model and emitting more things lazily.

For example, this makes wasm codegen emit MIR which is then lowered to
wasm code during linking, with optimal function indexes etc, or
relocations are emitted if outputting an object. Previously, this would
always emit relocations, which are fully unnecessary when emitting an
executable, and required all function calls to use the maximum size LEB
encoding.

This branch introduces the concept of the "prelink" phase which occurs
after all object files have been parsed, but before any Zcu updates are
sent to the linker. This allows the linker to fully parse all objects
into a compact memory model, which is guaranteed to be complete when Zcu
code is generated.

This commit is not a complete implementation of all these goals; it is
not even passing semantic analysis.
2025-01-15 15:11:35 -08:00
..
Build wasm linker: aggressive DODification 2025-01-15 15:11:35 -08:00
c add m4 {pro,max} detection 2024-12-16 20:56:29 -05:00
compress Rewrite bit_reader and bit_writer to take advantage of current zig semantics and enhance readability (#21689) 2024-10-13 18:44:42 -07:00
crypto argon2: bail out if m < 8p (#22232) 2024-12-14 19:26:55 +00:00
debug defaultPanic: @trap on 'other' target 2024-11-29 15:30:05 -05:00
dwarf Dwarf: remove redundant debug info 2024-12-19 17:10:03 -05:00
fmt
fs std.os.windows: Map PIPE_NOT_AVAILABLE from OpenFile() to error.NoDevice (#21938) 2024-11-27 22:33:29 +01:00
hash correct the hint in XxHash3 2024-12-15 03:40:20 -08:00
heap Fix index calculation in WasmPageAllocator 2024-10-12 22:53:02 +02:00
http std.http.Client: change ssl key log creation permission bits 2024-11-07 20:56:33 -05:00
io Rewrite bit_reader and bit_writer to take advantage of current zig semantics and enhance readability (#21689) 2024-10-13 18:44:42 -07:00
json
math Sema: rewrite semantic analysis of function calls 2025-01-09 06:46:47 +00:00
mem Allocator.free: document zero-length behavior 2024-11-24 18:19:11 -05:00
meta
net
os Sema: rewrite semantic analysis of function calls 2025-01-09 06:46:47 +00:00
posix std.posix: Skip Stat struct comparison in fstatat test for s390x-linux. 2024-10-04 00:26:55 +02:00
process std.os.windows: Map PIPE_NOT_AVAILABLE from OpenFile() to error.NoDevice (#21938) 2024-11-27 22:33:29 +01:00
Random
sort
tar Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
Target std: fix undefined value in Target.Query 2025-01-05 16:26:21 +00:00
testing
Thread std.Thread.Futex: Mark inline asm volatile in WasmImpl. 2024-11-27 23:24:37 +01:00
time
tz
unicode
valgrind std.valgrind: Fix some compile errors. 2024-11-04 10:56:32 +01:00
zig compiler: improve "... contains reference to comptime var" errors 2025-01-11 08:54:47 +00:00
zip
array_hash_map.zig std.ArrayHashMap fix eql documentation 2024-12-11 15:21:56 -05:00
array_list.zig compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
ascii.zig Updated ascii.zig's isWhitespace function to use switch instead of for loop. (#22094) 2024-11-29 12:26:23 -08:00
atomic.zig std.atomic: fix cache line size for RISC-V 2025-01-12 04:51:00 +01:00
base64.zig
bit_set.zig
BitStack.zig
bounded_array.zig
buf_map.zig
buf_set.zig
Build.zig std.Build: add API to create Compile steps from existing module 2024-12-18 01:48:54 +05:00
builtin.zig compiler: Improve the handling of unwind table levels. 2024-12-11 00:10:15 +01:00
c.zig Also export mach_timebase_info_data from darwin 2024-12-14 03:16:34 +01:00
coff.zig
compress.zig
crypto.zig Reinstantiates AEGIS-MAC with the final construction (#22205) 2024-12-11 18:52:43 +01:00
debug.zig defaultPanic: @trap on 'other' target 2024-11-29 15:30:05 -05:00
dwarf.zig
dynamic_library.zig std.dynamic_library: update to new elf API 2024-10-12 10:44:17 -07:00
elf.zig link.Elf: eliminate an O(N^2) algorithm in flush() 2024-10-12 10:44:17 -07:00
enums.zig
fifo.zig
fmt.zig std: Disable some tests affected by #22060 for thumbeb too. 2025-01-06 16:47:40 +01:00
fs.zig fix compilation errors for fs and fs.Dir (#21643) 2024-10-17 01:08:58 +02:00
gpu.zig std.gpu: add instanceIndex 2024-11-01 02:04:27 +03:30
hash.zig std.hash.int: avoid words like "easy" and "fast" in doc comments 2024-11-24 15:30:52 -08:00
hash_map.zig Remove strict verifyContext invocation from hash_map implementation. (#22370) 2025-01-06 13:37:30 +00:00
heap.zig Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
http.zig
io.zig std.io.Poller: handle EPIPE as EOF 2024-11-25 14:18:55 -08:00
json.zig
leb128.zig
linked_list.zig
log.zig
macho.zig
math.zig
mem.zig Improve first() documentation for split iterators 2025-01-04 13:45:12 +00:00
meta.zig std.meta.eql: use == directly when comparing packed structs (#21982) 2024-11-24 14:29:44 -08:00
multi_array_list.zig compiler: allow files with AstGen errors to undergo semantic analysis 2024-12-05 19:58:38 +00:00
net.zig
once.zig
os.zig
pdb.zig
posix.zig std.Build.Cache.hit: work around macOS kernel bug 2024-12-11 11:56:44 -08:00
priority_dequeue.zig
priority_queue.zig
process.zig
Progress.zig std.Progress: fix data race 2024-10-23 13:47:44 -07:00
Random.zig add branchHint to std.Random.float 2024-12-13 13:24:38 +01:00
RingBuffer.zig
segmented_list.zig
SemanticVersion.zig compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
simd.zig std: Disable some tests affected by #22060 for thumbeb too. 2025-01-06 16:47:40 +01:00
sort.zig std.equalRange: Compute lower and upper bounds simultaneously 2024-09-23 13:03:06 -07:00
start.zig start: Extend DWARF unwinding protection to more architectures. 2024-12-11 00:10:17 +01:00
static_string_map.zig
std.zig std.crypto.tls: improve debuggability of encrypted connections 2024-11-07 20:25:26 -05:00
tar.zig Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
Target.zig std.Target: Incorporate the Abi tag in VersionRange.default(). 2024-12-17 05:04:16 +01:00
testing.zig std.testing.expectError: fix error names 2024-11-12 14:35:14 +02:00
Thread.zig std.os.windows: Fix some incorrect callconv specifiers. 2024-11-02 10:44:18 +01:00
time.zig move std.time.sleep to std.Thread.sleep 2024-09-26 12:35:14 -07: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: aggressive DODification 2025-01-15 15:11:35 -08:00
zig.zig Sema: rewrite semantic analysis of function calls 2025-01-09 06:46:47 +00:00
zip.zig