sa-jdi

 == null)
      {
        clazz = getBytecodeClass(hotspotcode);
        if (clazz == null) {
          clazz = Bytecode.class;
        }
      }
      Constructor cstr = null;
      try
      {
        cstr = clazz.getDeclaredConstructor(new Class[] { Method.class, Integer.TYPE });
      }
      catch (NoSuchMethodException nomethod)
      {
        if (Assert.ASSERTS_ENABLED) {
          Assert.that(false, "Bytecode class without proper constructor!");
        }
      }
      Object bytecodeObj = null;
      try
      {
        bytecodeObj = cstr.newInstance(new Object[] { method, new Integer(bci) });
      }
      catch (Exception exp)
      {
        if (Assert.ASSERTS_ENABLED) {
          Assert.that(false, "Bytecode instance of class " + clazz.getName() + " can not be created!");
        }
      }
      if (stream.isWide()) {
        visitor.visit(new Bytecode(method, bci - 1));
      }
      try
      {
        visitor.visit((Bytecode)bytecodeObj);
      }
      catch (ClassCastException castfail)
      {
        if (Assert.ASSERTS_ENABLED) {
          Assert.that(false, clazz.getName() + " is not derived from Bytecode!");
        }
      }
    }
    visitor.epilogue();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeDisassembler
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeFastAAccess0
  extends BytecodeGetPut
{
  BytecodeFastAAccess0(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int index()
  {
    return 0xFF & javaShortAt(2);
  }
  
  public boolean isStatic()
  {
    return false;
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check fast_aaccess_0");
    }
  }
  
  public boolean isValid()
  {
    return code() == 221;
  }
  
  public static BytecodeFastAAccess0 at(Method method, int bci)
  {
    BytecodeFastAAccess0 b = new BytecodeFastAAccess0(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeFastAAccess0 atCheck(Method method, int bci)
  {
    BytecodeFastAAccess0 b = new BytecodeFastAAccess0(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeFastAAccess0 at(BytecodeStream bcs)
  {
    return new BytecodeFastAAccess0(bcs.method(), bcs.bci());
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append("aload_0");
    buf.append(" ");
    buf.append(super.toString());
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeFastAAccess0
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeFastIAccess0
  extends BytecodeGetPut
{
  BytecodeFastIAccess0(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int index()
  {
    return 0xFF & javaShortAt(2);
  }
  
  public boolean isStatic()
  {
    return false;
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check fast_iaccess_0");
    }
  }
  
  public boolean isValid()
  {
    return code() == 220;
  }
  
  public static BytecodeFastIAccess0 at(Method method, int bci)
  {
    BytecodeFastIAccess0 b = new BytecodeFastIAccess0(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeFastIAccess0 atCheck(Method method, int bci)
  {
    BytecodeFastIAccess0 b = new BytecodeFastIAccess0(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeFastIAccess0 at(BytecodeStream bcs)
  {
    return new BytecodeFastIAccess0(bcs.method(), bcs.bci());
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append("aload_0");
    buf.append(" ");
    buf.append(super.toString());
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeFastIAccess0
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeGetField
  extends BytecodeGetPut
{
  BytecodeGetField(Method method, int bci)
  {
    super(method, bci);
  }
  
  public boolean isStatic()
  {
    return false;
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check getfield");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 180;
  }
  
  public static BytecodeGetField at(Method method, int bci)
  {
    BytecodeGetField b = new BytecodeGetField(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeGetField atCheck(Method method, int bci)
  {
    BytecodeGetField b = new BytecodeGetField(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeGetField at(BytecodeStream bcs)
  {
    return new BytecodeGetField(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeGetField
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.ConstantPool;
import sun.jvm.hotspot.oops.Field;
import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.oops.Symbol;
import sun.jvm.hotspot.runtime.SignatureConverter;

public abstract class BytecodeGetPut
  extends BytecodeWithCPIndex
{
  BytecodeGetPut(Method method, int bci)
  {
    super(method, bci);
  }
  
  public Symbol name()
  {
    ConstantPool cp = method().getConstants();
    return cp.getNameRefAt(index());
  }
  
  public Symbol signature()
  {
    ConstantPool cp = method().getConstants();
    return cp.getSignatureRefAt(index());
  }
  
  public Field getField()
  {
    return method().getConstants().getFieldRefAt(index());
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getJavaBytecodeName());
    buf.append(" ");
    buf.append('#');
    buf.append(Integer.toString(indexForFieldOrMethod()));
    buf.append(" [Field ");
    StringBuffer sigBuf = new StringBuffer();
    new SignatureConverter(signature(), sigBuf).dispatchField();
    buf.append(sigBuf.toString().replace('/', '.'));
    buf.append(" ");
    buf.append(name().asString());
    buf.append("]");
    if (code() != javaCode())
    {
      buf.append(" ");
      buf.append('[');
      buf.append(getBytecodeName());
      buf.append(']');
    }
    return buf.toString();
  }
  
  public abstract boolean isStatic();
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeGetPut
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeGetStatic
  extends BytecodeGetPut
{
  BytecodeGetStatic(Method method, int bci)
  {
    super(method, bci);
  }
  
  public boolean isStatic()
  {
    return true;
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check getstatic");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 178;
  }
  
  public static BytecodeGetStatic at(Method method, int bci)
  {
    BytecodeGetStatic b = new BytecodeGetStatic(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeGetStatic atCheck(Method method, int bci)
  {
    BytecodeGetStatic b = new BytecodeGetStatic(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeGetStatic at(BytecodeStream bcs)
  {
    return new BytecodeGetStatic(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeGetStatic
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeGoto
  extends BytecodeJmp
{
  BytecodeGoto(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int getTargetBCI()
  {
    return bci() + javaShortAt(1);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check goto");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 167;
  }
  
  public static BytecodeGoto at(Method method, int bci)
  {
    BytecodeGoto b = new BytecodeGoto(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeGoto atCheck(Method method, int bci)
  {
    BytecodeGoto b = new BytecodeGoto(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeGoto at(BytecodeStream bcs)
  {
    return new BytecodeGoto(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeGoto
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeGotoW
  extends BytecodeJmp
{
  BytecodeGotoW(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int getTargetBCI()
  {
    return bci() + javaSignedWordAt(1);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check goto_w");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 200;
  }
  
  public static BytecodeGotoW at(Method method, int bci)
  {
    BytecodeGotoW b = new BytecodeGotoW(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeGotoW atCheck(Method method, int bci)
  {
    BytecodeGotoW b = new BytecodeGotoW(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeGotoW at(BytecodeStream bcs)
  {
    return new BytecodeGotoW(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeGotoW
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeIf
  extends BytecodeJmp
{
  BytecodeIf(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int getTargetBCI()
  {
    return bci() + javaShortAt(1);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check if");
    }
  }
  
  public boolean isValid()
  {
    int jcode = javaCode();
    return ((jcode >= 153) && (jcode <= 166)) || (jcode == 198) || (jcode == 199);
  }
  
  public static BytecodeIf at(Method method, int bci)
  {
    BytecodeIf b = new BytecodeIf(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeIf atCheck(Method method, int bci)
  {
    BytecodeIf b = new BytecodeIf(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeIf at(BytecodeStream bcs)
  {
    return new BytecodeIf(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeIf
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeIinc
  extends BytecodeWideable
{
  BytecodeIinc(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int getIncrement()
  {
    return isWide() ? javaShortAt(3) : javaByteAt(2);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check iinc");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 132;
  }
  
  public static BytecodeIinc at(Method method, int bci)
  {
    BytecodeIinc b = new BytecodeIinc(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeIinc atCheck(Method method, int bci)
  {
    BytecodeIinc b = new BytecodeIinc(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeIinc at(BytecodeStream bcs)
  {
    return new BytecodeIinc(bcs.method(), bcs.bci());
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append("iinc");
    buf.append(" ");
    buf.append('#');
    buf.append(Integer.toString(getLocalVarIndex()));
    buf.append(" by ");
    buf.append(Integer.toString(getIncrement()));
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeIinc
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.InstanceKlass;
import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeInstanceOf
  extends BytecodeWithKlass
{
  BytecodeInstanceOf(Method method, int bci)
  {
    super(method, bci);
  }
  
  public InstanceKlass getInstanceOfKlass()
  {
    return (InstanceKlass)getKlass();
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check instanceof");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 193;
  }
  
  public static BytecodeInstanceOf at(Method method, int bci)
  {
    BytecodeInstanceOf b = new BytecodeInstanceOf(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeInstanceOf atCheck(Method method, int bci)
  {
    BytecodeInstanceOf b = new BytecodeInstanceOf(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeInstanceOf at(BytecodeStream bcs)
  {
    return new BytecodeInstanceOf(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeInstanceOf
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.ConstantPool;
import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.oops.Symbol;
import sun.jvm.hotspot.runtime.Bytes;
import sun.jvm.hotspot.runtime.ResultTypeFinder;
import sun.jvm.hotspot.runtime.SignatureConverter;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeInvoke
  extends BytecodeWithCPIndex
{
  BytecodeInvoke(Method method, int bci)
  {
    super(method, bci);
  }
  
  public static BytecodeInvoke at(Method method, int bci)
  {
    BytecodeInvoke b = new BytecodeInvoke(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeInvoke atCheck(Method method, int bci)
  {
    BytecodeInvoke b = new BytecodeInvoke(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeInvoke at(BytecodeStream bcs)
  {
    return new BytecodeInvoke(bcs.method(), bcs.bci());
  }
  
  public Symbol name()
  {
    ConstantPool cp = method().getConstants();
    if (isInvokedynamic())
    {
      int[] nt = cp.getNameAndTypeAt(indexForFieldOrMethod());
      return cp.getSymbolAt(nt[0]);
    }
    return cp.getNameRefAt(index());
  }
  
  public Symbol signature()
  {
    ConstantPool cp = method().getConstants();
    if (isInvokedynamic())
    {
      int[] nt = cp.getNameAndTypeAt(indexForFieldOrMethod());
      return cp.getSymbolAt(nt[1]);
    }
    return cp.getSignatureRefAt(index());
  }
  
  public int getSecondaryIndex()
  {
    if (isInvokedynamic()) {
      return VM.getVM().getBytes().swapInt(javaSignedWordAt(1));
    }
    return super.getSecondaryIndex();
  }
  
  public Method getInvokedMethod()
  {
    return method().getConstants().getMethodRefAt(index());
  }
  
  public int resultType()
  {
    ResultTypeFinder rts = new ResultTypeFinder(signature());
    rts.iterate();
    return rts.type();
  }
  
  public int adjustedInvokeCode()
  {
    return javaCode();
  }
  
  public boolean isInvokeinterface()
  {
    return adjustedInvokeCode() == 185;
  }
  
  public boolean isInvokevirtual()
  {
    return adjustedInvokeCode() == 182;
  }
  
  public boolean isInvokestatic()
  {
    return adjustedInvokeCode() == 184;
  }
  
  public boolean isInvokespecial()
  {
    return adjustedInvokeCode() == 183;
  }
  
  public boolean isInvokedynamic()
  {
    return adjustedInvokeCode() == 186;
  }
  
  public boolean isValid()
  {
    return (isInvokeinterface()) || (isInvokevirtual()) || (isInvokestatic()) || (isInvokespecial());
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check invoke");
    }
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getJavaBytecodeName());
    buf.append(" ");
    buf.append('#');
    buf.append(Integer.toString(indexForFieldOrMethod()));
    if (isInvokedynamic())
    {
      buf.append('(');
      buf.append(Integer.toString(getSecondaryIndex()));
      buf.append(')');
    }
    buf.append(" [Method ");
    StringBuffer sigBuf = new StringBuffer();
    new SignatureConverter(signature(), sigBuf).iterateReturntype();
    buf.append(sigBuf.toString().replace('/', '.'));
    buf.append(" ");
    buf.append(name().asString());
    buf.append('(');
    sigBuf = new StringBuffer();
    new SignatureConverter(signature(), sigBuf).iterateParameters();
    buf.append(sigBuf.toString().replace('/', '.'));
    buf.append(')');
    buf.append(']');
    if (code() != javaCode())
    {
      buf.append(" ");
      buf.append('[');
      buf.append(getBytecodeName());
      buf.append(']');
    }
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeInvoke
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;

public abstract class BytecodeJmp
  extends Bytecode
{
  BytecodeJmp(Method method, int bci)
  {
    super(method, bci);
  }
  
  public abstract int getTargetBCI();
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getJavaBytecodeName());
    buf.append(" ");
    buf.append(Integer.toString(getTargetBCI()));
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeJmp
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeJsr
  extends BytecodeJmp
{
  BytecodeJsr(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int getTargetBCI()
  {
    return bci() + javaShortAt(1);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check jsr");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 168;
  }
  
  public static BytecodeJsr at(Method method, int bci)
  {
    BytecodeJsr b = new BytecodeJsr(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeJsr atCheck(Method method, int bci)
  {
    BytecodeJsr b = new BytecodeJsr(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeJsr at(BytecodeStream bcs)
  {
    return new BytecodeJsr(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeJsr
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeJsrW
  extends BytecodeJmp
{
  BytecodeJsrW(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int getTargetBCI()
  {
    return bci() + javaSignedWordAt(1);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check jsr_w");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 201;
  }
  
  public static BytecodeJsrW at(Method method, int bci)
  {
    BytecodeJsrW b = new BytecodeJsrW(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeJsrW atCheck(Method method, int bci)
  {
    BytecodeJsrW b = new BytecodeJsrW(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeJsrW at(BytecodeStream bcs)
  {
    return new BytecodeJsrW(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeJsrW
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeLoad
  extends BytecodeLoadStore
{
  BytecodeLoad(Method method, int bci)
  {
    super(method, bci);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check load");
    }
  }
  
  public boolean isValid()
  {
    int jcode = javaCode();
    switch (jcode)
    {
    case 21: 
    case 22: 
    case 23: 
    case 24: 
    case 25: 
      return true;
    }
    return false;
  }
  
  public static BytecodeLoad at(Method method, int bci)
  {
    BytecodeLoad b = new BytecodeLoad(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeLoad atCheck(Method method, int bci)
  {
    BytecodeLoad b = new BytecodeLoad(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeLoad at(BytecodeStream bcs)
  {
    return new BytecodeLoad(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeLoad
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.ConstantPool;
import sun.jvm.hotspot.oops.ConstantPoolCache;
import sun.jvm.hotspot.oops.ConstantPoolCacheEntry;
import sun.jvm.hotspot.oops.Klass;
import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.oops.Oop;
import sun.jvm.hotspot.oops.OopUtilities;
import sun.jvm.hotspot.oops.Symbol;
import sun.jvm.hotspot.runtime.Bytes;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.utilities.Assert;
import sun.jvm.hotspot.utilities.ConstantTag;

public class BytecodeLoadConstant
  extends BytecodeWithCPIndex
{
  BytecodeLoadConstant(Method method, int bci)
  {
    super(method, bci);
  }
  
  public boolean hasCacheIndex()
  {
    return javaCode() != code();
  }
  
  public int index()
  {
    int i = javaCode() == 18 ? 0xFF & javaByteAt(1) : 0xFFFF & javaShortAt(1);
    if (hasCacheIndex()) {
      return 0xFFFF & VM.getVM().getBytes().swapShort((short)i);
    }
    return i;
  }
  
  public int poolIndex()
  {
    int i = index();
    if (hasCacheIndex())
    {
      ConstantPoolCache cpCache = method().getConstants().getCache();
      return cpCache.getEntryAt(i).getConstantPoolIndex();
    }
    return i;
  }
  
  public int cacheIndex()
  {
    if (hasCacheIndex()) {
      return index();
    }
    return -1;
  }
  
  private Oop getCachedConstant()
  {
    int i = cacheIndex();
    if (i >= 0)
    {
      ConstantPoolCache cpCache = method().getConstants().getCache();
      return cpCache.getEntryAt(i).getF1();
    }
    return null;
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check load constant");
    }
  }
  
  public boolean isValid()
  {
    int jcode = javaCode();
    boolean codeOk = (jcode == 18) || (jcode == 19) || (jcode == 20);
    if (!codeOk) {
      return false;
    }
    ConstantTag ctag = method().getConstants().getTagAt(index());
    if (jcode == 20) {
      return (ctag.isDouble()) || (ctag.isLong());
    }
    return (ctag.isUnresolvedString()) || (ctag.isString()) || (ctag.isUnresolvedKlass()) || (ctag.isKlass()) || (ctag.isMethodHandle()) || (ctag.isMethodType()) || (ctag.isInt()) || (ctag.isFloat());
  }
  
  public boolean isKlassConstant()
  {
    int jcode = javaCode();
    if (jcode == 20) {
      return false;
    }
    ConstantTag ctag = method().getConstants().getTagAt(index());
    return (ctag.isKlass()) || (ctag.isUnresolvedKlass());
  }
  
  public Oop getKlass()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isKlassConstant(), "not a klass literal");
    }
    ConstantPool cpool = method().getConstants();
    int cpIndex = index();
    Oop oop = cpool.getObjAt(cpIndex);
    if (oop.isKlass()) {
      return (Klass)oop;
    }
    if (oop.isSymbol()) {
      return (Symbol)oop;
    }
    throw new RuntimeException("should not reach here");
  }
  
  public static BytecodeLoadConstant at(Method method, int bci)
  {
    BytecodeLoadConstant b = new BytecodeLoadConstant(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeLoadConstant atCheck(Method method, int bci)
  {
    BytecodeLoadConstant b = new BytecodeLoadConstant(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeLoadConstant at(BytecodeStream bcs)
  {
    return new BytecodeLoadConstant(bcs.method(), bcs.bci());
  }
  
  public String getConstantValue()
  {
    ConstantPool cpool = method().getConstants();
    int cpIndex = poolIndex();
    ConstantTag ctag = cpool.getTagAt(cpIndex);
    if (ctag.isInt()) {
      return "<int " + Integer.toString(cpool.getIntAt(cpIndex)) + ">";
    }
    if (ctag.isLong()) {
      return "<long " + Long.toString(cpool.getLongAt(cpIndex)) + "L>";
    }
    if (ctag.isFloat()) {
      return "<float " + Float.toString(cpool.getFloatAt(cpIndex)) + "F>";
    }
    if (ctag.isDouble()) {
      return "<double " + Double.toString(cpool.getDoubleAt(cpIndex)) + "D>";
    }
    if ((ctag.isString()) || (ctag.isUnresolvedString()))
    {
      Oop obj = cpool.getObjAt(cpIndex);
      if (obj.isSymbol())
      {
        Symbol sym = (Symbol)obj;
        return "<String \"" + sym.asString() + "\">";
      }
      if (obj.isInstance()) {
        return "<String \"" + OopUtilities.stringOopToString(obj) + "\">";
      }
      throw new RuntimeException("should not reach here");
    }
    if ((ctag.isKlass()) || (ctag.isUnresolvedKlass()))
    {
      Oop obj = cpool.getObjAt(cpIndex);
      if (obj.isKlass())
      {
        Klass k = (Klass)obj;
        return "<Class " + k.getName().asString() + "@" + k.getHandle() + ">";
      }
      if (obj.isSymbol())
      {
        Symbol sym = (Symbol)obj;
        return "<Class " + sym.asString() + ">";
      }
      throw new RuntimeException("should not reach here");
    }
    if (ctag.isMethodHandle())
    {
      Oop x = getCachedConstant();
      int refidx = cpool.getMethodHandleIndexAt(cpIndex);
      int refkind = cpool.getMethodHandleRefKindAt(cpIndex);
      return "<MethodHandle kind=" + Integer.toString(refkind) + " ref=" + Integer.toString(refidx) + (x == null ? "" : new StringBuffer().append(" @").append(x.getHandle()).toString()) + ">";
    }
    if (ctag.isMethodType())
    {
      Oop x = getCachedConstant();
      int refidx = cpool.getMethodTypeIndexAt(cpIndex);
      return "<MethodType " + cpool.getSymbolAt(refidx).asString() + (x == null ? "" : new StringBuffer().append(" @").append(x.getHandle()).toString()) + ">";
    }
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(false, "invalid load constant type");
    }
    return null;
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getJavaBytecodeName());
    buf.append(" ");
    buf.append('#');
    buf.append(Integer.toString(poolIndex()));
    if (hasCacheIndex())
    {
      buf.append('(');
      buf.append(Integer.toString(cacheIndex()));
      buf.append(')');
    }
    buf.append(" ");
    buf.append(getConstantValue());
    if (code() != javaCode())
    {
      buf.append(" ");
      buf.append('[');
      buf.append(getBytecodeName());
      buf.append(']');
    }
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeLoadConstant
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;

public abstract class BytecodeLoadStore
  extends BytecodeWideable
{
  BytecodeLoadStore(Method method, int bci)
  {
    super(method, bci);
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getJavaBytecodeName());
    buf.append(" ");
    buf.append('#');
    buf.append(Integer.toString(getLocalVarIndex()));
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeLoadStore
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeLookupswitch
  extends Bytecode
{
  BytecodeLookupswitch(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int defaultOffset()
  {
    return javaSignedWordAt(alignedOffset(1));
  }
  
  public int numberOfPairs()
  {
    return javaSignedWordAt(alignedOffset(5));
  }
  
  public LookupswitchPair pairAt(int i)
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((0 <= i) && (i < numberOfPairs()), "pair index out of bounds");
    }
    return new LookupswitchPair(method, bci + alignedOffset(1 + (1 + i) * 2 * 4));
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check lookupswitch");
    }
  }
  
  public boolean isValid()
  {
    boolean result = javaCode() == 171;
    if (!result) {
      return false;
    }
    int i = numberOfPairs() - 1;
    while (i-- > 0) {
      if (pairAt(i).match() > pairAt(i + 1).match()) {
        return false;
      }
    }
    return true;
  }
  
  public static BytecodeLookupswitch at(Method method, int bci)
  {
    BytecodeLookupswitch b = new BytecodeLookupswitch(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeLookupswitch atCheck(Method method, int bci)
  {
    BytecodeLookupswitch b = new BytecodeLookupswitch(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeLookupswitch at(BytecodeStream bcs)
  {
    return new BytecodeLookupswitch(bcs.method(), bcs.bci());
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append("lookupswitch");
    buf.append(" ");
    buf.append("default: ");
    buf.append(Integer.toString(bci() + defaultOffset()));
    buf.append(", ");
    int i = numberOfPairs() - 1;
    while (i-- > 0)
    {
      LookupswitchPair pair = pairAt(i);
      buf.append("case ");
      buf.append(Integer.toString(pair.match()));
      buf.append(':');
      buf.append(Integer.toString(bci() + pair.offset()));
      buf.append(", ");
    }
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeLookupswitch
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Klass;
import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeMultiANewArray
  extends BytecodeWithKlass
{
  BytecodeMultiANewArray(Method method, int bci)
  {
    super(method, bci);
  }
  
  public Klass getKlass()
  {
    return super.getKlass();
  }
  
  public int getDimension()
  {
    return 0xFF & javaByteAt(2);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check multianewarray");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 197;
  }
  
  public static BytecodeMultiANewArray at(Method method, int bci)
  {
    BytecodeMultiANewArray b = new BytecodeMultiANewArray(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeMultiANewArray atCheck(Method method, int bci)
  {
    BytecodeMultiANewArray b = new BytecodeMultiANewArray(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeMultiANewArray at(BytecodeStream bcs)
  {
    return new BytecodeMultiANewArray(bcs.method(), bcs.bci());
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(super.toString());
    buf.append(" ");
    buf.append(Integer.toString(getDimension()));
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeMultiANewArray
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.InstanceKlass;
import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeNew
  extends BytecodeWithKlass
{
  BytecodeNew(Method method, int bci)
  {
    super(method, bci);
  }
  
  public InstanceKlass getNewKlass()
  {
    return (InstanceKlass)getKlass();
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check new");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 187;
  }
  
  public static BytecodeNew at(Method method, int bci)
  {
    BytecodeNew b = new BytecodeNew(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeNew atCheck(Method method, int bci)
  {
    BytecodeNew b = new BytecodeNew(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeNew at(BytecodeStream bcs)
  {
    return new BytecodeNew(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeNew
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeNewArray
  extends Bytecode
{
  BytecodeNewArray(Method method, int bci)
  {
    super(method, bci);
  }
  
  public int getType()
  {
    return javaByteAt(1);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check newarray");
    }
  }
  
  public boolean isValid()
  {
    boolean result = javaCode() == 188;
    if (!result) {
      return false;
    }
    switch (getType())
    {
    case 4: 
    case 5: 
    case 6: 
    case 7: 
    case 8: 
    case 9: 
    case 10: 
    case 11: 
      break;
    default: 
      return false;
    }
    return true;
  }
  
  public String getTypeName()
  {
    String result;
    switch (getType())
    {
    case 4: 
      result = "boolean";
      break;
    case 5: 
      result = "char";
      break;
    case 6: 
      result = "float";
      break;
    case 7: 
      result = "double";
      break;
    case 8: 
      result = "byte";
      break;
    case 9: 
      result = "short";
      break;
    case 10: 
      result = "int";
      break;
    case 11: 
      result = "long";
      break;
    default: 
      result = "<invalid>";
    }
    return result;
  }
  
  public static BytecodeNewArray at(Method method, int bci)
  {
    BytecodeNewArray b = new BytecodeNewArray(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeNewArray atCheck(Method method, int bci)
  {
    BytecodeNewArray b = new BytecodeNewArray(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeNewArray at(BytecodeStream bcs)
  {
    return new BytecodeNewArray(bcs.method(), bcs.bci());
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append("newarray");
    buf.append(" ");
    buf.append(getTypeName());
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeNewArray
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodePutField
  extends BytecodeGetPut
{
  BytecodePutField(Method method, int bci)
  {
    super(method, bci);
  }
  
  public boolean isStatic()
  {
    return false;
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check putfield");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 181;
  }
  
  public static BytecodePutField at(Method method, int bci)
  {
    BytecodePutField b = new BytecodePutField(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodePutField atCheck(Method method, int bci)
  {
    BytecodePutField b = new BytecodePutField(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodePutField at(BytecodeStream bcs)
  {
    return new BytecodePutField(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodePutField
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodePutStatic
  extends BytecodeGetPut
{
  BytecodePutStatic(Method method, int bci)
  {
    super(method, bci);
  }
  
  public boolean isStatic()
  {
    return true;
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check putstatic");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 179;
  }
  
  public static BytecodePutStatic at(Method method, int bci)
  {
    BytecodePutStatic b = new BytecodePutStatic(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodePutStatic atCheck(Method method, int bci)
  {
    BytecodePutStatic b = new BytecodePutStatic(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodePutStatic at(BytecodeStream bcs)
  {
    return new BytecodePutStatic(bcs.method(), bcs.bci());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodePutStatic
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import sun.jvm.hotspot.oops.Method;
import sun.jvm.hotspot.utilities.Assert;

public class BytecodeRet
  extends BytecodeWideable
{
  BytecodeRet(Method method, int bci)
  {
    super(method, bci);
  }
  
  public void verify()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(isValid(), "check ret");
    }
  }
  
  public boolean isValid()
  {
    return javaCode() == 169;
  }
  
  public static BytecodeRet at(Method method, int bci)
  {
    BytecodeRet b = new BytecodeRet(method, bci);
    if (Assert.ASSERTS_ENABLED) {
      b.verify();
    }
    return b;
  }
  
  public static BytecodeRet atCheck(Method method, int bci)
  {
    BytecodeRet b = new BytecodeRet(method, bci);
    return b.isValid() ? b : null;
  }
  
  public static BytecodeRet at(BytecodeStream bcs)
  {
    return new BytecodeRet(bcs.method(), bcs.bci());
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append("ret");
    buf.append(" ");
    buf.append('#');
    buf.append(Integer.toString(getLocalVarIndex()));
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.interpreter.BytecodeRet
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.interpreter;

import java.util.Observable;
import java.util.Observer;

final class Bytecodes$1
  implements Observer
{
  public void u
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

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-2019. Infinite Loop Ltd