From 760960a544d20804497eb85def4145fe3c28f497 Mon Sep 17 00:00:00 2001 From: gary Date: Wed, 17 Jan 2007 17:02:48 +0000 Subject: 2007-01-17 Gary Benson * java/nio/natVMDirectByteBufferImpl.cc: Renamed from java/nio/natDirectByteBufferImpl.cc. * Makefile.am: Reflect the above. * Makefile.in: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120859 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 7 +++ libjava/Makefile.am | 2 +- libjava/Makefile.in | 14 +++--- libjava/java/nio/natDirectByteBufferImpl.cc | 72 --------------------------- libjava/java/nio/natVMDirectByteBufferImpl.cc | 72 +++++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 80 deletions(-) delete mode 100644 libjava/java/nio/natDirectByteBufferImpl.cc create mode 100644 libjava/java/nio/natVMDirectByteBufferImpl.cc (limited to 'libjava') diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e2ba835c48f..64bdf4b9355 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2007-01-17 Gary Benson + + * java/nio/natVMDirectByteBufferImpl.cc: + Renamed from java/nio/natDirectByteBufferImpl.cc. + * Makefile.am: Reflect the above. + * Makefile.in: Rebuilt. + 2007-01-17 Marco Trudel * jvmti.cc (_Jv_JVMTI_GetAllThreads): Now static. Use JNICALL. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index a8b2fffc255..d95dc344638 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -871,7 +871,7 @@ java/net/natVMInetAddress.cc \ java/net/natVMNetworkInterface.cc \ java/net/natVMURLConnection.cc \ java/nio/channels/natVMChannels.cc \ -java/nio/natDirectByteBufferImpl.cc \ +java/nio/natVMDirectByteBufferImpl.cc \ java/security/natVMAccessController.cc \ java/security/natVMAccessControlState.cc \ java/text/natCollator.cc \ diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 78013d50100..b27d0809688 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -329,7 +329,7 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc jvmti.cc exception.cc \ java/net/natVMNetworkInterface.cc \ java/net/natVMURLConnection.cc \ java/nio/channels/natVMChannels.cc \ - java/nio/natDirectByteBufferImpl.cc \ + java/nio/natVMDirectByteBufferImpl.cc \ java/security/natVMAccessController.cc \ java/security/natVMAccessControlState.cc \ java/text/natCollator.cc java/util/natVMTimeZone.cc \ @@ -392,7 +392,7 @@ am__objects_2 = gnu/classpath/jdwp/natVMFrame.lo \ java/net/natVMNetworkInterface.lo \ java/net/natVMURLConnection.lo \ java/nio/channels/natVMChannels.lo \ - java/nio/natDirectByteBufferImpl.lo \ + java/nio/natVMDirectByteBufferImpl.lo \ java/security/natVMAccessController.lo \ java/security/natVMAccessControlState.lo \ java/text/natCollator.lo java/util/natVMTimeZone.lo \ @@ -7955,7 +7955,7 @@ java/net/natVMInetAddress.cc \ java/net/natVMNetworkInterface.cc \ java/net/natVMURLConnection.cc \ java/nio/channels/natVMChannels.cc \ -java/nio/natDirectByteBufferImpl.cc \ +java/nio/natVMDirectByteBufferImpl.cc \ java/security/natVMAccessController.cc \ java/security/natVMAccessControlState.cc \ java/text/natCollator.cc \ @@ -8513,7 +8513,7 @@ java/nio/$(am__dirstamp): java/nio/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) java/nio/$(DEPDIR) @: > java/nio/$(DEPDIR)/$(am__dirstamp) -java/nio/natDirectByteBufferImpl.lo: java/nio/$(am__dirstamp) \ +java/nio/natVMDirectByteBufferImpl.lo: java/nio/$(am__dirstamp) \ java/nio/$(DEPDIR)/$(am__dirstamp) java/security/$(am__dirstamp): @$(mkdir_p) java/security @@ -8924,8 +8924,8 @@ mostlyclean-compile: -rm -f java/net/natVMURLConnection.lo -rm -f java/nio/channels/natVMChannels.$(OBJEXT) -rm -f java/nio/channels/natVMChannels.lo - -rm -f java/nio/natDirectByteBufferImpl.$(OBJEXT) - -rm -f java/nio/natDirectByteBufferImpl.lo + -rm -f java/nio/natVMDirectByteBufferImpl.$(OBJEXT) + -rm -f java/nio/natVMDirectByteBufferImpl.lo -rm -f java/security/natVMAccessControlState.$(OBJEXT) -rm -f java/security/natVMAccessControlState.lo -rm -f java/security/natVMAccessController.$(OBJEXT) @@ -9063,7 +9063,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@java/net/$(DEPDIR)/natVMInetAddress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/net/$(DEPDIR)/natVMNetworkInterface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/net/$(DEPDIR)/natVMURLConnection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@java/nio/$(DEPDIR)/natDirectByteBufferImpl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@java/nio/$(DEPDIR)/natVMDirectByteBufferImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/nio/channels/$(DEPDIR)/natVMChannels.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/security/$(DEPDIR)/natVMAccessControlState.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/security/$(DEPDIR)/natVMAccessController.Plo@am__quote@ diff --git a/libjava/java/nio/natDirectByteBufferImpl.cc b/libjava/java/nio/natDirectByteBufferImpl.cc deleted file mode 100644 index 3119fdea3e6..00000000000 --- a/libjava/java/nio/natDirectByteBufferImpl.cc +++ /dev/null @@ -1,72 +0,0 @@ -// natDirectByteBufferImpl.cc - -/* Copyright (C) 2003, 2004 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#include - -#include -#include - -#include - -#include -#include - -using gnu::gcj::RawData; - -RawData* -java::nio::VMDirectByteBuffer::allocate (jint capacity) -{ - return reinterpret_cast (::malloc (capacity)); -} - -void -java::nio::VMDirectByteBuffer::free (gnu::gcj::RawData* address) -{ - ::free (reinterpret_cast (address)); -} - -jbyte -java::nio::VMDirectByteBuffer::get (RawData* address, jint index) -{ - jbyte* pointer = reinterpret_cast (address) + index; - return *pointer; -} - -void -java::nio::VMDirectByteBuffer::get (RawData* address, jint index, - jbyteArray dst, jint offset, jint length) -{ - jbyte* src = reinterpret_cast (address) + index; - memcpy (elements (dst) + offset, src, length); -} - -void -java::nio::VMDirectByteBuffer::put (gnu::gcj::RawData* address, - jint index, jbyte value) -{ - jbyte* pointer = reinterpret_cast (address) + index; - *pointer = value; -} - -RawData* -java::nio::VMDirectByteBuffer::adjustAddress (RawData* address, jint offset) -{ - jbyte* start = reinterpret_cast (address) + offset; - return reinterpret_cast(start); -} - -void -java::nio::VMDirectByteBuffer::shiftDown (RawData* address, jint dst_offset, - jint src_offset, jint count) -{ - jbyte* dst = reinterpret_cast (address) + dst_offset; - jbyte* src = reinterpret_cast (address) + src_offset; - ::memmove(dst, src, count); -} diff --git a/libjava/java/nio/natVMDirectByteBufferImpl.cc b/libjava/java/nio/natVMDirectByteBufferImpl.cc new file mode 100644 index 00000000000..3119fdea3e6 --- /dev/null +++ b/libjava/java/nio/natVMDirectByteBufferImpl.cc @@ -0,0 +1,72 @@ +// natDirectByteBufferImpl.cc + +/* Copyright (C) 2003, 2004 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#include + +#include +#include + +#include + +#include +#include + +using gnu::gcj::RawData; + +RawData* +java::nio::VMDirectByteBuffer::allocate (jint capacity) +{ + return reinterpret_cast (::malloc (capacity)); +} + +void +java::nio::VMDirectByteBuffer::free (gnu::gcj::RawData* address) +{ + ::free (reinterpret_cast (address)); +} + +jbyte +java::nio::VMDirectByteBuffer::get (RawData* address, jint index) +{ + jbyte* pointer = reinterpret_cast (address) + index; + return *pointer; +} + +void +java::nio::VMDirectByteBuffer::get (RawData* address, jint index, + jbyteArray dst, jint offset, jint length) +{ + jbyte* src = reinterpret_cast (address) + index; + memcpy (elements (dst) + offset, src, length); +} + +void +java::nio::VMDirectByteBuffer::put (gnu::gcj::RawData* address, + jint index, jbyte value) +{ + jbyte* pointer = reinterpret_cast (address) + index; + *pointer = value; +} + +RawData* +java::nio::VMDirectByteBuffer::adjustAddress (RawData* address, jint offset) +{ + jbyte* start = reinterpret_cast (address) + offset; + return reinterpret_cast(start); +} + +void +java::nio::VMDirectByteBuffer::shiftDown (RawData* address, jint dst_offset, + jint src_offset, jint count) +{ + jbyte* dst = reinterpret_cast (address) + dst_offset; + jbyte* src = reinterpret_cast (address) + src_offset; + ::memmove(dst, src, count); +} -- cgit v1.2.1