JVM_IR generate range loops as counter loops when possible

This commit is contained in:
Dmitry Petrov
2021-07-28 16:21:01 +03:00
committed by teamcityserver
parent d0f207071c
commit 38d6c8ded0
35 changed files with 167 additions and 223 deletions
@@ -9,9 +9,6 @@ fun f(a: UInt): Int {
return n
}
// JVM non-IR uses while.
// JVM IR uses if + do-while.
// 0 iterator
// 0 getStart
// 0 getEnd
@@ -27,7 +24,6 @@ fun f(a: UInt): Int {
// 1 IF
// JVM_IR_TEMPLATES
// 2 INVOKESTATIC kotlin/UnsignedKt.uintCompare
// 1 INVOKESTATIC kotlin/UnsignedKt.uintCompare
// 1 IFGE
// 1 IFLT
// 2 IF
// 1 IF
@@ -25,4 +25,4 @@ fun f(a: UInt): Int {
// 1 IF
// JVM_IR_TEMPLATES
// 2 IF
// 1 IF
@@ -27,7 +27,6 @@ fun f(a: ULong): Int {
// 1 IF
// JVM_IR_TEMPLATES
// 2 INVOKESTATIC kotlin/UnsignedKt.ulongCompare
// 1 INVOKESTATIC kotlin/UnsignedKt.ulongCompare
// 1 IFGE
// 1 IFLT
// 2 IF
// 1 IF
@@ -25,4 +25,4 @@ fun f(a: ULong): Int {
// 1 IF
// JVM_IR_TEMPLATES
// 2 IF
// 1 IF