mirror of
https://github.com/irmen/prog8.git
synced 2024-09-07 03:54:27 +00:00
fix
This commit is contained in:
parent
f465b2e2a0
commit
24f37e2062
@ -78,7 +78,6 @@ class IRUnusedCodeRemover(
|
|||||||
// check if asmsub is called from another asmsub
|
// check if asmsub is called from another asmsub
|
||||||
irprog.blocks.asSequence().forEach { block ->
|
irprog.blocks.asSequence().forEach { block ->
|
||||||
block.children.filterIsInstance<IRAsmSubroutine>().forEach { sub ->
|
block.children.filterIsInstance<IRAsmSubroutine>().forEach { sub ->
|
||||||
require(sub.asmChunk.next == null) { "asmsubs won't be pointing to their successor, otherwise we should do more work here" }
|
|
||||||
if (block.forceOutput || block.library)
|
if (block.forceOutput || block.library)
|
||||||
linkedAsmSubs += sub
|
linkedAsmSubs += sub
|
||||||
if (sub.asmChunk.isNotEmpty()) {
|
if (sub.asmChunk.isNotEmpty()) {
|
||||||
@ -87,6 +86,13 @@ class IRUnusedCodeRemover(
|
|||||||
linkedAsmSubs += asmsub
|
linkedAsmSubs += asmsub
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
val inlineAsm = sub.asmChunk.next as? IRInlineAsmChunk
|
||||||
|
if(inlineAsm!=null) {
|
||||||
|
allSubs.forEach { (label, asmsub) ->
|
||||||
|
if (inlineAsm.assembly.contains(label))
|
||||||
|
linkedAsmSubs += asmsub
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user