Skip to content

Commit c4ab943

Browse files
committed
Prevent KeyPathBuffer.next from being inlined
1 parent 1071451 commit c4ab943

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/public/core/KeyPath.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2380,6 +2380,7 @@ internal struct KeyPathBuffer {
23802380
}
23812381
}
23822382

2383+
@inline(never)
23832384
internal mutating func next() -> (RawKeyPathComponent, Any.Type?) {
23842385
let header = unsafe _pop(from: &data, as: RawKeyPathComponent.Header.self)
23852386
// Track if this is the last component of the reference prefix.
@@ -3663,7 +3664,7 @@ internal struct GetKeyPathClassAndInstanceSizeFromPattern
36633664
var size: Int = MemoryLayout<Int>.size
36643665
var sizeWithMaxSize: Int = 0
36653666
var sizeWithObjectHeaderAndKvc: Int {
3666-
size &+ MemoryLayout<Int>.size * 3
3667+
unsafe size &+ MemoryLayout<Int>.size &* 3
36673668
}
36683669

36693670
var capability: KeyPathKind = .value

0 commit comments

Comments
 (0)