* exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit
of catch_type.
* java/lang/natClass.cc (initializeClass): Link vtable, otable,
idt tables after initializing superclass.
* java/lang/natClassLoader.cc (uaddr): New typedef.
(_Jv_PrepareCompiledClass): Resolve superclass, interfaces
if they are constant pool indicies. Don't link vtable, otable yet.
From-SVN: r60450
2002-12-21 Anthony Green <green@redhat.com>
* Makefile.am: Move org.xml.sax and org.w3c.dom into their own
libraries.
* Makefile.in: Rebuilt.
From-SVN: r60410
2002-12-19 Andrew Haley <aph@redhat.com>
* java/util/natResourceBundle.cc: Include
ArrayIndexOutOfBoundsException.h.
(getCallingClassLoader): Don't put upper bound on stack search.
Catch ArrayIndexOutOfBoundsException.
From-SVN: r60348
* java/lang/natClassLoader.cc (defineClass0): Removed erroneous
comment.
* java/lang/ClassLoader.java (defineClass): Use chained
exception when rethrowing.
* defineclass.cc (handleClassBegin): Mark class as interpreted.
* java/lang/reflect/Modifier.java (INVISIBLE, INTERPRETED): New
constants.
* resolve.cc (_Jv_PrepareMissingMethods): New function.
(_Jv_PrepareClass): Use it.
* include/java-interp.h (_Jv_IsInterpretedClass): Rewrote.
(_Jv_InterpClass): _Jv_PrepareMissingMethods now friend.
* java/lang/Class.h (Class::getModifiers): Mask with ALL_FLAGS.
(Class): _Jv_PrepareMissingMethods now friend.
* java/lang/natClassLoader.cc (defineClass0): Use JvSynchronize.
Record `NULL' for system class loader.
(_Jv_RegisterInitiatingLoader): Use JvSynchronize. Special case
system class loader.
(_Jv_FindClassInCache): Likewise.
(_Jv_UnregisterClass): Use JvSynchronize. Free old loader info.
(_Jv_FindClass): Special case system class loader.
* java/lang/natClass.cc (_Jv_abstractMethodError): New function.
(_Jv_SetVTableEntries): Put _Jv_abstractMethodError into empty
vtable slots.
(_Jv_LayoutVTableMethods): Don't generate vtable slot for a method
in a final class.
(_getDeclaredMethod): Don't return synthetic methods.
(getDeclaredMethods): Likewise.
(_getMethod): Likewise.
(_getMethods): Likewise.
From-SVN: r60319
2002-12-18 Raif Naffah <raif@fl.net.au>
* java/math/BigInteger.java (euclidInv): Make sure quot and rem are in
canonical form after divide().
(modInverse): Likewise.
From-SVN: r60292
* java/lang/ClassLoader.java (resolveClass0): Transform
ClassNotFoundException to NoClassDefFoundError. Transform all other
throwables to LinkageError.
From-SVN: r60097
* libjava.loader/loader.exp (gcj_loader_test_one): Use
libjava_prune_warnings.
(gcj_loader_run): Likewise.
* libjava.mauve/mauve.exp (test_mauve): Use
libjava_prune_warnings.
(test_mauve_sim): Likewise.
* libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Use
libjava_prune_warnings.
(gcj_jni_build_header): Likewise.
* lib/libjava.exp (libjava_prune_warnings): New proc.
(gcj_link): Use it.
(test_libjava_from_source): Likewise.
(test_libjava_from_javac): Likewise.
From-SVN: r60089
* java/lang/ClassLoader.java (loadedClasses): New field.
(defineClass): Fixed indentation. Put new class in
loadedClasses.
(findLoadedClass): Implement here.
* java/lang/natClassLoader.cc (findLoadedClass): Removed.
From-SVN: r60043
2002-12-10 Mark Wielaard <mark@klomp.org>
Tom Tromey <tromey@redhat.com>
* java/net/URLClassLoader.java (getCanonicalFileURL): New method.
(JarURLLoader): Use it.
(FileURLLoader): Likewise.
(JarURLResource.getURL): Use chained exception.
(FileResource.getURL): Likewise.
(FileURLLoader.getResource): Use canonical file name.
(addURL): Indentation fix.
Co-Authored-By: Tom Tromey <tromey@redhat.com>
From-SVN: r60019
* include/win32.h (_Jv_platform_solib_prefix): New define.
(_Jv_platform_solib_suffix): Likewise.
* include/posix.h (_Jv_platform_solib_prefix): New define.
(_Jv_platform_solib_suffix): Likewise.
* java/lang/natRuntime.cc: Include StackTrace.h.
(_load): Use findLibrary and new platform defines.
(nativeGetLibname): Use new platform defines.
From-SVN: r59976
* gnu/gcj/protocol/jar/Connection.java (getJarFile): download and
cache remote jar files.
* gnu/gcj/runtime/VMClassLoader.java: Don't construct jar URL, only
add File.separator to URL when it is a directory.
* java/lang/ClassLoader.java: Add Classpath javadoc.
(parent): final.
(getParent): Add (disabled) security check.
(findLibrary): New default method.
* java/net/JarURLConnection.java (getManifest): Implement.
(getInputStream): Only create InputStream when entry exists.
(getHeaders): Only use jarFileURLConnection or JarEntry to set length
when they exist.
* java/net/URLClassLoader.java: New/Rewritten version from Classpath.
From-SVN: r59949
* java/net/InetAddress.java (toString): Use hostname when not null,
don't do an explicit reverse getHostName() lookup.
* java/net/Socket.java (setSocketImplFactory): When fac == null throw
NullPointerException.
From-SVN: r59902
2002-12-05 Andrew Haley <aph@redhat.com>
* gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Throw
#ifdef (HAVE_BACKTRACE) around the whole function body.
From-SVN: r59855
* java/lang/Class.h (_Jv_SetVTableEntries): Updated declaration.
* resolve.cc: Don't include AbstractMethodError.h.
(_Jv_abstractMethodError): Removed.
* defineclass.cc (handleMethodsBegin): Initialize method index to
-1.
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Don't set
method index for "new" final method.
(_Jv_SetVTableEntries): Compare index against -1 instead of using
isVirtualMethod. Added `flags' argument.
(_Jv_MakeVTable): Throw exception for abstract method in concrete
class.
From-SVN: r59847
* java/util/jar/JarFile.java (manifest): Not final.
(manifestRead): New field.
(JarFile): Don't read Manifest in constructor.
(getManifest): New method.
(JarEnumeration.nextElement): Use new method.
(getEntry): Likewise.
* java/util/zip/ZipFile.java (name): Final.
(raf): Likewsie.
(entries): Change type to Hashtable.
(closed): New field.
(ZipFile): Don't read enties in constructor.
(readEntries): Use Hashtable.
(close): Set new close flag and set entries to null inside
synchronized block.
(entries): Contruct enumeration using new getEntries() method and
entries Hashtable.
(getEntryIndex): Removed.
(getEntries): New method.
(getEntry): Use new getEntries() method and entries Hastable.
(getInputStream): Likewise.
(size): Return getEntries().size().
(ZipEntryEnumeration): Wrap entries Hashtable elements.
* java/util/zip/ZipEntry.java (cal): Don't initialize.
(time): Removed
(dostime): New field.
(zipFileIndex): Removed.
(ZipEntry(ZipEntry)): Copy dostime.
(setDOSTime): Now final and doesn't convert dos time.
(getDOSTime): Likewise.
(setTime): Convert dos time.
(getTime): Likewise.
(getCalendar): New method.
(setExtra): Use setTime().
* java/util/zip/ZipInputStream.java (getNextEntry): Format error msg.
From-SVN: r59785
2002-12-03 Andrew Haley <aph@redhat.com>
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call
_Jv_PushClass.
(_Jv_InitNewClassFields): Set protectionDomain and chain = NULL.
(_Jv_PopClass): New.
(_Jv_PushClass): New.
* java/lang/natClass.cc (forName (jstring)): Use a StackTrace to
discover the ClassLoader of our caller.
(_Jv_CheckArrayStore): Don't check that a class is assignment
compatible with Object.
* java/lang/natVMTHrowable.cc: Delete.
* gnu/gcj/runtime/StackTrace.java: New, partly copied from
java.lang.VMThrowable.
(StackTrace(), StackTrace(int)): New constructors.
(classAt, methodAt, update, methodAtAddress): New methods.
(map): New field.
* java/lang/VMThrowable.java: Use StackTrace instead of
natVMTHrowable.
* java/lang/Class.h (getClassLoaderInternal): New.
(class Class): Be friendly with _Jv_PopClass and _Jv_PushClass.
Be friendly with gnu::gcj::runtime::StackTrace.
(Object.chain): New field.
* include/java-interp.h (class _Jv_InterpMethod): Be friendly with
gnu::gcj::runtime::StackTrace.
* gnu/gcj/runtime/natStackTrace.cc: New file.
* gnu/gcj/runtime/MethodRef.java: New file.
* prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal()
instead of getClassLoader().
* verify.cc (class _Jv_BytecodeVerifier): Likewise.
java::lang::VMThrowable.
* Makefile.am (core_java_source_files): Add MethodRef.java,
StackTrace.java.
(nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc.
* Makefile.in: Rebuild.
From-SVN: r59771
2002-12-03 Andrew Haley <aph@redhat.com>
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call
_Jv_PushClass.
(_Jv_InitNewClassFields): Set protectionDomain and chain = NULL.
(_Jv_PopClass): New.
(_Jv_PushClass): New.
* java/lang/natClass.cc (forName (jstring)): Use a StackTrace to
discover the ClassLoader of our caller.
(_Jv_CheckArrayStore): Don't check that a class is assignment
compatible with Object.
* java/lang/natVMTHrowable.cc: Delete.
* gnu/gcj/runtime/StackTrace.java: New, partly copied from
java.lang.VMThrowable.
(StackTrace(), StackTrace(int)): New constructors.
(classAt, methodAt, update, methodAtAddress): New methods.
(map): New field.
* java/lang/VMThrowable.java: Use StackTrace instead of
natVMTHrowable.
* java/lang/Class.h (getClassLoaderInternal): New.
(class Class): Be friendly with _Jv_PopClass and _Jv_PushClass.
Be friendly with gnu::gcj::runtime::StackTrace.
(Object.chain): New field.
* include/java-interp.h (class _Jv_InterpMethod): Be friendly with
gnu::gcj::runtime::StackTrace.
* prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal()
instead of getClassLoader().
* verify.cc (class _Jv_BytecodeVerifier): Likewise.
java::lang::VMThrowable.
* Makefile.am (core_java_source_files): Add MethodRef.java,
StackTrace.java.
(nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc.
* Makefile.in: Rebuild.
From-SVN: r59770
2002-12-03 Andrew Haley <aph@redhat.com>
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call
_Jv_PushClass.
(_Jv_InitNewClassFields): Set protectionDomain and chain = NULL.
(_Jv_PopClass): New.
(_Jv_PushClass): New.
* java/lang/natClass.cc (forName (jstring)): Use a StackTrace to
discover the ClassLoader of our caller.
(_Jv_CheckArrayStore): Don't check that a class is assignment
compatible with Object.
* java/lang/natVMTHrowable.cc: Delete.
* gnu/gcj/runtime/StackTrace.java: New, partly copied from
java.lang.VMThrowable.
(StackTrace(), StackTrace(int)): New constructors.
(classAt, methodAt, update, methodAtAddress): New methods.
(map): New field.
* java/lang/VMThrowable.java: Use StackTrace instead of
natVMTHrowable.
* java/lang/Class.h (getClassLoaderInternal): New.
(class Class): Be friendly with _Jv_PopClass and _Jv_PushClass.
Be friendly with gnu::gcj::runtime::StackTrace.
(Object.chain): New field.
* include/java-interp.h (class _Jv_InterpMethod): Be friendly with
gnu::gcj::runtime::StackTrace.
* prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal()
instead of getClassLoader().
* verify.cc (class _Jv_BytecodeVerifier): Likewise.
java::lang::VMThrowable.
* Makefile.am (core_java_source_files): Add MethodRef.java,
StackTrace.java.
(nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc.
* Makefile.in: Rebuild.
2002-12-03 Andrew Haley <aph@redhat.com>
* class.c (make_class_data): New field, "chain".
* decl.c (java_init_decl_processing): Likewise.
From-SVN: r59769
* libjava.jacks/jacks.exp (gcj_jacks_setup_xfail): New function.
(gcj_jacks_parse): Use it; set up xfails.
* libjava.jacks/jacks.xfail: New file.
From-SVN: r59702
2002-11-29 Scott Gilbertson <scottg@mantatest.com>
* java/awt/image/ColorModel.java (getUnnormalizedComponents,
getNormalizedComponents): Fix calculation which was using one too
many bits in the unnormalized format.
From-SVN: r59651