zig/test/behavior
Andrew Kelley cb785b9c6b Sema: implement coerce_result_ptr for optionals
New AIR instruction: `optional_payload_ptr_set`
It's like `optional_payload_ptr` except it sets the non-null bit.

When storing to the payload via a result location that is an optional,
`optional_payload_ptr_set` is now emitted. There is a new algorithm in
`zirCoerceResultPtr` which stores a dummy value through the result
pointer into a temporary block, and then pops off the AIR instructions
from the temporary block in order to determine how to transform the
result location pointer in case any in-between coercions need to happen.

Fixes a couple of behavior tests regarding optionals.
2021-11-09 23:01:35 -07:00
..
2021-10-21 19:05:26 -07:00
2021-10-21 19:05:26 -07:00
2021-10-30 16:09:55 -04:00
2021-10-26 16:43:18 -07:00
2021-10-28 17:33:05 -07:00
2021-08-30 18:50:07 -04:00
2021-10-05 23:05:14 -07:00
2021-10-05 21:38:47 -07:00
2021-10-21 19:05:26 -07:00
2021-10-21 19:05:26 -07:00
2021-10-26 15:43:57 -07:00
2021-10-21 19:05:26 -07:00
2021-10-24 17:11:43 +02:00
2021-07-26 20:05:48 -04:00