Examples of InsnTarget


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

        final String methodSig = JDO_PC_jdoReplaceField_Sig;
        final int accessFlags = JDO_PC_jdoReplaceField_Mods;
        final ExceptionsAttribute exceptAttr = null;

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

        // generate the begin code
        insn = appendBeginProvideReplaceField(insn);
       
View Full Code Here

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

            = JDONameHelper.getJDO_PC_jdoCopyField_Sig(className);
        final int accessFlags = JDO_PC_jdoCopyField_Mods;
        final ExceptionsAttribute exceptAttr = null;
       
        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // generate the begin code
        insn = appendBeginCopyField(insn);
       
View Full Code Here

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

        final String methodSig = JDO_PC_jdoCopyFields_Sig;
        final int accessFlags = JDO_PC_jdoCopyFields_Mods;       
        final ExceptionsAttribute exceptAttr = null;

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

        // check sm
        insn = appendCheckStateManager(insn, 0,
                                       JAVA_IllegalStateException_Path,
                                       "arg0." + JDO_PC_jdoStateManager_Name);

        // check pc argument
        final ConstClass thisConstClass = classFile.className();
        affirm(thisConstClass != null);
        insn = appendCheckVarInstanceOf(insn, 1, thisConstClass,
                                        JAVA_IllegalArgumentException_Path,
                                        "arg1");

        // check fieldnumbers argument
        insn = appendCheckVarNonNull(insn, 2,
                                     JAVA_IllegalArgumentException_Path,
                                     "arg2");

        // downcast argument
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_checkcast, thisConstClass));
        insn = insn.append(Insn.create(opc_astore_3));

        // check this and argument's sm for equality
        final InsnTarget endcheck = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_3));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(Insn.create(opc_if_acmpeq, endcheck));
        insn = appendThrowJavaException(insn,
                                        JAVA_IllegalArgumentException_Path,
                                        "arg1." + JDO_PC_jdoStateManager_Name);

        // store the array argument length into local var
        insn = insn.append(endcheck);
        insn = insn.append(Insn.create(opc_aload_2));
        insn = insn.append(Insn.create(opc_arraylength));
        insn = insn.append(Insn.create(opc_istore, 4));

        // init loop counter and goto loop check
        final InsnTarget loopcheck = new InsnTarget();
        insn = insn.append(Insn.create(opc_iconst_0));
        insn = insn.append(Insn.create(opc_istore, 5));
        insn = insn.append(Insn.create(opc_goto, loopcheck));

        // loop body: call self-delegating method with arguments
        final InsnTarget loopbody = new InsnTarget();
        insn = insn.append(loopbody);
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(Insn.create(opc_aload_3));

        // select element from array argument at loop counter
View Full Code Here

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

        final String methodSig = JDO_PC_jdoNewObjectIdInstance_Sig;
        final int accessFlags = JDO_PC_jdoNewObjectIdInstance_Mods;
        final ExceptionsAttribute exceptAttr = null;

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

        // generate empty method in case of datastore identity
        final String keyClassName = analyzer.getKeyClassName();
        if (keyClassName == null){
View Full Code Here

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

        final String methodSig = JDO_PC_jdoNewObjectIdInstance_Object_Sig;
        final int accessFlags = JDO_PC_jdoNewObjectIdInstance_Object_Mods;
        final ExceptionsAttribute exceptAttr = null;

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

        // generate empty method in case of datastore identity
        final String keyClassName = analyzer.getKeyClassName();
        if (keyClassName == null){
View Full Code Here

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

            accessFlags = JDO_PC_jdoCopyKeyFieldsFromObjectId_Mods;
        }
        final ExceptionsAttribute exceptAttr = null;

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

        // generate empty method in case of datastore identity
        final String keyClassName = analyzer.getKeyClassName();
        if (keyClassName == null){
View Full Code Here

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

            accessFlags = JDO_PC_jdoCopyKeyFieldsFromObjectId_OIFC_Mods;
        }
        final ExceptionsAttribute exceptAttr = null;

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

        // generate empty method in case of datastore identity
        final String keyClassName = analyzer.getKeyClassName();
        if (keyClassName == null){
View Full Code Here

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

        affirm(methodName != null);     
        affirm(methodSig != null);     
        final ExceptionsAttribute exceptAttr = null;

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

        final ConstFieldRef fieldRef = getAnnotatedFieldRefs()[fieldIndex];
        affirm(fieldRef != null);
        final String sig = fieldRef.nameAndType().signature().asString();
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.