@@ -6777,9 +6777,9 @@ Checked Conversions
6777
6777
6778
6778
Some user-level cast operations can fail and thus require runtime checking.
6779
6779
6780
- The `unconditional_checked_cast_addr `_, ` unconditional_checked_cast_value `_ and `unconditional_checked_cast `_
6780
+ The `unconditional_checked_cast_addr ` and `unconditional_checked_cast `_
6781
6781
instructions performs an unconditional checked cast; it is a runtime failure
6782
- if the cast fails. The `checked_cast_addr_br `_, ` checked_cast_value_br `_ and `checked_cast_br `_
6782
+ if the cast fails. The `checked_cast_addr_br `_ and `checked_cast_br `_
6783
6783
terminator instruction performs a conditional checked cast; it branches to one
6784
6784
of two destinations based on whether the cast succeeds or not.
6785
6785
@@ -6814,25 +6814,6 @@ unconditional_checked_cast_addr
6814
6814
Performs a checked indirect conversion, causing a runtime failure if the
6815
6815
conversion fails.
6816
6816
6817
- unconditional_checked_cast_value
6818
- ````````````````````````````````
6819
- ::
6820
-
6821
- sil-instruction ::= 'unconditional_checked_cast_value'
6822
- sil-operand 'to' sil-type
6823
-
6824
- %1 = unconditional_checked_cast_value %0 : $A to $B
6825
- // $A must not be an address
6826
- // $B must not be an address
6827
- // %1 will be of type $B
6828
- // $A is destroyed during the conversion. There is no implicit copy.
6829
-
6830
- Performs a checked conversion, causing a runtime failure if the conversion
6831
- fails. Unlike `unconditional_checked_cast `, this destroys its operand and
6832
- creates a new value. Consequently, this supports bridging objects to values, as
6833
- well as casting to a different ownership classification such as `$AnyObject ` to
6834
- `$T.Type `.
6835
-
6836
6817
Runtime Failures
6837
6818
~~~~~~~~~~~~~~~~
6838
6819
@@ -7213,26 +7194,6 @@ An exact cast checks whether the dynamic type is exactly the target
7213
7194
type, not any possible subtype of it. The source and target types
7214
7195
must be class types.
7215
7196
7216
- checked_cast_value_br
7217
- `````````````````````
7218
- ::
7219
-
7220
- sil-terminator ::= 'checked_cast_value_br'
7221
- sil-operand 'to' sil-type ','
7222
- sil-identifier ',' sil-identifier
7223
- sil-checked-cast-exact ::= '[' 'exact' ']'
7224
-
7225
- checked_cast_value_br %0 : $A to $B, bb1, bb2
7226
- // $A must be not be an address
7227
- // $B must be an opaque value
7228
- // bb1 must take a single argument of type $B
7229
- // bb2 must take no arguments
7230
-
7231
- Performs a checked opaque conversion from ``$A `` to ``$B ``. If the conversion
7232
- succeeds, control is transferred to ``bb1 ``, and the result of the cast is
7233
- passed into ``bb1 `` as an argument. If the conversion fails, control is
7234
- transferred to ``bb2 ``.
7235
-
7236
7197
checked_cast_addr_br
7237
7198
````````````````````
7238
7199
::
0 commit comments