@@ -14,7 +14,7 @@ internal expect fun wrapContextWithDebug(context: CoroutineContext): CoroutineCo
1414/* *
1515 * Executes a block using a given coroutine context.
1616 */
17- internal actual inline fun <T > withCoroutineContext (context : CoroutineContext , countOrElement : Any? , block : () -> T ): T {
17+ internal inline fun <T > withCoroutineContext (context : CoroutineContext , countOrElement : Any? , block : () -> T ): T {
1818 val oldValue = updateThreadContext(context, countOrElement)
1919 try {
2020 return block()
@@ -26,7 +26,7 @@ internal actual inline fun <T> withCoroutineContext(context: CoroutineContext, c
2626/* *
2727 * Executes a block using a context of a given continuation.
2828 */
29- internal actual inline fun <T > withContinuationContext (continuation : Continuation <* >, countOrElement : Any? , block : () -> T ): T {
29+ internal inline fun <T > withContinuationContext (continuation : Continuation <* >, countOrElement : Any? , block : () -> T ): T {
3030 val context = continuation.context
3131 val oldValue = updateThreadContext(context, countOrElement)
3232 val undispatchedCompletion = if (oldValue != = NO_THREAD_ELEMENTS ) {
@@ -44,7 +44,7 @@ internal actual inline fun <T> withContinuationContext(continuation: Continuatio
4444 }
4545}
4646
47- internal fun Continuation <* >.updateUndispatchedCompletion (context : CoroutineContext , oldValue : Any? ): UndispatchedCoroutine <* >? {
47+ private fun Continuation <* >.updateUndispatchedCompletion (context : CoroutineContext , oldValue : Any? ): UndispatchedCoroutine <* >? {
4848 if (this !is CoroutineStackFrame ) return null
4949 /*
5050 * Fast-path to detect whether we have undispatched coroutine at all in our stack.
@@ -65,7 +65,7 @@ internal fun Continuation<*>.updateUndispatchedCompletion(context: CoroutineCont
6565 return completion
6666}
6767
68- internal tailrec fun CoroutineStackFrame.undispatchedCompletion (): UndispatchedCoroutine <* >? {
68+ private tailrec fun CoroutineStackFrame.undispatchedCompletion (): UndispatchedCoroutine <* >? {
6969 // Find direct completion of this continuation
7070 val completion: CoroutineStackFrame = when (this ) {
7171 is DispatchedCoroutine <* > -> return null
@@ -79,7 +79,7 @@ internal tailrec fun CoroutineStackFrame.undispatchedCompletion(): UndispatchedC
7979 * Marker indicating that [UndispatchedCoroutine] exists somewhere up in the stack.
8080 * Used as a performance optimization to avoid stack walking where it is not necessary.
8181 */
82- private object UndispatchedMarker: CoroutineContext.Element, CoroutineContext.Key<UndispatchedMarker> {
82+ internal object UndispatchedMarker: CoroutineContext.Element, CoroutineContext.Key<UndispatchedMarker> {
8383 override val key: CoroutineContext .Key <* >
8484 get() = this
8585}
0 commit comments