Examples of GoToIntermediate


Examples of org.candle.decompiler.intermediate.code.GoToIntermediate

    if(predecessors.size() >= 2) {
      //check to see that 1 predecessor is a GOTO.
     
      TreeSet<GoToIntermediate> incomingGotoNonNested = new TreeSet<GoToIntermediate>(new IntermediateComparator());
      TreeSet<GoToIntermediate> incomingGotoNested = new TreeSet<GoToIntermediate>(new IntermediateComparator());
      GoToIntermediate nestedLine = null;
      AbstractIntermediate otherLine = null;
     
      //classify.
      for(AbstractIntermediate predecessor : predecessors) {
        //check to see if 1 is GOTO.
        if(predecessor instanceof GoToIntermediate) {
          if(isNested(line, predecessor)) {
            incomingGotoNested.add((GoToIntermediate)predecessor);
          }
          else {
            incomingGotoNonNested.add((GoToIntermediate)predecessor);
          }
          continue;
        }
        else {
          otherLine = predecessor;
        }
      }
     
      //if there are more than one GOTO statements that are not-nested, return.
      if(incomingGotoNonNested.size() > 1) {
        return;
      }
     
      nestedLine = getCandidateGoto(incomingGotoNonNested, incomingGotoNested);
     
      //stop if both conditions aren't met.
      if(nestedLine == null || otherLine == null) {
        return;
      }
     
      //check to validate that the GOTO instruction is less than the other incoming...
      if(comparator.before(otherLine, line)) {
        //take the lower condition...
        BranchHandle refHandle = null;
        if(comparator.before(nestedLine, line)) {
          refHandle = (BranchHandle)nestedLine.getInstruction();
        }
        else {
          refHandle = (BranchHandle)line.getInstruction();
        }
       
View Full Code Here

Examples of org.candle.decompiler.intermediate.code.GoToIntermediate

    if(gotoIntermediates.size() == 0) {
      return;
    }
   
    //now, the largest should be...
    GoToIntermediate maxGotoForBranch = gotoIntermediates.pollLast();
   
    if(maxGotoForBranch.getInstruction().getPosition() > line.getInstruction().getPosition())
    {
      return;
    }
   
    //find the element directly after this one...
View Full Code Here

Examples of org.candle.decompiler.intermediate.code.GoToIntermediate

    int position = lastNode.getInstruction().getPosition();
   
    //look for goto statements...
    for(AbstractIntermediate element : elements) {
      if(element instanceof GoToIntermediate) {
        GoToIntermediate gti = (GoToIntermediate)element;
       
        if(igc.getTarget(gti).getInstruction().getPosition() > position) {
          line.getBlockRange().setEnd(igc.getTarget(gti).getInstruction().getPrev());
          foundUpper = true;
          break;
View Full Code Here

Examples of org.candle.decompiler.intermediate.code.GoToIntermediate

  public void visitGOTO(GOTO instruction) {
    // fall to goto
  }

  public void visitGotoInstruction(GotoInstruction instruction) {
    GoToIntermediate line = new GoToIntermediate(context.getCurrentInstruction());
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

Examples of org.candle.decompiler.intermediate.code.GoToIntermediate

    }
   
    //now, we are going to look for the block jump.
    InstructionHandle ih = tryBlock.getBlockRange().getEnd();
    //see about a goto.
    GoToIntermediate gotoHandle = (GoToIntermediate)igc.findNextNode(ih.getNext());
    TreeSet<AbstractIntermediate> ordered = new TreeSet<AbstractIntermediate>(new IntermediateComparator());
    //no finally clause...
    ordered.addAll(igc.getCatchClauses(tryBlock));
   
    AbstractIntermediate target = igc.getTarget(gotoHandle);
View Full Code Here

Examples of org.candle.decompiler.intermediate.code.GoToIntermediate

      int position = defaultNode.getInstruction().getPosition();
     
      //look for goto statements...
      for(AbstractIntermediate element : elements) {
        if(element instanceof GoToIntermediate) {
          GoToIntermediate gti = (GoToIntermediate)element;
         
          if(igc.getTarget(gti).getInstruction().getPosition() > position) {
            transformGotoToBreak(gti);
          }
        }
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.