Collapsing Owned Places
At the outset of each program point, the collapse_owned_places operation eagerly collapses the Owned PCG.
This operation is implemented as PcgVisitor::collapse_owned_places
(see https://github.com/viperproject/pcg/blob/main/src/pcg/visitor/pack.rs
It is implemented as follows:
- For each place for which there exists a place node (from longest to shortest):
- If no expansion of is blocked by a borrow and every expansion of has the same capability:
- perform the collapse(p) operation
- if has no projection and has capability, upgrade 's capability to
- If no expansion of is blocked by a borrow and every expansion of has the same capability: