mirror of
https://github.com/irmen/prog8.git
synced 2026-04-19 04:17:08 +00:00
IR: fix chunk reachability: via unchopped chunk label directly so that they don't get removed
This commit is contained in:
@@ -168,7 +168,7 @@ class IRUnusedCodeRemover(
|
||||
it.instructions.forEach { instr ->
|
||||
if (instr.branchTarget == null)
|
||||
instr.labelSymbol?.let { label ->
|
||||
val chunk = allLabeledChunks[label.substringBeforeLast('.')]
|
||||
val chunk = allLabeledChunks[label] ?: allLabeledChunks[label.substringBeforeLast('.')]
|
||||
if(chunk!=null)
|
||||
new+=chunk
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user