mirror of
https://github.com/irmen/prog8.git
synced 2026-04-26 20:17:57 +00:00
remove last trace of getTempVar (arry index expression)
tiny optimization
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user