Examples of GOTO


Examples of org.apache.bcel.generic.GOTO

  // 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

Examples of org.apache.bcel.generic.GOTO

  // 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

Examples of org.apache.bcel.generic.GOTO

  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

Examples of org.apache.bcel.generic.GOTO

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
  final InstructionList il = methodGen.getInstructionList();

  _left.translate(classGen, methodGen);
  final InstructionHandle gotot = il.append(new GOTO(null));
  il.append(methodGen.loadContextNode());
  _right.translate(classGen, methodGen);

  _left._trueList.backPatch(gotot);
  _left._falseList.backPatch(gotot.getNext());
View Full Code Here

Examples of org.apache.bcel.generic.GOTO

                                                              invertedIfInst);

                    // Append an unconditional branch to the target of the
                    // original IF instruction after the new IF instruction
                    BranchHandle gotoHandle = il.append(invertedIfHandle,
                                                        new GOTO(target));

                    // If the original IF was the last instruction in
                    // InstructionList, add a new no-op to act as the target
                    // of the new IF
                    if (nextHandle == null) {
View Full Code Here

Examples of org.apache.bcel.generic.GOTO

  il.append(DUP);
  final BranchHandle ifNull = il.append(new IFNULL(null));
  il.append(new INVOKEVIRTUAL(cpg.addMethodref(_javaClassName,
                "toString",
                "()" + STRING_SIG)));
  final BranchHandle gotobh = il.append(new GOTO(null));
  ifNull.setTarget(il.append(POP));
  il.append(new PUSH(cpg, ""));
  gotobh.setTarget(il.append(NOP));
    }
View Full Code Here

Examples of org.apache.bcel.generic.GOTO

          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

Examples of org.apache.bcel.generic.GOTO

    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

Examples of org.apache.bcel.generic.GOTO

  // 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

Examples of org.apache.bcel.generic.GOTO

  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
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.