Files
kotlin-fork/backend.native/tests/codegen/basics
Ilya Matveev d474f207e3 backend: Don't create a Progression objects in 'for' loops
This patch optimizes the following pattern:

for (i in first..last step st) { ... }

In this case we need to create a Progression object and then call its
iterator() method causing at least 2 allocation per loop. This change
replaces such loops with the following constuction:

var inductionVar = first
checkProgressionStep(step)  // check if step > 0
last = getProgressionLastElement(first, last, step)
if (first <= last) {
    do {
        i = inductionVar
        inductionVar += step
        ...
    } while(i != last)
}
2017-07-18 17:05:58 +07:00
..
2016-11-30 16:19:28 +03:00
2016-11-25 23:37:49 +03:00
2016-12-23 11:40:31 +07:00
2016-11-28 21:48:01 +03:00
2016-12-08 11:59:46 +03:00
2016-12-29 12:18:15 +07:00
2016-12-29 12:18:15 +07:00
2016-12-29 12:18:15 +07:00
2016-12-29 12:18:15 +07:00