public static Value cloneIfNecessary(Value val) { if (val instanceof Local || val instanceof Constant) { return val; } else { return (Value) val.clone(); } } }
public static Value cloneIfNecessary(Value val) { if (val instanceof Immediate) { return val; } else { return (Value) val.clone(); } }
public Object clone() { EquivalentValue equiVal = new EquivalentValue((Value) e.clone()); return equiVal; }
Expr expr = (Expr) v.clone(); Iterator useBoxIt = expr.getUseBoxes().iterator();
/** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:129 */ public soot.Value emitShiftExpr(Body b) { TypeDecl dest = getDest().type(); TypeDecl source = getSource().type(); TypeDecl type = dest.unaryNumericPromotion(); Value lvalue = getDest().eval(b); Value v = lvalue instanceof Local ? lvalue : (Value)lvalue.clone(); Value value = b.newTemp(dest.emitCastTo(b, v, type, getDest())); Value rvalue = source.emitCastTo(b, getSource(), typeInt()); Value result = asImmediate(b, type.emitCastTo(b, createAssignOp(b, value, rvalue), dest, getDest() )); getDest().emitStore(b, lvalue, result, this); return result; } /**
/** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:62 */ public soot.Value eval(Body b) { TypeDecl dest = getDest().type(); TypeDecl source = getSource().type(); TypeDecl type; if(dest.isNumericType() && source.isNumericType()) type = dest.binaryNumericPromotion(source); else type = dest; Value lvalue = getDest().eval(b); Value v = lvalue instanceof Local ? lvalue : (Value)lvalue.clone(); Value value = b.newTemp(dest.emitCastTo(b, v, type, this)); Value rvalue = source.emitCastTo(b, getSource(), type); Value result = asImmediate(b, type.emitCastTo(b, createAssignOp(b, value, rvalue), dest, getDest() )); getDest().emitStore(b, lvalue, result, this); return result; } /**
/** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:754 */ public soot.Value emitPrefix(Body b, int constant) { soot.Value lvalue = getOperand().eval(b); Value v = lvalue instanceof Local ? lvalue : (Value)lvalue.clone(); TypeDecl type = getOperand().type().binaryNumericPromotion(typeInt()); Value value = getOperand().type().emitCastTo(b, v, type, getOperand()); Value rvalue = typeInt().emitCastTo(b, IntType.emitConstant(constant), type, this); Value result = asLocal(b, type.emitCastTo(b, b.newAddExpr(asImmediate(b, value), asImmediate(b, rvalue), this), getOperand().type(), this )); getOperand().emitStore(b, lvalue, result, this); return result; } /**
/** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:736 */ public soot.Value emitPostfix(Body b, int constant) { soot.Value lvalue = getOperand().eval(b); Value v = lvalue instanceof Local ? lvalue : (Value)lvalue.clone(); TypeDecl type = getOperand().type().binaryNumericPromotion(typeInt()); Value value = b.newTemp(getOperand().type().emitCastTo(b, v, type, getOperand())); Value rvalue = typeInt().emitCastTo(b, IntType.emitConstant(constant), type, this); Value sum = asRValue(b, type.emitCastTo(b, b.newAddExpr(asImmediate(b, value), asImmediate(b, rvalue), this), getOperand().type(), this )); getOperand().emitStore(b, lvalue, sum, this); return value; } /**
)); Value v2 = lvalue instanceof Local ? lvalue : (Value)lvalue.clone(); getDest().emitStore(b, v2, result, this); return result;
soot.Value left2 = (soot.Value) left.clone();
public static Value cloneIfNecessary(Value val) { if( val instanceof Local || val instanceof Constant ) return val; else return (Value) val.clone(); }
public static Value cloneIfNecessary(Value val) { if( val instanceof Local || val instanceof Constant ) return val; else return (Value) val.clone(); }
public Object clone() { EquivalentValue equiVal = new EquivalentValue((Value)e.clone()); return equiVal; }
public Object clone() { EquivalentValue equiVal = new EquivalentValue((Value)e.clone()); return equiVal; }