Package org.candle.decompiler.intermediate.expression

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


    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);
   
    if(predecessor.size() != 1) {
      return;
View Full Code Here


   
    if(!(assignment.getLeftHandSide() instanceof ArrayAccess)) {
      return null;
    }
   
    ArrayAccess apr = (ArrayAccess)assignment.getLeftHandSide();
    if(!(apr.getArray() instanceof NewConstantArrayInstance)) {
      return null;
    }
   
    return assignment;
  }
View Full Code Here

  protected void processArrayStore() {
    Expression value = context.getExpressions().pop();
    Expression arrayPosition = context.getExpressions().pop();
    Expression arrayReference = context.getExpressions().pop();
   
    ArrayAccess arrayPositionReference = new ArrayAccess(context.getCurrentInstruction(), arrayReference, arrayPosition);
    Assignment assignment = new Assignment(context.getCurrentInstruction(), arrayPositionReference, value);
   
    StatementIntermediate si = new StatementIntermediate(context.getCurrentInstruction(), assignment);
   
    //add it to the intermediate lines.
View Full Code Here

    Expression arrayPosition = context.getExpressions().pop();
    Expression arrayObject = context.getExpressions().pop();
   
    //now, we just need to create the array reference.
   
    ArrayAccess apr = new ArrayAccess(context.getCurrentInstruction(), arrayObject, arrayPosition);
    context.getExpressions().push(apr);
  }
View Full Code Here

  private boolean firstMatchesGeneratedVariables(StatementIntermediate first, GeneratedVariable generatedArrayRef, GeneratedVariable generatedArrayIterator) {
    Declaration childDeclaration = (Declaration)first.getExpression();
    Expression right = childDeclaration.getAssignment().getRightHandSide();
   
    if(right instanceof ArrayAccess) {
      ArrayAccess apr = (ArrayAccess)right;
     
      if(!(apr.getIndex() instanceof Variable)) {
        return false;
      }
      if(!(apr.getArray() instanceof Variable)) {
        return false;
      }
     
      //cast both to variable. check the variables match the name and type of the ones found above.
      Variable arrayPosition = (Variable)apr.getArray();
      Variable arrayRef = (Variable)apr.getArray();
     
      if(!StringUtils.equals(arrayPosition.getName(), generatedArrayIterator.getName())) {
        return false;
      }
     
View Full Code Here

TOP

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

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.