Merge conditions refinement

This commit is contained in:
Denis Zharkov
2014-07-10 18:14:15 +04:00
committed by Alexander Udalov
parent 0f5e29df9b
commit 602e60f72e
@@ -211,12 +211,20 @@ public class BoxingInterpreter extends OptimizationBasicInterpreter {
return v;
}
if (v instanceof BoxedBasicValue && w != BasicValue.UNINITIALIZED_VALUE) {
if (v instanceof BoxedBasicValue && w == BasicValue.UNINITIALIZED_VALUE) {
return v;
}
if (w instanceof BoxedBasicValue && v == BasicValue.UNINITIALIZED_VALUE) {
return w;
}
if (v instanceof BoxedBasicValue) {
onMergeFail((BoxedBasicValue) v);
v = new BasicValue(v.getType());
}
if (w instanceof BoxedBasicValue && v != BasicValue.UNINITIALIZED_VALUE) {
if (w instanceof BoxedBasicValue) {
onMergeFail((BoxedBasicValue) w);
w = new BasicValue(w.getType());
}