remove last trace of getTempVar (arry index expression)

tiny optimization
This commit is contained in:
Irmen de Jong
2023-10-26 22:28:07 +02:00
parent 32becdbced
commit 0904712a00
9 changed files with 265 additions and 315 deletions
@@ -147,5 +147,18 @@ main {
compileText(C64Target(), false, text, writeAssembly = true) shouldNotBe null
compileText(VMTarget(), false, text, writeAssembly = true) shouldNotBe null
}
test("array target with expression for index") {
val text = """
main {
sub start() {
ubyte[] array = [1,2,3]
array[cx16.r0L+1] += 42
cx16.r0L = array[cx16.r0L+1]
}
}"""
compileText(VMTarget(), false, text, writeAssembly = true) shouldNotBe null
compileText(C64Target(), false, text, writeAssembly = true) shouldNotBe null
}
})