File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -8460,6 +8460,33 @@ need for the guaranteed form in the future.
8460
8460
@moveOnly trivial type, we convert from the non-trivial representation to the
8461
8461
trivial representation.
8462
8462
8463
+ copyable_to_moveonlywrapper_addr
8464
+ ````````````````````````````````
8465
+ ::
8466
+
8467
+ sil-instruction ::= 'copyable_to_moveonlywrapper_addr'
8468
+
8469
+ `copyable_to_moveonlywrapper_addr `_ takes in a '*T' and maps it to a move only
8470
+ wrapped '*@moveOnly T'. This is semantically used by a code generator
8471
+ initializing a new moveOnly binding from a copyable value. It semantically acts
8472
+ as an address cast. If one thinks of '@moveOnly' as a monad, this is how one
8473
+ injects a copyable value into the move only space.
8474
+
8475
+ moveonlywrapper_to_copyable_addr
8476
+ ````````````````````````````````
8477
+ ::
8478
+
8479
+ sil-instruction ::= 'moveonlywrapper_to_copyable_addr'
8480
+
8481
+ `moveonlywrapper_to_copyable_addr `_ takes in a '*@moveOnly T' and produces a new
8482
+ '*T' value. This instruction acts like an address cast that projects out the
8483
+ underlying T from an @moveOnly T.
8484
+
8485
+ NOTE: From the perspective of the address checker, a trivial `load `_ with a
8486
+ `moveonlywrapper_to_copyable_addr `_ operand is considered to be a use of a
8487
+ noncopyable type.
8488
+
8489
+
8463
8490
Assertion configuration
8464
8491
~~~~~~~~~~~~~~~~~~~~~~~
8465
8492
You can’t perform that action at this time.
0 commit comments