@@ -80,33 +80,25 @@ extension _StringGuts {
80
80
@effects ( readonly)
81
81
public
82
82
static func _compareDeterministicUnicodeCollation(
83
- _leftUnsafeStringGutsBitPattern leftBits: ( UInt , UInt ) ,
84
- _rightUnsafeStringGutsBitPattern rightBits: ( UInt , UInt )
83
+ _leftUnsafeStringGutsBitPattern leftBits: _RawBitPattern ,
84
+ _rightUnsafeStringGutsBitPattern rightBits: _RawBitPattern
85
85
) -> Int {
86
- let left = _StringGuts (
87
- object: _StringObject ( rawBits: leftBits. 0 ) ,
88
- otherBits: leftBits. 1 )
89
- let right = _StringGuts (
90
- object: _StringObject ( rawBits: rightBits. 0 ) ,
91
- otherBits: rightBits. 1 )
86
+ let left = _StringGuts ( rawBits: leftBits)
87
+ let right = _StringGuts ( rawBits: rightBits)
92
88
return _compareDeterministicUnicodeCollation (
93
89
left, 0 ..< left. count, to: right, 0 ..< right. count)
94
90
}
95
91
@inline ( never)
96
92
@effects ( readonly)
97
93
public
98
94
static func _compareDeterministicUnicodeCollation(
99
- _leftUnsafeStringGutsBitPattern leftBits: ( UInt , UInt ) ,
95
+ _leftUnsafeStringGutsBitPattern leftBits: _RawBitPattern ,
100
96
_ leftRange: Range < Int > ,
101
- _rightUnsafeStringGutsBitPattern rightBits: ( UInt , UInt ) ,
97
+ _rightUnsafeStringGutsBitPattern rightBits: _RawBitPattern ,
102
98
_ rightRange: Range < Int >
103
99
) -> Int {
104
- let left = _StringGuts (
105
- object: _StringObject ( rawBits: leftBits. 0 ) ,
106
- otherBits: leftBits. 1 )
107
- let right = _StringGuts (
108
- object: _StringObject ( rawBits: rightBits. 0 ) ,
109
- otherBits: rightBits. 1 )
100
+ let left = _StringGuts ( rawBits: leftBits)
101
+ let right = _StringGuts ( rawBits: rightBits)
110
102
return _compareDeterministicUnicodeCollation (
111
103
left, leftRange, to: right, rightRange)
112
104
}
@@ -165,8 +157,7 @@ extension _StringGuts {
165
157
@inline ( __always)
166
158
@_inlineable
167
159
public func _bitwiseEqualTo( _ other: _StringGuts ) -> Bool {
168
- return self . _object. rawBits == other. _object. rawBits
169
- && self . _otherBits == other. _otherBits
160
+ return self . rawBits == other. rawBits
170
161
}
171
162
172
163
@_inlineable
@@ -232,11 +223,9 @@ extension _StringGuts {
232
223
return result
233
224
}
234
225
#endif
235
- let leftBits = ( left. _object. rawBits, left. _otherBits)
236
- let rightBits = ( right. _object. rawBits, right. _otherBits)
237
226
return _compareDeterministicUnicodeCollation (
238
- _leftUnsafeStringGutsBitPattern: leftBits , leftRange,
239
- _rightUnsafeStringGutsBitPattern: rightBits , rightRange)
227
+ _leftUnsafeStringGutsBitPattern: left . rawBits , leftRange,
228
+ _rightUnsafeStringGutsBitPattern: right . rawBits , rightRange)
240
229
}
241
230
242
231
@_inlineable
@@ -259,11 +248,9 @@ extension _StringGuts {
259
248
return result
260
249
}
261
250
#endif
262
- let leftBits = ( left. _object. rawBits, left. _otherBits)
263
- let rightBits = ( right. _object. rawBits, right. _otherBits)
264
251
return _compareDeterministicUnicodeCollation (
265
- _leftUnsafeStringGutsBitPattern: leftBits ,
266
- _rightUnsafeStringGutsBitPattern: rightBits )
252
+ _leftUnsafeStringGutsBitPattern: left . rawBits ,
253
+ _rightUnsafeStringGutsBitPattern: right . rawBits )
267
254
}
268
255
}
269
256
0 commit comments