Examples of IF_ICMPEQ


Examples of org.apache.bcel.generic.IF_ICMPEQ

                                                          "(I)I");
      il.append(methodGen.loadDOM());
      il.append(methodGen.loadCurrentNode());
      il.append(new INVOKEINTERFACE(getType, 2));
      il.append(new PUSH(cpg, DTM.PROCESSING_INSTRUCTION_NODE));
      _falseList.add(il.append(new IF_ICMPEQ(null)));
  }

  // Load the requested processing instruction name
  il.append(new PUSH(cpg, _name));
  // Load the current processing instruction's name
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

    il.append(new PUSH(cpg, rule.getNamespace()));
    il.append(new INVOKEVIRTUAL(strcmp));
    il.append(ICONST_0);

    if (rule.getAction() == STRIP_SPACE) {
        strip[sCount++] = il.append(new IF_ICMPEQ(null));
    }
    else {
        preserve[pCount++] = il.append(new IF_ICMPEQ(null));
    }
      }
      // Handle elements="ns:el" type rule
      else if (rule.getStrength() == RULE_ELEMENT) {
    // Create the QName for the element
    final Parser parser = classGen.getParser();
    QName qname;
    if (rule.getNamespace() != Constants.EMPTYSTRING )
        qname = parser.getQName(rule.getNamespace(), null,
              rule.getElement());
    else
        qname = parser.getQName(rule.getElement());

    // Register the element.
    final int elementType = xsltc.registerElement(qname);
    il.append(new ILOAD(paramType));
    il.append(new PUSH(cpg, elementType));

    // Compare current node type with wanted element type
    if (rule.getAction() == STRIP_SPACE)
        strip[sCount++] = il.append(new IF_ICMPEQ(null));
    else
        preserve[pCount++] = il.append(new IF_ICMPEQ(null));
      }
  }

  if (defaultAction == STRIP_SPACE) {
      compileStripSpace(strip, sCount, il);
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

                                                          "(I)I");
      il.append(methodGen.loadDOM());
      il.append(methodGen.loadCurrentNode());
      il.append(new INVOKEINTERFACE(getType, 2));
      il.append(new PUSH(cpg, DTM.PROCESSING_INSTRUCTION_NODE));
      _falseList.add(il.append(new IF_ICMPEQ(null)));
  }

  // Load the requested processing instruction name
  il.append(new PUSH(cpg, _name));
  // Load the current processing instruction's name
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

      il.append(SWAP);
  }
  il.append(new INVOKEINTERFACE(getType, 2));
  il.append(new PUSH(cpg, DTM.DOCUMENT_NODE));
 
  final BranchHandle skip = il.append(new IF_ICMPEQ(null));
  _falseList.add(il.append(new GOTO_W(null)));
  skip.setTarget(il.append(NOP));

  if (_left != null) {
      _left.backPatchTrueList(begin);
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

            il.append(checkKeyIsNull);
            createThrowException(ClassEnhancer.CN_IllegalArgumentException, "key is null");
            checkKeyIsNull.setTarget(il.append(InstructionConstants.ALOAD_1));
            il.append(factory.createInstanceOf(Type.STRING));
            il.append(InstructionConstants.ICONST_1);
            BranchInstruction isInstanceof = new IF_ICMPEQ(null);
            il.append(isInstanceof);

            // new oidType(getClass(), (oidKeyType)key);
            il.append(factory.createNew(oidType));
            il.append(InstructionConstants.DUP);
            il.append(InstructionConstants.ALOAD_0);
            il.append(factory.createInvoke("java.lang.Object", "getClass", BCELClassEnhancer.OT_CLASS, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            il.append(InstructionConstants.ALOAD_1);
            il.append(factory.createCheckCast(oidKeyType));
            il.append(factory.createInvoke(oidType.getClassName(), Constants.CONSTRUCTOR_NAME, Type.VOID,
                new Type[] { BCELClassEnhancer.OT_CLASS, oidKeyType }, Constants.INVOKESPECIAL));

            // "return"
            il.append(InstructionFactory.createReturn(Type.OBJECT));

            // "new oidType(getClass(), (String)key);"
            isInstanceof.setTarget(il.append(factory.createNew(oidType)));
            il.append(InstructionConstants.DUP);
            il.append(InstructionConstants.ALOAD_0);
            il.append(factory.createInvoke("java.lang.Object", "getClass", BCELClassEnhancer.OT_CLASS, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            il.append(InstructionConstants.ALOAD_1);
            il.append(factory.createCheckCast(Type.STRING));
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

            // 1
            il.append(InstructionConstants.ICONST_1);

            // if (jdoIsDetached() == 1)
            IF_ICMPEQ ifIsDetached = new IF_ICMPEQ(null);
            il.append(ifIsDetached);

            // return 0;
            il.append(InstructionConstants.ICONST_0);
            il.append(InstructionConstants.IRETURN);

            // ((BitSet)jdoDetachedState[3]).length()
            ifIsDetached.setTarget(il.append(InstructionConstants.ALOAD_0));
            il.append(factory.createGetField(className, ClassEnhancer.FN_JdoDetachedState, BCELClassEnhancer.OT_ObjectArray));
            il.append(InstructionConstants.ICONST_3);
            il.append(InstructionConstants.AALOAD);
            il.append(factory.createCheckCast(BCELClassEnhancer.OT_BitSet)); // Cast to BitSet
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

                Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEINTERFACE));

            //1
            il.append(InstructionConstants.ICONST_1);
            // if (jdoIsDetached() == 1)
            IF_ICMPEQ ifIsDetached = new IF_ICMPEQ(null);
            il.append(ifIsDetached);
            //return;
            il.append(InstructionConstants.RETURN);

            // jdoDetachedState[3].set(?)
            //   jdoDetachedState[3]
            ifIsDetached.setTarget(il.append(InstructionConstants.ALOAD_0));
            il.append(factory.createGetField(className, ClassEnhancer.FN_JdoDetachedState, BCELClassEnhancer.OT_ObjectArray));
            il.append(InstructionConstants.ICONST_3);
            il.append(InstructionConstants.AALOAD);
            il.append(factory.createCheckCast(BCELClassEnhancer.OT_BitSet)); // Cast to BitSet
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

                Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEINTERFACE));

            //0
            il.append(InstructionConstants.ICONST_0);
            // if (jdoIsDetached() == 0)
            IF_ICMPEQ ifIsDetached = new IF_ICMPEQ(null);
            il.append(ifIsDetached);

            // if (jdoDetachedState[2].get(?) == 1)
            //   jdoDetachedState[2]
            ifIsDetached.setTarget(il.append(InstructionConstants.ALOAD_0));
            il.append(factory.createGetField(className, ClassEnhancer.FN_JdoDetachedState, BCELClassEnhancer.OT_ObjectArray));
            il.append(InstructionConstants.ICONST_2);
            il.append(InstructionConstants.AALOAD);
            il.append(factory.createCheckCast(BCELClassEnhancer.OT_BitSet)); // Cast to BitSet

            //   the field index: 0, 1, 2...
            il.append(BCELUtils.getBIPUSH(fieldConfig.getFieldId()));
            if (cmd.getPersistenceCapableSuperclass() != null)
            {
                // add to field index the parentFieldCount
                il.append(factory.createGetStatic(className, ClassEnhancer.FN_JdoInheritedFieldCount, Type.INT));
                il.append(InstructionConstants.IADD);
            }
            //   get(?)
            il.append(factory.createInvoke(ClassEnhancer.CN_BitSet, "get", Type.BOOLEAN, new Type[]{Type.INT}, Constants.INVOKEVIRTUAL));

            // 1
            il.append(InstructionConstants.ICONST_1);
            // if (jdoLoadedFields.get(?) == 1)
            IF_ICMPEQ ifLoaded = new IF_ICMPEQ(null);
            il.append(ifLoaded);

            // throw new JDODetachedFieldAccessException("XXXX was not loaded.");
            createThrowException(ClassEnhancer.CN_JDODetachedFieldAccessException, LOCALISER.msg("Enhancer.DetachedFieldAccess", fieldName));

            //----detach------

            // return <target field>
            InstructionHandle jumpTarget2;
            jumpTarget2 = il.append(InstructionConstants.ALOAD_0);
            il.append(factory.createInvoke(
                className,
                "jdo"+BCELUtils.getGetterName(fieldName),
                nativeType,
                new Type[] { },
                Constants.INVOKEVIRTUAL));

            if (nativeType instanceof ReferenceType)
            {
                String type = null;
                if (nativeType instanceof ArrayType)
                {
                    type = nativeType.getSignature();
                }
                else
                {
                    type = nativeType.toString();
                }
                il.append(new CHECKCAST(constantPoolGen.addClass(type)));
            }
            il.append(InstructionFactory.createReturn(nativeType));

            if( (fieldConfig.getJdoFieldFlag() & PersistenceCapable.CHECK_READ) == PersistenceCapable.CHECK_READ)
            {
                jump1.setTarget(jumpTarget);
            }
            jump2.setTarget(jumpTarget);
            jump3.setTarget(jumpTarget);
            ifIsDetached.setTarget(jumpTarget2);
            ifLoaded.setTarget(jumpTarget2);
        }
        else
        {
            // return <target field>
            jumpTarget = il.append(InstructionConstants.ALOAD_0);
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

                Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEINTERFACE));

            // 0
            il.append(InstructionConstants.ICONST_1);
            // if (jdoIsDetached() == 1)
            IF_ICMPEQ ifIsDetached = new IF_ICMPEQ(null);
            il.append(ifIsDetached);
            // return null;
            il.append(InstructionConstants.ACONST_NULL);
            il.append(InstructionConstants.ARETURN);

            // return jdoDetachedState[0];
            ifIsDetached.setTarget(il.append(InstructionConstants.ALOAD_0));
            il.append(factory.createGetField(className, ClassEnhancer.FN_JdoDetachedState, BCELClassEnhancer.OT_ObjectArray));
            il.append(InstructionConstants.ICONST_0);
            il.append(InstructionConstants.AALOAD);

            il.append(InstructionConstants.ARETURN);
View Full Code Here

Examples of org.apache.bcel.generic.IF_ICMPEQ

                Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEINTERFACE));

            //0
            il.append(InstructionConstants.ICONST_0);
            // if (jdoIsDetached() == 0)
            IF_ICMPEQ ifIsDetached = new IF_ICMPEQ(null);
            il.append(ifIsDetached);

            // if (jdoDetachedState[2].get(?) == 1)
            //   jdoDetachedState[2]
            ifIsDetached.setTarget(il.append(InstructionConstants.ALOAD_0));
            il.append(factory.createGetField(className, ClassEnhancer.FN_JdoDetachedState, BCELClassEnhancer.OT_ObjectArray));
            il.append(InstructionConstants.ICONST_2);
            il.append(InstructionConstants.AALOAD);
            il.append(factory.createCheckCast(BCELClassEnhancer.OT_BitSet)); // Cast to BitSet

            //   the field index: 0, 1, 2...
            il.append(BCELUtils.getBIPUSH(fieldConfig.getFieldId()));
            if (cmd.getPersistenceCapableSuperclass() != null)
            {
                // add to field index the parentFieldCount
                il.append(factory.createGetStatic(className, ClassEnhancer.FN_JdoInheritedFieldCount, Type.INT));
                il.append(InstructionConstants.IADD);
            }
            //   get(?)
            il.append(factory.createInvoke(ClassEnhancer.CN_BitSet, "get", Type.BOOLEAN, new Type[]{Type.INT}, Constants.INVOKEVIRTUAL));

            // 1
            il.append(InstructionConstants.ICONST_1);
            // if (jdoLoadedFields.get(?) == 1)
            IF_ICMPEQ ifLoaded = new IF_ICMPEQ(null);
            il.append(ifLoaded);

            // throw new JDODetachedFieldAccessException("XXXX was not loaded.");
            createThrowException(ClassEnhancer.CN_JDODetachedFieldAccessException, LOCALISER.msg("Enhancer.DetachedFieldAccess", fieldName));

            //----detach------

            // return <target field>
            InstructionHandle jumpTarget2;
            jumpTarget2 = il.append(InstructionConstants.ALOAD_0);
            il.append(factory.createGetField(className, fieldName, nativeType));
            il.append(InstructionFactory.createReturn(nativeType));

            jump1.setTarget(jumpTarget);
            jump2.setTarget(jumpTarget);
            jump3.setTarget(jumpTarget);
            ifIsDetached.setTarget(jumpTarget2);
            ifLoaded.setTarget(jumpTarget2);
        }
        else
        {
            // return <target field>
            jumpTarget = il.append(InstructionConstants.ALOAD_0);
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.