1313// COW helpers
1414extension _StringGuts {
1515 internal var nativeCapacity : Int ? {
16- guard hasNativeStorage else { return nil }
17- return _object. withNativeStorage { $0. capacity }
16+ @inline ( never)
17+ @_effects ( releasenone)
18+ get {
19+ guard hasNativeStorage else { return nil }
20+ return _object. withNativeStorage { $0. capacity }
21+ }
1822 }
1923
2024 internal var nativeUnusedCapacity : Int ? {
21- guard hasNativeStorage else { return nil }
22- return _object. withNativeStorage { $0. unusedCapacity }
25+ @inline ( never)
26+ @_effects ( releasenone)
27+ get {
28+ guard hasNativeStorage else { return nil }
29+ return _object. withNativeStorage { $0. unusedCapacity }
30+ }
2331 }
2432
2533 // If natively stored and uniquely referenced, return the storage's total
2634 // capacity. Otherwise, nil.
2735 internal var uniqueNativeCapacity : Int ? {
28- @inline ( __always) mutating get {
36+ @inline ( never)
37+ @_effects ( releasenone)
38+ mutating get {
2939 guard isUniqueNative else { return nil }
3040 return _object. withNativeStorage { $0. capacity }
3141 }
@@ -34,7 +44,9 @@ extension _StringGuts {
3444 // If natively stored and uniquely referenced, return the storage's spare
3545 // capacity. Otherwise, nil.
3646 internal var uniqueNativeUnusedCapacity : Int ? {
37- @inline ( __always) mutating get {
47+ @inline ( never)
48+ @_effects ( releasenone)
49+ mutating get {
3850 guard isUniqueNative else { return nil }
3951 return _object. withNativeStorage { $0. unusedCapacity }
4052 }
0 commit comments