More efficient patch for Frame.merge()
The Frame.merge(Frame<? extends V> frame, final Interpreter<V> interpreter)
method has a line in its for loop:
changes |= true;
This can be changed to :
changes = true;
since the OR operation will always return true when OR'd with 'true'.
Here is the full method with the patched line:
public boolean merge(final Frame<? extends V> frame, final Interpreter<V>
interpreter)
throws AnalyzerException
{
if (top != frame.top) {
throw new AnalyzerException(null, "Incompatible stack heights");
}
boolean changes = false;
for (int i = 0; i < locals + top; ++i) {
V v = interpreter.merge(values[i], frame.values[i]);
if (v != values[i]) {
values[i] = v;
changes == true;
}
}
return changes;
}