JS: add partial tail-call optimization for suspend functions

This commit is contained in:
Alexey Andreev
2017-11-01 13:10:40 +03:00
parent 7c621488ad
commit f8e7861ce6
9 changed files with 119 additions and 16 deletions
@@ -2,6 +2,8 @@
// WITH_COROUTINES
import helpers.*
// CHECK_BYTECODE_LISTING
// CHECK_NEW_COUNT: function=suspendHere count=1
// CHECK_NEW_COUNT: function=mainSuspend count=1
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
@@ -2,6 +2,8 @@
// WITH_COROUTINES
import helpers.*
// CHECK_BYTECODE_LISTING
// CHECK_NEW_COUNT: function=suspendHere count=0
// CHECK_NEW_COUNT: function=complexSuspend count=0
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
@@ -1,6 +1,7 @@
// WITH_RUNTIME
// WITH_COROUTINES
// CHECK_BYTECODE_LISTING
// CHECK_NEW_COUNT: function=suspendHere count=0
import helpers.*
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*