Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.GOTO


  final InstructionList il = methodGen.getInstructionList();
  if (_value) {
      il.append(NOP)// true list falls through
  }
  else {
      _falseList.add(il.append(new GOTO(null)));
  }
    }
View Full Code Here


    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

    public void translateDesynthesized(ClassGenerator classGen,
               MethodGenerator methodGen) {
  final InstructionList il = methodGen.getInstructionList();
  final Expression exp = argument();
  exp.translateDesynthesized(classGen, methodGen);
  final BranchHandle gotoh = il.append(new GOTO(null));
  _trueList = exp._falseList;   // swap flow lists
  _falseList = exp._trueList;
  _falseList.add(gotoh);
    }
View Full Code Here

    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

  final InstructionList il = methodGen.getInstructionList();
  getFirstNode(classGen, methodGen);
  il.append(DUP);
  final BranchHandle falsec = il.append(new IFLT(null));
  Type.Node.translateTo(classGen, methodGen, type);
  final BranchHandle truec = il.append(new GOTO(null));
  falsec.setTarget(il.append(POP));
  il.append(new PUSH(classGen.getConstantPool(), ""));
  truec.setTarget(il.append(NOP));
    }
View Full Code Here

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

TOP

Related Classes of org.apache.bcel.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.