boolean evaluate(int v1, int v2) { switch (value) { case EQUAL: return v1 == v2; case NOT_EQUAL: return v1 != v2; case GREATER: return v1 > v2; case LESS: return v1 < v2; case GREATER_EQUAL: return v1 >= v2; case LESS_EQUAL: return v1 <= v2;
boolean evaluate(OPT_Operand v1, OPT_Operand v2) { if (v1.isIntConstant()) { if (v2.isIntConstant()) { return evaluate(v1.asIntConstant().value, v2.asIntConstant().value); } else if (v2.isNullConstant()) { return evaluate(v1.asIntConstant().value, 0); } } else if (v1.isLongConstant()) { if (v2.isLongConstant()) { return evaluate(v1.asLongConstant().value, v2.asLongConstant().value); } } else if (v1.isFloatConstant()) { if (v2.isFloatConstant()) { return evaluate(v1.asFloatConstant().value, v2.asFloatConstant().value); } } else if (v1.isDoubleConstant()) { if (v2.isDoubleConstant()) { return evaluate(v1.asDoubleConstant().value, v2.asDoubleConstant().value); } } else if (v1.isStringConstant()) { if (v2.isStringConstant()) { if (isEQUAL()) { return v1.asStringConstant().value.equals(v2.asStringConstant().value); } else if (isNOT_EQUAL()) { return !v1.asStringConstant().value.equals(v2.asStringConstant().value); } } else if (v2.isNullConstant() || (v2.isIntConstant() && v2.asIntConstant().value == 0)) { if (isEQUAL()) { return false; } else if (isNOT_EQUAL()) { return true; } } } else if (v1.isNullConstant()) { if (v2.isNullConstant()) { return evaluate(0, 0); } else if (v2.isIntConstant()) { return evaluate(0, v2.asIntConstant().value); } else if (v2.isStringConstant()) { if (isEQUAL()) { return false; } else if (isNOT_EQUAL()) { return true; } }
  boolean evaluate(int v1, int v2) {    switch (value) {    case EQUAL:       return v1 == v2;    case NOT_EQUAL:      return v1 != v2;    case GREATER:      return v1 > v2;    case LESS:      return v1 < v2;    case GREATER_EQUAL:      return v1 >= v2;    case LESS_EQUAL:      return v1 <= v2;    }    throw  new OPT_OptimizingCompilerException("invalid condition" + this);  }