backend: Add caching for unary and binary operation symbols

This commit is contained in:
Ilya Matveev
2017-07-13 17:01:23 +07:00
committed by ilmat192
parent 01f0540fac
commit 745fc711f8
4 changed files with 45 additions and 10 deletions
+1 -1
View File
@@ -309,7 +309,7 @@ task sum_3const(type: RunKonanTest) {
task codegen_basics_for_loops(type: RunKonanTest) {
source = "codegen/basics/for_loops.kt"
goldValue = "01234\n0123\n43210\n\n024\n02\n420\n\n036\n03\n630\n\n"
goldValue = "01234\n0123\n43210\n\n024\n02\n420\n\n036\n03\n630\n\n024\n02\n420\n\n"
}
task codegen_basics_for_loops_types(type: RunKonanTest) {
@@ -51,4 +51,24 @@ fun main(args: Array<String>) {
}
println()
println()
// Without constants
val a = 0
val b = 4
val s = 2
for (i in a..b step s) {
print(i)
}
println()
for (i in a until b step s) {
print(i)
}
println()
for (i in b downTo a step s) {
print(i)
}
println()
println()
}