Package org.candle.decompiler.intermediate.expression

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


      if(localVar == null) {
        //probably need to create a variable for enhanced loops...
        Type type = instruction.getType(context.getMethodGen().getConstantPool());
        localVar = context.getVariableResolver().addLocalVariable(index, context.getCurrentInstruction(), type);
       
        variable = new GeneratedVariable(context.getCurrentInstruction(), localVar.getType(), localVar.getName());
      }
      else {
        variable = new Variable(context.getCurrentInstruction(), localVar.getType(), localVar.getName());
      }
     
View Full Code Here


   
    Variable variable = null;
    if(iv == null) {
      //generate IV.
      iv = context.getVariableResolver().addLocalVariable(index, context.getCurrentInstruction(), instruction.getType(context.getMethodGen().getConstantPool()));
      variable = new GeneratedVariable(context.getCurrentInstruction(), iv.getType(), iv.getName());
    }
    else {
      variable = new Variable(context.getCurrentInstruction(), iv.getType(), iv.getName());
    }
   
View Full Code Here

          }
        }
       
        //generate variable name...
        iv = context.getVariableResolver().addLocalVariable(instruction.getIndex(), context.getCurrentInstruction(), type);
        variable = new GeneratedVariable(context.getCurrentInstruction(), iv.getType(), iv.getName());
      }
    }
   
    //create the variable.
    if(variable == null) {
View Full Code Here

    //if either of these are null, then this doesn't match.
    if(arrayLenthCandidate == null || tempArrayCandidate == null) {
      return;
    }
   
    GeneratedVariable generatedArrayLength = extractGeneratedVariableDeclaration(arrayLenthCandidate);
    GeneratedVariable generatedArrayReference = extractGeneratedVariableDeclaration(tempArrayCandidate);
    GeneratedVariable arrayIteratorValue = extractGeneratedVariableDeclaration(line.getInit());
   
    if(generatedArrayLength == null || generatedArrayReference == null || arrayIteratorValue == null) {
      return;
    }
   
    //now validate the types.  array length should be an integer.  the array reference, well, should be an array ;)
    //the iterator should be an integer.

    if(generatedArrayLength.getType() != Type.INT) {
     
      if(!(generatedArrayReference.getType() instanceof ArrayType)) {
        return;
      }
     
      if(arrayIteratorValue.getType() != Type.INT) {
        return;
      }
    }
   
    //great; at this point we know the pattern matches.  check the next statement to see if the transformation is possible.
View Full Code Here

TOP

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

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.