swift
f4e1b2a8 - [move-only] Update SILGen/MoveCheckers so that vars are emitted in eagerly projected box form.

Commit
2 years ago
[move-only] Update SILGen/MoveCheckers so that vars are emitted in eagerly projected box form. This is the first slice of bringing up escaping closure support. The support is based around introducing a new type of SILGen VarLoc: a VarLoc with a box and without a value. Because the VarLoc only has a box, we have to in SILGen always eagerly reproject out the address from the box. The reason why I am doing this is that it makes it easy for the move checker to distinguish in between different accesses to the box that we want to check separately. As such every time that we open the box, we insert a mark_must_check [assignable_but_not_consumable] on that project. If allocbox_to_stack manages to determine that the box can be stack allocated, we eliminate all of the mark_must_check and place a new mark_must_check [consumable_and_assignable] on the alloc_stack. The end result is that we get the old model that we had before and also can support escaping closures.
Author
Committer
Parents
Loading