@Override public void visitILOAD(ILOAD obj) { handleLoadInstruction(obj); }
@Override public void visitDLOAD(DLOAD obj) { handleLoadInstruction(obj); }
@Override public void visitLLOAD(LLOAD obj) { handleLoadInstruction(obj); }
@Override public void visitFLOAD(FLOAD obj) { handleLoadInstruction(obj); }
@Override public void visitALOAD(ALOAD obj) { handleLoadInstruction(obj); }
/** * Handler for all instructions which load values from a local variable and * push them on the stack. Note that two locals are loaded for long and * double loads. */ @Override public void handleLoadInstruction(LoadInstruction obj) { int numProduced = obj.produceStack(cpg); if (numProduced == Const.UNPREDICTABLE) { throw new InvalidBytecodeException("Unpredictable stack production"); } if (numProduced != 1) { super.handleLoadInstruction(obj); return; } int index = obj.getIndex(); TypeFrame frame = getFrame(); Type value = frame.getValue(index); if (value instanceof ReferenceType && !(value instanceof GenericObjectType)) { GenericObjectType gType = getLocalVariable(index, getLocation().getHandle().getPosition()); value = GenericUtilities.merge(gType, value); } boolean isExact = frame.isExact(index); frame.pushValue(value); if (isExact) { setTopOfStackIsExact(); } }
@Override public void visitALOAD(ALOAD obj) { handleLoadInstruction(obj); }
@Override public void visitDLOAD(DLOAD obj) { handleLoadInstruction(obj); }
@Override public void visitILOAD(ILOAD obj) { handleLoadInstruction(obj); }
@Override public void visitFLOAD(FLOAD obj) { handleLoadInstruction(obj); }
@Override public void visitLLOAD(LLOAD obj) { handleLoadInstruction(obj); }
/** * Handler for all instructions which load values from a local variable and * push them on the stack. Note that two locals are loaded for long and * double loads. */ @Override public void handleLoadInstruction(LoadInstruction obj) { int numProduced = obj.produceStack(cpg); if (numProduced == Constants.UNPREDICTABLE) { throw new InvalidBytecodeException("Unpredictable stack production"); } if (numProduced != 1) { super.handleLoadInstruction(obj); return; } int index = obj.getIndex(); TypeFrame frame = getFrame(); Type value = frame.getValue(index); if (value instanceof ReferenceType && !(value instanceof GenericObjectType)) { GenericObjectType gType = getLocalVariable(index, getLocation().getHandle().getPosition()); value = GenericUtilities.merge(gType, value); } boolean isExact = frame.isExact(index); frame.pushValue(value); if (isExact) { setTopOfStackIsExact(); } }