@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 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 ( ) ; } }
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.