mirror of
https://github.com/KarolS/millfork.git
synced 2025-07-04 18:24:44 +00:00
Fix deduplication problems with trampolined functions
This commit is contained in:
@ -323,7 +323,6 @@ abstract class AbstractAssembler[T <: AbstractCode](private val program: Program
|
|||||||
function.environment.removedThings.foreach(env.removeVariable)
|
function.environment.removedThings.foreach(env.removeVariable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deduplicate(options, compiledFunctions)
|
|
||||||
if (log.traceEnabled) {
|
if (log.traceEnabled) {
|
||||||
niceFunctionProperties.toList.groupBy(_._2).mapValues(_.map(_._1).sortBy(_.toString)).toList.sortBy(_._1).foreach{ case (fname, properties) =>
|
niceFunctionProperties.toList.groupBy(_._2).mapValues(_.map(_._1).sortBy(_.toString)).toList.sortBy(_._1).foreach{ case (fname, properties) =>
|
||||||
log.trace(fname.padTo(30, ' ') + properties.mkString(" "))
|
log.trace(fname.padTo(30, ' ') + properties.mkString(" "))
|
||||||
@ -358,6 +357,7 @@ abstract class AbstractAssembler[T <: AbstractCode](private val program: Program
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
deduplicate(options, compiledFunctions.filterNot(o => unusedRuntimeObjects(o._1)))
|
||||||
|
|
||||||
env.allPreallocatables.filterNot(o => unusedRuntimeObjects(o.name)).foreach {
|
env.allPreallocatables.filterNot(o => unusedRuntimeObjects(o.name)).foreach {
|
||||||
case thing@InitializedArray(name, Some(NumericConstant(address, _)), items, _, _, elementType, readOnly, _, _) =>
|
case thing@InitializedArray(name, Some(NumericConstant(address, _)), items, _, _, elementType, readOnly, _, _) =>
|
||||||
|
Reference in New Issue
Block a user