Package org.candle.decompiler.intermediate.code

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


    super(igc);
  }
 
  @Override
  public void visitMultiBranchIntermediate(MultiBranchIntermediate line) {
    SwitchIntermediate si = new SwitchIntermediate(line.getInstruction(), line);
    igc.getGraph().addVertex(si);
    igc.redirectPredecessors(line, si);
    igc.redirectSuccessors(line, si);
    igc.getGraph().removeVertex(line);
  }
View Full Code Here


    super(igc);
  }
 
  @Override
  public void visitCaseIntermediate(CaseIntermediate line) {
    SwitchIntermediate si = (SwitchIntermediate)igc.getSinglePredecessor(line);

    List<CaseIntermediate> switchCases = igc.getCases(si);
    int position = line.getBlockRange().getStart().getPosition();
    CaseIntermediate next = findNextCase(switchCases, position);

    if(next != null) {
      line.getBlockRange().setEnd(next.getBlockRange().getStart().getPrev());
    }
    else {
      //we should get the end from the parent.
      line.getBlockRange().setEnd(si.getBlockRange().getEnd());
    }
  }
View Full Code Here

TOP

Related Classes of org.candle.decompiler.intermediate.code.SwitchIntermediate

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.