Examples of TryIntermediate


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

    for(IntermediateEdge ie : edges) {
      if(ie.getType() == EdgeType.EXCEPTION) {
        System.out.println("EXCEEEEEPTIONS!");
       
       
        TryIntermediate ti = new TryIntermediate(line.getInstruction());
        igc.getGraph().addVertex(ti);
        igc.redirectPredecessors(line, ti);
      }
    }
  }
View Full Code Here

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

      line.getBlockRange().setEnd(lastStatement.getInstruction());
    }
  }
 
  public void processLastCatch(CatchIntermediate line) {
    TryIntermediate tryBlock = (TryIntermediate)igc.getSinglePredecessor(line);
    if(igc.getFinallyClause(tryBlock) != null) {
      return;
    }
   
    //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));
View Full Code Here

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

    InstructionHandle min = getLowestBound(line.getCodeExceptions());
    InstructionHandle max = getHighestBound(line.getCodeExceptions());
   
    LOG.debug("Finally Range: "+min.getPosition() + " -> "+max.getPosition());
   
    TryIntermediate matched = matchTryBlock(min, max);
    if(matched != null) {
      final Set<Integer> offsets = collectOffsets(line);
      //ok, now we need to eliminate finally blocks from this try and all of the catches.  thanks Java!
      List<CatchIntermediate> catchClauses = igc.getCatchClauses(matched);
      //for each catch clause...
View Full Code Here

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

  protected TryIntermediate matchTryBlock(InstructionHandle min, InstructionHandle max) {
    LinkedList<TryIntermediate> matches = new LinkedList<TryIntermediate>();
    //find the try block...
    for(AbstractIntermediate ai : igc.getGraph().vertexSet()) {
      if(ai instanceof TryIntermediate) {
        TryIntermediate tryIntermediate = ((TryIntermediate) ai);
        LOG.debug("Finally: "+tryIntermediate+ " , "+tryIntermediate.getInstruction().getPosition()+" , "+tryIntermediate.getBlockRange().getStart());
        if(tryIntermediate.getBlockRange().getStart().getPosition() == min.getPosition()) {
         
          //only add where max > try's max range...
          if(tryIntermediate.getBlockRange().getEnd().getPosition() < max.getPosition()) {
            matches.add(tryIntermediate);
          }
        }
      }
    }
View Full Code Here

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

   
    for(BlockRange tryRange : tryBlock) {
      //create try block... create each catch block... link the two together for graph sake.
      //look up block...
      InstructionHandle start = tryRange.getStart();
      TryIntermediate tryIntermediate = new TryIntermediate(start);
      tryIntermediate.getBlockRange().setStart(tryRange.getStart());
      tryIntermediate.getBlockRange().setEnd(tryRange.getEnd());
     
     
      igc.getGraph().addVertex(tryIntermediate);
     
      //add line between try and node.
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.