JS: optimize variable representation in coroutines

Don't convert local variables to fields of coroutine object
when variable is both used and defined in a single block.
This commit is contained in:
Alexey Andreev
2017-09-15 13:20:35 +03:00
parent b852f73dd2
commit 3b2d634cea
6 changed files with 192 additions and 14 deletions
+1 -1
View File
@@ -14,4 +14,4 @@ suspend fun bar(): Unit {
println(a + b)
}
// LINES: 4 4 4 5 5 5 5 6 4 4 4 15 9 9 9 9 15 9 9 9 9 * 15 10 10 11 11 11 11 11 * 11 12 12 13 13 13 13 13 13 14 14
// LINES: 4 4 4 5 5 5 5 6 4 4 4 15 9 9 9 9 15 9 9 9 * 15 10 10 11 11 11 11 11 * 11 12 12 13 13 13 13 13 13 13 14 14