|
16 | 16 |
|
17 | 17 | import SwiftShims
|
18 | 18 |
|
| 19 | +// FIXME: Remove @usableFromInline once Hasher is resilient. |
| 20 | +// rdar://problem/38549901 |
| 21 | +@usableFromInline |
19 | 22 | internal protocol _HasherCore {
|
20 | 23 | init(seed: (UInt64, UInt64))
|
21 | 24 | mutating func compress(_ value: UInt64)
|
@@ -74,6 +77,9 @@ internal func _loadPartialUnalignedUInt64LE(
|
74 | 77 | /// trailing bytes, while the most significant 8 bits hold the count of bytes
|
75 | 78 | /// appended so far, modulo 256. The count of bytes currently stored in the
|
76 | 79 | /// buffer is in the lower three bits of the byte count.)
|
| 80 | +// FIXME: Remove @usableFromInline and @_fixed_layout once Hasher is resilient. |
| 81 | +// rdar://problem/38549901 |
| 82 | +@usableFromInline @_fixed_layout |
77 | 83 | internal struct _HasherTailBuffer {
|
78 | 84 | // msb lsb
|
79 | 85 | // +---------+-------+-------+-------+-------+-------+-------+-------+
|
@@ -146,6 +152,9 @@ internal struct _HasherTailBuffer {
|
146 | 152 | }
|
147 | 153 | }
|
148 | 154 |
|
| 155 | +// FIXME: Remove @usableFromInline and @_fixed_layout once Hasher is resilient. |
| 156 | +// rdar://problem/38549901 |
| 157 | +@usableFromInline @_fixed_layout |
149 | 158 | internal struct _BufferingHasher<Core: _HasherCore> {
|
150 | 159 | private var _buffer: _HasherTailBuffer
|
151 | 160 | private var _core: Core
|
@@ -278,7 +287,13 @@ internal struct _BufferingHasher<Core: _HasherCore> {
|
278 | 287 | /// versions of the standard library.
|
279 | 288 | @_fixed_layout // FIXME: Should be resilient (rdar://problem/38549901)
|
280 | 289 | public struct Hasher {
|
| 290 | + // FIXME: Remove @usableFromInline once Hasher is resilient. |
| 291 | + // rdar://problem/38549901 |
| 292 | + @usableFromInline |
281 | 293 | internal typealias RawCore = _SipHash13Core
|
| 294 | + // FIXME: Remove @usableFromInline once Hasher is resilient. |
| 295 | + // rdar://problem/38549901 |
| 296 | + @usableFromInline |
282 | 297 | internal typealias Core = _BufferingHasher<RawCore>
|
283 | 298 |
|
284 | 299 | internal var _core: Core
|
|
0 commit comments