@@ -235,22 +235,22 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
235235
236236 /// Implementation for withValue that consumes valueDuringOperation.
237237 ///
238- /// Because _taskLocalValuePush and _taskLocalValuePop involve calls to
239- /// swift_task_alloc/swift_task_dealloc respectively unbeknownst to the
240- /// compiler, compiler-emitted calls to swift_task_de/alloc must be avoided
241- /// in a function that calls them.
238+ /// Because Builtin.taskLocalValuePush and Builtin.taskLocalValuePop involve
239+ /// calls to swift_task_alloc/swift_task_dealloc respectively unbeknownst to
240+ /// the compiler, compiler-emitted calls to swift_task_de/alloc must be
241+ /// avoided in a function that calls them.
242242 ///
243243 /// A copy of valueDuringOperation is required because withValue borrows its
244- /// argument but _taskLocalValuePush consumes its. Because
244+ /// argument but Builtin.taskLocalValuePush consumes its. Because
245245 /// valueDuringOperation is of generic type, its size is not generally known,
246246 /// so such a copy entails a stack allocation and a copy to that allocation.
247247 /// That stack traffic gets lowered to calls to
248248 /// swift_task_alloc/swift_task_deallloc.
249249 ///
250- /// Split the calls _taskLocalValuePush /Pop from the compiler-emitted calls
250+ /// Split the calls Builtin.taskLocalValuePush /Pop from the compiler-emitted calls
251251 /// to swift_task_de/alloc for the copy as follows:
252252 /// - withValue contains the compiler-emitted calls swift_task_de/alloc.
253- /// - withValueImpl contains the calls to _taskLocalValuePush /Pop
253+ /// - withValueImpl contains the calls to Builtin.taskLocalValuePush /Pop
254254 @inlinable
255255 @discardableResult
256256 @available ( SwiftStdlib 5 . 1 , * )
@@ -259,8 +259,8 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
259259 operation: ( ) async throws -> R ,
260260 isolation: isolated ( any Actor ) ? ,
261261 file: String = #fileID, line: UInt = #line) async rethrows -> R {
262- _taskLocalValuePush ( key: key , value : consume valueDuringOperation)
263- defer { _taskLocalValuePop ( ) }
262+ Builtin . taskLocalValuePush ( key, consume valueDuringOperation)
263+ defer { Builtin . taskLocalValuePop ( ) }
264264
265265 return try await operation ( )
266266 }
@@ -275,8 +275,8 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
275275 operation: ( ) async throws -> R ,
276276 file: String = #fileID, line: UInt = #line
277277 ) async rethrows -> R {
278- _taskLocalValuePush ( key: key , value : consume valueDuringOperation)
279- defer { _taskLocalValuePop ( ) }
278+ Builtin . taskLocalValuePush ( key, consume valueDuringOperation)
279+ defer { Builtin . taskLocalValuePop ( ) }
280280
281281 return try await operation ( )
282282 }
@@ -299,8 +299,8 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
299299 @discardableResult
300300 public func withValue< R> ( _ valueDuringOperation: Value , operation: ( ) throws -> R ,
301301 file: String = #fileID, line: UInt = #line) rethrows -> R {
302- _taskLocalValuePush ( key: key , value : valueDuringOperation)
303- defer { _taskLocalValuePop ( ) }
302+ Builtin . taskLocalValuePush ( key, valueDuringOperation)
303+ defer { Builtin . taskLocalValuePop ( ) }
304304
305305 return try operation ( )
306306 }
@@ -344,19 +344,6 @@ public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible
344344
345345// ==== ------------------------------------------------------------------------
346346
347- @available ( SwiftStdlib 5 . 1 , * )
348- @usableFromInline
349- @_silgen_name ( " swift_task_localValuePush " )
350- func _taskLocalValuePush< Value> (
351- key: Builtin . RawPointer /*: Key*/,
352- value: __owned Value
353- ) // where Key: TaskLocal
354-
355- @available( SwiftStdlib 5 . 1 , * )
356- @usableFromInline
357- @_silgen_name ( " swift_task_localValuePop " )
358- func _taskLocalValuePop( )
359-
360347@available ( SwiftStdlib 5 . 1 , * )
361348@_silgen_name ( " swift_task_localValueGet " )
362349func _taskLocalValueGet(
0 commit comments