JVM_IR generate range-based loop closer to Java counter loop

KT-48435 KT-48507
This commit is contained in:
Dmitry Petrov
2021-09-01 15:31:19 +03:00
parent 9ed08438d5
commit b669de1663
137 changed files with 1518 additions and 573 deletions
@@ -15,7 +15,14 @@ fun foo() {
// 7 ALOAD
// 2 LSTORE
// 3 LLOAD
// 1 MAXLOCALS = 10
// 0 InlineMarker
// JVM_TEMPLATES
// 1 MAXLOCALS = 10
// 16 ISTORE
// 11 ILOAD
// JVM_IR_TEMPLATES
// 1 MAXLOCALS = 9
// 13 ISTORE
// 8 ILOAD
@@ -15,8 +15,16 @@ fun test() {
// 2 ASTORE
// 5 ALOAD
// 0 InlineMarker
// JVM_TEMPLATES
// 1 MAXLOCALS = 3
// 1 MAXLOCALS = 4
// 0 InlineMarker
// 14 ISTORE
// 7 ILOAD
// JVM_IR_TEMPLATES
// 2 MAXLOCALS = 3
// 1 MAXLOCALS = 4
// 11 ISTORE
// 4 ILOAD
@@ -20,5 +20,5 @@ fun foo() : String {
// JVM_IR_TEMPLATES
// 4 ASTORE
// 16 ALOAD
// 1 MAXLOCALS = 7
// 1 MAXLOCALS = 6
// 0 InlineMarker