Use our own primitive boxing methods in coroutines codegen

#KT-26490 Fixed
This commit is contained in:
Ilmir Usmanov
2018-09-12 15:35:07 +03:00
parent 273889d1a9
commit e9fc65c7ae
7 changed files with 105 additions and 1 deletions
@@ -0,0 +1,9 @@
// !LANGUAGE: +ReleaseCoroutines
inline fun inlineMe(crossinline c: suspend () -> Int): suspend () -> Int {
val i: suspend () -> Int = { c() + c() }
return i
}
// 1 valueOf
// 0 boxInt
@@ -0,0 +1,9 @@
// !LANGUAGE: +ReleaseCoroutines
inline suspend fun inlineMe() = 1000
// inlineMe$$forInline : valueOf
// inlineMe : boxInt
// 1 valueOf
// 1 boxInt
@@ -0,0 +1,6 @@
// !LANGUAGE: +ReleaseCoroutines
suspend fun produce(): Int = 1000
// 0 valueOf
// 1 boxInt