Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.GOTO


                    }
                }
                if (match) {
                    if (depth > types.length) {
                        BranchWrapper merge = new BranchWrapper
                            (m_instructionList.insert(inst, new GOTO(null)),
                            types, this);
                        String[] stack = m_targetBranches[0].getStackState();
                        m_stackState = new StringStack(stack);
                        InstructionHandle poph = m_instructionList.
                            insert(inst, InstructionConstants.POP);
View Full Code Here


     *
     * @param src object responsible for generating branch
     * @return wrapper for appended unconditional branch
     */
    public BranchWrapper appendUnconditionalBranch(Object src) {
        BranchHandle hand = m_instructionList.append(new GOTO(null));
        setTarget(hand);
        BranchWrapper wrapper =
            new BranchWrapper(hand, m_stackState.toArray(), src);
        m_stackState = null;
        return wrapper;
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 IFEQ(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

  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

      }
      else {
    il.append(loadLocal);
      }

      final BranchHandle exit = il.append(new GOTO(null));
      _loop = il.append(methodGen.loadDOM());
      il.append(loadLocal);
      local.setEnd(_loop);
      il.append(new GOTO(parent));
      exit.setTarget(il.append(NOP));
      _left.backPatchFalseList(_loop);

      _trueList.append(_left._trueList)
  }
View Full Code Here

  il.append(methodGen.storeIterator());

  // Give local variables (if any) default values before starting loop
  initializeVariables(classGen, methodGen);

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

  translateContents(classGen, methodGen);
       
  nextNode.setTarget(il.append(methodGen.loadIterator()));
View Full Code Here

  {
      il.append(new INVOKEVIRTUAL(lookupKey));
  }

  _trueList.add(il.append(new IFNE(null)));
  _falseList.add(il.append(new GOTO(null)));
    }
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

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.