mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 00:21:26 +00:00
KT-6916 Slow bytecode for downTo iteration like for (i in max downTo min)
#KT-6916 fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fun f() {
|
||||
for (i in 1..2) {
|
||||
}
|
||||
}
|
||||
|
||||
// 0 iterator
|
||||
// 0 getStart
|
||||
// 0 getEnd
|
||||
@@ -0,0 +1,8 @@
|
||||
fun f(a: Int, b: Int) {
|
||||
for (i in a..b) {
|
||||
}
|
||||
}
|
||||
|
||||
// 0 iterator
|
||||
// 0 getStart
|
||||
// 0 getEnd
|
||||
@@ -0,0 +1,11 @@
|
||||
fun f() {
|
||||
for (i in 0..5 step 2) {
|
||||
}
|
||||
for (i in 5 downTo 1) {
|
||||
}
|
||||
}
|
||||
|
||||
// 0 iterator
|
||||
// 2 getStart
|
||||
// 2 getEnd
|
||||
// 2 getIncrement
|
||||
@@ -0,0 +1,8 @@
|
||||
fun f(r: IntRange) {
|
||||
for (i in r) {
|
||||
}
|
||||
}
|
||||
|
||||
// 0 iterator
|
||||
// 1 getStart
|
||||
// 1 getEnd
|
||||
Reference in New Issue
Block a user