public void caseNewMultiArrayExpr(NewMultiArrayExpr expr) { result = result.add(mgr.RESOLVE_CLASS_ERRORS); for (int i = 0; i < expr.getSizeCount(); i++) { Value count = expr.getSize(i); if ((!(count instanceof IntConstant)) || (((IntConstant) count).lessThan(INT_CONSTANT_ZERO).equals(INT_CONSTANT_ZERO))) { result = result.add(mgr.NEGATIVE_ARRAY_SIZE_EXCEPTION); } result = result.add(mightThrow(count)); } }
public void caseNewArrayExpr(NewArrayExpr expr) { if (expr.getBaseType() instanceof RefLikeType) { result = result.add(mgr.RESOLVE_CLASS_ERRORS); } Value count = expr.getSize(); if ((!(count instanceof IntConstant)) || (((IntConstant) count).lessThan(INT_CONSTANT_ZERO).equals(INT_CONSTANT_ZERO))) { result = result.add(mgr.NEGATIVE_ARRAY_SIZE_EXCEPTION); } result = result.add(mightThrow(count)); }
@SuppressWarnings("rawtypes") public void casePhiExpr(PhiExpr e) { for (Iterator i = e.getUseBoxes().iterator(); i.hasNext();) { ValueBox box = (ValueBox) i.next(); result = result.add(mightThrow(box.getValue())); } }
@Override public ThrowableSet getThrowables() { if (null == throwables) { throwables = ThrowableSet.Manager.v().EMPTY; for (Unit unit : b) { throwables = throwables.add(throwAnalysis.mightThrow(unit)); } } return throwables; } };
@Override public void caseThrowInst(ThrowInst i) { result = mightThrowImplicitly(i); result = result.add(mightThrowExplicitly(i)); }
@Override public void caseDivInst(DivInst i) { if (i.getOpType() instanceof IntegerType || i.getOpType() == LongType.v()) { result = result.add(mgr.ARITHMETIC_EXCEPTION); } }
@Override public void caseRemInst(RemInst i) { if (i.getOpType() instanceof IntegerType || i.getOpType() == LongType.v()) { result = result.add(mgr.ARITHMETIC_EXCEPTION); } }