mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Add an on stack version of partial_apply
It does not take ownership of its non-trivial arguments, is a trivial function type and therefore must not be destroyed. The compiler must make sure to extend the lifetime of non-trivial arguments beyond the last use of the closure. %objc = copy_value %0 : $AnObject %closure = partial_apply [stack] [callee_guaranteed] %16(%obj) : $@convention(thin) (@guaranteed AnObject) -> () %closure2 = mark_dependence %closure : $@noescape @callee_guaranteed () -> () on %obj : $AnObject %user = function_ref @useClosure : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> () apply %user(%closure2) : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> () dealloc_stack %closure : $() ->() destroy_value %obj : $AnObject // noescape closure does not take ownership SR-904 rdar://35590578
This commit is contained in:
@@ -52,7 +52,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
/// Don't worry about adhering to the 80-column limit for this line.
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 471; // Last change: Add @available(_PackageDescription..)
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 472; // Last change: partial_apply [stack]
|
||||
|
||||
using DeclIDField = BCFixed<31>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user