本文整理了Java中soot.Value.clone()
方法的一些代码示例,展示了Value.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.clone()
方法的具体详情如下:
包路径:soot.Value
类名称:Value
方法名:clone
[英]Returns a clone of this Value.
[中]
代码示例来源:origin: Sable/soot
public static Value cloneIfNecessary(Value val) {
if (val instanceof Local || val instanceof Constant) {
return val;
} else {
return (Value) val.clone();
}
}
}
代码示例来源:origin: Sable/soot
public static Value cloneIfNecessary(Value val) {
if (val instanceof Immediate) {
return val;
} else {
return (Value) val.clone();
}
}
代码示例来源:origin: Sable/soot
public Object clone() {
EquivalentValue equiVal = new EquivalentValue((Value) e.clone());
return equiVal;
}
代码示例来源:origin: Sable/soot
Expr expr = (Expr) v.clone();
Iterator useBoxIt = expr.getUseBoxes().iterator();
代码示例来源:origin: Sable/soot
/**
* @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;
}
/**
代码示例来源:origin: Sable/soot
/**
* @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;
}
/**
代码示例来源:origin: Sable/soot
/**
* @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;
}
/**
代码示例来源:origin: Sable/soot
/**
* @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;
}
/**
代码示例来源:origin: Sable/soot
));
Value v2 = lvalue instanceof Local ? lvalue : (Value)lvalue.clone();
getDest().emitStore(b, v2, result, this);
return result;
代码示例来源:origin: Sable/soot
soot.Value left2 = (soot.Value) left.clone();
代码示例来源:origin: com.bugvm/bugvm-soot
public static Value cloneIfNecessary(Value val)
{
if( val instanceof Local || val instanceof Constant )
return val;
else
return (Value) val.clone();
}
代码示例来源:origin: ibinti/bugvm
public static Value cloneIfNecessary(Value val)
{
if( val instanceof Local || val instanceof Constant )
return val;
else
return (Value) val.clone();
}
代码示例来源:origin: ibinti/bugvm
public Object clone() {
EquivalentValue equiVal = new EquivalentValue((Value)e.clone());
return equiVal;
}
代码示例来源:origin: com.bugvm/bugvm-soot
public Object clone() {
EquivalentValue equiVal = new EquivalentValue((Value)e.clone());
return equiVal;
}
内容来源于网络,如有侵权,请联系作者删除!