Reformat stdlib: new coroutines
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
* that can be found in the license/LICENSE.txt file.
|
* that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package kotlin.coroutines
|
package kotlin.coroutines
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater
|
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater
|
||||||
@@ -33,7 +32,8 @@ internal actual constructor(
|
|||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
private val RESULT = AtomicReferenceFieldUpdater.newUpdater<SafeContinuation<*>, Any?>(
|
private val RESULT = AtomicReferenceFieldUpdater.newUpdater<SafeContinuation<*>, Any?>(
|
||||||
SafeContinuation::class.java, Any::class.java as Class<Any?>, "result")
|
SafeContinuation::class.java, Any::class.java as Class<Any?>, "result"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Fail(val exception: Throwable)
|
private class Fail(val exception: Throwable)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
@file:kotlin.jvm.JvmName("IntrinsicsKt")
|
@file:kotlin.jvm.JvmName("IntrinsicsKt")
|
||||||
@file:kotlin.jvm.JvmMultifileClass
|
@file:kotlin.jvm.JvmMultifileClass
|
||||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||||
|
|
||||||
package kotlin.coroutines.intrinsics
|
package kotlin.coroutines.intrinsics
|
||||||
|
|
||||||
import kotlin.coroutines.*
|
import kotlin.coroutines.*
|
||||||
|
|||||||
+1
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@file:JvmName("CoroutineIntrinsics")
|
@file:JvmName("CoroutineIntrinsics")
|
||||||
|
|
||||||
package kotlin.coroutines.jvm.internal
|
package kotlin.coroutines.jvm.internal
|
||||||
|
|
||||||
import kotlin.coroutines.Continuation
|
import kotlin.coroutines.Continuation
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||||
@file:kotlin.jvm.JvmName("CoroutinesKt")
|
@file:kotlin.jvm.JvmName("CoroutinesKt")
|
||||||
|
|
||||||
package kotlin.coroutines
|
package kotlin.coroutines
|
||||||
|
|
||||||
import kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED
|
import kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
@file:kotlin.jvm.JvmMultifileClass
|
@file:kotlin.jvm.JvmMultifileClass
|
||||||
@file:kotlin.jvm.JvmName("SequenceBuilderKt")
|
@file:kotlin.jvm.JvmName("SequenceBuilderKt")
|
||||||
|
|
||||||
package kotlin.sequences
|
package kotlin.sequences
|
||||||
|
|
||||||
import kotlin.*
|
import kotlin.*
|
||||||
@@ -85,6 +86,7 @@ public abstract class SequenceBuilder<in T> internal constructor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private typealias State = Int
|
private typealias State = Int
|
||||||
|
|
||||||
private const val State_NotReady: State = 0
|
private const val State_NotReady: State = 0
|
||||||
private const val State_ManyNotReady: State = 1
|
private const val State_ManyNotReady: State = 1
|
||||||
private const val State_ManyReady: State = 2
|
private const val State_ManyReady: State = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user