Package com.sun.org.apache.bcel.internal.generic

Examples of com.sun.org.apache.bcel.internal.generic.IFEQ


        final InstructionList il = methodGen.getInstructionList();
        translate(classGen, methodGen);

        if ((type instanceof BooleanType) || (type instanceof IntType)) {
            _falseList.add(il.append(new IFEQ(null)));
        }
    }
View Full Code Here


        il.append(methodGen.loadDOM());
        il.append(methodGen.loadCurrentNode());
        il.append(new INVOKEINTERFACE(gname, 2));
        // Compare the two strings
        il.append(new INVOKEVIRTUAL(cmp));
        _falseList.add(il.append(new IFEQ(null)));

        // Compile the expressions within the predicates
        if (hasPredicates()) {
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
View Full Code Here

        // Check if the current node matches the pattern in "match"
        il.append(methodGen.loadCurrentNode());
        _match.translate(classGen, methodGen);
        _match.synthesize(classGen, methodGen); // Leaves 0 or 1 on stack
        final BranchHandle skipNode = il.append(new IFEQ(null));

        // If this is a node-set we must go through each node in the set
        if (_useType instanceof NodeSetType) {
            // Pass current node as parameter (we're indexing on that node)
            il.append(methodGen.loadCurrentNode());
View Full Code Here

    }

    public void desynthesize(ClassGenerator classGen,
                             MethodGenerator methodGen) {
        final InstructionList il = methodGen.getInstructionList();
        _falseList.add(il.append(new IFEQ(null)));
    }
View Full Code Here

     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
                            StringType type) {
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
        final BranchHandle falsec = il.append(new IFEQ(null));
        il.append(new PUSH(cpg, "true"));
        final BranchHandle truec = il.append(new GOTO(null));
        falsec.setTarget(il.append(new PUSH(cpg, "false")));
        truec.setTarget(il.append(NOP));
    }
View Full Code Here

     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
                            BooleanType type) {
        final InstructionList il = methodGen.getInstructionList();
        final BranchHandle falsec = il.append(new IFEQ(null));
        il.append(ICONST_1);
        final BranchHandle truec = il.append(new GOTO(null));
        falsec.setTarget(il.append(ICONST_0));
        truec.setTarget(il.append(NOP));
    }
View Full Code Here

     */
    public FlowList translateToDesynthesized(ClassGenerator classGen,
                                             MethodGenerator methodGen,
                                             BooleanType type) {
        final InstructionList il = methodGen.getInstructionList();
        return new FlowList(il.append(new IFEQ(null)));
    }
View Full Code Here

     */
    public FlowList translateToDesynthesized(ClassGenerator classGen,
                                             MethodGenerator methodGen,
                                             BooleanType type) {
        final InstructionList il = methodGen.getInstructionList();
        return new FlowList(il.append(new IFEQ(null)));
    }
View Full Code Here

    case ARRAY:
      ilc.addBranch(new IF_ACMPEQ(null),mi) ;
      return ;
    case LONG:
      ilc.add(InstructionConstants.LCMP) ;
      ilc.addBranch(new IFEQ(null),mi) ;
      return ;
    case DOUBLE:
      ilc.add(InstructionConstants.DCMPL) ;
      ilc.addBranch(new IFEQ(null),mi) ;
      return ;
    case FLOAT:
      ilc.add(InstructionConstants.FCMPL) ;
      ilc.addBranch(new IFEQ(null),mi) ;
      return ;
    default:
      throw new IllegalArgumentException() ;
    }
  }
View Full Code Here

    case INT:
    case SHORT:
    case BYTE:
    case CHAR:
    case BOOLEAN:
      ilc.addBranch(new IFEQ(null), markInst) ;
      return ;
    case LONG:
      ilc.add(ilc.getInstructionFactory().createConstant(Long.valueOf(0))) ;
      ilc.add(InstructionConstants.LCMP) ;
      ilc.addBranch(new IFEQ(null), markInst) ;
      return ;
    case DOUBLE:
      ilc.add(ilc.getInstructionFactory().createConstant(Double.valueOf(0))) ;
      ilc.add(InstructionConstants.DCMPL) ;
      ilc.addBranch(new IFEQ(null), markInst) ;
      return ;
    case FLOAT:
      ilc.add(ilc.getInstructionFactory().createConstant(Float.valueOf(0))) ;
      ilc.add(InstructionConstants.FCMPL) ;
      ilc.addBranch(new IFEQ(null), markInst) ;
      return ;
    default:
      throw new IllegalArgumentException() ;
    }
  }
View Full Code Here

TOP

Related Classes of com.sun.org.apache.bcel.internal.generic.IFEQ

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.