Package serp.bytecode

Examples of serp.bytecode.Code.invokeinterface()


            code.invokeinterface().setMethod(ObjectOutput.class,
                "writeObject", void.class, objargs);
            //    out.writeObject (null) // StateManager
            code.aload().setParam(0);
            code.constant().setValue((Object) null);
            code.invokeinterface().setMethod(ObjectOutput.class,
                "writeObject", void.class, objargs);
        }
        if (go2 != null)
            go2.setTarget(code.nop());
View Full Code Here


        // inst.pcStateManager.accessingField (field);
        // return inst.<field>;
        loadManagedInstance(code, true);
        code.getfield().setField(SM, SMTYPE);
        code.iload().setLocal(fieldLocal);
        code.invokeinterface().setMethod(SMTYPE, "accessingField", void.class,
            new Class[]{ int.class });
        loadManagedInstance(code, true);
        addGetManagedValueCode(code, fmd);
        code.xreturn().setType(fmd.getDeclaredType());
View Full Code Here

        code.iadd();
        loadManagedInstance(code, true);
        addGetManagedValueCode(code, fmd);
        code.xload().setParam(firstParamOffset);
        code.constant().setValue(0);
        code.invokeinterface().setMethod(getStateManagerMethod
            (fmd.getDeclaredType(), "setting", false, true));
        code.vreturn();

        code.calculateMaxStack();
        code.calculateMaxLocals();
View Full Code Here

        if (detachedState) {
            // pcSetDetachedState (in.readObject ());
            loadManagedInstance(code, false);
            code.aload().setParam(0);
            code.invokeinterface().setMethod(ObjectInput.class, "readObject",
                Object.class, null);
            code.invokevirtual().setMethod(PRE + "SetDetachedState",
                void.class, new Class[]{ Object.class });

            // pcReplaceStateManager ((StateManager) in.readObject ());
View Full Code Here

        code.dup();
        if (params.length == 1) {
            code.aload().setParam(0);
            if (params[0] == Comparator.class) {
                code.checkcast().setType(SortedMap.class);
                code.invokeinterface().setMethod(SortedMap.class, "comparator",
                    Comparator.class, null);
            } else
                code.checkcast().setType(params[0]);
        }
        code.invokespecial().setMethod(type, "<init>", void.class, params);
View Full Code Here

                void.class, new Class[]{ Object.class });

            // pcReplaceStateManager ((StateManager) in.readObject ());
            loadManagedInstance(code, false);
            code.aload().setParam(0);
            code.invokeinterface().setMethod(ObjectInput.class, "readObject",
                Object.class, null);
            code.checkcast().setType(StateManager.class);
            code.invokevirtual().setMethod(PRE + "ReplaceStateManager",
                void.class, new Class[]{ StateManager.class });
        }
View Full Code Here

            code.getfield().setField(SM, SMTYPE);
            IfInstruction ifnull = code.ifnull();
            loadManagedInstance(code, false);
            code.getfield().setField(SM, SMTYPE);
            code.aload().setParam(0);
            code.invokeinterface().setMethod(SMTYPE, "writeDetached",
                boolean.class, outargs);
            go2 = code.ifeq();
            code.vreturn();

            // else
View Full Code Here

            Class[] objargs = new Class[]{ Object.class };
            ifnull.setTarget(code.aload().setParam(0));
            loadManagedInstance(code, false);
            code.invokevirtual().setMethod(PRE + "GetDetachedState",
                Object.class, null);
            code.invokeinterface().setMethod(ObjectOutput.class,
                "writeObject", void.class, objargs);
            //    out.writeObject (null) // StateManager
            code.aload().setParam(0);
            code.constant().setValue((Object) null);
            code.invokeinterface().setMethod(ObjectOutput.class,
View Full Code Here

            code.invokeinterface().setMethod(ObjectOutput.class,
                "writeObject", void.class, objargs);
            //    out.writeObject (null) // StateManager
            code.aload().setParam(0);
            code.constant().setValue((Object) null);
            code.invokeinterface().setMethod(ObjectOutput.class,
                "writeObject", void.class, objargs);
        }
        if (go2 != null)
            go2.setTarget(code.nop());
View Full Code Here

        int other = code.getNextLocalsIndex();
        code.astore().setLocal(other);
        code.aload().setLocal(other);
        code.constant().setNull();
        code.constant().setValue(0);
        code.invokeinterface().setMethod(Proxy.class, "setOwner", void.class,
                new Class[] { OpenJPAStateManager.class, int.class });
        code.aload().setLocal(other);
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
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.