Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.IF_ICMPEQ


      il.append(SWAP);
  }
  il.append(new INVOKEINTERFACE(getType, 2));
  il.append(new PUSH(cpg, DOM.ROOT));
 
  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


                "getType", "(I)I");
      il.append(methodGen.loadDOM());
      il.append(methodGen.loadCurrentNode());
      il.append(new INVOKEINTERFACE(getType, 2));
      il.append(new PUSH(cpg, DOM.PROCESSING_INSTRUCTION));
      _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

    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

                                                          "(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

      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

      il.append(SWAP);
      il.append(new INVOKEINTERFACE(getEType, 2));
      il.append(new PUSH(cpg, _nodeType));
 
      // Need to allow for long jumps here
      final BranchHandle icmp = il.append(new IF_ICMPEQ(null));
      _falseList.add(il.append(new GOTO_W(null)));
      icmp.setTarget(il.append(NOP));
  }
    }
View Full Code Here

  if (tleft instanceof BooleanType) {
      _left.translate(classGen, methodGen);
      _right.translate(classGen, methodGen);
        _falseList.add(il.append(_op == Operators.EQ ?
             (BranchInstruction)new IF_ICMPNE(null) :
             (BranchInstruction)new IF_ICMPEQ(null)));
  }
  else if (tleft instanceof NumberType) {
      _left.translate(classGen, methodGen);
      _right.translate(classGen, methodGen);

      if (tleft instanceof RealType) {
    il.append(DCMPG);
        _falseList.add(il.append(_op == Operators.EQ ?
           (BranchInstruction)new IFNE(null) :
           (BranchInstruction)new IFEQ(null)));
      }
      else {
            _falseList.add(il.append(_op == Operators.EQ ?
           (BranchInstruction)new IF_ICMPNE(null) :
           (BranchInstruction)new IF_ICMPEQ(null)));
      }
  }
  else {
      translate(classGen, methodGen);
      desynthesize(classGen, methodGen);
View Full Code Here

      il.append(SWAP);
      il.append(new INVOKEINTERFACE(getType, 2));
      il.append(new PUSH(cpg, _nodeType));
 
      // Need to allow for long jumps here
      final BranchHandle icmp = il.append(new IF_ICMPEQ(null));
      _falseList.add(il.append(new GOTO_W(null)));
      icmp.setTarget(il.append(NOP));
  }
    }
View Full Code Here

  if (tleft instanceof BooleanType) {
      _left.translate(classGen, methodGen);
      _right.translate(classGen, methodGen);
        _falseList.add(il.append(_op == Operators.EQ ?
             (BranchInstruction)new IF_ICMPNE(null) :
             (BranchInstruction)new IF_ICMPEQ(null)));
  }
  else if (tleft instanceof NumberType) {
      _left.translate(classGen, methodGen);
      _right.translate(classGen, methodGen);

      if (tleft instanceof RealType) {
    il.append(DCMPG);
        _falseList.add(il.append(_op == Operators.EQ ?
           (BranchInstruction)new IFNE(null) :
           (BranchInstruction)new IFEQ(null)));
      }
      else {
            _falseList.add(il.append(_op == Operators.EQ ?
           (BranchInstruction)new IF_ICMPNE(null) :
           (BranchInstruction)new IF_ICMPEQ(null)));
      }
  }
  else {
      translate(classGen, methodGen);
      desynthesize(classGen, methodGen);
View Full Code Here

      il.append(SWAP);
      il.append(new INVOKEINTERFACE(getEType, 2));
      il.append(new PUSH(cpg, _nodeType));
 
      // Need to allow for long jumps here
      final BranchHandle icmp = il.append(new IF_ICMPEQ(null));
      _falseList.add(il.append(new GOTO_W(null)));
      icmp.setTarget(il.append(NOP));
  }
    }
View Full Code Here

TOP

Related Classes of org.apache.bcel.generic.IF_ICMPEQ

Copyright © 2018 www.massapicom. 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.