Create singleton sets in LiveVariableAnalyzer where possible

This will be slightly more efficient than the existing approach.

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent 15d359429e
commit df6c9a610c
  1. 2
      deob/src/main/java/dev/openrs2/deob/analysis/LiveVariableAnalyzer.kt

@ -47,6 +47,8 @@ public class LiveVariableAnalyzer(owner: String, method: MethodNode) :
private fun IntSet.plus(element: Int): IntSet {
if (contains(element)) {
return this
} else if (isEmpty()) {
return IntSets.singleton(element)
}
val newSet = IntOpenHashSet(this)

Loading…
Cancel
Save