* Makefile.am: Removed java/io/Replaceable.java and
java/io/Resolvable.java.
* Makefile.in: Rebuilt.
* gcj/javaprims.h: Removed Replaceable and Resolvable from java.io
namespace.
* java/io/ObjectInputStream.java (processResolution): Fixed typo
in method name.
(processResolution): Handle readResolve method via reflection with
removal of Resolvable interface.
* java/io/ObjectOutputStream.java (writeObject): Handle writeReplace
method via reflection with removal of Replaceable interface.
* java/io/Replaceable.java: Removed.
* java/io/Resolvable.java: Removed.
* java/security/Key.java (serialVersionUID): New field.
* java/security/Provider.java (serialVersionUID): New field.
* java/security/interfaces/DSAPrivateKey.java (serialVersionUID):
New field.
* java/security/interfaces/DSAPublicKey.java (serialVersionUID):
New field.
* java/sql/DataTruncation.java (serialVersionUID): New field.
* java/sql/SQLException.java (serialVersionUID): New field.
* java/sql/SQLWarning.java (serialVersionUID): New field.
* java/util/Date.java (serialVersionUID): New field.
(millis): Made transient.
(readObject): New method.
(writeObject): New method.
Serialization mods.
Note: The interfaces java.io.Replaceable and java.io.Resolvable were only
temporary additions to JDK 1.2 beta versions and were not included
in the JDK 1.2 final. The Serialization spec instructs how to deal
with their methods (via reflection).
From-SVN: r36736
2000-09-30 Tom Tromey <tromey@cygnus.com>
* posix-threads.cc (_Jv_CondWait): Check to see if we are
interrupted before modifying the cv's wait set.
From-SVN: r36680
2000-09-30 Hans Boehm <boehm@acm.org>
Bryce McKinlay <bryce@albatross.co.nz>
Implement bitmap descriptor based marking for Boehm GC.
* configure.in: Define JC1GCSPEC. Set it if boehm-gc is used.
* configure: Rebuilt.
* libgcj.spec.in: Pass JC1GCSPEC to jc1.
* include/jvm.h (struct _Jv_VTable): New field `gc_descr'. New inline
method get_finalizer().
(struct _Jv_ArrayVTable): Ditto. Declare method array with
NUM_OBJECT_METHODS elements instead of NUM_OBJECT_METHODS + 1.
(_Jv_AllocObj): Add new jclass parameter.
(_Jv_AllocArray): Ditto.
(_Jv_BuildGCDescr): New prototype.
* prims.cc (_Jv_AllocObject): Rename parameter `c' to `klass'. Pass
`klass' to _Jv_AllocObj. Don't set the new object's vtable. Use
get_finalizer() instead of direct finalizer vtable offset.
(_Jv_NewObjectArray): Rename parameter `clas' to `klass'. Pass
`klass' to _Jv_AllocArray. Don't set the new array's vtable.
(_Jv_NewPrimArray): Call _Jv_FindArrayClass before _Jv_AllocObj.
Pass `klass' to _Jv_AllocObj. Don't set the new array's vtable.
* resolve.cc (METHOD_NOT_THERE, METHOD_INACCESSIBLE): New #defines.
(_Jv_ResolvePoolEntry): Use METHOD_NOT_THERE and METHOD_INACCESSIBLE.
(_Jv_DetermineVTableIndex): Ditto.
(_Jv_PrepareClass): Ditto. Remove offset-by-one adjustments from vtable
calculations to account for new gc_descr field.
* boehm.cc: #include gc_gcj.h.
(obj_kind_x, obj_free_list): `#if 0'-ed away.
(_Jv_MarkObj): Check that vtable doesn't point to a cleared object.
New commentary from HB. Mark the classes vtable.
(_Jv_MarkArray): Check that vtable doesn't point to a cleared object.
(GC_DEFAULT_DESCR): New #define.
(_Jv_BuildGCDescr): New function. Use GC_DEFAULT_DESCR, for now.
(_Jv_AllocObj): New parameter `klass'. Use GC_GCJ_MALLOC ().
(_Jv_AllocArray): New parameter `klass'. Allocate with GC_MALLOC and
scan conservativly if size is less than min_heap_addr. Set vtable
pointer of new object before returning.
(_Jv_AllocBytes): Use GC_MALLOC_ATOMIC, not GC_GENERIC_MALLOC.
(_Jv_InitGC): Call GC_init_gcj_malloc(). Don't set up marking and
allocation for obj_kind_x.
* nogc.cc (_Jv_BuildGCDescr): New function. Return 0.
(_Jv_AllocObj): Set vtable on returned object.
(_Jv_AllocArray): Ditto.
* java/lang/Class.h (_Jv_NewObjectArray): No longer a friend.
(_Jv_NewPrimArray): Ditto.
(_Jv_AllocObj): Declare as a friend.
(_Jv_AllocArray): Ditto.
* java/lang/natClassLoader.cc (_Jv_FindArrayClass): Copy gc_descr
from &ObjectClass into new array class. Remove offset-by-one
adjustments from `method' size calculations to account for gc_descr
field.
Co-Authored-By: Bryce McKinlay <bryce@albatross.co.nz>
From-SVN: r36679
* defineclass.cc: Include alloca.h only if HAVE_ALLOCA_H.
* java/lang/natDouble.cc: Likewise.
* java/lang/reflect/natMethod.cc: Likewise.
* interpret.cc: Likewise. Fix NULLCHECKs that tested a _Jv_word.
From-SVN: r36404
2000-09-13 Alexandre Oliva <aoliva@redhat.com>
* configure.in (LIBDATASTARTSPEC): Use `%s' to search for
libgcjdata.a.
(GCJ): Support single-tree builds. Add -B`pwd`/ and -I$srcdir.
* acinclude.m4: Arrange for automake to not bring in a new
libtool.m4 for LT_AC_PROG_GCJ. AC_SUBST GCJ.
* Makefile.am: Leave it up to automake to subst GCJ.
* aclocal.m4, configure, Makefile.in: Rebuilt.
From-SVN: r36392
* java/lang/reflect/natArray.cc (BooleanClass): New define.
(get): Ensure Boolean class is initialized.
* java/lang/reflect/natField.cc (BooleanClass): New define.
(get): Ensure Boolean class is initialized.
From-SVN: r36391
2000-09-13 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/String.java (CASE_INSENSITIVE_ORDER): New static field.
Initialize with anonymous class.
(compareToIgnoreCase): New method.
* java/lang/ThreadGroup.java (had_uncaught_exception): New field.
(uncaughtException): Set had_uncaught_exception.
* prims.cc (JvRunMain): Check value of had_uncaught_exception and
exit with error status if set.
(_Jv_RunMain): Ditto.
From-SVN: r36385
* gnu/gcj/convert/BytesToUnicode.java (getDefaultDecoder): Let
default decoder use iconv.
* gnu/gcj/convert/UnicodeToBytes.java (getDefaultEncoder):
Let default encoder use iconv.
* configure: Rebuilt.
* configure.in: Check for nl_langinfo and <langinfo.h>.
* java/lang/natSystem.cc (file_encoding): New function.
(DEFAULT_FILE_ENCODING): Define to file_encoding() if possible.
From-SVN: r36306
2000-09-06 Jeff Sturm <jeff.sturm@appnet.com>
* include/jvm.h (_Jv_HashCode): Cast object ptr to `unsigned long'
to avoid long long division.
From-SVN: r36215
* java/lang/reflect/Constructor.java (toString): Use `getName' for
parameter types.
* java/lang/reflect/Method.java (toString): Use `getName' for
return type.
From-SVN: r36214
* java/lang/natPosixProcess.cc (fail): New function.
(cleanup): New function.
(startProcess): Use them. Create pipe so child can communicate
exec failure back to parent.
From-SVN: r36202
Fix for PR java.io/203:
* java/io/File.java (createTempFile): Obey directory argument.
Use java.io.tmpdir if needed. Don't leave FileDescripators open.
* java/lang/natSystem.cc (init_properties): Use TMPDIR environment
variable to set java.io.tmpdir on non-WIN32 systems.
From-SVN: r36143
2000-09-01 Andrew Haley <aph@redhat.com>
* java/io/StreamTokenizer.java: Don't throw a
NumberFormatException if a field is numeric as far as the
StreamTokenizer is concerned but not as far as Double.valueOf() is
concerned: return a zero instead.
For gcj/141.
From-SVN: r36100
* java/util/zip/ZipFile.java: Implement OPEN_DELETE mode, new constructor,
close can delete the file, finalize calls close.
* java/util/jar/JarFile.java: Constructor that takes mode now calls super.
From-SVN: r36007
2000-08-26 Anthony Green <green@redhat.com>
* Makefile.in: Rebuilt.
* Makefile.am (java/lang/ClassLoader.h): Make _Jv_RunMain a
friend.
* prims.cc: Include ClassLoader.h.
(_Jv_RunMain): When executing jar files, classpath must be the jar
file only. Lose our reference to the system ClassLoader in order
to get a new one with the correct classpath.
* java/lang/natSystem.cc (init_properties): When executing a jar
file, only use the jar file for java.class.path.
* gnu/gcj/runtime/VMClassLoader.java: Use the canonical file name
for bytecode archives.
* gnu/gcj/runtime/FirstThread.java: Handle case where manifest
exists, but not Main-Class.
From-SVN: r35999
2000-08-21 Mark Wielaard <mark@klomp.org>
* Makefile.in: Rebuilt.
* Makefile.am (java/lang/reflect/Constructor.h): Declare Class as
a `friend class'.
(java/lang/reflect/Field.h): Likewise.
(java/lang/reflect/Method.h): Likewise.
(gnu/gcj/runtime/VMClassLoader.h): Declare ClassLoader as a
`friend class'.
From-SVN: r35863
2000-08-20 Mark Wielaard <mark@klomp.org>
* java/util/zip/Adler32.java: Make private variables really private
* java/util/zip/CRC32.java: Make private variables really private
* java/util/zip/CheckedInputStream.java: skip() could skip to much bytes
* java/util/zip/InflaterInputStream.java: skip() could skip to much bytes
* java/util/zip/ZipEntry.java: setCompressedSize() didn't check input
* java/util/zip/ZipFile.java: size() new 1.2 method
* java/util/zip/ZipInputStream.java: Use createZipEntry not new ZipEntry.
since 1.2 available() always returns just 1 or 0 when closed
From-SVN: r35826