Package org.candle.decompiler.intermediate.expression

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


    //check the right hand of the declaration...
    if(!(declaration.getAssignment().getRightHandSide() instanceof NewConstantArrayInstance)) {
      return;
    }
    NewConstantArrayInstance ncai = (NewConstantArrayInstance)declaration.getAssignment().getRightHandSide();
    Expression countExpression = ncai.getCount();
   
   
    AbstractIntermediate current = line;
    Map<Integer, Expression> values = new HashMap<Integer, Expression>();
    collectConstantAssignments(current, values);
   
    //create a new array...
    Integer count = toInteger(countExpression);
    List<Expression> expressions = new ArrayList<Expression>(count);
    for(int i=0, j=count; i<j; i++) {
      Expression exp = null;
      if(values.containsKey(i)) {
        exp = values.get(i);
      }
      else {
        exp = new Resolved(ncai.getInstructionHandle(), Type.NULL, "null");
View Full Code Here


    Assignment assignment = extractConstantArrayAssignment(si.getExpression());
    if(assignment == null) {
      return;
    }
   
    Expression right = assignment.getRightHandSide();
    ArrayAccess apr = (ArrayAccess)assignment.getLeftHandSide();
    assignments.put(toInteger(apr.getIndex()), right);
   
    List<AbstractIntermediate> predecessor = Graphs.predecessorListOf(igc.getGraph(), current);
   
View Full Code Here

    StatementIntermediate complete = new StatementIntermediate(context.getCurrentInstruction(), ret);
    context.pushIntermediateToInstruction(complete);
  }
 
  public void visitFRETURN(FRETURN instruction) {
    Expression exp = context.getExpressions().pop();
    Return ret = new Return(context.getCurrentInstruction(), exp);
   
    processReturn(ret);
  }
View Full Code Here

   
    processReturn(ret);
  }

  public void visitDRETURN(DRETURN instruction) {
    Expression exp = context.getExpressions().pop();
    Return ret = new Return(context.getCurrentInstruction(), exp);
   
    processReturn(ret)
  }
View Full Code Here

   
    processReturn(ret)
  }

  public void visitARETURN(ARETURN instruction) {
    Expression exp = context.getExpressions().pop();
    Return ret = new Return(context.getCurrentInstruction(), exp);
   
    processReturn(ret);
  }
View Full Code Here

  public void visitRETURN(RETURN instruction) {
    Return ret = new Return(context.getCurrentInstruction());
    processReturn(ret);   
  }
  public void visitLRETURN(LRETURN instruction) {
    Expression exp = context.getExpressions().pop();
    Return ret = new Return(context.getCurrentInstruction(), exp);
   
    processReturn(ret);   
  }
View Full Code Here

    Return ret = new Return(context.getCurrentInstruction(), exp);
   
    processReturn(ret);   
  }
  public void visitIRETURN(IRETURN instruction) {
    Expression exp = context.getExpressions().pop();
    Return ret = new Return(context.getCurrentInstruction(), exp);
   
    processReturn(ret);
  }
View Full Code Here

  public void visitPUTSTATIC(PUTSTATIC instruction) {
    ConstantPoolGen cpg = context.getMethodGen().getConstantPool();
    String fieldName = instruction.getFieldName(cpg);
    Type fieldType = instruction.getFieldType(cpg);
   
    Expression right = context.getExpressions().pop();
    Variable variable = new Variable(context.getCurrentInstruction(), fieldType, fieldName);
    Assignment assignment = new Assignment(context.getCurrentInstruction(), variable, right);
   
    if(LOG.isDebugEnabled()) {
      for(Field field : context.getJavaClass().getFields()) {
View Full Code Here

  public void visitPUTFIELD(PUTFIELD instruction) {
    ConstantPoolGen cpg = context.getMethodGen().getConstantPool();
   
    String fieldName = instruction.getFieldName(cpg);
   
    Expression right = context.getExpressions().pop();
    Expression left = context.getExpressions().pop();
   
    FieldAccess fieldRef = new FieldAccess(context.getCurrentInstruction(), left, fieldName);
    Assignment assignment = new Assignment(context.getCurrentInstruction(), fieldRef, right);
   
    StatementIntermediate complete = new StatementIntermediate(context.getCurrentInstruction(), assignment);
View Full Code Here

  }
 
 
  public void visitGETFIELD(GETFIELD instruction) {
    LOG.debug("Getting field..");
    Expression target = context.getExpressions().pop();
   
   
    MethodGen mg = context.getMethodGen();
    ConstantPoolGen cpg = mg.getConstantPool();
   
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.