0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std
Andrew Kelley 7b8cede61f stage2: rework the C backend
* std.ArrayList gains `moveToUnmanaged` and dead code
   `ArrayListUnmanaged.appendWrite` is deleted.
 * emit_h state is attached to Module rather than Compilation.
 * remove the implementation of emit-h because it did not properly
   integrate with incremental compilation. I will re-implement it
   in a follow-up commit.
 * Compilation: use the .codegen_failure tag rather than
   .dependency_failure tag for when `bin_file.updateDecl` fails.

C backend:
 * Use a CValue tagged union instead of strings for C values.
 * Cleanly separate state into Object and DeclGen:
   - Object is present only when generating a .c file
   - DeclGen is present for both generating a .c and .h
 * Move some functions into their respective Object/DeclGen namespace.
 * Forward decls are managed by the incremental compilation frontend; C
   backend no longer renders function signatures based on callsites.
   For simplicity, all functions always get forward decls.
 * Constants are managed by the incremental compilation frontend. C
   backend no longer has a "constants" section.
 * Participate in incremental compilation. Each Decl gets an ArrayList
   for its generated C code and it is updated when the Decl is updated.
   During flush(), all these are joined together in the output file.
 * The new CValue tagged union is used to clean up using of assigning to
   locals without an additional pointer local.
 * Fix bug with bitcast of non-pointers making the memcpy destination
   immutable.
History 2021-01-05 17:41:14 -07:00
..
atomic Year++ 2020-12-31 15:45:24 -08:00
build std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
c Allow dollar sign $ in identifiers in translate-c 2021-01-04 14:14:04 -08:00
compress Year++ 2020-12-31 15:45:24 -08:00
crypto std/crypto: add BLAKE2-160 types and tests 2021-01-03 19:53:30 -08:00
event Year++ 2020-12-31 15:45:24 -08:00
fmt Year++ 2020-12-31 15:45:24 -08:00
fs convert more {} to {d} and {s} 2021-01-02 19:03:14 -07:00
hash std: disable a couple tests on windows 2021-01-02 12:21:19 -07:00
heap std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
io std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
json Year++ 2020-12-31 15:45:24 -08:00
math Year++ 2020-12-31 15:45:24 -08:00
mem Year++ 2020-12-31 15:45:24 -08:00
meta stage2: Use {s} instead of {} when formatting strings 2021-01-02 17:12:57 -07:00
net Year++ 2020-12-31 15:45:24 -08:00
os std.c add syslog 2021-01-05 13:09:40 -08:00
rand std: disable a couple tests on windows 2021-01-02 12:21:19 -07:00
special Revert "Fix #7296:" 2021-01-04 13:49:17 -07:00
target Year++ 2020-12-31 15:45:24 -08:00
testing Year++ 2020-12-31 15:45:24 -08:00
time Year++ 2020-12-31 15:45:24 -08:00
unicode Year++ 2020-12-31 15:45:24 -08:00
valgrind Year++ 2020-12-31 15:45:24 -08:00
zig convert more {} to {d} and {s} 2021-01-02 19:03:14 -07:00
array_hash_map.zig Year++ 2020-12-31 15:45:24 -08:00
array_list.zig stage2: rework the C backend 2021-01-05 17:41:14 -07:00
ascii.zig Year++ 2020-12-31 15:45:24 -08:00
atomic.zig Year++ 2020-12-31 15:45:24 -08:00
auto_reset_event.zig Year++ 2020-12-31 15:45:24 -08:00
base64.zig Year++ 2020-12-31 15:45:24 -08:00
buf_map.zig Year++ 2020-12-31 15:45:24 -08:00
buf_set.zig Year++ 2020-12-31 15:45:24 -08:00
build.zig Revert "Fix #7296:" 2021-01-04 13:49:17 -07:00
builtin.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
c.zig std.c add syslog 2021-01-05 13:09:40 -08:00
child_process.zig Year++ 2020-12-31 15:45:24 -08:00
coff.zig Year++ 2020-12-31 15:45:24 -08:00
compress.zig Year++ 2020-12-31 15:45:24 -08:00
comptime_string_map.zig Year++ 2020-12-31 15:45:24 -08:00
crypto.zig ci: skip crypto tests on windows 2021-01-04 15:57:54 -07:00
cstr.zig Year++ 2020-12-31 15:45:24 -08:00
debug.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
dwarf.zig Merge pull request #7592 from LemonBoy/fix-7188 2021-01-04 14:23:01 -08:00
dwarf_bits.zig Year++ 2020-12-31 15:45:24 -08:00
dynamic_library.zig Year++ 2020-12-31 15:45:24 -08:00
elf.zig Year++ 2020-12-31 15:45:24 -08:00
event.zig Year++ 2020-12-31 15:45:24 -08:00
fifo.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
fmt.zig Decrement max_depth when printing slice elements 2021-01-02 17:12:57 -07:00
fs.zig Merge pull request #7578 from vrischmann/walker 2021-01-01 13:28:01 -08:00
hash.zig Year++ 2020-12-31 15:45:24 -08:00
hash_map.zig Year++ 2020-12-31 15:45:24 -08:00
heap.zig Year++ 2020-12-31 15:45:24 -08:00
io.zig Year++ 2020-12-31 15:45:24 -08:00
json.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
leb128.zig Year++ 2020-12-31 15:45:24 -08:00
linked_list.zig Fix off-by-one error in SinglyLinkedList.len() and add associated tests 2021-01-04 14:03:21 -08:00
log.zig Year++ 2020-12-31 15:45:24 -08:00
macho.zig Year++ 2020-12-31 15:45:24 -08:00
math.zig Year++ 2020-12-31 15:45:24 -08:00
mem.zig Year++ 2020-12-31 15:45:24 -08:00
meta.zig std: have std.meta.fieldInfo take an enum rather than a string 2021-01-01 15:48:46 -07:00
mutex.zig Year++ 2020-12-31 15:45:24 -08:00
net.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
once.zig Year++ 2020-12-31 15:45:24 -08:00
os.zig Fixes missing error prong in std.os.send. 2021-01-04 14:03:39 -08:00
packed_int_array.zig Add workaround in PackedIntArray .initAllTo for #7635 2021-01-02 01:10:47 +11:00
pdb.zig Year++ 2020-12-31 15:45:24 -08:00
priority_queue.zig Year++ 2020-12-31 15:45:24 -08:00
process.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
Progress.zig Year++ 2020-12-31 15:45:24 -08:00
rand.zig Year++ 2020-12-31 15:45:24 -08:00
ResetEvent.zig Year++ 2020-12-31 15:45:24 -08:00
SemanticVersion.zig convert more {} to {d} and {s} 2021-01-02 19:03:14 -07:00
sort.zig Year++ 2020-12-31 15:45:24 -08:00
spinlock.zig Year++ 2020-12-31 15:45:24 -08:00
start.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
start_windows_tls.zig Year++ 2020-12-31 15:45:24 -08:00
StaticResetEvent.zig Year++ 2020-12-31 15:45:24 -08:00
std.zig std: skip more tests on Windows to save CI memory 2021-01-04 22:25:04 -07:00
target.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
testing.zig convert more {} to {d} and {s} 2021-01-02 19:03:14 -07:00
thread.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
time.zig Year++ 2020-12-31 15:45:24 -08:00
unicode.zig Year++ 2020-12-31 15:45:24 -08:00
valgrind.zig Year++ 2020-12-31 15:45:24 -08:00
zig.zig Year++ 2020-12-31 15:45:24 -08:00