}
@Override
public Void visitBinaryExpression(BinaryExpression node) {
TokenType operatorType = node.getOperator().getType();
Expression leftOperand = node.getLeftOperand();
Expression rightOperand = node.getRightOperand();
if (operatorType == TokenType.AMPERSAND_AMPERSAND) {
safelyVisit(leftOperand);
if (rightOperand != null) {
overrideManager.enterScope();
try {
promoteManager.enterScope();
try {
propagateTrueState(leftOperand);
// Type promotion.
promoteTypes(leftOperand);
clearTypePromotionsIfPotentiallyMutatedIn(leftOperand);
clearTypePromotionsIfPotentiallyMutatedIn(rightOperand);
clearTypePromotionsIfAccessedInClosureAndProtentiallyMutated(rightOperand);
// Visit right operand.
rightOperand.accept(this);
} finally {
promoteManager.exitScope();
}
} finally {
overrideManager.exitScope();
}
}
} else if (operatorType == TokenType.BAR_BAR) {
safelyVisit(leftOperand);
if (rightOperand != null) {
overrideManager.enterScope();
try {
propagateFalseState(leftOperand);
rightOperand.accept(this);
} finally {
overrideManager.exitScope();
}
}
} else {