[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: nio cleanup
Kaffe CVS
cvs-commits at kaffe.org
Sat Jan 8 13:54:53 PST 2005
PatchSet 5819
Date: 2005/01/08 21:50:14
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: nio cleanup
Members:
ChangeLog:1.3363->1.3364
libraries/javalib/java/nio/Buffer.java:1.10->1.11
libraries/javalib/java/nio/CharViewBufferImpl.java:1.4->1.5
libraries/javalib/java/nio/DirectByteBufferImpl.java:1.13->1.14
libraries/javalib/java/nio/DoubleViewBufferImpl.java:1.5->1.6
libraries/javalib/java/nio/FloatViewBufferImpl.java:1.5->1.6
libraries/javalib/java/nio/IntViewBufferImpl.java:1.5->1.6
libraries/javalib/java/nio/LongViewBufferImpl.java:1.5->1.6
libraries/javalib/java/nio/MappedByteBufferImpl.java:1.11->1.12
libraries/javalib/java/nio/ShortViewBufferImpl.java:1.5->1.6
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3363 kaffe/ChangeLog:1.3364
--- kaffe/ChangeLog:1.3363 Sat Jan 8 21:26:21 2005
+++ kaffe/ChangeLog Sat Jan 8 21:50:14 2005
@@ -1,6 +1,23 @@
2005-01-08 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
+
+ 2005-01-07 Michael Koch <konqueror at gmx.de>
+
+ * java/nio/Buffer.java (address): New field.
+ * java/nio/DirectByteBufferImpl.java (address): Removed.
+ * java/nio/MappedByteBufferImpl.java (address): Likewise..
+ * java/nio/CharViewBufferImpl.java (CharViewBufferImpl): Explicitely
+ initialize Buffer.address if needed.
+ * java/nio/DoubleViewBufferImpl.java (DoubleViewBufferImpl): Likewise.
+ * java/nio/FloatViewBufferImpl.java (FloatViewBufferImpl): Likewise.
+ * java/nio/IntViewBufferImpl.java (IntViewBufferImpl): Likewise.
+ * java/nio/LongViewBufferImpl.java (LongViewBufferImpl): Likewise.
+ * java/nio/ShortViewBufferImpl.java (ShortViewBufferImpl): Likewise.
+
+2005-01-08 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
2005-01-07 Olga Rodimina <rodimina at redhat.com>
Index: kaffe/libraries/javalib/java/nio/Buffer.java
diff -u kaffe/libraries/javalib/java/nio/Buffer.java:1.10 kaffe/libraries/javalib/java/nio/Buffer.java:1.11
--- kaffe/libraries/javalib/java/nio/Buffer.java:1.10 Sun Oct 24 17:20:09 2004
+++ kaffe/libraries/javalib/java/nio/Buffer.java Sat Jan 8 21:50:16 2005
@@ -38,12 +38,18 @@
package java.nio;
+import gnu.classpath.RawData;
+
+/**
+ * @since 1.4
+ */
public abstract class Buffer
{
int cap = 0;
int limit = 0;
int pos = 0;
int mark = -1;
+ RawData address;
/**
* Creates a new Buffer.
Index: kaffe/libraries/javalib/java/nio/CharViewBufferImpl.java
diff -u kaffe/libraries/javalib/java/nio/CharViewBufferImpl.java:1.4 kaffe/libraries/javalib/java/nio/CharViewBufferImpl.java:1.5
--- kaffe/libraries/javalib/java/nio/CharViewBufferImpl.java:1.4 Wed Jan 5 23:09:53 2005
+++ kaffe/libraries/javalib/java/nio/CharViewBufferImpl.java Sat Jan 8 21:50:16 2005
@@ -53,6 +53,8 @@
this.offset = bb.position();
this.readOnly = bb.isReadOnly();
this.endian = bb.order();
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
public CharViewBufferImpl (ByteBuffer bb, int offset, int capacity,
@@ -64,6 +66,8 @@
this.offset = offset;
this.readOnly = readOnly;
this.endian = endian;
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
/**
Index: kaffe/libraries/javalib/java/nio/DirectByteBufferImpl.java
diff -u kaffe/libraries/javalib/java/nio/DirectByteBufferImpl.java:1.13 kaffe/libraries/javalib/java/nio/DirectByteBufferImpl.java:1.14
--- kaffe/libraries/javalib/java/nio/DirectByteBufferImpl.java:1.13 Wed Jan 5 23:09:53 2005
+++ kaffe/libraries/javalib/java/nio/DirectByteBufferImpl.java Sat Jan 8 21:50:16 2005
@@ -56,8 +56,6 @@
* memory and should free it.
*/
private final Object owner;
-
- final RawData address;
static final class ReadOnly extends DirectByteBufferImpl
{
Index: kaffe/libraries/javalib/java/nio/DoubleViewBufferImpl.java
diff -u kaffe/libraries/javalib/java/nio/DoubleViewBufferImpl.java:1.5 kaffe/libraries/javalib/java/nio/DoubleViewBufferImpl.java:1.6
--- kaffe/libraries/javalib/java/nio/DoubleViewBufferImpl.java:1.5 Wed Jan 5 23:09:53 2005
+++ kaffe/libraries/javalib/java/nio/DoubleViewBufferImpl.java Sat Jan 8 21:50:16 2005
@@ -53,6 +53,8 @@
this.offset = bb.position();
this.readOnly = bb.isReadOnly();
this.endian = bb.order();
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
public DoubleViewBufferImpl (ByteBuffer bb, int offset, int capacity,
@@ -64,6 +66,8 @@
this.offset = offset;
this.readOnly = readOnly;
this.endian = endian;
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
/**
Index: kaffe/libraries/javalib/java/nio/FloatViewBufferImpl.java
diff -u kaffe/libraries/javalib/java/nio/FloatViewBufferImpl.java:1.5 kaffe/libraries/javalib/java/nio/FloatViewBufferImpl.java:1.6
--- kaffe/libraries/javalib/java/nio/FloatViewBufferImpl.java:1.5 Wed Jan 5 23:09:53 2005
+++ kaffe/libraries/javalib/java/nio/FloatViewBufferImpl.java Sat Jan 8 21:50:16 2005
@@ -53,6 +53,8 @@
this.offset = bb.position();
this.readOnly = bb.isReadOnly();
this.endian = bb.order();
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
public FloatViewBufferImpl (ByteBuffer bb, int offset, int capacity,
@@ -64,6 +66,8 @@
this.offset = offset;
this.readOnly = readOnly;
this.endian = endian;
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
/**
Index: kaffe/libraries/javalib/java/nio/IntViewBufferImpl.java
diff -u kaffe/libraries/javalib/java/nio/IntViewBufferImpl.java:1.5 kaffe/libraries/javalib/java/nio/IntViewBufferImpl.java:1.6
--- kaffe/libraries/javalib/java/nio/IntViewBufferImpl.java:1.5 Wed Jan 5 23:09:53 2005
+++ kaffe/libraries/javalib/java/nio/IntViewBufferImpl.java Sat Jan 8 21:50:16 2005
@@ -53,6 +53,8 @@
this.offset = bb.position();
this.readOnly = bb.isReadOnly();
this.endian = bb.order();
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
public IntViewBufferImpl (ByteBuffer bb, int offset, int capacity,
@@ -64,6 +66,8 @@
this.offset = offset;
this.readOnly = readOnly;
this.endian = endian;
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
/**
Index: kaffe/libraries/javalib/java/nio/LongViewBufferImpl.java
diff -u kaffe/libraries/javalib/java/nio/LongViewBufferImpl.java:1.5 kaffe/libraries/javalib/java/nio/LongViewBufferImpl.java:1.6
--- kaffe/libraries/javalib/java/nio/LongViewBufferImpl.java:1.5 Wed Jan 5 23:09:53 2005
+++ kaffe/libraries/javalib/java/nio/LongViewBufferImpl.java Sat Jan 8 21:50:16 2005
@@ -53,6 +53,8 @@
this.offset = bb.position();
this.readOnly = bb.isReadOnly();
this.endian = bb.order();
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
public LongViewBufferImpl (ByteBuffer bb, int offset, int capacity,
@@ -64,6 +66,8 @@
this.offset = offset;
this.readOnly = readOnly;
this.endian = endian;
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
/**
Index: kaffe/libraries/javalib/java/nio/MappedByteBufferImpl.java
diff -u kaffe/libraries/javalib/java/nio/MappedByteBufferImpl.java:1.11 kaffe/libraries/javalib/java/nio/MappedByteBufferImpl.java:1.12
--- kaffe/libraries/javalib/java/nio/MappedByteBufferImpl.java:1.11 Wed Jan 5 23:09:53 2005
+++ kaffe/libraries/javalib/java/nio/MappedByteBufferImpl.java Sat Jan 8 21:50:16 2005
@@ -45,7 +45,6 @@
final class MappedByteBufferImpl extends MappedByteBuffer
{
boolean readOnly;
- RawData address;
/** Posix uses this for the pointer returned by mmap;
* Win32 uses it for the pointer returned by MapViewOfFile. */
Index: kaffe/libraries/javalib/java/nio/ShortViewBufferImpl.java
diff -u kaffe/libraries/javalib/java/nio/ShortViewBufferImpl.java:1.5 kaffe/libraries/javalib/java/nio/ShortViewBufferImpl.java:1.6
--- kaffe/libraries/javalib/java/nio/ShortViewBufferImpl.java:1.5 Wed Jan 5 23:09:53 2005
+++ kaffe/libraries/javalib/java/nio/ShortViewBufferImpl.java Sat Jan 8 21:50:16 2005
@@ -53,6 +53,8 @@
this.offset = bb.position();
this.readOnly = bb.isReadOnly();
this.endian = bb.order();
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
public ShortViewBufferImpl (ByteBuffer bb, int offset, int capacity,
@@ -64,6 +66,8 @@
this.offset = offset;
this.readOnly = readOnly;
this.endian = endian;
+ if (bb.isDirect())
+ this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
}
/**
More information about the kaffe
mailing list