JS: support stack unwinding convention in coroutines

This commit is contained in:
Alexey Andreev
2016-11-30 18:21:20 +03:00
parent bdda04243d
commit 9eff193ea4
11 changed files with 56 additions and 31 deletions
@@ -1,8 +1,8 @@
// WITH_RUNTIME
// WITH_REFLECT
// CHECK_NOT_CALLED: suspendInline_die06n$
// CHECK_NOT_CALLED: suspendInline_nesahw$
// CHECK_NOT_CALLED: suspendInline_grpnnl$
// CHECK_NOT_CALLED: suspendInline_61zpoe$
// CHECK_NOT_CALLED: suspendInline_6r51u9$
// CHECK_NOT_CALLED: suspendInline
class Controller {
fun withValue(v: String, x: Continuation<String>) {
x.resume(v)
@@ -1,8 +1,8 @@
// WITH_RUNTIME
// WITH_REFLECT
// CHECK_NOT_CALLED: suspendInline_die06n$
// CHECK_NOT_CALLED: suspendInline_nesahw$
// CHECK_NOT_CALLED: suspendInline_grpnnl$
// CHECK_NOT_CALLED: suspendInline_61zpoe$
// CHECK_NOT_CALLED: suspendInline_6r51u9$
// CHECK_NOT_CALLED: suspendInline
class Controller {
suspend inline fun suspendInline(v: String): String = v
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS
class Controller {
suspend fun suspendHere(): Int = suspendWithCurrentContinuation { x ->
1