Methods Summary |
---|
public Value | binaryOperation(oracle.toplink.libraries.asm.tree.AbstractInsnNode insn, Value value1, Value value2)
int size;
switch (insn.getOpcode()) {
case LALOAD:
case DALOAD:
case LADD:
case DADD:
case LSUB:
case DSUB:
case LMUL:
case DMUL:
case LDIV:
case DDIV:
case LREM:
case DREM:
case LSHL:
case LSHR:
case LUSHR:
case LAND:
case LOR:
case LXOR:
size = 2;
break;
default:
size = 1;
}
return new DataflowValue(size, insn);
|
public Value | copyOperation(oracle.toplink.libraries.asm.tree.AbstractInsnNode insn, Value value)
return new DataflowValue(value.getSize(), insn);
|
public Value | merge(Value v, Value w)
DataflowValue dv = (DataflowValue)v;
DataflowValue dw = (DataflowValue)w;
if (dv.size != dw.size || !dv.insns.equals(dw.insns)) {
Set s = new HashSet();
s.addAll(dv.insns);
s.addAll(dw.insns);
return new DataflowValue(Math.min(dv.size, dw.size), s);
}
return v;
|
public Value | naryOperation(oracle.toplink.libraries.asm.tree.AbstractInsnNode insn, java.util.List values)
int size;
if (insn.getOpcode() == MULTIANEWARRAY) {
size = 1;
} else {
size = Type.getReturnType(((MethodInsnNode)insn).desc).getSize();
}
return new DataflowValue(size, insn);
|
public Value | newOperation(oracle.toplink.libraries.asm.tree.AbstractInsnNode insn)
int size;
switch (insn.getOpcode()) {
case LCONST_0:
case LCONST_1:
case DCONST_0:
case DCONST_1:
size = 2;
break;
case LDC:
Object cst = ((LdcInsnNode)insn).cst;
size = cst instanceof Long || cst instanceof Double ? 2 : 1;
break;
case GETSTATIC:
size = Type.getType(((FieldInsnNode)insn).desc).getSize();
break;
default:
size = 1;
}
return new DataflowValue(size, insn);
|
public Value | newValue(oracle.toplink.libraries.asm.Type type)
return new DataflowValue(type == null ? 1 : type.getSize());
|
public Value | ternaryOperation(oracle.toplink.libraries.asm.tree.AbstractInsnNode insn, Value value1, Value value2, Value value3)
return new DataflowValue(1, insn);
|
public Value | unaryOperation(oracle.toplink.libraries.asm.tree.AbstractInsnNode insn, Value value)
int size;
switch (insn.getOpcode()) {
case LNEG:
case DNEG:
case I2L:
case I2D:
case L2D:
case F2L:
case F2D:
case D2L:
size = 2;
break;
case GETFIELD:
size = Type.getType(((FieldInsnNode)insn).desc).getSize();
break;
default:
size = 1;
}
return new DataflowValue(size, insn);
|