dex-ir-1.9

16:35:19.507 INFO  jd.cli.Main - Decompiling dex-ir-1.9.jar
package com.googlecode.dex2jar.ir;

public class ValueBox
{
  public Value value;
  
  public ValueBox(Value value)
  {
    this.value = value;
  }
  
  public String toString()
  {
    return value == null ? "[Null ValueBox]" : value.toString();
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.ValueBox
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir;

import com.googlecode.dex2jar.ir.stmt.LabelStmt;
import java.util.Map;
import org.objectweb.asm.Type;

public class Trap
{
  public LabelStmt start;
  public LabelStmt end;
  public LabelStmt handler;
  public Type type;
  
  public Trap() {}
  
  public Trap(LabelStmt start, LabelStmt end, LabelStmt handler, Type type)
  {
    this.start = start;
    this.end = end;
    this.handler = handler;
    this.type = type;
  }
  
  public Trap clone(Map<LabelStmt, LabelStmt> map)
  {
    return new Trap(start.clone(map), end.clone(map), handler.clone(map), type);
  }
  
  public String toString()
  {
    return String.format(".catch %s - %s > %s // %s", new Object[] { start.getDisplayName(), end.getDisplayName(), handler.getDisplayName(), type == null ? "all" : ToStringUtil.toShortClassName(type) });
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.Trap
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.Local;
import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public final class Exprs
{
  public static ValueBox box(Value value)
  {
    return new ValueBox(value);
  }
  
  public static ValueBox[] box(Value[] v)
  {
    if (v == null) {
      return new ValueBox[0];
    }
    ValueBox[] vb = new ValueBox[v.length];
    for (int i = 0; i < v.length; i++) {
      vb[i] = new ValueBox(v[i]);
    }
    return vb;
  }
  
  public static BinopExpr nAdd(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.ADD, a, b, type);
  }
  
  public static BinopExpr nAnd(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.AND, a, b, type);
  }
  
  public static ArrayExpr nArray(Value base, Value index)
  {
    return new ArrayExpr(base, index);
  }
  
  public static CastExpr nCast(Value obj, Type from, Type to)
  {
    return new CastExpr(obj, from, to);
  }
  
  public static TypeExpr nCheckCast(Value obj, Type type)
  {
    return new TypeExpr(Value.VT.CHECK_CAST, obj, type);
  }
  
  public static BinopExpr nDCmpg(Value a, Value b)
  {
    return new BinopExpr(Value.VT.DCMPG, a, b, Type.DOUBLE_TYPE);
  }
  
  public static BinopExpr nDCmpl(Value a, Value b)
  {
    return new BinopExpr(Value.VT.DCMPL, a, b, Type.DOUBLE_TYPE);
  }
  
  public static BinopExpr nDiv(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.DIV, a, b, type);
  }
  
  public static BinopExpr nEq(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.EQ, a, b, type);
  }
  
  public static RefExpr nExceptionRef(Type type)
  {
    return new RefExpr(Value.VT.EXCEPTION_REF, type, -1);
  }
  
  public static BinopExpr nFCmpg(Value a, Value b)
  {
    return new BinopExpr(Value.VT.FCMPG, a, b, Type.FLOAT_TYPE);
  }
  
  public static BinopExpr nFCmpl(Value a, Value b)
  {
    return new BinopExpr(Value.VT.FCMPL, a, b, Type.FLOAT_TYPE);
  }
  
  public static FieldExpr nField(Value object, Type ownerType, String fieldName, Type fieldType)
  {
    return new FieldExpr(new ValueBox(object), ownerType, fieldName, fieldType);
  }
  
  public static BinopExpr nGe(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.GE, a, b, type);
  }
  
  public static BinopExpr nGt(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.GT, a, b, type);
  }
  
  public static TypeExpr nInstanceOf(Value value, Type type)
  {
    return new TypeExpr(Value.VT.INSTANCE_OF, value, type);
  }
  
  public static InvokeExpr nInvokeInterface(Value[] regs, Type owner, String name, Type[] argmentTypes, Type returnType)
  {
    return new InvokeExpr(Value.VT.INVOKE_INTERFACE, box(regs), owner, name, argmentTypes, returnType);
  }
  
  public static InvokeExpr nInvokeNew(Value[] regs, Type[] argmentTypes, Type owner)
  {
    return new InvokeExpr(Value.VT.INVOKE_NEW, box(regs), owner, "<init>", argmentTypes, owner);
  }
  
  public static InvokeExpr nInvokeNew(ValueBox[] regs, Type[] argmentTypes, Type owner)
  {
    return new InvokeExpr(Value.VT.INVOKE_NEW, regs, owner, "<init>", argmentTypes, owner);
  }
  
  public static InvokeExpr nInvokeSpecial(Value[] regs, Type owner, String name, Type[] argmentTypes, Type returnType)
  {
    return new InvokeExpr(Value.VT.INVOKE_SPECIAL, box(regs), owner, name, argmentTypes, returnType);
  }
  
  public static InvokeExpr nInvokeStatic(Value[] regs, Type owner, String name, Type[] argmentTypes, Type returnType)
  {
    return new InvokeExpr(Value.VT.INVOKE_STATIC, box(regs), owner, name, argmentTypes, returnType);
  }
  
  public static InvokeExpr nInvokeVirtual(Value[] regs, Type owner, String name, Type[] argmentTypes, Type returnType)
  {
    return new InvokeExpr(Value.VT.INVOKE_VIRTUAL, box(regs), owner, name, argmentTypes, returnType);
  }
  
  public static BinopExpr nLCmp(Value a, Value b)
  {
    return new BinopExpr(Value.VT.LCMP, a, b, Type.LONG_TYPE);
  }
  
  public static BinopExpr nLe(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.LE, a, b, type);
  }
  
  public static UnopExpr nLength(Value array)
  {
    return new UnopExpr(Value.VT.LENGTH, array, null);
  }
  
  public static Local nLocal(String name)
  {
    return new Local(name);
  }
  
  public static BinopExpr nLt(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.LT, a, b, type);
  }
  
  public static BinopExpr nMul(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.MUL, a, b, type);
  }
  
  public static BinopExpr nNe(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.NE, a, b, type);
  }
  
  public static UnopExpr nNeg(Value array, Type type)
  {
    return new UnopExpr(Value.VT.NEG, array, type);
  }
  
  public static NewExpr nNew(Type type)
  {
    return new NewExpr(type);
  }
  
  public static TypeExpr nNewArray(Type elementType, Value size)
  {
    return new TypeExpr(Value.VT.NEW_ARRAY, size, elementType);
  }
  
  public static FilledArrayExpr nFilledArray(Type elementType, Value[] datas)
  {
    return new FilledArrayExpr(box(datas), elementType);
  }
  
  public static NewMutiArrayExpr nNewMutiArray(Type base, int dim, Value[] sizes)
  {
    return new NewMutiArrayExpr(base, dim, box(sizes));
  }
  
  public static UnopExpr nNot(Value array, Type type)
  {
    return new UnopExpr(Value.VT.NOT, array, type);
  }
  
  public static BinopExpr nOr(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.OR, a, b, type);
  }
  
  public static RefExpr nParameterRef(Type type, int index)
  {
    return new RefExpr(Value.VT.PARAMETER_REF, type, index);
  }
  
  public static BinopExpr nRem(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.REM, a, b, type);
  }
  
  public static BinopExpr nShl(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.SHL, a, b, type);
  }
  
  public static BinopExpr nShr(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.SHR, a, b, type);
  }
  
  public static FieldExpr nStaticField(Type ownerType, String fieldName, Type fieldType)
  {
    return new FieldExpr(null, ownerType, fieldName, fieldType);
  }
  
  public static BinopExpr nSub(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.SUB, a, b, type);
  }
  
  public static RefExpr nThisRef(Type type)
  {
    return new RefExpr(Value.VT.THIS_REF, type, -1);
  }
  
  public static BinopExpr nUshr(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.USHR, a, b, type);
  }
  
  public static BinopExpr nXor(Value a, Value b, Type type)
  {
    return new BinopExpr(Value.VT.XOR, a, b, type);
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.Exprs
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E0Expr;
import com.googlecode.dex2jar.ir.Value.VT;
import org.objectweb.asm.Type;

public class RefExpr
  extends Value.E0Expr
{
  public int parameterIndex;
  public Type type;
  
  public RefExpr(Value.VT vt, Type refType, int index)
  {
    super(vt);
    type = refType;
    parameterIndex = index;
  }
  
  public Value clone()
  {
    return new RefExpr(vt, type, parameterIndex);
  }
  
  public String toString()
  {
    switch (vt)
    {
    case THIS_REF: 
      return "@this";
    case PARAMETER_REF: 
      return "@parameter_" + parameterIndex;
    case EXCEPTION_REF: 
      return "@Exception";
    }
    return super.toString();
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.RefExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.ToStringUtil;
import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.EnExpr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public class InvokeExpr
  extends Value.EnExpr
{
  public Type[] argmentTypes;
  public String methodName;
  public Type methodOwnerType;
  public Type methodReturnType;
  
  public InvokeExpr(Value.VT type, ValueBox[] args, Type ownerType, String methodName, Type[] argmentTypes, Type returnType)
  {
    super(type, args);
    methodReturnType = returnType;
    this.methodName = methodName;
    methodOwnerType = ownerType;
    this.argmentTypes = argmentTypes;
  }
  
  public Value clone()
  {
    ValueBox[] nOps = new ValueBox[ops.length];
    for (int i = 0; i < nOps.length; i++) {
      nOps[i] = new ValueBox(ops[i].value.clone());
    }
    return new InvokeExpr(vt, nOps, methodOwnerType, methodName, argmentTypes, methodReturnType);
  }
  
  public String toString()
  {
    StringBuilder sb = new StringBuilder();
    if (vt == Value.VT.INVOKE_NEW) {
      sb.append("new ").append(ToStringUtil.toShortClassName(methodOwnerType)).append('(');
    } else {
      sb.append(vt == Value.VT.INVOKE_STATIC ? ToStringUtil.toShortClassName(methodOwnerType) : ops[0]).append('.').append(methodName).append('(');
    }
    boolean first = true;
    for (int i = (vt == Value.VT.INVOKE_STATIC) || (vt == Value.VT.INVOKE_NEW) ? 0 : 1; i < ops.length; i++)
    {
      if (first) {
        first = false;
      } else {
        sb.append(',');
      }
      sb.append(ops[i]);
    }
    sb.append(')');
    return sb.toString();
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.InvokeExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.ToStringUtil;
import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E1Expr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public class FieldExpr
  extends Value.E1Expr
{
  public String fieldName;
  public Type fieldOwnerType;
  public Type fieldType;
  
  public FieldExpr(ValueBox object, Type ownerType, String fieldName, Type fieldType)
  {
    super(Value.VT.FIELD, object);
    this.fieldType = fieldType;
    this.fieldName = fieldName;
    fieldOwnerType = ownerType;
  }
  
  public Value clone()
  {
    return new FieldExpr(op == null ? null : new ValueBox(op.value.clone()), fieldOwnerType, fieldName, fieldType);
  }
  
  public String toString()
  {
    return (op == null ? ToStringUtil.toShortClassName(fieldOwnerType) : op) + "." + fieldName;
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.FieldExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E2Expr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public class BinopExpr
  extends Value.E2Expr
{
  public Type type;
  
  public BinopExpr(Value.VT vt, Value op1, Value op2, Type type)
  {
    super(vt, new ValueBox(op1), new ValueBox(op2));
    this.type = type;
  }
  
  public Value clone()
  {
    return new BinopExpr(vt, op1.value.clone(), op2.value.clone(), type);
  }
  
  public String toString()
  {
    return "(" + op1 + " " + vt + " " + op2 + ")";
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.BinopExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

class UnopExpr$1 {}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.UnopExpr.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.EnExpr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public class FilledArrayExpr
  extends Value.EnExpr
{
  public Type type;
  
  public FilledArrayExpr(ValueBox[] datas, Type type)
  {
    super(Value.VT.FILLED_ARRAY, datas);
    this.type = type;
  }
  
  public Value clone()
  {
    ValueBox[] nOps = new ValueBox[ops.length];
    for (int i = 0; i < nOps.length; i++) {
      nOps[i] = new ValueBox(ops[i].value.clone());
    }
    return new FilledArrayExpr(nOps, type);
  }
  
  public String toString()
  {
    StringBuilder sb = new StringBuilder().append('{');
    for (int i = 0; i < ops.length; i++) {
      sb.append(ops[i]).append(", ");
    }
    if (ops.length > 0) {
      sb.setLength(sb.length() - 2);
    }
    sb.append('}');
    return sb.toString();
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.FilledArrayExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

class TypeExpr$1 {}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.TypeExpr.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.EnExpr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public class NewMutiArrayExpr
  extends Value.EnExpr
{
  public Type baseType;
  public int dimension;
  
  public NewMutiArrayExpr(Type base, int dimension, ValueBox[] sizes)
  {
    super(Value.VT.NEW_MUTI_ARRAY, sizes);
    baseType = base;
    this.dimension = dimension;
    ops = new ValueBox[sizes.length];
  }
  
  public Value clone()
  {
    ValueBox[] nOps = new ValueBox[ops.length];
    for (int i = 0; i < nOps.length; i++) {
      nOps[i] = new ValueBox(ops[i].value.clone());
    }
    return new NewMutiArrayExpr(baseType, dimension, nOps);
  }
  
  public String toString()
  {
    StringBuilder sb = new StringBuilder();
    sb.append("new ").append(baseType);
    for (int i = 0; i < dimension; i++) {
      sb.append('[').append(ops[i]).append(']');
    }
    return sb.toString();
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.NewMutiArrayExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.ToStringUtil;
import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E1Expr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public class CastExpr
  extends Value.E1Expr
{
  public Type from;
  public Type to;
  
  public CastExpr(Value value, Type from, Type to)
  {
    super(Value.VT.CAST, new ValueBox(value));
    this.from = from;
    this.to = to;
  }
  
  public Value clone()
  {
    return new CastExpr(op.value, from, to);
  }
  
  public String toString()
  {
    return "((" + ToStringUtil.toShortClassName(to) + ")" + op + ")";
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.CastExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.ToStringUtil;
import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E1Expr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public class TypeExpr
  extends Value.E1Expr
{
  public Type type;
  
  public TypeExpr(Value.VT vt, Value value, Type type)
  {
    super(vt, new ValueBox(value));
    this.type = type;
  }
  
  public Value clone()
  {
    return new TypeExpr(vt, op.value.clone(), type);
  }
  
  public String toString()
  {
    switch (vt)
    {
    case CHECK_CAST: 
      return "((" + ToStringUtil.toShortClassName(type) + ")" + op + ")";
    case INSTANCE_OF: 
      return "(" + op + " instanceof " + ToStringUtil.toShortClassName(type) + ")";
    case NEW_ARRAY: 
      if (type.getSort() == 9)
      {
        StringBuilder sb = new StringBuilder("new ").append(ToStringUtil.toShortClassName(type.getElementType())).append("[").append(op).append("]");
        for (int i = 0; i < type.getDimensions(); i++) {
          sb.append("[]");
        }
        return sb.toString();
      }
      return "new " + ToStringUtil.toShortClassName(type) + "[" + op + "]";
    }
    return "UNKNOW";
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.TypeExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E1Expr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import org.objectweb.asm.Type;

public class UnopExpr
  extends Value.E1Expr
{
  public Type type;
  
  public UnopExpr(Value.VT vt, Value value, Type type)
  {
    super(vt, new ValueBox(value));
    this.type = type;
  }
  
  public Value clone()
  {
    return new UnopExpr(vt, op.value.clone(), type);
  }
  
  public String toString()
  {
    switch (vt)
    {
    case LENGTH: 
      return op + ".length";
    case NEG: 
      return "(-" + op + ")";
    case NOT: 
      return "(!" + op + ")";
    }
    return super.toString();
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.UnopExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

class RefExpr$1 {}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.RefExpr.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E2Expr;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;

public class ArrayExpr
  extends Value.E2Expr
{
  public ArrayExpr()
  {
    super(Value.VT.ARRAY, null, null);
  }
  
  public ArrayExpr(Value base, Value index)
  {
    super(Value.VT.ARRAY, new ValueBox(base), new ValueBox(index));
  }
  
  public Value clone()
  {
    return new ArrayExpr(op1.value.clone(), op2.value.clone());
  }
  
  public String toString()
  {
    return op1 + "[" + op2 + "]";
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.ArrayExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.expr;

import com.googlecode.dex2jar.ir.ToStringUtil;
import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E0Expr;
import com.googlecode.dex2jar.ir.Value.VT;
import org.objectweb.asm.Type;

public class NewExpr
  extends Value.E0Expr
{
  public Type type;
  
  public NewExpr(Type type)
  {
    super(Value.VT.NEW);
    this.type = type;
  }
  
  public Value clone()
  {
    return new NewExpr(type);
  }
  
  public String toString()
  {
    return "NEW " + ToStringUtil.toShortClassName(type);
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.expr.NewExpr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir;

public enum Value$VT
{
  ADD("+"),  AND("&"),  ARRAY,  CAST,  CHECK_CAST,  LCMP,  FCMPG,  FCMPL,  DCMPG,  DCMPL,  CONSTANT,  DIV("/"),  EQ("=="),  EXCEPTION_REF,  FIELD,  GE(">="),  GT(">"),  INSTANCE_OF,  INVOKE_INTERFACE,  INVOKE_NEW,  INVOKE_SPECIAL,  INVOKE_STATIC,  INVOKE_VIRTUAL,  LE("<="),  LENGTH,  LOCAL,  LT("<"),  MUL("*"),  NE("!="),  NEG,  NEW,  NEW_ARRAY,  NEW_MUTI_ARRAY,  NOT,  OR("|"),  PARAMETER_REF,  REM("%"),  SHL("<<"),  SHR(">>"),  SUB("-"),  THIS_REF,  USHR(">>>"),  XOR("^"),  FILLED_ARRAY;
  
  private String name;
  
  private Value$VT()
  {
    this(null);
  }
  
  private Value$VT(String name)
  {
    this.name = name;
  }
  
  public String toString()
  {
    return name == null ? super.toString() : name;
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.Value.VT
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir;

public abstract class Value$E1Expr
  extends Value
{
  public ValueBox op;
  
  public Value$E1Expr(Value.VT vt, ValueBox op)
  {
    super(vt, ET.E1);
    this.op = op;
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.Value.E1Expr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir;

import org.objectweb.asm.Type;
import org.objectweb.asm.util.AbstractVisitor;

public class Constant
  extends Value.E0Expr
{
  public static final Object Null = new Object();
  public static Type STRING = Type.getType(String.class);
  public Type type;
  public Object value;
  
  public static Constant n(Type type, Object value)
  {
    return new Constant(type, value);
  }
  
  public static Constant nByte(byte i)
  {
    return new Constant(Type.BYTE_TYPE, Byte.valueOf(i));
  }
  
  public static Constant nChar(char i)
  {
    return new Constant(Type.CHAR_TYPE, Character.valueOf(i));
  }
  
  public static Constant nClass(Type clz)
  {
    return new Constant(Type.getType("Ljava/lang/Class;"), clz);
  }
  
  public static Constant nDouble(double i)
  {
    return new Constant(Type.DOUBLE_TYPE, Double.valueOf(i));
  }
  
  public static Constant nFloat(float i)
  {
    return new Constant(Type.FLOAT_TYPE, Float.valueOf(i));
  }
  
  public static Constant nInt(int i)
  {
    return new Constant(Type.INT_TYPE, Integer.valueOf(i));
  }
  
  public static Constant nLong(long i)
  {
    return new Constant(Type.LONG_TYPE, Long.valueOf(i));
  }
  
  public static Constant nNull()
  {
    return new Constant(Null);
  }
  
  public static Constant nShort(short i)
  {
    return new Constant(Type.SHORT_TYPE, Short.valueOf(i));
  }
  
  public static Constant nString(String i)
  {
    return new Constant(STRING, i);
  }
  
  public Constant(Object value)
  {
    super(Value.VT.CONSTANT);
    this.value = value;
  }
  
  public Constant(Type type, Object value)
  {
    super(Value.VT.CONSTANT);
    this.value = value;
    this.type = type;
  }
  
  public Value clone()
  {
    return new Constant(type, value);
  }
  
  public String toString()
  {
    if (Null == value) {
      return "null";
    }
    if (value == null) {
      return "NULL";
    }
    if ((value instanceof Number))
    {
      if ((value instanceof Float)) {
        return value.toString() + "F";
      }
      if ((value instanceof Long)) {
        return value.toString() + "L";
      }
      return value.toString();
    }
    if ((value instanceof String))
    {
      StringBuffer buf = new StringBuffer();
      AbstractVisitor.appendString(buf, (String)value);
      return buf.toString();
    }
    if (type.equals(Type.getType(Class.class))) {
      return ToStringUtil.toShortClassName((Type)value) + ".class";
    }
    return "" + value;
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.Constant
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir;

public abstract class Value$E0Expr
  extends Value
{
  public Value$E0Expr(Value.VT vt)
  {
    super(vt, ET.E0);
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.Value.E0Expr
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir;

public class Local
  extends Value.E0Expr
{
  public int _ls_index;
  public int _ls_read_count;
  public ValueBox _ls_vb;
  public int _ls_write_count;
  public String name;
  
  public Local(String name)
  {
    super(Value.VT.LOCAL);
    this.name = name;
  }
  
  public Value clone()
  {
    return this;
  }
  
  public String toString()
  {
    return name;
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.Local
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir;

import org.objectweb.asm.Type;

public class ToStringUtil
{
  public static String getAccDes(int acc)
  {
    StringBuilder sb = new StringBuilder();
    if ((acc & 0x1) != 0) {
      sb.append("public ");
    }
    if ((acc & 0x4) != 0) {
      sb.append("protected ");
    }
    if ((acc & 0x2) != 0) {
      sb.append("private ");
    }
    if ((acc & 0x8) != 0) {
      sb.append("static ");
    }
    if (((acc & 0x400) != 0) && ((acc & 0x200) == 0)) {
      sb.append("abstract ");
    }
    if ((acc & 0x2000) != 0) {
      sb.append("annotation ");
    }
    if ((acc & 0x40) != 0) {
      sb.append("bridge ");
    }
    if ((acc & 0x20000) != 0) {
      sb.append("deprecated ");
    }
    if ((acc & 0x4000) != 0) {
      sb.append("enum ");
    }
    if ((acc & 0x10) != 0) {
      sb.append("final ");
    }
    if ((acc & 0x200) != 0) {
      sb.append("interace ");
    }
    if ((acc & 0x100) != 0) {
      sb.append("native ");
    }
    if ((acc & 0x800) != 0) {
      sb.append("strict ");
    }
    if ((acc & 0x20) != 0) {
      sb.append("synchronized ");
    }
    if ((acc & 0x80) != 0) {
      sb.append("transient ");
    }
    if ((acc & 0x80) != 0) {
      sb.append("varargs ");
    }
    if ((acc & 0x40) != 0) {
      sb.append("volatile ");
    }
    return sb.toString();
  }
  
  public static String toShortClassName(Type t)
  {
    String cn = t.getClassName();
    int i = cn.lastIndexOf('.');
    return i > 0 ? cn.substring(i + 1) : cn;
  }
}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.ToStringUtil
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.ts;

class ExceptionHandlerCurrectTransformer$1 {}

/* Location:
 * Qualified Name:     com.googlecode.dex2jar.ir.ts.ExceptionHandlerCurrectTransformer.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.googlecode.dex2jar.ir.ts;

import com.googlecode.dex2jar.ir.Constant;
import com.googlecode.dex2jar.ir.IrMethod;
import com.googlecode.dex2jar.ir.Value;
import com.googlecode.dex2jar.ir.Value.E0Expr;
import com.googlecode.dex2jar.ir.Value.E1Expr;
import com.googlecode.dex2jar.ir.Value.E2Expr;
import com.googlecode.dex2jar.ir.Value.EnExpr;
import com.googlecode.dex2jar.ir.Value.TypeRef;
import com.googlecode.dex2jar.ir.Value.VT;
import com.googlecode.dex2jar.ir.ValueBox;
import com.googlecode.dex2jar.ir.expr.BinopExpr;
import com.googlecode.dex2jar.ir.expr.CastExpr;
import com.googlecode.dex2jar.ir.expr.FieldExpr;
import com.googlecode.dex2jar.ir.expr.FilledArrayExpr;
import com.googlecode.dex2jar.ir.expr.InvokeExpr;
import com.googlecode.dex2jar.ir.expr.NewExpr;
import com.googlecode.dex2jar.ir.expr.NewMutiArrayExpr;
import com.googlecode.dex2jar.ir.expr.RefExpr;
import com.googlecode.dex2jar.ir.expr.TypeExpr;
import com.googlecode.dex2jar.ir.expr.UnopExpr;
import com.googlecode.dex2jar.ir.stmt.Stmt;
import com.googlecode.dex2jar.ir.stmt.Stmt.E1Stmt;
import com.googlecode.dex2jar.ir.stmt.Stmt.E2Stmt;
import com.googlecode.dex2jar.ir.stmt.Stmt.ST;
import com.googlecode.dex2jar.ir.stmt.StmtList;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.objectweb.asm.Type;

public class TypeAnalyze
{
  protected IrMethod method;
  
  public static class DefTypeRef
    implements Value.TypeRef
  {
    static Comparator<Type> c = new Comparator()
    {
      int[] x = { 999, 1, 4, 2, 3, 5, 6, 7, 8, 10, 9 };
      
      public int compare(Type o1, Type o2)
      {
        if (o1.equals(o2)) {
          return 0;
        }
        int s1 = o1.getSort();
        int s2 = o2.getSort();
        if (s1 == s2) {
          switch (s1)
          {
          case 10: 
            if (o1.equals(Type.getType(Object.class))) {
              return 1;
            }
            if (o2.equals(Type.getType(Object.class))) {
              return -1;
            }
            return o1.getDescriptor().compareTo(o2.getDescriptor());
          case 9: 
            int a = o1.getDimensions();
            int b = o2.getDimensions();
            if (a == b)
            {
              if (o1.getElementType().equals(Type.getType(Object.class))) {
                return 1;
              }
              if (o2.getElementType().equals(Type.getType(Object.class))) {
                return -1;
              }
              return o1.getElementType().getDescriptor().compareTo(o2.getElementType().getDescriptor());
            }
            return b - a;
          }
        } else {
          return x[s2] - x[s1];
        }
        return 0;
      }
    };
    
    private static String getShort(String desc)
    {
      char c = desc.charAt(0);
      if (c == '[')
      {
        StringBuilder sb = new StringBuilder();
        sb.append(c);
        for (int i = 1; i < desc.length(); i++)
        {
          c = desc.charAt(i);
          if (c != '[') {
            break;
          }
          sb.append(c);
        }
        sb.append(c);
        return sb.toString();
      }
      return Character.toString(c);
    }
    
    public Set<DefTypeRef> sameValues = new HashSet();
    public Set<DefTypeRef> arrayValues = new HashSet();
    public Set<DefTypeRef> arryRoots = new HashSet();
    public Set<DefTypeRef> froms = new HashSet();
    public Set<Type> providerAs = new TreeSet(c);
    public Set<DefTypeRef> tos = new HashSet();
    public Type type;
    public Set<Type> useAs = new TreeSet(c);
    Value value;
    
    public Type get()
    {
      return type;
    }
    
    public String toString()
    {
      if (type != null) {
        return type.toString();
      }
      StringBuilder sb = new StringBuilder();
      sb.append(value).append(": ");
      if (providerAs != null) {
        for (Type t : providerAs) {
          sb.append(getShort(t.getDescriptor()));
        }
      }
      sb.append(" > ");
      if (useAs != null) {
        for (Type t : useAs) {
          sb.append(getShort(t.getDescriptor()));
        }
      }
      return sb.toString();
    }
  }
  
  List<DefTypeRef> refs = new ArrayList();
  
  public TypeAnalyze(IrMethod method)
  {
    this.method = method;
  }
  
  public List<DefTypeRef> analyze()
  {
    sxStmt();
    
    fixProvidAs();
    
    return refs;
  }
  
  private void e0expr(Value.E0Expr op)
  {
    switch (vt)
    {
    case LOCAL: 
      break;
    case NEW: 
      NewExpr newExpr = (NewExpr)op;
      provideAs(newExpr, type);
      break;
    case THIS_REF: 
    case PARAMETER_REF: 
    case EXCEPTION_REF: 
      RefExpr refExpr = (RefExpr)op;
      Type refType = type;
      if ((refType == null) && (vt == Value.VT.EXCEPTION_REF)) {
        refType = Type.getType(Throwable.class);
      }
      provideAs(refExpr, refType);
      break;
    case CONSTANT: 
      Constant cst = (Constant)op;
      
      Object value = value;
      if ((value instanceof String)) {
        provideAs(cst, Type.getType(String.class));
      } else if ((value instanceof Type)) {
        provideAs(cst, Type.getType(Class.class));
      } else if ((value instanceof Number)) {
        if ((value instanceof Integer))
        {
          int a = ((Integer)value).intValue();
          if ((a >= 0) && (a <= 1)) {
            provideAs(cst, Type.BOOLEAN_TYPE);
          } else if ((a >= -128) && (a <= 127)) {
            provideAs(cst, Type.BYTE_TYPE);
          } else if ((a >= 32768) && (a <= 32767)) {
            provideAs(cst, Type.SHORT_TYPE);
          } else if ((a >= 0) && (a <= 65535)) {
            provideAs(cst, Type.CHAR_TYPE);
          } else {
            provideAs(cst, Type.INT_TYPE);
          }
        }
        else if ((value instanceof Long))
        {
          provideAs(cst, Type.LONG_TYPE);
        }
        else if ((value instanceof Float))
        {
          provideAs(cst, Type.FLOAT_TYPE);
        }
        else if ((value instanceof Double))
        {
          provideAs(cst, Type.DOUBLE_TYPE);
        }
      }
      break;
    }
  }
  
  private void e1expr(Value.E1Expr e1, boolean getValue)
  {
    Value v = op != null ? op.value : null;
    switch (vt)
    {
    case CAST: 
      CastExpr ce = (CastExpr)e1;
      useAs(v, from);
      provideAs(e1, to);
      break;
    case FIELD: 
      FieldExpr fe = (FieldExpr)e1;
      if (getValue) {
        provideAs(fe, fieldType);
      } else {
        useAs(fe, fieldType);
      }
      if (v != null) {
        useAs(v, fieldOwnerType);
      }
      break;
    case CHECK_CAST: 
      TypeExpr te = (TypeExpr)e1;
      provideAs(te, type);
      useAs(v, Type.getType(Object.class));
      
      break;
    case INSTANCE_OF: 
      TypeExpr te = (TypeExpr)e1;
      provideAs(te, Type.BOOLEAN_TYPE);
      useAs(v, Type.getType(Object.class));
      
      break;
    case NEW_ARRAY: 
      TypeExpr te = (TypeExpr)e1;
      provideAs(te, Type.getType("[" + type.getDescriptor()));
      useAs(v, Type.INT_TYPE);
      
      break;
    case LENGTH: 
      UnopExpr ue = (UnopExpr)e1;
      provideAs(ue, Type.INT_TYPE);
      useAs(v, Type.getType(Object.class));
      
      break;
    case NEG: 
    case NOT: 
      UnopExpr ue = (UnopExpr)e1;
      provideAs(ue, type);
      useAs(v, type);
    }
    if (v != null) {
      exExpr(v);
    }
  }
  
  private void e2expr(Value.E2Expr e2)
  {
    Value a = op1.value;
    Value b = op2.value;
    switch (vt)
    {
    case ARRAY: 
      useAs(b, Type.INT_TYPE);
      useAs(a, Type.getType(Object.class));
      linkArray(a, e2);
      break;
    case LCMP: 
    case FCMPG: 
    case FCMPL: 
    case DCMPG: 
    case DCMPL: 
      BinopExpr be = (BinopExpr)e2;
      useAs(a, type);
      useAs(b, type);
      provideAs(e2, Type.INT_TYPE);
      
      break;
    case EQ: 
    case NE: 
      if (((vt == Value.VT.CONSTANT) && (Integer.valueOf(0).equals(value))) || ((vt == Value.VT.CONSTANT) && (Integer.valueOf(0).equals(value))))
      {
        useAs(a, Type.BOOLEAN_TYPE);
        useAs(b, Type.BOOLEAN_TYPE);
        sameAs(a, b);
      }
      else
      {
        BinopExpr be = (BinopExpr)e2;
        useAs(a, type);
        useAs(b, type);
      }
      provideAs(e2, Type.BOOLEAN_TYPE);
      
      break;
    case GE: 
    case GT: 
    case LE: 
    case LT: 
      BinopExpr be = (BinopExpr)e2;
      useAs(a, type);
      useAs(b, type);
      provideAs(e2, Type.BOOLEAN_TYPE);
      
      break;
    case ADD: 
    case SUB: 
    case AND: 
    case DIV: 
    case MUL: 
    case OR: 
    case REM: 
    case XOR: 
      BinopExpr be = (BinopExpr)e2;
      useAs(a, type);
      useAs(b, type);
      provideAs(e2, type);
      
      break;
    case SHL: 
    case SHR: 
    case USHR: 
      BinopExpr be = (BinopExpr)e2;
      useAs(a, type);
      useAs(b, Type.INT_TYPE);
      provideAs(e2, type);
      
      break;
    default: 
      throw new UnsupportedOperationException();
    }
    if (a != null) {
      exExpr(a);
    }
    if (b != null) {
      exExpr(b);
    }
  }
  
  private void sameAs(Value a, Value b)
  {
    DefTypeRef aa = getDefTypeRef(a);
    DefTypeRef bb = getDefTypeRef(b);
    sameValues.add(bb);
    sameValues.add(aa);
  }
  
  private void enexpr(Value.EnExpr enExpr)
  {
    ValueBox[] vbs = ops;
    switch (vt)
    {
    case INVOKE_NEW: 
    case INVOKE_INTERFACE: 
    case INVOKE_SPECIAL: 
    case INVOKE_STATIC: 
    case INVOKE_VIRTUAL: 
      InvokeExpr ie = (InvokeExpr)enExpr;
      provideAs(enExpr, vt == Value.VT.INVOKE_NEW ? methodOwnerType : methodReturnType);
      int start = 0;
      if ((vt != Value.VT.INVOKE_STATIC) && (vt != Value.VT.INVOKE_NEW))
      {
        start = 1;
        useAs(0value, methodOwnerType);
      }
      for (int i = 0; start < vbs.length; i++)
      {
        useAs(value, argmentTypes[i]);start++;
      }
      break;
    case FILLED_ARRAY: 
      FilledArrayExpr fae = (FilledArrayExpr)enExpr;
      for (ValueBox vb : vbs) {
        useAs(value, type);
      }
      provideAs(fae, Type.getType("[" + type.getDescriptor()));
      break;
    case NEW_MUTI_ARRAY: 
      NewMutiArrayExpr nmae = (NewMutiArrayExpr)enExpr;
      for (ValueBox vb : vbs) {
        useAs(value, Type.INT_TYPE);
      }
      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < dimension; i++) {
        sb.append('[');
      }
      sb.append(baseType.getDescriptor());
      provideAs(nmae, Type.getType(sb.toString()));
    }
    for (ValueBox vb : ops) {
      exExpr(value);
    }
  }
  
  private void exExpr(Value op)
  {
    exExpr(op, true);
  }
  
  private void exExpr(Value op, boolean getValue)
  {
    switch (et)
    {
    case E0: 
      e0expr((Value.E0Expr)op);
      break;
    case E1: 
      e1expr((Value.E1Expr)op, getValue);
      break;
    case E2: 
      e2expr((Value.E2Expr)op);
      break;
    case En: 
      enexpr((Value.EnExpr)op);
    }
  }
  
  void fixProvidAs()
  {
    LinkedList<DefTypeRef> queue = new LinkedList();
    queue.addAll(refs);
    Set<DefTypeRef> cache = new HashSet();
    while (!queue.isEmpty())
    {
      DefTypeRef ref = (DefTypeRef)queue.poll();
      if (providerAs.size() > 0)
      {
        Type t = (Type)providerAs.iterator().next();
        for (DefTypeRef subref : tos) {
          if (providerAs.addAll(providerAs)) {
            cache.add(subref);
          }
        }
        Type elementType;
        boolean object;
        if ((arrayValues.size() > 0) && 
          (t.getSort() == 9))
        {
          elementType = Type.getType(t.getDescriptor().substring(1));
          object = false;
          switch (elementType.getSort())
          {
          case 6: 
          case 8: 
          case 9: 
          case 10: 
            object = true;
          }
          for (DefTypeRef subref : arrayValues)
          {
            boolean needAdd = providerAs.add(elementType);
            if (object) {
              needAdd = (useAs.add(elementType)) || (needAdd);
            }
            if (needAdd) {
              cache.add(subref);
            }
          }
        }
        switch (t.getSort())
        {
        case 9: 
        case 10: 
          t = Type.getType(Object.class);
        case 6: 
        case 8: 
          useAs.add(t);
        }
      }
      Type t;
      if (useAs.size() > 0)
      {
        for (DefTypeRef subref : froms) {
          if (useAs.addAll(useAs)) {
            cache.add(subref);
          }
        }
        t = (Type)useAs.iterator().next();
        for (DefTypeRef subref : s
1 2 3 4 5

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd