mirror of
https://github.com/KarolS/millfork.git
synced 2025-08-09 10:24:57 +00:00
Don't emit labels for inlined functions
This commit is contained in:
@@ -185,22 +185,31 @@ class Assembler(private val program: Program, private val rootEnv: Environment)
|
||||
case InitializedArray(name, Some(_), items) => ???
|
||||
case f: NormalFunction if f.address.isDefined =>
|
||||
var index = f.address.get.asInstanceOf[NumericConstant].value.toInt
|
||||
val code = compiledFunctions(f.name)
|
||||
if (code.nonEmpty) {
|
||||
labelMap(f.name) = index
|
||||
index = outputFunction(compiledFunctions(f.name), index, assembly, options)
|
||||
index = outputFunction(code, index, assembly, options)
|
||||
}
|
||||
case _ =>
|
||||
}
|
||||
|
||||
var index = platform.org
|
||||
env.allPreallocatables.foreach {
|
||||
case f: NormalFunction if f.address.isEmpty && f.name == "main" =>
|
||||
val code = compiledFunctions(f.name)
|
||||
if (code.nonEmpty) {
|
||||
labelMap(f.name) = index
|
||||
index = outputFunction(compiledFunctions(f.name), index, assembly, options)
|
||||
index = outputFunction(code, index, assembly, options)
|
||||
}
|
||||
case _ =>
|
||||
}
|
||||
env.allPreallocatables.foreach {
|
||||
case f: NormalFunction if f.address.isEmpty && f.name != "main" =>
|
||||
val code = compiledFunctions(f.name)
|
||||
if (code.nonEmpty) {
|
||||
labelMap(f.name) = index
|
||||
index = outputFunction(compiledFunctions(f.name), index, assembly, options)
|
||||
index = outputFunction(code, index, assembly, options)
|
||||
}
|
||||
case _ =>
|
||||
}
|
||||
env.allPreallocatables.foreach {
|
||||
|
Reference in New Issue
Block a user