Package org.candle.decompiler.intermediate.expression

Examples of org.candle.decompiler.intermediate.expression.Expression


    super(igc);
  }
 
  @Override
  public void visitStatementIntermediate(StatementIntermediate line) {
    Expression exp = line.getExpression();
   
    //ok, now we can visit the expression...
    exp.visit(new ASTListener() {
     
      @Override
      public void accept(Expression e) {
        if(e instanceof NewInstance) {
          if(((NewInstance) e).getType() instanceof ObjectType) {
View Full Code Here


  public void visitINSTANCEOF(INSTANCEOF instruction) {
    ConstantPoolGen cpg = context.getMethodGen().getConstantPool();
    String type = instruction.getLoadClassType(cpg).getClassName();

    //get the left, create the right
    Expression left = context.getExpressions().pop();
    Expression right = new Resolved(context.getCurrentInstruction(), Type.BOOLEAN, type);
    InstanceOf instanceOf = new InstanceOf(context.getCurrentInstruction(), left, right);
   
    context.getExpressions().push(instanceOf);
  }
View Full Code Here

  public void visitIF_ACMPEQ(IF_ACMPEQ instruction) {
    processMultiConditionalStatement(OperationType.EQ);
  }
  public void processMultiConditionalStatement(OperationType operation) {
    //first, get the things to be operated on.
    Expression right = context.getExpressions().pop();
    Expression left = context.getExpressions().pop();
   
    processMultiConditionalStatement(operation, left, right);
  }
View Full Code Here

    NewInstance instance = new NewInstance(context.getCurrentInstruction(), type);
    context.getExpressions().push(instance);
  }
 
  public void visitDUP2(DUP2 instruction) {
    Expression one = context.getExpressions().pop();
    Expression two = context.getExpressions().pop();
   
    context.getExpressions().push(two);
    context.getExpressions().push(one);
 
    context.getExpressions().push(two);
View Full Code Here

    context.getExpressions().push(two);
    context.getExpressions().push(one);
  }

  public void visitDUP2_X1(DUP2_X1 instruction) {
    Expression one = context.getExpressions().pop();
    Expression two = context.getExpressions().pop();
    Expression three = context.getExpressions().pop();
   
    //push on 1, 2
    context.getExpressions().push(two);
    context.getExpressions().push(one);
   
View Full Code Here

  }
 

  public void visitDUP2_X2(DUP2_X2 instruction) {
    Expression one = context.getExpressions().pop();
    Expression two = context.getExpressions().pop();
    Expression three = context.getExpressions().pop();
    Expression four = context.getExpressions().pop();
   
    //push on 1, 2
    context.getExpressions().push(two);
    context.getExpressions().push(one);
   
View Full Code Here

    context.getExpressions().push(one);
  }
 
  //Now provide the suplication visitors
  public void visitDUP(DUP instruction) {
    Expression exp = context.getExpressions().pop();
   
    try {
      Expression dup = (Expression)exp.clone();
      dup.setInstructionHandle(context.getCurrentInstruction());
      context.getExpressions().push(dup);
      context.getExpressions().push(exp);
     
    } catch (CloneNotSupportedException e) {
      LOG.error("Exception duplicating expression: "+exp.toString(), e);
View Full Code Here

    }
   
  }
 
  public void visitDUP_X2(DUP_X2 instruction) {
    Expression one = context.getExpressions().pop();
    Expression two = context.getExpressions().pop();
    Expression three = context.getExpressions().pop();
   
    context.getExpressions().push(one);
   
    context.getExpressions().push(three);
    context.getExpressions().push(two);
View Full Code Here

    context.getExpressions().push(one);
  }


  public void visitDUP_X1(DUP_X1 instruction) {
    Expression one = context.getExpressions().pop();
    Expression two = context.getExpressions().pop();
   
    context.getExpressions().push(one);
    context.getExpressions().push(two);
   
    context.getExpressions().push(one);
View Full Code Here

   
    context.getExpressions().push(one);
  }
 
  public void visitSWAP(SWAP instruction) {
    Expression one = context.getExpressions().pop();
    Expression two = context.getExpressions().pop();

    context.getExpressions().push(one);
    context.getExpressions().push(two);
  }
View Full Code Here

TOP

Related Classes of org.candle.decompiler.intermediate.expression.Expression

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.