public String toString() { Value op1 = op1Box.getValue(), op2 = op2Box.getValue(); String leftOp = op1.toString(), rightOp = op2.toString(); return leftOp + getSymbol() + rightOp; }
private void handleEqualityOrNonEqualityCheck(AbstractBinopExpr eqExpr, AnalysisInfo in, AnalysisInfo out, AnalysisInfo outBranch) { Value left = eqExpr.getOp1(); Value right = eqExpr.getOp2(); Value val = null; if (left == NullConstant.v()) { if (right != NullConstant.v()) { val = right; } } else if (right == NullConstant.v()) { if (left != NullConstant.v()) { val = left; } } // if we compare a local with null then process further... if (val != null && val instanceof Local) { if (eqExpr instanceof JEqExpr) { // a==null handleEquality(val, out, outBranch); } else if (eqExpr instanceof JNeExpr) { // a!=null handleNonEquality(val, out, outBranch); } else { throw new IllegalStateException("unexpected condition: " + eqExpr.getClass()); } } }
/** Returns a hash code for this object, consistent with structural equality. */ public int equivHashCode() { return op1Box.getValue().equivHashCode() * 101 + op2Box.getValue().equivHashCode() + 17 ^ getSymbol().hashCode(); }
public void toString(UnitPrinter up) { // Value val1 = op1Box.getValue(); // Value val2 = op2Box.getValue(); if (PrecedenceTest.needsBrackets(op1Box, this)) { up.literal("("); } op1Box.toString(up); if (PrecedenceTest.needsBrackets(op1Box, this)) { up.literal(")"); } up.literal(getSymbol()); if (PrecedenceTest.needsBracketsRight(op2Box, this)) { up.literal("("); } op2Box.toString(up); if (PrecedenceTest.needsBracketsRight(op2Box, this)) { up.literal(")"); } } }
public String toString() { Value op1 = op1Box.getValue(), op2 = op2Box.getValue(); String leftOp = op1.toString(), rightOp = op2.toString(); return leftOp + getSymbol() + rightOp; }
public String toString() { Value op1 = op1Box.getValue(), op2 = op2Box.getValue(); String leftOp = op1.toString(), rightOp = op2.toString(); return leftOp + getSymbol() + rightOp; }
/** Returns a hash code for this object, consistent with structural equality. */ public int equivHashCode() { return op1Box.getValue().equivHashCode() * 101 + op2Box.getValue().equivHashCode() + 17 ^ getSymbol().hashCode(); }
/** Returns a hash code for this object, consistent with structural equality. */ public int equivHashCode() { return op1Box.getValue().equivHashCode() * 101 + op2Box.getValue().equivHashCode() + 17 ^ getSymbol().hashCode(); }
public void toString( UnitPrinter up ) { Value val1 = op1Box.getValue(); Value val2 = op2Box.getValue(); if( PrecedenceTest.needsBrackets( op1Box, this ) ) up.literal("("); op1Box.toString(up); if( PrecedenceTest.needsBrackets( op1Box, this ) ) up.literal(")"); up.literal(getSymbol()); if( PrecedenceTest.needsBracketsRight( op2Box, this ) ) up.literal("("); op2Box.toString(up); if( PrecedenceTest.needsBracketsRight( op2Box, this ) ) up.literal(")"); } }
public void toString( UnitPrinter up ) { Value val1 = op1Box.getValue(); Value val2 = op2Box.getValue(); if( PrecedenceTest.needsBrackets( op1Box, this ) ) up.literal("("); op1Box.toString(up); if( PrecedenceTest.needsBrackets( op1Box, this ) ) up.literal(")"); up.literal(getSymbol()); if( PrecedenceTest.needsBracketsRight( op2Box, this ) ) up.literal("("); op2Box.toString(up); if( PrecedenceTest.needsBracketsRight( op2Box, this ) ) up.literal(")"); } }