diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-21 15:33:53 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-21 15:33:53 +0000 |
commit | abb13663a66a4e38613848766fe687c276ec41b6 (patch) | |
tree | 5fa0cc964f6d61e0eb5bd8fc06169c322bd63729 /libjava/java/nio/DirectByteBufferImpl.java | |
parent | 54ec2a40e023563fc136d7084f397706bf8141de (diff) | |
download | ppe42-gcc-abb13663a66a4e38613848766fe687c276ec41b6.tar.gz ppe42-gcc-abb13663a66a4e38613848766fe687c276ec41b6.zip |
2004-04-21 Michael Koch <konqueror@gmx.de>
* java/nio/DirectByteBufferImpl.java
(shiftDown): Made static, give address as argument and
provide a convenience method that overwrites shiftDown in
ByteBufferImpl and calls the native shiftDown.
* java/nio/MappedByteBufferImpl.java
(): Use optimized method in DirectByteBufferImpl.
* java/nio/natDirectByteBufferImpl.cc
(shiftDown): Changed method signature. Removed usage of array_offset.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80967 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/nio/DirectByteBufferImpl.java')
-rw-r--r-- | libjava/java/nio/DirectByteBufferImpl.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libjava/java/nio/DirectByteBufferImpl.java b/libjava/java/nio/DirectByteBufferImpl.java index 7c2b783d7d8..be0fc52c07d 100644 --- a/libjava/java/nio/DirectByteBufferImpl.java +++ b/libjava/java/nio/DirectByteBufferImpl.java @@ -136,15 +136,20 @@ final class DirectByteBufferImpl extends ByteBuffer return this; } - native void shiftDown (int dst_offset, int src_offset, int count); + static native void shiftDown(RawData address, int dst_offset, int src_offset, int count); + void shiftDown(int dst_offset, int src_offset, int count) + { + shiftDown(address, dst_offset, src_offset, count); + } + public ByteBuffer compact () { int pos = position(); if (pos > 0) { int count = remaining(); - shiftDown(0, pos, count); + shiftDown(address, 0, pos, count); position(count); limit(capacity()); } |