org.apache.bcel.generic.LoadInstruction Java Examples

The following examples show how to use org.apache.bcel.generic.LoadInstruction. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TaintFrameModelingVisitor.java    From Android_Code_Arbiter with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void handleLoadInstruction(LoadInstruction obj) {
    int numProduced = obj.produceStack(cpg);
    if (numProduced == Constants.UNPREDICTABLE) {
        throw new InvalidBytecodeException("Unpredictable stack production");
    }
    int index = obj.getIndex() + numProduced;
    while (numProduced-- > 0) {
        Taint value = getFrame().getValue(--index);
        assert value.hasValidVariableIndex() : "index not set in " + methodDescriptor;
        assert index == value.getVariableIndex() : "bad index in " + methodDescriptor;
        getFrame().pushValue(new Taint(value));
    }
}
 
Example #2
Source File: UnreadVariableCheck.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void visitLoadInstruction(LoadInstruction aInstruction)
{
    mLocalVariableBitSet.set(aInstruction.getIndex());
}
 
Example #3
Source File: UnreadVariableCheck.java    From contribution with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void visitLoadInstruction(LoadInstruction aInstruction)
{
    mLocalVariableBitSet.set(aInstruction.getIndex());
}
 
Example #4
Source File: FindDeadLocalStores.java    From spotbugs with GNU Lesser General Public License v2.1 2 votes vote down vote up
/**
 * Is instruction at given location a load?
 *
 * @param location
 *            the location
 * @return true if instruction at given location is a load, false if not
 */
private boolean isLoad(Location location) {
    Instruction ins = location.getHandle().getInstruction();
    return (ins instanceof LoadInstruction) || (ins instanceof IINC);
}