@@ -1719,13 +1719,13 @@ Ownership Kind
1719
1719
The semantics in the previous example is of just one form of ownership semantics
1720
1720
supported: "owned" semantics. In SIL, we map these "ownership semantics" into a
1721
1721
form that a compiler can reason about by mapping semantics onto a lattice with
1722
- the following elements: `None `_, `Owned `_, `Guaranteed `_, `Unowned `_, `Any `_ . We
1722
+ the following elements: `None `_, `Owned `_, `Guaranteed `_, `Unowned `_, `Any `. We
1723
1723
call this the lattice of "Ownership Kinds" and each individual value an
1724
1724
"Ownership Kind". This lattice is defined as a 3-level lattice with::
1725
1725
1726
- 1. None being Top.
1727
- 2. Any being Bottom.
1728
- 3. All non-Any, non-None OwnershipKinds being defined as a mid-level elements of the lattice
1726
+ 1. None being Top.
1727
+ 2. Any being Bottom.
1728
+ 3. All non-Any, non-None OwnershipKinds being defined as a mid-level elements of the lattice
1729
1729
1730
1730
We can graphically represent the lattice via a diagram like the following::
1731
1731
@@ -1760,8 +1760,8 @@ This lattice is applied to SIL by requiring well formed SIL to:
1760
1760
1. Define a static map of each SIL value to an OwnershipKind that classify the
1761
1761
semantics that the SIL value obeys. We call this subset of OwnershipKind to
1762
1762
be the set of `Value Ownership Kind `_: `None `_, `Unowned `_, `Guaranteed `_,
1763
- `Owned `_ (note conspiciously missing `Any `_ ). This is because in our model
1764
- `Any `_ represents an unknown ownership semantics and since our model is
1763
+ `Owned `_ (note conspiciously missing `Any `). This is because in our model
1764
+ `Any ` represents an unknown ownership semantics and since our model is
1765
1765
statically strict, we do not allow for values to have unknown ownership.
1766
1766
1767
1767
2. Define a static map from each operand of a SILInstruction, `i `, to an
@@ -1787,13 +1787,13 @@ In prose, a value can be passed to an operand if applying the operand's
1787
1787
ownership constraint to the value's ownership does not change the value's
1788
1788
ownership. Operationally this has a few interesting effects on SIL::
1789
1789
1790
- 1. We have defined away invalid value-operand (aka def-use) pairing since the
1791
- SILVerifier validates the aforementioned relationship on all SIL values,
1792
- uses at all points of the pipeline until ossa is lowered.
1790
+ 1. We have defined away invalid value-operand (aka def-use) pairing since the
1791
+ SILVerifier validates the aforementioned relationship on all SIL values,
1792
+ uses at all points of the pipeline until ossa is lowered.
1793
1793
1794
- 2. Many SIL instructions do not care about the ownership kind that their value
1795
- will take. They can just define all of their operand's as having an
1796
- ownership constraint of Any.
1794
+ 2. Many SIL instructions do not care about the ownership kind that their value
1795
+ will take. They can just define all of their operand's as having an
1796
+ ownership constraint of Any.
1797
1797
1798
1798
Now lets go into more depth upon `Value Ownership Kind `_ and `Ownership Constraint `_.
1799
1799
0 commit comments