Move all coroutine-related declarations from built-ins to stdlib
Also move internal declarations from runtime.jvm module into new package kotlin.coroutines.jvm.internal in stdlib The necessity of these declarations being in built-ins is controversial, but also it will complicate the migration of current coroutine runtime to a separate jar if we ever need this
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package kotlin.coroutines
|
||||
|
||||
/**
|
||||
* Marks coroutine context element that intercepts coroutine continuations.
|
||||
* The coroutines framework uses [ContinuationInterceptor.Key] to retrieve the interceptor and
|
||||
* intercepts all coroutine continuations with [interceptContinuation] invocations.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
public interface ContinuationInterceptor : CoroutineContext.Element {
|
||||
/**
|
||||
* The key that defines *the* context interceptor.
|
||||
*/
|
||||
companion object Key : CoroutineContext.Key<ContinuationInterceptor>
|
||||
|
||||
/**
|
||||
* Returns continuation that wraps the original [continuation], thus intercepting all resumptions.
|
||||
* This function is invoked by coroutines framework when needed and the resulting continuations are
|
||||
* cached internally per each instance of the original [continuation].
|
||||
*
|
||||
* By convention, implementations that install themselves as *the* interceptor in the context with
|
||||
* the [Key] shall also scan the context for other element that implement [ContinuationInterceptor] interface
|
||||
* and use their [interceptContinuation] functions, too.
|
||||
*/
|
||||
public fun <T> interceptContinuation(continuation: Continuation<T>): Continuation<T>
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package kotlin.coroutines
|
||||
|
||||
/**
|
||||
* Persistent context for the coroutine. It is an indexed set of [Element] instances.
|
||||
* An indexed set is a mix between a set and a map.
|
||||
* Every element in this set has a unique [Key].
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
public interface CoroutineContext {
|
||||
/**
|
||||
* Returns the element with the given [key] from this context or `null`.
|
||||
*/
|
||||
public operator fun <E : Element> get(key: Key<E>): E?
|
||||
|
||||
/**
|
||||
* Accumulates entries of this context starting with [initial] value and applying [operation]
|
||||
* from left to right to current accumulator value and each element of this context.
|
||||
*/
|
||||
public fun <R> fold(initial: R, operation: (R, Element) -> R): R
|
||||
|
||||
/**
|
||||
* Returns a context containing elements from this context and elements from other [context].
|
||||
* The elements from this context with the same key as in the other one are dropped.
|
||||
*/
|
||||
public operator fun plus(context: CoroutineContext): CoroutineContext
|
||||
|
||||
/**
|
||||
* Returns a context containing elements from this context, but without an element with
|
||||
* the specified [key].
|
||||
*/
|
||||
public fun minusKey(key: Key<*>): CoroutineContext
|
||||
|
||||
/**
|
||||
* An element of the [CoroutineContext]. An element of the coroutine context is a singleton context by itself.
|
||||
*/
|
||||
public interface Element : CoroutineContext {
|
||||
/**
|
||||
* A key of this coroutine context element.
|
||||
*/
|
||||
public val key: Key<*>
|
||||
}
|
||||
|
||||
/**
|
||||
* Key for the elements of [CoroutineContext]. [E] is a type of element with this key.
|
||||
*/
|
||||
public interface Key<E : Element>
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package kotlin.coroutines
|
||||
|
||||
/**
|
||||
* Interface representing a continuation after a suspension point that returns value of type `T`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
public interface Continuation<in T> {
|
||||
/**
|
||||
* Context of the coroutine that corresponds to this continuation.
|
||||
*/
|
||||
public val context: CoroutineContext
|
||||
|
||||
/**
|
||||
* Resumes the execution of the corresponding coroutine passing [value] as the return value of the last suspension point.
|
||||
*/
|
||||
public fun resume(value: T)
|
||||
|
||||
/**
|
||||
* Resumes the execution of the corresponding coroutine so that the [exception] is re-thrown right after the
|
||||
* last suspension point.
|
||||
*/
|
||||
public fun resumeWithException(exception: Throwable)
|
||||
}
|
||||
|
||||
/**
|
||||
* Classes and interfaces marked with this annotation are restricted when used as receivers for extension
|
||||
* `suspend` functions. These `suspend` extensions can only invoke other member or extension `suspend` functions on this particular
|
||||
* receiver only and are restricted from calling arbitrary suspension functions.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
public annotation class RestrictsSuspension
|
||||
@@ -4,7 +4,8 @@ package kotlin.coroutines
|
||||
|
||||
import java.lang.IllegalStateException
|
||||
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
import kotlin.coroutines.intrinsics.SUSPENDED_MARKER
|
||||
import kotlin.coroutines.intrinsics.suspendCoroutineOrReturn
|
||||
|
||||
/**
|
||||
* Creates coroutine with receiver type [R] and result type [T].
|
||||
@@ -17,7 +18,7 @@ import kotlin.coroutines.intrinsics.*
|
||||
public fun <R, T> (suspend R.() -> T).createCoroutine(
|
||||
receiver: R,
|
||||
completion: Continuation<T>
|
||||
): Continuation<Unit> = ((this as kotlin.jvm.internal.CoroutineImpl).create(receiver, completion) as kotlin.jvm.internal.CoroutineImpl).facade
|
||||
): Continuation<Unit> = ((this as kotlin.coroutines.jvm.internal.CoroutineImpl).create(receiver, completion) as kotlin.coroutines.jvm.internal.CoroutineImpl).facade
|
||||
|
||||
/**
|
||||
* Starts coroutine with receiver type [R] and result type [T].
|
||||
@@ -43,7 +44,7 @@ public fun <R, T> (suspend R.() -> T).startCoroutine(
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
public fun <T> (suspend () -> T).createCoroutine(
|
||||
completion: Continuation<T>
|
||||
): Continuation<Unit> = ((this as kotlin.jvm.internal.CoroutineImpl).create(completion) as kotlin.jvm.internal.CoroutineImpl).facade
|
||||
): Continuation<Unit> = ((this as kotlin.coroutines.jvm.internal.CoroutineImpl).create(completion) as kotlin.coroutines.jvm.internal.CoroutineImpl).facade
|
||||
|
||||
/**
|
||||
* Starts coroutine without receiver and with result type [T].
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@file:JvmVersion
|
||||
package kotlin.coroutines.jvm.internal
|
||||
|
||||
import java.lang.IllegalStateException
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.ContinuationInterceptor
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.coroutines.intrinsics.SUSPENDED_MARKER
|
||||
import kotlin.jvm.internal.Lambda
|
||||
|
||||
abstract class CoroutineImpl(
|
||||
arity: Int,
|
||||
@JvmField
|
||||
protected var completion: Continuation<Any?>?
|
||||
) : Lambda(arity), Continuation<Any?> {
|
||||
|
||||
// label == -1 when coroutine cannot be started (it is just a factory object) or has already finished execution
|
||||
// label == 0 in initial part of the coroutine
|
||||
@JvmField
|
||||
protected var label: Int = if (completion != null) 0 else -1
|
||||
|
||||
private val _context: CoroutineContext? = completion?.context
|
||||
|
||||
override val context: CoroutineContext
|
||||
get() = _context!!
|
||||
|
||||
private var _facade: Continuation<Any?>? = null
|
||||
|
||||
val facade: Continuation<Any?> get() {
|
||||
if (_facade == null) _facade = _context!![ContinuationInterceptor]?.interceptContinuation(this) ?: this
|
||||
return _facade!!
|
||||
}
|
||||
|
||||
override fun resume(value: Any?) {
|
||||
try {
|
||||
val result = doResume(value, null)
|
||||
if (result != SUSPENDED_MARKER)
|
||||
completion!!.resume(result)
|
||||
} catch (e: Throwable) {
|
||||
completion!!.resumeWithException(e)
|
||||
}
|
||||
}
|
||||
|
||||
override fun resumeWithException(exception: Throwable) {
|
||||
try {
|
||||
val result = doResume(null, exception)
|
||||
if (result != SUSPENDED_MARKER)
|
||||
completion!!.resume(result)
|
||||
} catch (e: Throwable) {
|
||||
completion!!.resumeWithException(e)
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract fun doResume(data: Any?, exception: Throwable?): Any?
|
||||
|
||||
open fun create(completion: Continuation<*>): Continuation<Unit> {
|
||||
throw IllegalStateException("create(Continuation) has not been overridden")
|
||||
}
|
||||
|
||||
open fun create(value: Any?, completion: Continuation<*>): Continuation<Unit> {
|
||||
throw IllegalStateException("create(Any?;Continuation) has not been overridden")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@file:JvmVersion
|
||||
@file:JvmName("CoroutineIntrinsics")
|
||||
package kotlin.coroutines.jvm.internal
|
||||
|
||||
import kotlin.coroutines.Continuation
|
||||
|
||||
fun <T> normalizeContinuation(continuation: Continuation<T>): Continuation<T> =
|
||||
(continuation as? kotlin.coroutines.jvm.internal.CoroutineImpl)?.facade ?: continuation
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@file:kotlin.jvm.JvmName("IntrinsicsKt")
|
||||
|
||||
package kotlin.coroutines.intrinsics
|
||||
|
||||
import kotlin.coroutines.Continuation
|
||||
|
||||
/**
|
||||
* Obtains the current continuation instance inside suspend functions and either suspend
|
||||
* currently running coroutine or return result immediately without suspension.
|
||||
*
|
||||
* If the [block] returns the special [SUSPENDED_MARKER] value, it means that suspend function did suspend the execution and will
|
||||
* not return any result immediately. In this case, the [Continuation] provided to the [block] shall be invoked at some moment in the
|
||||
* future when the result becomes available to resume the computation.
|
||||
*
|
||||
* Otherwise, the return value of the [block] must have a type assignable to [T] and represents the result of this suspend function.
|
||||
* It means that the execution was not suspended and the [Continuation] provided to the [block] shall not be invoked.
|
||||
* As the result type of the [block] is declared as `Any?` and cannot be correctly type-checked,
|
||||
* its proper return type remains on the conscience of the suspend function's author.
|
||||
*
|
||||
* Note that it is not recommended to call either [Continuation.resume] nor [Continuation.resumeWithException] functions synchronously
|
||||
* in the same stackframe where suspension function is run. Use [suspendCoroutine] as a safer way to obtain current
|
||||
* continuation instance.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
public inline suspend fun <T> suspendCoroutineOrReturn(crossinline block: (Continuation<T>) -> Any?): T = null!!
|
||||
|
||||
/**
|
||||
* This value is used as a return value of [suspendCoroutineOrReturn] `block` argument to state that
|
||||
* the execution was suspended and will not return any result immediately.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
public val SUSPENDED_MARKER: Any = Any()
|
||||
|
||||
-53
@@ -179,42 +179,6 @@ public abstract class kotlin/collections/ShortIterator : java/util/Iterator, kot
|
||||
public fun remove ()V
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/Continuation {
|
||||
public abstract fun getContext ()Lkotlin/coroutines/CoroutineContext;
|
||||
public abstract fun resume (Ljava/lang/Object;)V
|
||||
public abstract fun resumeWithException (Ljava/lang/Throwable;)V
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/ContinuationInterceptor : kotlin/coroutines/CoroutineContext$Element {
|
||||
public static final field Key Lkotlin/coroutines/ContinuationInterceptor$Key;
|
||||
public abstract fun interceptContinuation (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
}
|
||||
|
||||
public final class kotlin/coroutines/ContinuationInterceptor$Key : kotlin/coroutines/CoroutineContext$Key {
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/CoroutineContext {
|
||||
public abstract fun fold (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
|
||||
public abstract fun get (Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext$Element;
|
||||
public abstract fun minusKey (Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext;
|
||||
public abstract fun plus (Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/CoroutineContext$Element : kotlin/coroutines/CoroutineContext {
|
||||
public abstract fun getKey ()Lkotlin/coroutines/CoroutineContext$Key;
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/CoroutineContext$Key {
|
||||
}
|
||||
|
||||
public abstract interface annotation class kotlin/coroutines/RestrictsSuspension : java/lang/annotation/Annotation {
|
||||
}
|
||||
|
||||
public final class kotlin/coroutines/intrinsics/IntrinsicsKt {
|
||||
public static final fun getSUSPENDED_MARKER ()Ljava/lang/Object;
|
||||
public static final fun suspendCoroutineOrReturn (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class kotlin/jvm/JvmClassMappingKt {
|
||||
public static final fun getAnnotationClass (Ljava/lang/annotation/Annotation;)Lkotlin/reflect/KClass;
|
||||
public static final fun getJavaClass (Ljava/lang/Object;)Ljava/lang/Class;
|
||||
@@ -481,23 +445,6 @@ public class kotlin/jvm/internal/CollectionToArray {
|
||||
public static fun toArray (Ljava/util/Collection;[Ljava/lang/Object;)[Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public abstract class kotlin/jvm/internal/CoroutineImpl : kotlin/jvm/internal/Lambda, kotlin/coroutines/Continuation {
|
||||
protected field completion Lkotlin/coroutines/Continuation;
|
||||
protected field label I
|
||||
public fun <init> (ILkotlin/coroutines/Continuation;)V
|
||||
public fun create (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
public fun create (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
protected abstract fun doResume (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
public fun getContext ()Lkotlin/coroutines/CoroutineContext;
|
||||
public final fun getFacade ()Lkotlin/coroutines/Continuation;
|
||||
public fun resume (Ljava/lang/Object;)V
|
||||
public fun resumeWithException (Ljava/lang/Throwable;)V
|
||||
}
|
||||
|
||||
public final class kotlin/jvm/internal/CoroutineIntrinsics {
|
||||
public static final fun normalizeContinuation (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
}
|
||||
|
||||
public final class kotlin/jvm/internal/DoubleCompanionObject {
|
||||
public static final field INSTANCE Lkotlin/jvm/internal/DoubleCompanionObject;
|
||||
public final fun getMAX_VALUE ()D
|
||||
|
||||
+17
-18
@@ -2012,7 +2012,23 @@ public final class kotlin/coroutines/SafeContinuation$Companion {
|
||||
|
||||
public final class kotlin/coroutines/intrinsics/IntrinsicsKt {
|
||||
public static final fun getSUSPENDED_MARKER ()Ljava/lang/Object;
|
||||
public static final fun suspendCoroutineOrReturn (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public abstract class kotlin/coroutines/jvm/internal/CoroutineImpl : kotlin/jvm/internal/Lambda, kotlin/coroutines/Continuation {
|
||||
protected field completion Lkotlin/coroutines/Continuation;
|
||||
protected field label I
|
||||
public fun <init> (ILkotlin/coroutines/Continuation;)V
|
||||
public fun create (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
public fun create (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
protected abstract fun doResume (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
public fun getContext ()Lkotlin/coroutines/CoroutineContext;
|
||||
public final fun getFacade ()Lkotlin/coroutines/Continuation;
|
||||
public fun resume (Ljava/lang/Object;)V
|
||||
public fun resumeWithException (Ljava/lang/Throwable;)V
|
||||
}
|
||||
|
||||
public final class kotlin/coroutines/jvm/internal/CoroutineIntrinsics {
|
||||
public static final fun normalizeContinuation (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
}
|
||||
|
||||
public final class kotlin/internal/PlatformImplementationsKt {
|
||||
@@ -2411,23 +2427,6 @@ public class kotlin/jvm/internal/CollectionToArray {
|
||||
public static fun toArray (Ljava/util/Collection;[Ljava/lang/Object;)[Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public abstract class kotlin/jvm/internal/CoroutineImpl : kotlin/jvm/internal/Lambda, kotlin/coroutines/Continuation {
|
||||
protected field completion Lkotlin/coroutines/Continuation;
|
||||
protected field label I
|
||||
public fun <init> (ILkotlin/coroutines/Continuation;)V
|
||||
public fun create (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
public fun create (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
protected abstract fun doResume (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
public fun getContext ()Lkotlin/coroutines/CoroutineContext;
|
||||
public final fun getFacade ()Lkotlin/coroutines/Continuation;
|
||||
public fun resume (Ljava/lang/Object;)V
|
||||
public fun resumeWithException (Ljava/lang/Throwable;)V
|
||||
}
|
||||
|
||||
public final class kotlin/jvm/internal/CoroutineIntrinsics {
|
||||
public static final fun normalizeContinuation (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
}
|
||||
|
||||
public final class kotlin/jvm/internal/DoubleCompanionObject {
|
||||
public static final field INSTANCE Lkotlin/jvm/internal/DoubleCompanionObject;
|
||||
public final fun getMAX_VALUE ()D
|
||||
|
||||
@@ -1768,6 +1768,34 @@ public abstract class kotlin/coroutines/AbstractCoroutineContextElement : kotlin
|
||||
public fun plus (Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/Continuation {
|
||||
public abstract fun getContext ()Lkotlin/coroutines/CoroutineContext;
|
||||
public abstract fun resume (Ljava/lang/Object;)V
|
||||
public abstract fun resumeWithException (Ljava/lang/Throwable;)V
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/ContinuationInterceptor : kotlin/coroutines/CoroutineContext$Element {
|
||||
public static final field Key Lkotlin/coroutines/ContinuationInterceptor$Key;
|
||||
public abstract fun interceptContinuation (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
}
|
||||
|
||||
public final class kotlin/coroutines/ContinuationInterceptor$Key : kotlin/coroutines/CoroutineContext$Key {
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/CoroutineContext {
|
||||
public abstract fun fold (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
|
||||
public abstract fun get (Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext$Element;
|
||||
public abstract fun minusKey (Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext;
|
||||
public abstract fun plus (Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/CoroutineContext$Element : kotlin/coroutines/CoroutineContext {
|
||||
public abstract fun getKey ()Lkotlin/coroutines/CoroutineContext$Key;
|
||||
}
|
||||
|
||||
public abstract interface class kotlin/coroutines/CoroutineContext$Key {
|
||||
}
|
||||
|
||||
public final class kotlin/coroutines/CoroutinesKt {
|
||||
public static final fun createCoroutine (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
public static final fun createCoroutine (Lkotlin/jvm/functions/Function2;Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
@@ -1786,6 +1814,9 @@ public final class kotlin/coroutines/EmptyCoroutineContext : kotlin/coroutines/C
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public abstract interface annotation class kotlin/coroutines/RestrictsSuspension : java/lang/annotation/Annotation {
|
||||
}
|
||||
|
||||
public final class kotlin/coroutines/SafeContinuation : kotlin/coroutines/Continuation {
|
||||
public static final field Companion Lkotlin/coroutines/SafeContinuation$Companion;
|
||||
public fun <init> (Lkotlin/coroutines/Continuation;)V
|
||||
@@ -1798,6 +1829,28 @@ public final class kotlin/coroutines/SafeContinuation : kotlin/coroutines/Contin
|
||||
public final class kotlin/coroutines/SafeContinuation$Companion {
|
||||
}
|
||||
|
||||
public final class kotlin/coroutines/intrinsics/IntrinsicsKt {
|
||||
public static final fun getSUSPENDED_MARKER ()Ljava/lang/Object;
|
||||
public static final fun suspendCoroutineOrReturn (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public abstract class kotlin/coroutines/jvm/internal/CoroutineImpl : kotlin/jvm/internal/Lambda, kotlin/coroutines/Continuation {
|
||||
protected field completion Lkotlin/coroutines/Continuation;
|
||||
protected field label I
|
||||
public fun <init> (ILkotlin/coroutines/Continuation;)V
|
||||
public fun create (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
public fun create (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
protected abstract fun doResume (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
public fun getContext ()Lkotlin/coroutines/CoroutineContext;
|
||||
public final fun getFacade ()Lkotlin/coroutines/Continuation;
|
||||
public fun resume (Ljava/lang/Object;)V
|
||||
public fun resumeWithException (Ljava/lang/Throwable;)V
|
||||
}
|
||||
|
||||
public final class kotlin/coroutines/jvm/internal/CoroutineIntrinsics {
|
||||
public static final fun normalizeContinuation (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
||||
}
|
||||
|
||||
public final class kotlin/internal/PlatformImplementationsKt {
|
||||
public static final synthetic fun platformCloseSuppressed (Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user