Examples of BooleanBranchIntermediate


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

        return;
      }
     
      if(firstElseBlockElement instanceof BooleanBranchIntermediate) {
        //only add ELSE if the child of conditional doesn't go to the target.
        BooleanBranchIntermediate ci = (BooleanBranchIntermediate)firstElseBlockElement;
        if(igc.getFalseTarget(ci) == line || igc.getTrueTarget(ci) == line) {
          //do nothing.
          return;
        }
       
View Full Code Here

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

 
  @Override
  public void visitIFNE(IFNE instruction) {
    Expression left = context.getExpressions().pop();
    SingleConditional conditional = new SingleConditional(context.getCurrentInstruction(), left, false);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(context.getCurrentInstruction(), conditional);
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

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

 
  @Override
  public void visitIFEQ(IFEQ instruction) {
    Expression left = context.getExpressions().pop();
    SingleConditional conditional = new SingleConditional(context.getCurrentInstruction(), left);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(context.getCurrentInstruction(), conditional);
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

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

  public void visitIFNULL(IFNULL instruction) {
    Expression left = context.getExpressions().pop();
    Expression right = new NullLiteral(context.getCurrentInstruction());
   
    MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.EQ);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(context.getCurrentInstruction(), conditional);
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

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

  public void visitIFNONNULL(IFNONNULL instruction) {
    Expression left = context.getExpressions().pop();
    Expression right = new NullLiteral(context.getCurrentInstruction());
   
    MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.NE);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(context.getCurrentInstruction(), conditional);
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

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

  }
 
  public void processMultiConditionalStatement(OperationType operation, Expression left, Expression right) {
    MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, operation);
    //context.getExpressions().push(conditional);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(this.context.getCurrentInstruction(), conditional);
    //check to see whether you need to negate.
   
    //if the conditional's target is greater than the conditional's next statement, don't negate.
    BranchHandle branchHandle = (BranchHandle) context.getCurrentInstruction();
    int next = branchHandle.getNext().getPosition();
    int target = branchHandle.getTarget().getPosition();
   
   
    //Important.  Make sure the expression "true" is pointed towards the lower branch.
    if(target > next) {
      line.getExpression().negate();
    }
   
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

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

  protected void processComparator() {
    Expression left = context.getExpressions().pop();
    Expression right = context.getExpressions().pop();

    MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.EQ);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(this.context.getCurrentInstruction(), conditional);
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

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

   
    //otherwise, see if it is another IF.
    if(predecessors.get(0) instanceof BooleanBranchIntermediate) {
     
      //check to see whether it is on the ELSE side.
      BooleanBranchIntermediate parent = (BooleanBranchIntermediate)predecessors.get(0);
      LOG.debug(parent.getClass());
      if(!(parent instanceof IfIntermediate)) {
        return;
      }
     
     
View Full Code Here

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

    if(tryEndNode instanceof StatementIntermediate) {
      LOG.debug("Position: "+tryEndNode.getInstruction().getPosition()+" Value: "+tryEndNode);
      gotoIntermediate = igc.getSingleSuccessor(tryEndNode);
    }
    else if(tryEndNode instanceof BooleanBranchIntermediate) {
      BooleanBranchIntermediate bbi = (BooleanBranchIntermediate)tryEndNode;
     
      //find higher target...
      AbstractIntermediate trueTarget = igc.getTrueTarget(bbi);
      AbstractIntermediate falseTarget = igc.getFalseTarget(bbi);
     
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.