mirror of
https://github.com/irmen/prog8.git
synced 2025-01-12 19:29:50 +00:00
fix codegen mistake for zp allocated loop vars
This commit is contained in:
parent
b3368acb33
commit
bf71fabe0e
@ -293,7 +293,7 @@ $loopLabel sty $indexVar
|
|||||||
// allocate index var on ZP if possible
|
// allocate index var on ZP if possible
|
||||||
val result = asmgen.zeropage.allocate(listOf(indexVar), DataType.UBYTE, null, stmt.position, asmgen.errors)
|
val result = asmgen.zeropage.allocate(listOf(indexVar), DataType.UBYTE, null, stmt.position, asmgen.errors)
|
||||||
result.fold(
|
result.fold(
|
||||||
success = { zpAddr-> asmgen.out("""$indexVar = $zpAddr ; auto zp UBYTE""") },
|
success = { (address,_)-> asmgen.out("""$indexVar = $address ; auto zp UBYTE""") },
|
||||||
failure = { asmgen.out("$indexVar .byte 0") }
|
failure = { asmgen.out("$indexVar .byte 0") }
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@ -334,7 +334,7 @@ $loopLabel sty $indexVar
|
|||||||
// allocate index var on ZP if possible
|
// allocate index var on ZP if possible
|
||||||
val result = asmgen.zeropage.allocate(listOf(indexVar), DataType.UBYTE, null, stmt.position, asmgen.errors)
|
val result = asmgen.zeropage.allocate(listOf(indexVar), DataType.UBYTE, null, stmt.position, asmgen.errors)
|
||||||
result.fold(
|
result.fold(
|
||||||
success = { zpAddr-> asmgen.out("""$indexVar = $zpAddr ; auto zp UBYTE""") },
|
success = { (address,_)-> asmgen.out("""$indexVar = $address ; auto zp UBYTE""") },
|
||||||
failure = { asmgen.out("$indexVar .byte 0") }
|
failure = { asmgen.out("$indexVar .byte 0") }
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -3,8 +3,6 @@ TODO
|
|||||||
|
|
||||||
For next compiler release (7.7)
|
For next compiler release (7.7)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
- fix crash after enter in bdmusic (caused by ZP branch)
|
|
||||||
- fix crash in sorting (caused by ZP branch)
|
|
||||||
- if zp option = dontuse, give error if any variable has @requirezp
|
- if zp option = dontuse, give error if any variable has @requirezp
|
||||||
|
|
||||||
Need help with
|
Need help with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user