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
[SILGen] force immeidate LValue assignment cleanups.
In SILGenFunction::emitAssignToLValue, use an ArgumentScope instead of
a FormalEvaluationScope. This ensures that the lifetime of objects
needed to materialize each LValue component do not overlap.
For example in this tuple assignment:
public func testTupleAssign(x: inout [Int]) {
(x[0], x[1]) = (0, 1)
}
Array.subscript.nativeOwningMutableAddressor keeps a reference to the
array across the assignment, unnecessarily forcing a copy of the
array.
Fixes SR-8621: SILGen creates destroys for tuple assignment at the
wrong places.
0 commit comments