Package serp.bytecode

Examples of serp.bytecode.Code.astore()


        params = (cons == null) ? new Class[0] : cons.getParameterTypes();
        if (params.length == 1)
            code.aload().setParam(1);
        code.invokespecial().setMethod("<init>", void.class, params);
        int ret = code.getNextLocalsIndex();
        code.astore().setLocal(ret);

        // set element type
        code.aload().setLocal(ret);
        code.aload().setParam(0);
        code.putfield().setField(elementType);
View Full Code Here


            code.vreturn();

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

            // establish switch target, then move before it
            Instruction target = code.aload().setLocal(obj);
            code.previous();
View Full Code Here

                // case x: obj = fieldImpl[y]; break;
                lswitch.addCase(i, code.aload().setThis());
                code.getfield().setField(impl);
                code.constant().setValue(cacheable++);
                code.aaload();
                code.astore().setLocal(obj);
                code.go2().setTarget(target);
            }
            lswitch.setDefaultTarget(target);

            // if (obj != null)
View Full Code Here

        params = (cons == null) ? new Class[0] : cons.getParameterTypes();
        if (params.length == 1)
            code.aload().setParam(2);
        code.invokespecial().setMethod("<init>", void.class, params);
        int ret = code.getNextLocalsIndex();
        code.astore().setLocal(ret);

        // set key and value types
        code.aload().setLocal(ret);
        code.aload().setParam(0);
        code.putfield().setField(keyType);
View Full Code Here

            int obj = code.getNextLocalsIndex();
            code.aload().setParam(0);
            code.iload().setParam(1);
            code.invokeinterface().setMethod(OpenJPAStateManager.class,
                "getImplData", Object.class, new Class[]{ int.class });
            code.astore().setLocal(obj);

            // if (obj != null)
            code.aload().setLocal(obj);
            code.ifnull().setTarget(nullTarget);
View Full Code Here

        Collection jumps = new LinkedList();
        Collection jumps2;
   
        int local = code.getNextLocalsIndex();
        code.constant().setNull();
        code.astore().setLocal(local);
        int inter = code.getNextLocalsIndex();
        code.constant().setNull();
        code.astore().setLocal(inter);

        int objectCount = 0;
View Full Code Here

        int local = code.getNextLocalsIndex();
        code.constant().setNull();
        code.astore().setLocal(local);
        int inter = code.getNextLocalsIndex();
        code.constant().setNull();
        code.astore().setLocal(inter);

        int objectCount = 0;
        boolean intermediate;
        for (int i = 0; i < fmds.length; i++) {
            jumps2 = new LinkedList();
View Full Code Here

                code.invokestatic().setMethod(ImplHelper.class,
                    "getManagedInstance", Object.class,
                    new Class[] { Object.class });
                code.checkcast().setType(_managedType);
                inst = code.getNextLocalsIndex();
                code.astore().setLocal(inst);

                // there might be a difference between the classes of 'this'
                // vs 'other' in this context; use the PC methods to get the SM
                code.aload().setParam(0);
                code.aload().setThis();
View Full Code Here

            } else {
                // XXX other = (XXX) pc;
                code.aload().setParam(0);
                code.checkcast().setType(_pc);
                inst = code.getNextLocalsIndex();
                code.astore().setLocal(inst);

                // access the other's sm field directly
                code.aload().setLocal(inst);
                code.getfield().setField(SM, SMTYPE);
            }
View Full Code Here

        Collection jumps2;
        int objectCount = 0;
        boolean intermediate;
        int local = code.getNextLocalsIndex();
        code.constant().setNull();
        code.astore().setLocal(local);
        int inter = code.getNextLocalsIndex();
        code.constant().setNull();
        code.astore().setLocal(inter);

        for (int i = 0; i < fmds.length; i++) {
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.