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

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


    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
                            BooleanType type) {
        final InstructionList il = methodGen.getInstructionList();
        FlowList falsel = translateToDesynthesized(classGen, methodGen, type);
        il.append(ICONST_1);
        final BranchHandle truec = il.append(new GOTO(null));
        falsel.backPatch(il.append(ICONST_0));
        truec.setTarget(il.append(NOP));
    }
View Full Code Here


        // Backpatch true list and restore current iterator/node
        InstructionHandle restore;
        restore = il.append(methodGen.storeCurrentNode());
        backPatchTrueList(restore);
        BranchHandle skipFalse = il.append(new GOTO(null));

        // Backpatch false list and restore current iterator/node
        restore = il.append(methodGen.storeCurrentNode());
        backPatchFalseList(restore);
        _falseList.add(il.append(new GOTO(null)));

        // True list falls through
        skipFalse.setTarget(il.append(NOP));
    }
View Full Code Here

        // Backpatch true list and restore current iterator/node
        InstructionHandle restore = il.append(methodGen.storeIterator());
        il.append(methodGen.storeCurrentNode());
        exp.backPatchTrueList(restore);
        BranchHandle skipFalse = il.append(new GOTO(null));

        // Backpatch false list and restore current iterator/node
        restore = il.append(methodGen.storeIterator());
        il.append(methodGen.storeCurrentNode());
        exp.backPatchFalseList(restore);
        _falseList.add(il.append(new GOTO(null)));

        // True list falls through
        skipFalse.setTarget(il.append(NOP));
    }
View Full Code Here

        InstructionHandle begin, next;
        node2 = methodGen.addLocalVariable("step_pattern_tmp3",
                                           Util.getJCRefType(NODE_SIG),
                                           null, null);

        skipNext = il.append(new GOTO(null));
        next = il.append(new ALOAD(iter.getIndex()));
        node2.setStart(next);
        begin = il.append(methodGen.nextNode());
        il.append(DUP);
        il.append(new ISTORE(node2.getIndex()));
View Full Code Here

  public static void createMappedBoolean(InstructionListContext ilc, TypeCode type, Object T,Object F) {
    Mark one = new Mark() ;
    Mark end = new Mark() ;
    createIFNE0(ilc,type,one) ;
    ilc.add(ilc.getInstructionFactory().createConstant(F)) ;
    ilc.addBranch(new GOTO(null), end) ;
    ilc.addMark(one,-1) ;
    ilc.add(ilc.getInstructionFactory().createConstant(T)) ;
    ilc.addMark(end,-1) ;
  }
View Full Code Here

      ilc.addBranch(new JSR(null),t.mark) ;
    }
  }
  private static final class GotoConverter implements InstConverter<Goto> {
    public void convertInst(final Goto t, InstructionListContext ilc) {
      ilc.addBranch(new GOTO(null),t.mark) ;
    }
View Full Code Here

        // Overwrite current iterator with one that gives us only what we want
        _use.translate(classGen, methodGen);
        _use.startIterator(classGen, methodGen);
        il.append(methodGen.storeIterator());

        final BranchHandle nextNode = il.append(new GOTO(null));
        final InstructionHandle loop = il.append(NOP);

        // Prepare to call buildKeyIndex(String name, int node, String value);
        il.append(classGen.loadTranslet());
        il.append(new PUSH(cpg, _name.toString()));
View Full Code Here

        il.append(methodGen.loadCurrentNode());
        il.append(methodGen.setStartNode());
        il.append(methodGen.storeIterator());

        // Loop for traversing all nodes in the DOM
        final BranchHandle nextNode = il.append(new GOTO(null));
        final InstructionHandle loop = il.append(NOP);

        // Check if the current node matches the pattern in "match"
        il.append(methodGen.loadCurrentNode());
        _match.translate(classGen, methodGen);
View Full Code Here

  // Store the node counter in the field
  il.append(classGen.loadTranslet());
  il.append(SWAP);
  il.append(new PUTFIELD(fieldIndexes[_level]));
  final BranchHandle ifBlock2 = il.append(new GOTO(null));

  // Backpatch conditionals
  ifBlock1.setTarget(il.append(classGen.loadTranslet()));
  il.append(new GETFIELD(fieldIndexes[_level]));
 
View Full Code Here

        // Backpatch true list and restore current iterator/node
        InstructionHandle restore;
        restore = il.append(methodGen.storeCurrentNode());
        backPatchTrueList(restore);
        BranchHandle skipFalse = il.append(new GOTO(null));

        // Backpatch false list and restore current iterator/node
        restore = il.append(methodGen.storeCurrentNode());
        backPatchFalseList(restore);
        _falseList.add(il.append(new GOTO(null)));

        // True list falls through
        skipFalse.setTarget(il.append(NOP));
    }
View Full Code Here

TOP

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

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.