Support Long and Char in const-bounded counter loop generation

If the loop end value is a compile-time constant (best we can do now),
and it is safe to iterate over a given range using "naive" for loop
(using '<=' or '>=' in loop condition),
generate such loops for Longs and Chars as well Ints (Bytes, Shorts).
This commit is contained in:
Dmitry Petrov
2017-12-11 17:54:00 +03:00
parent df2b8d01d8
commit a4c29b3587
14 changed files with 252 additions and 42 deletions
@@ -9,4 +9,4 @@ fun test(): Int {
}
// 0 IF_ICMPEQ
// 1 IF_ICMPGE
// 1 IF_ICMPGT