mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 23:29:55 +00:00
fix asm code optimization problem caused in previous release where asm file is not read back in separate lines anymore
This commit is contained in:
parent
33061aaa0d
commit
75ea453bf4
@ -79,6 +79,10 @@ class AsmGen(private val program: Program,
|
||||
footer()
|
||||
|
||||
if(options.optimize) {
|
||||
val separateLines = assemblyLines.flatMap { it.split('\n') }
|
||||
assemblyLines.clear()
|
||||
assemblyLines.addAll(separateLines)
|
||||
require(assemblyLines.all { !it.contains('\n') })
|
||||
var optimizationsDone = 1
|
||||
while (optimizationsDone > 0) {
|
||||
optimizationsDone = optimizeAssembly(assemblyLines, options.compTarget.machine, program)
|
||||
|
Loading…
Reference in New Issue
Block a user