private boolean isFloat(soot.Value val) { if (val.getType() instanceof soot.FloatType) { return true; } return false; }
public void apply(Switch sw) { e.apply(sw); }
/** * compares the encapsulated value with <code>v</code>, using <code>equivTo</code> **/ public boolean equivToValue(Value v) { return e.equivTo(v); }
@Override public final List<ValueBox> getUseBoxes() { List<ValueBox> list = new ArrayList<ValueBox>(); list.addAll(opBox.getValue().getUseBoxes()); list.add(opBox); return list; }
public int hashCode() { return e.equivHashCode(); }
public static Value cloneIfNecessary(Value val) { if (val instanceof Local || val instanceof Constant) { return val; } else { return (Value) val.clone(); } } }
public void toString(UnitPrinter up) { e.toString(up); } }
@Override final public void caseIdentityStmt(IdentityStmt is) { if (!(is.getLeftOp().getType() instanceof RefLikeType)) { return; } Value leftOp = is.getLeftOp(); Value rightOp = is.getRightOp(); leftOp.apply(MethodNodeFactory.this); Node dest = getNode(); rightOp.apply(MethodNodeFactory.this); Node src = getNode(); mpag.addInternalEdge(src, dest); // in case library mode is activated add allocations to any // possible type of this local and // parameters of accessible methods int libOption = pag.getCGOpts().library(); if (libOption != CGOptions.library_disabled && (accessibilityOracle.isAccessible(method))) { if (rightOp instanceof IdentityRef) { Type rt = rightOp.getType(); rt.apply(new SparkLibraryHelper(pag, src, method)); } } }
public List getUseBoxes() { List list = new ArrayList(); list.addAll(rightBox.getValue().getUseBoxes()); list.add(rightBox); list.addAll(leftBox.getValue().getUseBoxes()); return list; }
/** Returns a hash code consistent with structural equality for this object. */ public int equivHashCode() { if (sourcename instanceof Value) { return ((Value) sourcename).equivHashCode(); } return sourcename.hashCode(); }
public static Value cloneIfNecessary(Value val) { if (val instanceof Immediate) { return val; } else { return (Value) val.clone(); } }
public void toString(UnitPrinter up) { value.toString(up); }
public boolean isAllShared(boolean refsOnly) { for (int i = 0; i < nodes.size(); i++) { if ((!refsOnly) && isNodeLocal.get(i).booleanValue()) { return false; } else if (((EquivalentValue) nodes.get(i)).getValue().getType() instanceof RefLikeType && isNodeLocal.get(i).booleanValue()) { return false; } } return true; }
Value l = as.getLeftOp(); Value r = as.getRightOp(); if (!(l.getType() instanceof RefLikeType)) { return; assert r.getType() instanceof RefLikeType : "Type mismatch in assignment " + as + " in method " + method.getSignature(); l.apply(MethodNodeFactory.this); Node dest = getNode(); r.apply(MethodNodeFactory.this); Node src = getNode(); if (l instanceof InstanceFieldRef) { ((InstanceFieldRef) l).getBase().apply(MethodNodeFactory.this); pag.addDereference((VarNode) getNode()); ((InstanceFieldRef) r).getBase().apply(MethodNodeFactory.this); pag.addDereference((VarNode) getNode()); } else if (r instanceof StaticFieldRef) {
public boolean equals(Object o) { if (o instanceof EquivalentValue) { o = ((EquivalentValue) o).e; } return e.equivTo(o); }
@Override public List<ValueBox> getUseBoxes() { if (argBoxes == null) { return Collections.emptyList(); } List<ValueBox> list = new ArrayList<ValueBox>(); Collections.addAll(list, argBoxes); for (ValueBox element : argBoxes) { list.addAll(element.getValue().getUseBoxes()); } return list; }
public Node getNode(Value v) { v.apply(this); return getNode(); }
public int equivHashCode() { int toReturn = 0; for (ValueBox element : elements) { toReturn += element.getValue().equivHashCode(); } return toReturn; }