no longer warn about removing unused asmsubs

This commit is contained in:
Irmen de Jong 2021-02-18 01:52:56 +01:00
parent 791dbbab9b
commit b543cc34cd
2 changed files with 3 additions and 1 deletions

View File

@ -53,6 +53,7 @@ internal class StatementOptimizer(private val program: Program,
}
if(subroutine !in callgraph.usedSymbols && !forceOutput) {
if(!subroutine.isAsmSubroutine)
errors.warn("removing unused subroutine '${subroutine.name}'", subroutine.position)
return listOf(IAstModification.Remove(subroutine, subroutine.definingScope()))
}

View File

@ -2,6 +2,7 @@
TODO
====
- don't require carry parameter Pc to asmsubs to be last; sort this out yourself like with the R0-R15 registers
- make blocks without explicit memory address, word-aligned in the assembly.
- add sound to the cx16 tehtriz
- hoist all variable declarations up to the subroutine scope *before* even the constant folding takes place (to avoid undefined symbol errors when referring to a variable from another nested scope in the subroutine)