mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
Update bytecodeText and bytecodeListing tests on coroutines
This commit is contained in:
committed by
Stanislav Erokhin
parent
8387d04425
commit
845e116aa9
@@ -1,10 +1,11 @@
|
||||
class Controller {
|
||||
suspend fun suspendHere() = ""
|
||||
}
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
suspend fun suspendHere() = ""
|
||||
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
@@ -19,5 +20,5 @@ fun box(): String {
|
||||
}
|
||||
|
||||
// 1 GETSTATIC kotlin/Unit.INSTANCE : Lkotlin/Unit;
|
||||
// 1 GETSTATIC kotlin/coroutines/Suspend.INSTANCE
|
||||
// 1 GETSTATIC EmptyContinuation.INSTANCE
|
||||
// 2 GETSTATIC
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
fun foo() = true
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
private var byteResult: Byte = 0
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
private var booleanResult = false
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
private var byteResult: Byte = 0
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
private var booleanResult = false
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
private var result: String = ""
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
// TARGET_BACKEND: JVM
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
@JvmField
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
private var booleanResult = false
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
// TARGET_BACKEND: JVM
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
@JvmField
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x ->
|
||||
x.resume(Unit)
|
||||
SUSPENDED
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend Controller.() -> Unit) {
|
||||
c.startCoroutine(Controller(), EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
class Controller {
|
||||
suspend fun suspendHere(): String = suspendWithCurrentContinuation { x ->
|
||||
x.resume("OK")
|
||||
}
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
suspend fun suspendHere(): String = suspendWithCurrentContinuation { x ->
|
||||
x.resume("OK")
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
class Controller {
|
||||
suspend fun suspendHere(): String = suspendWithCurrentContinuation { x ->
|
||||
x.resume("OK")
|
||||
}
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
suspend fun suspendHere(): String = suspendWithCurrentContinuation { x ->
|
||||
x.resume("OK")
|
||||
}
|
||||
|
||||
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
||||
c(Controller()).resume(Unit)
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Reference in New Issue
Block a user