Lines Matching refs:code

682      * Writes the Instruction at the given offset in the given code attribute.
686 write(codeAttribute.code, offset);
691 * Writes the Instruction at the given offset in the given code array.
693 public void write(byte[] code, int offset)
698 code[offset++] = InstructionConstants.OP_WIDE;
702 code[offset++] = opcode;
705 writeInfo(code, offset);
722 protected abstract void readInfo(byte[] code, int offset);
728 protected abstract void writeInfo(byte[] code, int offset);
793 protected static int readByte(byte[] code, int offset)
795 return code[offset] & 0xff;
798 protected static int readShort(byte[] code, int offset)
800 return ((code[offset++] & 0xff) << 8) |
801 ( code[offset ] & 0xff );
804 protected static int readInt(byte[] code, int offset)
806 return ( code[offset++] << 24) |
807 ((code[offset++] & 0xff) << 16) |
808 ((code[offset++] & 0xff) << 8) |
809 ( code[offset ] & 0xff );
812 protected static int readValue(byte[] code, int offset, int valueSize)
817 case 1: return readByte( code, offset);
818 case 2: return readShort(code, offset);
819 case 4: return readInt( code, offset);
824 protected static int readSignedByte(byte[] code, int offset)
826 return code[offset];
829 protected static int readSignedShort(byte[] code, int offset)
831 return (code[offset++] << 8) |
832 (code[offset ] & 0xff);
835 protected static int readSignedValue(byte[] code, int offset, int valueSize)
840 case 1: return readSignedByte( code, offset);
841 case 2: return readSignedShort(code, offset);
842 case 4: return readInt( code, offset);
847 protected static void writeByte(byte[] code, int offset, int value)
854 code[offset] = (byte)value;
857 protected static void writeShort(byte[] code, int offset, int value)
864 code[offset++] = (byte)(value >> 8);
865 code[offset ] = (byte)(value );
868 protected static void writeInt(byte[] code, int offset, int value)
870 code[offset++] = (byte)(value >> 24);
871 code[offset++] = (byte)(value >> 16);
872 code[offset++] = (byte)(value >> 8);
873 code[offset ] = (byte)(value );
876 protected static void writeValue(byte[] code, int offset, int value, int valueSize)
881 case 1: writeByte( code, offset, value); break;
882 case 2: writeShort(code, offset, value); break;
883 case 4: writeInt( code, offset, value); break;
888 protected static void writeSignedByte(byte[] code, int offset, int value)
895 code[offset] = (byte)value;
898 protected static void writeSignedShort(byte[] code, int offset, int value)
905 code[offset++] = (byte)(value >> 8);
906 code[offset ] = (byte)(value );
909 protected static void writeSignedValue(byte[] code, int offset, int value, int valueSize)
914 case 1: writeSignedByte( code, offset, value); break;
915 case 2: writeSignedShort(code, offset, value); break;
916 case 4: writeInt( code, offset, value); break;