public ByteCode_dup2(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool,int depth) : base(code) { name = "dup2"; size = 1; this.depth = depth; }
public ByteCode_tableswitch(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool, int offset) : base(code) { // there is a 0-3 byte padding based on what the bytecode // offset is so that the default reference will end up // on a 4-byte boundary offset++; // handle bytecode name = "tableswitch"; size = 1; int padCount = (4 - (offset % 4)); if (padCount == 4) { padCount = 0; } for (int i = 0; i < padCount; i++){ reader.ReadByte(); } size += padCount; //if (log.IsDebugEnabled) log.DebugFormat("Read {0} pad characters, offset = {1}",padCount,offset); defaultBranch = (int)reader.ReadUInt32(); //if (log.IsDebugEnabled) log.DebugFormat("Default: {0}/{0:X}",defaultBranch); low = (int)reader.ReadUInt32(); high = (int)reader.ReadUInt32(); //if (log.IsDebugEnabled) log.DebugFormat("{0} offsets ({1}/{1:X},{2}/{2:X})",high - low + 1,high,low); size += 12; int offsetCount = (int)(high - low + 1); offsets = new int[offsetCount]; for (int i = 0; i < offsetCount; i++){ offsets[i] = (int) reader.ReadUInt32(); if (log.IsDebugEnabled) log.DebugFormat("Offset: {0}",offsets[i]); size += 4; } }
public ByteCode_lload(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool,int index) : base(code) { name = "lload_" + index; size = 1; this.index = index; }
public ByteCode_if(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool,string op) : base(code) { name = "if" + op; size = 3; branch = (short)reader.ReadUInt16(); if (op.Equals("null")){ opval = OP_NULL; } else if (op.Equals("nonnull")){ opval = OP_NOTNULL; } else if (op.Equals("eq")){ opval = OP_EQUALS; } else if (op.Equals("ge")){ opval = OP_GE; } else if (op.Equals("gt")){ opval = OP_G; } else if (op.Equals("ne")){ opval = OP_NE; } else if (op.Equals("lt")){ opval = OP_LT; } else if (op.Equals("le")){ opval = OP_LE; } }
int index; // which thing are we loading #endregion Fields #region Constructors public ByteCode_lload(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { size = 2; this.index = reader.ReadByte(); name = "lload " + index; }
public ByteCode_sipush(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "sipush"; value = reader.ReadUInt16(); size = 3; }
public ByteCode_jsr(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "jsr"; size = 3; branch = (short)reader.ReadUInt16(); }
int index; // which thing are we loading #endregion Fields #region Constructors public ByteCode_lstore(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { size = 2; index = reader.ReadByte(); name = "lstore_" + index; }
public ByteCode_bipush(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "bipush"; value = reader.ReadByte(); size = 2; }
public ByteCode_new(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "new"; size = 3; // 2 bytes defining index into operand pool classIndex = reader.ReadUInt16(); classRef = (ConstantPoolInfo_Class)pool[classIndex - 1]; }
public ByteCode_anewarray(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "anewarray"; size = 3; // 2 bytes defining index into operand pool UInt16 fieldIndex = reader.ReadUInt16(); reference = (ConstantPoolInfo_Class)pool[fieldIndex - 1]; }
public ByteCode_fcmp(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool, string op) : base(code) { name = "fcmp"+op; size = 1; if ("l".Equals(op)) { opval = OP_LESS; } if ("g".Equals(op)) { opval = OP_GREATER; } }
public ByteCode_invokespecial(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "invokespecial"; size = 3; // 2 bytes defining index into operand pool UInt16 methodIndex = reader.ReadUInt16(); method = (ConstantPoolInfo_MethodRef)pool[methodIndex - 1]; }
public ByteCode_putstatic(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "putstatic"; size = 3; // 2 bytes defining index into operand pool UInt16 fieldIndex = reader.ReadUInt16(); field = (ConstantPoolInfo_FieldRef)pool[fieldIndex - 1]; }
public ByteCode_pop(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool,int num) : base(code) { name = "pop"; if (num == 2){ name = "pop2"; } size = 1; this.count = num; }
public ByteCode_ldc(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "ldc"; size = 2; byte index = reader.ReadByte(); reference = pool[index - 1]; }
public ByteCode_ldc_w(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "ldc_w"; size = 3; UInt16 index = reader.ReadUInt16(); reference = pool[index - 1]; }
public ByteCode_instanceof(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "instanceof"; size = 3; // 2 bytes defining index into operand pool UInt16 methodIndex = reader.ReadUInt16(); clazz = (ConstantPoolInfo_Class)pool[methodIndex - 1]; className = clazz.getClassName(); }
int index; // which thing are we loading #endregion Fields #region Constructors public ByteCode_iinc(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { size = 3; index = reader.ReadByte(); constant = reader.getReader().ReadSByte(); name = "iinc"; }
public ByteCode_ldc2_w(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "ldc2_w"; size = 3; UInt16 index = reader.ReadUInt16(); // if (log.IsDebugEnabled) log.DebugFormat("Index is {0}",index); reference = pool[index - 1]; }
public ByteCode_invokeinterface(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "invokeinterface"; size = 5; // 2 bytes defining index into operand pool UInt16 methodIndex = reader.ReadUInt16(); reader.ReadByte(); // count - unused reader.ReadByte(); // 0; method = (ConstantPoolInfo_InterfaceMethodRef)pool[methodIndex - 1]; }
public ByteCode_goto(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "goto"; size = 3; UInt16 temp = reader.ReadUInt16(); if ((temp & 0x8000) != 0){ branch = (-65536) + (temp); } else { branch = (int) temp; } }
public ByteCode_if_acmp(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool,string op) : base(code) { name = "if_acmp" + op; size = 3; branch = reader.ReadUInt16(); if (op.Equals("ne")){ opval = OP_NE; } else if (op.Equals("eq")){ opval = OP_EQ; } }
public ByteCode_checkcast(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "checkcast"; size = 3; // 2 bytes defining index into operand pool UInt16 methodIndex = reader.ReadUInt16(); reference = (ConstantPoolInfo_Class)pool[methodIndex - 1]; // check for array type if (reference.getClassName().StartsWith("[L")){ className = reference.getClassName(); // [L...; className = className.Substring(2,className.Length-3); isArray = true; } else { className = reference.getClassName(); } }
public ByteCode_arraylength(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "arraylength"; size = 1; }
public ByteCode_iand(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "iand"; size = 1; }
public ByteCode_dreturn(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "dreturn"; size = 1; }
public ByteCode_monitorexit(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "monitorexit"; size = 1; }
public ByteCode_aconst_null(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "aconst_null"; size = 1; }
public ByteCode_aastore(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool) : base(code) { name = "aastore"; size = 1; }