Skip to content

Commit de36d43

Browse files
Merge pull request #5499 from swiftwasm/main
[pull] swiftwasm from main
2 parents 8e8becd + 29672c5 commit de36d43

File tree

156 files changed

+5762
-1881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+5762
-1881
lines changed

docs/ABI/Mangling.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,8 @@ Types
675675
type ::= assoc-type-list 'QZ' // shortcut for 'QYz'
676676
type ::= opaque-type-decl-name bound-generic-args 'Qo' INDEX // opaque type
677677
678+
type ::= pack-type 'Qe' INDEX // pack element type
679+
678680
type ::= pattern-type count-type 'Qp' // pack expansion type
679681
type ::= pack-element-list 'QP' // pack type
680682
type ::= pack-element-list 'QS' DIRECTNESS // SIL pack type

docs/SIL.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8460,6 +8460,33 @@ need for the guaranteed form in the future.
84608460
@moveOnly trivial type, we convert from the non-trivial representation to the
84618461
trivial representation.
84628462

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+
84638490
Assertion configuration
84648491
~~~~~~~~~~~~~~~~~~~~~~~
84658492

0 commit comments

Comments
 (0)