Package org.apache.bcel.verifier.structurals

Examples of org.apache.bcel.verifier.structurals.OperandStack


                    // duplicate stack before invokespecial to insert uninitialized object
                    frame = context.getInFrame();
                    InvokeInstruction invoke = (InvokeInstruction)ins.getInstruction();
                    Type[] arguments = invoke.getArgumentTypes(method.getConstantPool());
   
                    OperandStack os = frame.getStack();
                    Type type = os.peek(arguments.length);
                    if (type instanceof UninitializedObjectType) {
                        ObjectType objecttype = ((UninitializedObjectType) type).getInitialized();
                        InstructionList duplicator = duplicateStack(method, invoke, objecttype);
                        InstructionTargeter[] targeter = ins.getTargeters();
View Full Code Here


            insList.insert(InstructionFactory.createPop(returnType.getSize()));
        }
        boolean skipFirst = returnType.getSize() > 0;

        // save stack
        OperandStack os = frame.getStack();
        for (int i = skipFirst ? 1 : 0; i < os.size(); i++) {
            Type type = os.peek(i);
            if (type instanceof BasicType) {
                if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
                    type = Type.INT;
                }
                insList.append(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
View Full Code Here

        InvokeInstruction inv = (InvokeInstruction) handle.getInstruction();
        Type returnType = getReturnType(method.getConstantPool().getConstantPool(), inv.getIndex());
        boolean skipFirst = returnType.getSize() > 0;

        // restore stack
        OperandStack os = frame.getStack();
        for (int i = os.size() - 1; i >= (skipFirst ? 1 : 0); i--) {
            Type type = os.peek(i);
            if (type instanceof BasicType) {
                if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
                    type = Type.INT;
                }
                insList.append(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
View Full Code Here

TOP

Related Classes of org.apache.bcel.verifier.structurals.OperandStack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.