@@ -102,7 +102,7 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
102102 self . defaultValue = defaultValue
103103 }
104104
105- @usableFromInline
105+ @_alwaysEmitIntoClient
106106 var key : Builtin . RawPointer {
107107 unsafeBitCast ( self , to: Builtin . RawPointer. self)
108108 }
@@ -135,10 +135,11 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
135135 ///
136136 /// If the value is a reference type, it will be retained for the duration of
137137 /// the operation closure.
138+ @inlinable
138139 @discardableResult
139140 @_unsafeInheritExecutor
140141 @available ( SwiftStdlib 5 . 1 , * ) // back deploy requires we declare the availability explicitly on this method
141- @_backDeploy ( before: macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 ) // SwiftStdlib 5.8 but it doesn't work with _backDeploy
142+ @_backDeploy ( before: SwiftStdlib 5.8 )
142143 public func withValue< R> ( _ valueDuringOperation: Value , operation: ( ) async throws -> R ,
143144 file: String = #fileID, line: UInt = #line) async rethrows -> R {
144145 // check if we're not trying to bind a value from an illegal context; this may crash
@@ -163,8 +164,8 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
163164 ///
164165 /// If the value is a reference type, it will be retained for the duration of
165166 /// the operation closure.
167+ @inlinable
166168 @discardableResult
167- @inline ( __always)
168169 public func withValue< R> ( _ valueDuringOperation: Value , operation: ( ) throws -> R ,
169170 file: String = #fileID, line: UInt = #line) rethrows -> R {
170171 // check if we're not trying to bind a value from an illegal context; this may crash
@@ -176,7 +177,6 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
176177 return try operation ( )
177178 }
178179
179- @inline ( __always)
180180 public var projectedValue : TaskLocal < Value > {
181181 get {
182182 self
@@ -218,27 +218,25 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
218218// ==== ------------------------------------------------------------------------
219219
220220@available ( SwiftStdlib 5 . 1 , * )
221- @usableFromInline
221+ @_alwaysEmitIntoClient
222222@_silgen_name ( " swift_task_localValuePush " )
223223func _taskLocalValuePush< Value> (
224224 key: Builtin . RawPointer /*: Key*/,
225225 value: __owned Value
226226) // where Key: TaskLocal
227227
228228@available( SwiftStdlib 5 . 1 , * )
229- @usableFromInline
229+ @_alwaysEmitIntoClient
230230@_silgen_name ( " swift_task_localValuePop " )
231231func _taskLocalValuePop( )
232232
233233@available( SwiftStdlib 5 . 1 , * )
234- @usableFromInline
235234@_silgen_name ( " swift_task_localValueGet " )
236235func _taskLocalValueGet(
237236 key: Builtin . RawPointer /*Key*/
238237) -> UnsafeMutableRawPointer ? // where Key: TaskLocal
239238
240239@available ( SwiftStdlib 5 . 1 , * )
241- @usableFromInline
242240@_silgen_name ( " swift_task_localsCopyTo " )
243241func _taskLocalsCopy(
244242 to target: Builtin . NativeObject
0 commit comments