Home | History | Annotate | Download | only in instruction

Lines Matching refs:offset

890      * Writes the Instruction at the given offset in the given code attribute.
892 public final void write(CodeAttribute codeAttribute, int offset)
894 write(codeAttribute.code, offset);
899 * Writes the Instruction at the given offset in the given code array.
901 public void write(byte[] code, int offset)
906 code[offset++] = InstructionConstants.OP_WIDE;
910 code[offset++] = opcode;
913 writeInfo(code, offset);
930 protected abstract void readInfo(byte[] code, int offset);
936 protected abstract void writeInfo(byte[] code, int offset);
942 public abstract int length(int offset);
948 public abstract void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, InstructionVisitor instructionVisitor);
952 * Returns a description of the instruction, at the given offset.
954 public String toString(int offset)
956 return "["+offset+"] "+ this.toString();
1010 protected static int readByte(byte[] code, int offset)
1012 return code[offset] & 0xff;
1015 protected static int readShort(byte[] code, int offset)
1017 return ((code[offset++] & 0xff) << 8) |
1018 ( code[offset ] & 0xff );
1021 protected static int readInt(byte[] code, int offset)
1023 return ( code[offset++] << 24) |
1024 ((code[offset++] & 0xff) << 16) |
1025 ((code[offset++] & 0xff) << 8) |
1026 ( code[offset ] & 0xff );
1029 protected static int readValue(byte[] code, int offset, int valueSize)
1034 case 1: return readByte( code, offset);
1035 case 2: return readShort(code, offset);
1036 case 4: return readInt( code, offset);
1041 protected static int readSignedByte(byte[] code, int offset)
1043 return code[offset];
1046 protected static int readSignedShort(byte[] code, int offset)
1048 return (code[offset++] << 8) |
1049 (code[offset ] & 0xff);
1052 protected static int readSignedValue(byte[] code, int offset, int valueSize)
1057 case 1: return readSignedByte( code, offset);
1058 case 2: return readSignedShort(code, offset);
1059 case 4: return readInt( code, offset);
1064 protected static void writeByte(byte[] code, int offset, int value)
1071 code[offset] = (byte)value;
1074 protected static void writeShort(byte[] code, int offset, int value)
1081 code[offset++] = (byte)(value >> 8);
1082 code[offset ] = (byte)(value );
1085 protected static void writeInt(byte[] code, int offset, int value)
1087 code[offset++] = (byte)(value >> 24);
1088 code[offset++] = (byte)(value >> 16);
1089 code[offset++] = (byte)(value >> 8);
1090 code[offset ] = (byte)(value );
1093 protected static void writeValue(byte[] code, int offset, int value, int valueSize)
1098 case 1: writeByte( code, offset, value); break;
1099 case 2: writeShort(code, offset, value); break;
1100 case 4: writeInt( code, offset, value); break;
1105 protected static void writeSignedByte(byte[] code, int offset, int value)
1112 code[offset] = (byte)value;
1115 protected static void writeSignedShort(byte[] code, int offset, int value)
1122 code[offset++] = (byte)(value >> 8);
1123 code[offset ] = (byte)(value );
1126 protected static void writeSignedValue(byte[] code, int offset, int value, int valueSize)
1131 case 1: writeSignedByte( code, offset, value); break;
1132 case 2: writeSignedShort(code, offset, value); break;
1133 case 4: writeInt( code, offset, value); break;