Fix local variables incorrectly merging.

master
LexManos 5 years ago committed by Graham
parent 0c1291b8ff
commit fda8f42dd0
  1. 8
      src/org/jetbrains/java/decompiler/modules/decompiler/StackVarsProcessor.java

@ -591,7 +591,7 @@ public class StackVarsProcessor {
for (Entry<Integer, Set<VarVersionPair>> ent : mapVars.entrySet()) { for (Entry<Integer, Set<VarVersionPair>> ent : mapVars.entrySet()) {
FastSparseSet<Integer> liveverset = mapLiveVars.get(ent.getKey()); FastSparseSet<Integer> liveverset = mapLiveVars.get(ent.getKey());
if (liveverset == null) { if (liveverset == null || liveverset.isEmpty()) {
return false; return false;
} }
@ -600,13 +600,13 @@ public class StackVarsProcessor {
domset.add(ssuversions.nodes.getWithKey(verpaar)); domset.add(ssuversions.nodes.getWithKey(verpaar));
} }
boolean isdom = false; boolean isdom = true;
for (Integer livever : liveverset) { for (Integer livever : liveverset) {
VarVersionNode node = ssuversions.nodes.getWithKey(new VarVersionPair(ent.getKey().intValue(), livever.intValue())); VarVersionNode node = ssuversions.nodes.getWithKey(new VarVersionPair(ent.getKey().intValue(), livever.intValue()));
if (ssuversions.isDominatorSet(node, domset)) { if (!ssuversions.isDominatorSet(node, domset)) {
isdom = true; isdom = false;
break; break;
} }
} }

Loading…
Cancel
Save