public List<Value> getBootstrapArgs() { List l = new ArrayList(); for (ValueBox element : bsmArgBoxes) { l.add(element.getValue()); } return l; }
public int equivHashCode() { int toReturn = 0; for (ValueBox element : elements) { toReturn += element.getValue().equivHashCode(); } return toReturn; }
public List<ValueBox> getUseBoxes() { List<ValueBox> list = new ArrayList<ValueBox>(); list.addAll(invokeExprBox.getValue().getUseBoxes()); list.add(invokeExprBox); return list; }
public List<Local> getLiveLocalsAfter(Unit u) { List<Local> ret = liveLocalsAfter.get(u); if (ret == null) { HashSet<Local> hs = new HashSet<Local>(); for (ValueBox vb : getFlowAfter(u)) { hs.add((Local) vb.getValue()); } liveLocalsAfter.put(u, ret = new ArrayList<Local>(hs)); } return ret; }
@Override public final List<ValueBox> getUseBoxes() { List<ValueBox> list = new ArrayList<ValueBox>(); list.addAll(opBox.getValue().getUseBoxes()); list.add(opBox); return list; }
public boolean canContainValue(Value v) { if (super.canContainValue(v)) { if (otherBox == null) { return true; } Value o = otherBox.getValue(); return (v instanceof Immediate) || (o instanceof Immediate); } return false; } }
@Override public InvokeExpr getInvokeExpr() { if (!containsInvokeExpr()) { throw new RuntimeException("getInvokeExpr() called with no invokeExpr present!"); } return (InvokeExpr) rightBox.getValue(); }
public List getUseBoxes() { List toReturn = new ArrayList(); toReturn.addAll(testExprBox.getValue().getUseBoxes()); toReturn.add(testExprBox); toReturn.addAll(trueExprBox.getValue().getUseBoxes()); toReturn.add(trueExprBox); toReturn.addAll(falseExprBox.getValue().getUseBoxes()); toReturn.add(falseExprBox); return toReturn; }
/** Returns a hash code for this object, consistent with structural equality. */ public int equivHashCode() { return getOpBox().getValue().equivHashCode(); } }
public static boolean needsBracketsRight(ValueBox subExprBox, Value expr) { Value sub = subExprBox.getValue(); if (!(sub instanceof Precedence)) { return false; } Precedence subP = (Precedence) sub; Precedence exprP = (Precedence) expr; return subP.getPrecedence() <= exprP.getPrecedence(); } }
@SuppressWarnings("rawtypes") public void caseNewExpr(NewExpr expr) { result = result.add(mgr.INITIALIZATION_ERRORS); for (Iterator i = expr.getUseBoxes().iterator(); i.hasNext();) { ValueBox box = (ValueBox) i.next(); result = result.add(mightThrow(box.getValue())); } }
public void caseExprOrRefValueBox(ValueBox vb) { inExprOrRefValueBox(vb); decideCaseExprOrRef(vb.getValue()); outExprOrRefValueBox(vb); }
/** * Returns a hash code for this object, consistent with structural equality. */ public int equivHashCode() { return baseBox.getValue().equivHashCode() * 101 + getMethod().equivHashCode() * 17; }
public void convertToBaf(JimpleToBafContext context, List<Unit> out) { if (argBoxes != null) { for (ValueBox element : argBoxes) { ((ConvertToBaf) (element.getValue())).convertToBaf(context, out); } } Unit u = Baf.v().newStaticInvokeInst(methodRef); out.add(u); u.addAllTagsOf(context.getCurrentUnit()); } }
private void javafy(ValueBox vb) { Value v = vb.getValue(); if (v instanceof Expr) { javafy_expr(vb); } else if (v instanceof Ref) { javafy_ref(vb); } else if (v instanceof Local) { javafy_local(vb); } else if (v instanceof Constant) { javafy_constant(vb); } }
public void convertToBaf(JimpleToBafContext context, List<Unit> out) { ((ConvertToBaf) getBase()).convertToBaf(context, out); if (argBoxes != null) { for (ValueBox element : argBoxes) { ((ConvertToBaf) (element.getValue())).convertToBaf(context, out); } } Unit u = Baf.v().newInterfaceInvokeInst(methodRef, argCountOf(methodRef)); out.add(u); u.addAllTagsOf(context.getCurrentUnit()); } }
private void javafy_newarray_expr(ValueBox vb) { NewArrayExpr nae = (NewArrayExpr) vb.getValue(); javafy(nae.getSizeBox()); vb.setValue(new DNewArrayExpr(nae.getBaseType(), nae.getSize())); }