0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test
Andrew Kelley dfb3231959 stage2: implement switching on unions
* AstGen: Move `refToIndex` and `indexToRef` to Zir
 * ZIR: the switch_block_*_* instruction tags are collapsed into one
   switch_block tag which uses 4 bits for flags, and reduces the
   scalar_cases_len field from 32 to 28 bits.
   This freed up more ZIR tags, 2 of which are now used for
   `switch_cond` and `switch_cond_ref` for producing the switch
   condition value. For example, for union values it returns the
   corresponding enum value.
 * switching with multiple cases and ranges is not yet supported because
   I want to change the ZIR encoding to store index pointers into the
   extra array rather than storing prong indexes. This will avoid O(N^2)
   iteration over prongs.
 * AstGen now adds a `switch_cond` on the operand and then passes the
   result of that to the `switch_block` instruction.
 * Sema: partially implement `switch_capture_*` instructions.
 * Sema: `unionToTag` notices if the enum type has only one possible value.
History 2021-10-19 20:22:47 -07:00
..
behavior stage2: implement switching on unions 2021-10-19 20:22:47 -07:00
src migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
stage1/c_abi stage1: Expand SysV C ABI support for small structs 2021-07-28 18:13:17 -04:00
stage2 stage2: implement switching on unions 2021-10-19 20:22:47 -07:00
standalone migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
assemble_and_link.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
behavior.zig astgen.zig: fix false positive in breakExpr's checking for store_to_block_ptr 2021-10-18 13:18:47 -04:00
cases.zig Fix failing tests and windows link dependencies 2021-09-22 14:39:02 -05:00
cli.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
compare_output.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
compile_errors.zig Sat shl neg rhs (#9949) 2021-10-15 13:56:27 -04:00
gen_h.zig run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
run_translated_c.zig translate_c: prevent a while under an if from stealing the else 2021-10-19 13:48:09 -04:00
runtime_safety.zig fix unused variable errors in runtime safety test cases 2021-06-23 10:44:46 -07:00
stack_traces.zig overhaul elf csu (c-runtime startup) logic 2021-05-23 15:38:57 -04:00
standalone.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
tests.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
translate_c.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00