Commit 9a421251 authored by Eric Bruneton's avatar Eric Bruneton

Merge branch 'retronymm/asm-topic/merge-opt'

parents bf708d5c 9412ed77
......@@ -200,7 +200,7 @@ public class SourceInterpreter extends Interpreter<SourceValue> implements Opcod
return new SourceValue(Math.min(value1.size, value2.size), setUnion);
}
}
if (value1.size != value2.size || !value1.insns.containsAll(value2.insns)) {
if (value1.size != value2.size || !containsAll(value1.insns, value2.insns)) {
HashSet<AbstractInsnNode> setUnion = new HashSet<AbstractInsnNode>();
setUnion.addAll(value1.insns);
setUnion.addAll(value2.insns);
......@@ -208,4 +208,11 @@ public class SourceInterpreter extends Interpreter<SourceValue> implements Opcod
}
return value1;
}
private static <E> boolean containsAll(final Set<E> self, final Set<E> other) {
if (self.size() < other.size()) {
return false;
}
return self.containsAll(other);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment