Package bytecodeparser.analysis.stack

Examples of bytecodeparser.analysis.stack.ValueFromLocalVariable


 
  // old
 
  private static String getLocalVariableName(StackElement se) {
    if(se instanceof ValueFromLocalVariable) {
      ValueFromLocalVariable v = (ValueFromLocalVariable) se;
      if(v.localVariable != null)
        return v.localVariable.name;
    }
    return null;
  }
View Full Code Here


    return result;
  }
 
  private static LocalVariable getLocalVariableIfAvailable(StackElement se) {
    if(se instanceof ValueFromLocalVariable) {
      ValueFromLocalVariable v = (ValueFromLocalVariable) se;
      return v.localVariable;
    }
    return null;
  }
View Full Code Here

  }
 
  @Override
  public void simulate(Stack stack) {
    if(op.code != Opcode.IINC) {
      ValueFromLocalVariable toPush = new ValueFromLocalVariable(localVariable);
      if(!load) {
        StackElement poppedSe;
        if(doubleLength)
          poppedSe = stack.pop2();
        else poppedSe = stack.pop();
        /* when a name is null while LocalVariableTable is present, it is likely that this class has been
         * previously enhanced and this local variable is just a variable proxy, so grab the original local
         * variable and consider its name
         */
        if(poppedSe instanceof ValueFromLocalVariable && (localVariable == null || localVariable.name == null)) {
          LOGGER.debug("ATTENTION ************** variable proxy for lv = '" + ((ValueFromLocalVariable) poppedSe).localVariable + "'");
          toPush = new ValueFromLocalVariable(((ValueFromLocalVariable) poppedSe).localVariable);
        }
      } else {
        if(doubleLength)
          stack.push2(toPush);
        else stack.push(toPush);
View Full Code Here

TOP

Related Classes of bytecodeparser.analysis.stack.ValueFromLocalVariable

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.