Package org.candle.decompiler.intermediate.expression

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


  //Process all single-value conditionals.
  @Override
  public void visitIFLT(IFLT instruction) {
    Expression left = context.getExpressions().pop();
    //TODO: this should probably be resolved to it's left expression value for the resovled value.
    Expression right = new Resolved(context.getCurrentInstruction(), null, "0");
    processMultiConditionalStatement(OperationType.LESS, left, right);
  }
View Full Code Here


    processMultiConditionalStatement(OperationType.LESS, left, right);
  }
 
  @Override
  public void visitIFGT(IFGT instruction) {
    Expression right = new Resolved(context.getCurrentInstruction(), null, "0");
    Expression left = context.getExpressions().pop();
    processMultiConditionalStatement(OperationType.GREATER, left, right);
  }
View Full Code Here

    processMultiConditionalStatement(OperationType.GREATER, left, right);
  }

  @Override
  public void visitIFGE(IFGE obj) {
    Expression right = new Resolved(context.getCurrentInstruction(), null, "0");
    Expression left = context.getExpressions().pop();
    processMultiConditionalStatement(OperationType.GREATER_EQUAL, left, right);
  }
View Full Code Here

    Expression left = context.getExpressions().pop();
    processMultiConditionalStatement(OperationType.GREATER_EQUAL, left, right);
  }
  @Override
  public void visitIFLE(IFLE obj) {
    Expression right = new Resolved(context.getCurrentInstruction(), null, "0");
    Expression left = context.getExpressions().pop();
    processMultiConditionalStatement(OperationType.LESS_EQUAL, left, right);
  }
View Full Code Here

    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

     
      parameters.add(param);
    }
   
   
    Resolved resolvedType = new Resolved(context.getCurrentInstruction(), Type.CLASS, instruction.getLoadClassType(cpg).getClassName());
    String methodName = instruction.getMethodName(cpg);
   
    //create the expression..
    MethodInvocation methodInvocation = new MethodInvocation(context.getCurrentInstruction(), resolvedType, methodName, parameters);
   
View Full Code Here

 
  //negate operations
  protected void processNegation(Type type) {
    //negation is the same as multiplying by negative 1; more readable.
    //push a negative 1 to the stack.
    Expression negativeOne = new Resolved(context.getCurrentInstruction(), type, "-1");
    context.getExpressions().push(negativeOne);
   
    processArithmeticTwoStackOperations(ArithmeticType.MULTIPLY);
  }
View Full Code Here

    Type type = instruction.getType(cpg);
   
    //now see what type it is.
    LOG.debug("To Type: "+type);
   
    Resolved resolve = new Resolved(context.getCurrentInstruction(), type, type.toString());
   
    Cast cast = new Cast(context.getCurrentInstruction(), resolve, right);
    context.getExpressions().push(cast);
  }
View Full Code Here

    Expression right = context.getExpressions().pop();
   
    MultiConditional eq = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.EQ);
    MultiConditional logic = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.GREATER);
   
    Resolved r0 = new Resolved(context.getCurrentInstruction(), Type.INT, "0");
    Resolved rN = new Resolved(context.getCurrentInstruction(), Type.INT, "-1");
    Resolved rP = new Resolved(context.getCurrentInstruction(), Type.INT, "1");
   
    Ternary tern2 = new Ternary(context.getCurrentInstruction(), ObjectType.INT, logic, rP, rN);
    Ternary tern1 = new Ternary(context.getCurrentInstruction(), Type.INT, eq, r0, tern2);
   
    context.getExpressions().push(tern1);
View Full Code Here

   
    for(int i=0, j=handles.length; i<j; i++) {
      InstructionHandle ih = handles[i];
      int match = matches[i];

      Resolved resolved = new Resolved(line.getInstruction(), BasicType.INT, ""+match);
      Case caseEntry = new Case(line.getInstruction(), ih, resolved);
      cases.add(caseEntry);
    }
   
    if(select.getTarget()!=null) {
View Full Code Here

TOP

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

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.