mirror of git://gcc.gnu.org/git/gcc.git
2004-11-24 Michael Koch <konqueror@gmx.de>
* java/nio/DirectByteBufferImpl.java (ReadWrite.ReadWrite): New constructor. (DirectByteBufferImpl): Likewise. * jni.cc (_Jv_JNI_NewDirectByteBuffer): Use DirectByteBufferImpl.ReadWrite. * Makefile.am: Generate java/nio/DirectByteBufferImpl$ReadWrite.h. * Makefile.in: Rgenerated. From-SVN: r91150
This commit is contained in:
parent
16df8078b8
commit
7ef527365f
|
@ -1,3 +1,14 @@
|
|||
2004-11-24 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/nio/DirectByteBufferImpl.java
|
||||
(ReadWrite.ReadWrite): New constructor.
|
||||
(DirectByteBufferImpl): Likewise.
|
||||
* jni.cc (_Jv_JNI_NewDirectByteBuffer):
|
||||
Use DirectByteBufferImpl.ReadWrite.
|
||||
* Makefile.am:
|
||||
Generate java/nio/DirectByteBufferImpl$ReadWrite.h.
|
||||
* Makefile.in: Rgenerated.
|
||||
|
||||
2004-11-24 Jeroen Frijters <address@bogus.example.com>
|
||||
|
||||
* java/nio/DirectByteBufferImpl.java
|
||||
|
|
|
@ -621,6 +621,7 @@ ordinary_nat_headers = $(ordinary_java_source_files:.java=.h) \
|
|||
|
||||
inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
|
||||
java/io/ObjectInputStream$$GetField.h \
|
||||
java/nio/DirectByteBufferImpl$$ReadWrite.h \
|
||||
java/nio/channels/Pipe$$SinkChannel.h \
|
||||
java/nio/channels/Pipe$$SourceChannel.h \
|
||||
java/lang/reflect/Proxy$$ProxyData.h \
|
||||
|
@ -736,6 +737,10 @@ java/io/ObjectOutputStream$$PutField.h: java/io/ObjectOutputStream.class
|
|||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
'java/io/ObjectOutputStream$$PutField'
|
||||
|
||||
java/nio/DirectByteBufferImpl$$ReadWrite.h: java/nio/DirectByteBufferImpl.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
'java/nio/DirectByteBufferImpl$$ReadWrite'
|
||||
|
||||
java/nio/channels/Pipe$$SinkChannel.h: java/nio/channels/Pipe.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
'java/nio/channels/Pipe$$SinkChannel'
|
||||
|
@ -806,6 +811,8 @@ install-data-local:
|
|||
$(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(includedir)/gnu/java/net/
|
||||
$(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(includedir)/gnu/java/nio/
|
||||
$(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(includedir)/gnu/java/nio/
|
||||
## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
|
||||
|
||||
|
||||
## ################################################################
|
||||
|
||||
|
|
|
@ -4818,6 +4818,7 @@ ordinary_nat_headers = $(ordinary_java_source_files:.java=.h) \
|
|||
|
||||
inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
|
||||
java/io/ObjectInputStream$$GetField.h \
|
||||
java/nio/DirectByteBufferImpl$$ReadWrite.h \
|
||||
java/nio/channels/Pipe$$SinkChannel.h \
|
||||
java/nio/channels/Pipe$$SourceChannel.h \
|
||||
java/lang/reflect/Proxy$$ProxyData.h \
|
||||
|
@ -23907,6 +23908,10 @@ java/io/ObjectOutputStream$$PutField.h: java/io/ObjectOutputStream.class
|
|||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
'java/io/ObjectOutputStream$$PutField'
|
||||
|
||||
java/nio/DirectByteBufferImpl$$ReadWrite.h: java/nio/DirectByteBufferImpl.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
'java/nio/DirectByteBufferImpl$$ReadWrite'
|
||||
|
||||
java/nio/channels/Pipe$$SinkChannel.h: java/nio/channels/Pipe.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
'java/nio/channels/Pipe$$SinkChannel'
|
||||
|
|
|
@ -89,6 +89,11 @@ abstract class DirectByteBufferImpl extends ByteBuffer
|
|||
super(capacity);
|
||||
}
|
||||
|
||||
ReadWrite(RawData address, int capacity)
|
||||
{
|
||||
super(address, capacity);
|
||||
}
|
||||
|
||||
ReadWrite(Object owner, RawData address,
|
||||
int capacity, int limit,
|
||||
int position)
|
||||
|
@ -109,6 +114,13 @@ abstract class DirectByteBufferImpl extends ByteBuffer
|
|||
this.address = VMDirectByteBuffer.allocate(capacity);
|
||||
}
|
||||
|
||||
DirectByteBufferImpl(RawData address, int capacity)
|
||||
{
|
||||
super(capacity, capacity, 0, -1);
|
||||
this.owner = this;
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
DirectByteBufferImpl(Object owner, RawData address,
|
||||
int capacity, int limit,
|
||||
int position)
|
||||
|
|
|
@ -42,6 +42,7 @@ details. */
|
|||
#include <java/lang/Thread.h>
|
||||
#include <java/lang/IllegalAccessError.h>
|
||||
#include <java/nio/DirectByteBufferImpl.h>
|
||||
#include <java/nio/DirectByteBufferImpl$ReadWrite.h>
|
||||
#include <java/util/IdentityHashMap.h>
|
||||
#include <gnu/gcj/RawData.h>
|
||||
|
||||
|
@ -1723,8 +1724,8 @@ _Jv_JNI_NewDirectByteBuffer (JNIEnv *, void *address, jlong length)
|
|||
{
|
||||
using namespace gnu::gcj;
|
||||
using namespace java::nio;
|
||||
return new DirectByteBufferImpl (reinterpret_cast<RawData *> (address),
|
||||
length);
|
||||
return new DirectByteBufferImpl$ReadWrite
|
||||
(reinterpret_cast<RawData *> (address), length);
|
||||
}
|
||||
|
||||
static void * JNICALL
|
||||
|
|
Loading…
Reference in New Issue