JVM don't optimize temporary vals in old back-end

This commit is contained in:
Dmitry Petrov
2021-08-23 15:13:22 +03:00
committed by TeamCityServer
parent 568958492a
commit d8f6d82411
9 changed files with 16 additions and 13 deletions
@@ -3,8 +3,8 @@
fun test(): Int = "123".indexOfAny(CharArray(1000) { '1' })
// JVM_TEMPLATES:
// 4 ALOAD
// 4 ASTORE
// 5 ALOAD
// 5 ASTORE
// 7 ILOAD
// 6 ISTORE
@@ -21,6 +21,6 @@ fun foo() : String {
)
}
// 11 ALOAD
// 1 ASTORE
// 12 ALOAD
// 2 ASTORE
// 0 InlineMarker
@@ -11,7 +11,7 @@ fun foo() : String {
return foobar("abc", bar("ghi") { x -> x + "jkl" }, "mno")
}
// 4 ASTORE
// 16 ALOAD
// 6 ASTORE
// 18 ALOAD
// 1 MAXLOCALS = 7
// 0 InlineMarker