0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test
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
..
src tests: Use {s} instead of {} when formatting strings 2021-01-02 17:12:57 -07:00
stage1 Merge pull request #7592 from LemonBoy/fix-7188 2021-01-04 14:23:01 -08:00
stage2 stage2: rework the C backend 2021-01-05 17:41:14 -07:00
standalone move ArrayListSentineled to std lib orphanage 2020-12-23 16:24:22 +02:00
assemble_and_link.zig update std lib to new Target API 2020-02-28 14:51:54 -05:00
cli.zig add std.testing.expectStringEndsWith 2020-12-08 21:59:24 -07:00
compare_output.zig Fix more stray uses of {} for formatting strings 2021-01-02 17:12:57 -07:00
compile_errors.zig stage1: Prevent crash with some lazy pointer types 2020-12-28 15:27:31 +02:00
gen_h.zig run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
run_translated_c.zig Allow dollar sign $ in identifiers in translate-c 2021-01-04 14:14:04 -08:00
runtime_safety.zig Add some test cases for the previous commits 2020-12-05 20:14:04 +01:00
stack_traces.zig std.crypto.random: introduce fork safety 2020-12-18 15:54:01 -07:00
standalone.zig fix deadlock with build-exe on an object for windows 2020-12-11 18:34:34 -05:00
tests.zig tests: Use {s} instead of {} when formatting strings 2021-01-02 17:12:57 -07:00
translate_c.zig Static function declarations with no prototype should not be variadic 2021-01-03 15:08:32 -08:00