1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-12-24 15:29:23 +00:00

Fix non-compiling code

An incremental compiler can be both a blessing and a curse
This commit is contained in:
Karol Stasiak 2019-10-15 00:51:16 +02:00
parent e9990dc9c1
commit 927c39585c

View File

@ -2051,9 +2051,9 @@ object Z80ExpressionCompiler extends AbstractExpressionCompiler[ZLine] {
ctx.log.debug("Weird branch of storeLarge reached!") ctx.log.debug("Weird branch of storeLarge reached!")
if (ctx.log.traceEnabled) { if (ctx.log.traceEnabled) {
ctx.log.trace("reads:") ctx.log.trace("reads:")
reads.foreach(l => ctx.log.trace(_, None)) reads.flatten.foreach(l => ctx.log.trace(l.toString, None))
ctx.log.trace("stores:") ctx.log.trace("stores:")
stores.foreach(l => ctx.log.trace(_, None)) stores.flatten.foreach(l => ctx.log.trace(l.toString, None))
} }
val fixedReads = (reads.head.init ++ List(ZLine.ld8(B, H), reads.head.last)) :: reads.tail.map(_.map { val fixedReads = (reads.head.init ++ List(ZLine.ld8(B, H), reads.head.last)) :: reads.tail.map(_.map {
case l@ZLine0(LD, TwoRegisters(reg, H), _) => l.copy(registers = TwoRegisters(reg, B)) case l@ZLine0(LD, TwoRegisters(reg, H), _) => l.copy(registers = TwoRegisters(reg, B))