JVM_IR: Lazyly generate continuation classes of suspend functions

Otherwise, they will be generated, but unused, if the function is tail-call.
 #KT-36795 Fixed
This commit is contained in:
Ilmir Usmanov
2020-02-26 20:52:41 +01:00
parent 91ee63432a
commit 536e0e23a0
11 changed files with 36 additions and 85 deletions
@@ -30,9 +30,8 @@ class A {
// JVM_IR_TEMPLATES
// <init>, invoke, invokeSuspend, create
// 4 LOCALVARIABLE this LThisAndResultInLvtKt\$c\$1; L0 L.* 0
// TODO: Continuation are generated even for tail-call suspend functions: KT-36795
// c's lambda and foo's and dummy's continuation
// 3 LOCALVARIABLE \$result Ljava/lang/Object; L0 L.* 1
// c's lambda and foo's continuation
// 2 LOCALVARIABLE \$result Ljava/lang/Object; L0 L.* 1
// foo and <init>
// 2 LOCALVARIABLE this LA; L0 L.* 0