private boolean isConstant(Expr expr, int op, ASTree oprand) { oprand = stripPlusExpr(oprand); if (oprand instanceof IntConst) { IntConst c = (IntConst)oprand; long v = c.get(); if (op == '-') v = -v; else if (op == '~') v = ~v; else return false; c.set(v); } else if (oprand instanceof DoubleConst) { DoubleConst c = (DoubleConst)oprand; if (op == '-') c.set(-c.get()); else return false; } else return false; expr.setOperator('+'); return true; }
private boolean isConstant(Expr expr, int op, ASTree oprand) { oprand = stripPlusExpr(oprand); if (oprand instanceof IntConst) { IntConst c = (IntConst)oprand; long v = c.get(); if (op == '-') v = -v; else if (op == '~') v = ~v; else return false; c.set(v); } else if (oprand instanceof DoubleConst) { DoubleConst c = (DoubleConst)oprand; if (op == '-') c.set(-c.get()); else return false; } else return false; expr.setOperator('+'); return true; }
private boolean isConstant(Expr expr, int op, ASTree oprand) { oprand = stripPlusExpr(oprand); if (oprand instanceof IntConst) { IntConst c = (IntConst)oprand; long v = c.get(); if (op == '-') v = -v; else if (op == '~') v = ~v; else return false; c.set(v); } else if (oprand instanceof DoubleConst) { DoubleConst c = (DoubleConst)oprand; if (op == '-') c.set(-c.get()); else return false; } else return false; expr.setOperator('+'); return true; }
private boolean isConstant(Expr expr, int op, ASTree oprand) { oprand = stripPlusExpr(oprand); if (oprand instanceof IntConst) { IntConst c = (IntConst)oprand; long v = c.get(); if (op == '-') v = -v; else if (op == '~') v = ~v; else return false; c.set(v); } else if (oprand instanceof DoubleConst) { DoubleConst c = (DoubleConst)oprand; if (op == '-') c.set(-c.get()); else return false; } else return false; expr.setOperator('+'); return true; }
private boolean isConstant(Expr expr, int op, ASTree oprand) { oprand = stripPlusExpr(oprand); if (oprand instanceof IntConst) { IntConst c = (IntConst)oprand; long v = c.get(); if (op == '-') v = -v; else if (op == '~') v = ~v; else return false; c.set(v); } else if (oprand instanceof DoubleConst) { DoubleConst c = (DoubleConst)oprand; if (op == '-') c.set(-c.get()); else return false; } else return false; expr.setOperator('+'); return true; }
private boolean isConstant(Expr expr, int op, ASTree oprand) { oprand = stripPlusExpr(oprand); if (oprand instanceof IntConst) { IntConst c = (IntConst)oprand; long v = c.get(); if (op == '-') v = -v; else if (op == '~') v = ~v; else return false; c.set(v); } else if (oprand instanceof DoubleConst) { DoubleConst c = (DoubleConst)oprand; if (op == '-') c.set(-c.get()); else return false; } else return false; expr.setOperator('+'); return true; }
private boolean isConstant(Expr expr, int op, ASTree oprand) { oprand = stripPlusExpr(oprand); if (oprand instanceof IntConst) { IntConst c = (IntConst)oprand; long v = c.get(); if (op == '-') v = -v; else if (op == '~') v = ~v; else return false; c.set(v); } else if (oprand instanceof DoubleConst) { DoubleConst c = (DoubleConst)oprand; if (op == '-') c.set(-c.get()); else return false; } else return false; expr.setOperator('+'); return true; }