JVM_IR generate range-based loop closer to Java counter loop
KT-48435 KT-48507
This commit is contained in:
+8
-1
@@ -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
|
||||
|
||||
+9
-1
@@ -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
|
||||
+1
-1
@@ -20,5 +20,5 @@ fun foo() : String {
|
||||
// JVM_IR_TEMPLATES
|
||||
// 4 ASTORE
|
||||
// 16 ALOAD
|
||||
// 1 MAXLOCALS = 7
|
||||
// 1 MAXLOCALS = 6
|
||||
// 0 InlineMarker
|
||||
|
||||
Reference in New Issue
Block a user