zig/test/behavior
Andrew Kelley f4d5fcde72 AstGen: avoid redundant "ref" instructions
Whenever a `ref` instruction is needed, it is created and saved in
`AstGen.ref_table` instead of being immediately appended to the current
block body. Then, when the referenced instruction is being added to the
parent block (e.g. from setBlockBody), if it has a ref_table entry, then
the ref instruction is added directly after the instruction being referenced.
This makes sure two properties are upheld:
1. All pointers to the same locals return the same address. This is required
   to be compliant with the language specification.
2. `ref` instructions will dominate their uses. This is a required property
   of ZIR.

A complication arises when a ref instruction refs another ref
instruction. The logic in appendBodyWithFixups must take this into
account, recursively handling ref refs.
2022-06-08 20:40:16 -07:00
..
2022-02-28 23:20:05 +01:00
2022-05-04 20:38:53 -07:00
2021-10-28 17:33:05 -07:00
2022-03-18 15:02:52 -07:00
2022-02-13 14:42:20 +02:00
2022-06-08 15:51:48 -07:00
2022-03-09 13:53:20 -07:00
2022-05-26 21:58:19 -07:00
2022-05-27 16:43:11 -04:00
2022-03-05 11:31:51 +01:00
2022-01-07 00:06:06 -05:00
2022-05-19 19:39:34 +02:00
2022-02-22 21:57:42 +01:00
2022-04-27 17:24:36 -07:00
2022-03-18 15:02:52 -07:00
2022-03-05 11:31:51 +01:00
2022-03-23 21:40:33 +01:00
2022-03-18 00:12:22 -07:00
2022-03-18 15:02:52 -07:00
2022-05-16 13:55:26 -07:00