Examples of InsnTarget


Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        affirm(managedFieldSigs.length >= managedFieldCount);
        affirm(managedFieldRefs.length >= managedFieldCount);

        // generate the switch
        final int lowOp = 0;
        final InsnTarget defaultOp = new InsnTarget();
        final InsnTarget[] targetsOp = new InsnTarget[managedFieldCount];
        for (int i = 0; i < managedFieldCount; i++) {
            targetsOp[i] = new InsnTarget();
        }           

        // javac prefers lookup switches for 1-element tables
        if (managedFieldCount <= 1) {
            final int[] matchesOp
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        //@olsen: fix 4467428, add dummy, non-empty line number table
        if (addLineNumberTableAttr) {
            // get first instruction which always is an instruction target
            affirm(codeAttr.theCode().opcode() == Insn.opc_target);
            final InsnTarget begin = (InsnTarget)codeAttr.theCode();

            // get attributes of the code attribute
            final AttributeVector codeSpecificAttrs = codeAttr.attributes();
            affirm(codeSpecificAttrs != null);
           
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        affirm(insn != null);
        affirm(exceptionName != null);
        affirm(exceptionText != null);
       
        // throw exception if sm == null
        final InsnTarget body = new InsnTarget();
        insn = insn.append(InsnUtils.aLoad(argStart, pool));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        affirm(insn != null);
        affirm(exceptionName != null);
        affirm(exceptionText != null);

        // throw exception if obj == null
        final InsnTarget body = new InsnTarget();
        insn = insn.append(InsnUtils.aLoad(argStart, pool));
        insn = insn.append(Insn.create(opc_ifnonnull, body));
        insn = appendThrowJavaException(insn, exceptionName, exceptionText);
        insn = insn.append(body);
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        affirm(constClass != null);
        affirm(exceptionName != null);
        affirm(exceptionText != null);

        // throw exception if obj not instance of class
        final InsnTarget body = new InsnTarget();
        insn = insn.append(InsnUtils.aLoad(argStart, pool));
        insn = insn.append(Insn.create(opc_instanceof, constClass));
        insn = insn.append(Insn.create(opc_ifne, body));
        insn = appendThrowJavaException(insn, exceptionName, exceptionText);
        insn = insn.append(body);
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        // assumed nonstatic call; otherwise subtract 'this' from maxStack
        affirm((accessFlags & ACCStatic) == 0);
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // end of method body
        insn = insn.append(Insn.create(opc_return));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final ExceptionsAttribute exceptAttr = null;

        //^olsen: exceptAttr != null ???

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // store the sm field into local var
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(Insn.create(opc_astore_2));

        // test the sm field and call the sm if nonnull
        final InsnTarget check = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_2));
        insn = insn.append(Insn.create(opc_ifnull, check));

        // load 'this' on the stack
        insn = insn.append(Insn.create(opc_aload_0));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final String methodSig = JDO_PC_jdoReplaceFlags_Sig;
        final int accessFlags = JDO_PC_jdoReplaceFlags_Mods;
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // store the sm field into local var
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(Insn.create(opc_astore_1));

        // test the sm field and goto end if null
        final InsnTarget end = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_ifnull, end));

        // load 'this' on the stack
        insn = insn.append(Insn.create(opc_aload_0));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final String methodSig = JDO_PC_jdoMakeDirty_Sig;
        final int accessFlags = JDO_PC_jdoMakeDirty_Mods;
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // store the sm field into local var
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(Insn.create(opc_astore_2));

        // test the sm field and goto end if null
        final InsnTarget end = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_2));
        insn = insn.append(Insn.create(opc_ifnull, end));

        // call the sm's method with 'this' and 'fieldname' arguments
        insn = insn.append(Insn.create(opc_aload_2));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final String methodSig = JDO_PC_jdoPreSerialize_Sig;
        final int accessFlags = JDO_PC_jdoPreSerialize_Mods;
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // store the sm field into local var
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(Insn.create(opc_astore_1));

        // test the sm field and goto end if null
        final InsnTarget end = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_ifnull, end));

        // call the sm's method with 'this' argument
        insn = insn.append(Insn.create(opc_aload_1));
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.