if ((operand0 instanceof Literal) && (operand1 instanceof Literal)) {
return Literal.makeLiteral(
(AtomicValue)evaluateItem(env.makeEarlyEvaluationContext()));
}
final TypeHierarchy th = env.getConfiguration().getTypeHierarchy();
ItemType type0 = operand0.getItemType(th);
ItemType type1 = operand1.getItemType(th);
if (type0.isAtomicType()) {
atomize0 = false;
}
if (type1.isAtomicType()) {
atomize1 = false;
}
if (th.relationship(type0, BuiltInAtomicType.BOOLEAN) == TypeHierarchy.DISJOINT) {
maybeBoolean0 = false;
}
if (th.relationship(type1, BuiltInAtomicType.BOOLEAN) == TypeHierarchy.DISJOINT) {
maybeBoolean1 = false;
}
if (!maybeBoolean0 && !maybeBoolean1) {
int n0 = th.relationship(type0, BuiltInAtomicType.NUMERIC);
int n1 = th.relationship(type1, BuiltInAtomicType.NUMERIC);
boolean maybeNumeric0 = (n0 != TypeHierarchy.DISJOINT);
boolean maybeNumeric1 = (n1 != TypeHierarchy.DISJOINT);
boolean numeric0 = (n0 == TypeHierarchy.SUBSUMED_BY || n0 == TypeHierarchy.SAME_TYPE);
boolean numeric1 = (n1 == TypeHierarchy.SUBSUMED_BY || n1 == TypeHierarchy.SAME_TYPE);
// Use the 2.0 path if we don't have to deal with the possibility of boolean values,