Package serp.bytecode

Examples of serp.bytecode.Code.vreturn()


            code = m.getCode(true);
            code.aload().setThis();
            for (int j = 0; j < params.length; j++)
                code.xload().setParam(j).setType(params[j]);
            code.invokespecial().setMethod(cons[i]);
            code.vreturn();
            code.calculateMaxStack();
            code.calculateMaxLocals();
        }
    }
View Full Code Here


        code.aload().setParam(0);
        code.putfield().setField(sm);
        code.aload().setThis();
        code.iload().setParam(1);
        code.putfield().setField(field);
        code.vreturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();

        m = bc.declareMethod("getOwner", OpenJPAStateManager.class, null);
        m.makePublic();
View Full Code Here

            new Class[]{ OpenJPAStateManager.class });
        Code code = meth.getCode(true);

        BCField impl = null;
        if (!usesImplData(meta))
            code.vreturn();
        else {
            // if (sm.isImplDataCacheable())
            //     setImplData(sm.getImplData());
            impl = addBeanField(bc, "implData", Object.class);
            code.aload().setParam(0);
View Full Code Here

            code.aload().setParam(0);
            code.invokeinterface().setMethod(OpenJPAStateManager.class,
                "getImplData", Object.class, null);
            code.invokevirtual().setMethod("setImplData", void.class,
                new Class[]{ Object.class });
            ifins.setTarget(code.vreturn());
        }
        code.calculateMaxStack();
        code.calculateMaxLocals();

        // void loadImplData(OpenJPAStateManager);
View Full Code Here

        // void loadImplData(OpenJPAStateManager);
        meth = bc.declareMethod("loadImplData", void.class,
            new Class[]{ OpenJPAStateManager.class });
        code = meth.getCode(true);
        if (!usesImplData(meta))
            code.vreturn();
        else {
            // if (sm.getImplData() == null && implData != null)
            //     sm.setImplData(impl, true);
            code.aload().setParam(0);
            code.invokeinterface().setMethod(OpenJPAStateManager.class,
View Full Code Here

            code.getfield().setField(impl);
            code.constant().setValue(true);
            code.invokeinterface().setMethod(OpenJPAStateManager.class,
                "setImplData", void.class,
                new Class[]{ Object.class, boolean.class });
            Instruction ins = code.vreturn();
            ifins.setTarget(ins);
            ifins2.setTarget(ins);
        }
        code.calculateMaxStack();
        code.calculateMaxLocals();
View Full Code Here

        Code code = meth.getCode(true);

        int count = countImplDataFields(meta);
        BCField impl = null;
        if (count == 0)
            code.vreturn();
        else {
            // Object[] fieldImpl
            impl = bc.declareField("fieldImpl", Object[].class);
            impl.makePrivate();
View Full Code Here

            // if (fieldImpl != null)
            code.aload().setThis();
            code.getfield().setField(impl);
            JumpInstruction ifins = code.ifnonnull();
            code.vreturn();

            // Object obj = null;
            int obj = code.getNextLocalsIndex();
            ifins.setTarget(code.constant().setNull());
            code.astore().setLocal(obj);
View Full Code Here

            lswitch.setDefaultTarget(target);

            // if (obj != null)
            code.next();    // jump back over target
            ifins = code.ifnonnull();
            code.vreturn();

            // sm.setImplData(index, impl);
            ifins.setTarget(code.aload().setParam(0));
            code.iload().setParam(1);
            code.aload().setLocal(obj);
View Full Code Here

            code.iload().setParam(1);
            code.aload().setLocal(obj);
            code.invokeinterface().setMethod(OpenJPAStateManager.class,
                "setImplData", void.class,
                new Class[]{ int.class, Object.class });
            code.vreturn();
        }
        code.calculateMaxLocals();
        code.calculateMaxStack();

        // void storeImplData(OpenJPAStateManager sm, int index, boolean loaded)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.