Eliminated the redundant ForLoopHeader.needsEmptinessCheck property, cast "bound" to progression type if necessary, fixed variable declaration order.

This commit is contained in:
Mark Punzalan
2019-03-26 11:20:01 -07:00
committed by max-kammerer
parent 6b83c04472
commit 7afe121238
5 changed files with 45 additions and 59 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
fun test(): Int {
var sum = 0
for (i in 1 until 6) {
@@ -12,4 +11,4 @@ fun test(): Int {
// 0 getEnd
// 0 getFirst
// 0 getLast
// 1 IF
// 0 getStep
@@ -7,5 +7,4 @@ fun f(r: IntRange) {
// 0 getStart
// 0 getEnd
// 1 getFirst
// 1 getLast
// 1 getStep
// 1 getLast