mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 01:29:28 +00:00
only reuse actual counter vars
This commit is contained in:
parent
deea0b05cb
commit
35ff1d996a
@ -766,9 +766,9 @@ $repeatLabel lda $counterVar
|
||||
}
|
||||
val isNested = parent is PtRepeatLoop
|
||||
|
||||
if(!isNested) {
|
||||
if(!isNested && !options.useRPN) {
|
||||
// we can re-use a counter var from the subroutine if it already has one for that datatype
|
||||
val existingVar = asmInfo.extraVars.firstOrNull { it.first==dt }
|
||||
val existingVar = asmInfo.extraVars.firstOrNull { it.first==dt && it.second.endsWith("counter") }
|
||||
if(existingVar!=null) {
|
||||
if(!preferZeropage || existingVar.third!=null)
|
||||
return existingVar.second
|
||||
|
@ -1,6 +1,5 @@
|
||||
TODO
|
||||
====
|
||||
RPN: examples/line-circle-txt crashes
|
||||
RPN: examples/turtlegfx crashes
|
||||
RPN: examples/maze crashes
|
||||
RPN: examples/bsieve,charset compilation crash (bit shift expression)
|
||||
|
Loading…
Reference in New Issue
Block a user