You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[6.1] SIL: builtin willThrow does not modify memory or release
This enables access enforcement analysis to classify a dynamic begin_access in
access patterns (such as the one below) involving a throwing function as not
having nested conflicts.
```
struct Stack {
var items : [UInt8]
mutating func pop() throws -> UInt8 {
guard let item = items.popLast() else { throw SomeErr.err }
return item
}
...
}
class Container {
private var ref : Stack
@inline(never)
internal func someMethod() throws {
try ref.pop()
}
...
}
```
Scope: Performance improvement
Risk: Medium, we are changing the side-effects of willThrow which should
not matter all that match. There is a second order effect: other wrongly
computed/assigned could now become visible.
Original PR: #78091
Reviewed by: Erik Eckstein
rdar://141182074
(cherry picked from commit fa01d8d)
0 commit comments