mirror of
https://github.com/KarolS/millfork.git
synced 2025-03-24 10:33:53 +00:00
Z80: CALL <number> shouldn't prevent inlining
This commit is contained in:
parent
e0bec29318
commit
7e6f2dd4ea
@ -2,7 +2,7 @@ package millfork.output
|
||||
|
||||
import millfork.assembly.z80._
|
||||
import millfork.compiler.AbstractCompiler
|
||||
import millfork.env.{ExternFunction, Label, MemoryAddressConstant, NormalFunction}
|
||||
import millfork.env._
|
||||
|
||||
import scala.collection.GenTraversableOnce
|
||||
|
||||
@ -31,6 +31,7 @@ object Z80InliningCalculator extends AbstractInliningCalculator[ZLine] {
|
||||
case ZLine(op, _, MemoryAddressConstant(Label(l)), _) if jumpingRelatedOpcodes(op) =>
|
||||
!l.startsWith(".")
|
||||
case ZLine(CALL, _, MemoryAddressConstant(th: ExternFunction), _) => false
|
||||
case ZLine(CALL, _, NumericConstant(_, _), _) => false
|
||||
case ZLine(JP, OneRegister(_), _, _) => false
|
||||
case ZLine(CALL, _, MemoryAddressConstant(th: NormalFunction), _) =>
|
||||
!functionsAlreadyKnownToBeNonInlineable(th.name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user