Skip to content

Commit 25e2580

Browse files
DaniilStepanovlehvolk
authored andcommitted
Too aggressive simplification fix
1 parent 40a2c80 commit 25e2580

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

jacodb-core/src/main/kotlin/org/jacodb/impl/cfg/Simplifier.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ internal class Simplifier {
125125
val lhv = inst.lhv
126126
val rhv = inst.rhv
127127
if (lhv is JcRawSimpleValue && rhv is JcRawSimpleValue) {
128+
val iterator = equalities.entries.iterator()
129+
while (iterator.hasNext()) {
130+
val entry = iterator.next()
131+
if (entry.value == lhv) {
132+
iterator.remove()
133+
}
134+
}
128135
if (equalities[lhv] != rhv) {
129136
equalities[lhv] = rhv
130137
instructions += inst

0 commit comments

Comments
 (0)