1. 10 Mar, 2000 2 commits
    • Key.java (serialVersionUID): Set to 0 for now. · ea7f51a4
      	* java/security/Key.java(serialVersionUID): Set to 0 for now.
      	* java/security/interfaces/DSAPrivateKey.java(serialVersionUID): Ditto.
      	* java/security/interfaces/DSAPublicKey.java(serialVersionUID): Ditto.
      
      From-SVN: r32464
      Warren Levy committed
    • AlgorithmParameterGeneratorSpi.java: New file. · 8560e497
      	* java/security/AlgorithmParameterGeneratorSpi.java: New file.
      	* java/security/DigestException.java: New file.
      	* java/security/GeneralSecurityException.java: New file.
      	* java/security/InvalidAlgorithmParameterException.java: New file.
      	* java/security/InvalidKeyException.java: New file.
      	* java/security/InvalidParameterException.java: New file.
      	* java/security/Key.java: New file.
      	* java/security/KeyException.java: New file.
      	* java/security/KeyPair.java: New file.
      	* java/security/KeyPairGenerator.java: New file.
      	* java/security/KeyPairGeneratorSpi.java: New file.
      	* java/security/NoSuchProviderException.java: New file.
      	* java/security/PrivateKey.java: New file.
      	* java/security/Provider.java: New file.
      	* java/security/PublicKey.java: New file.
      	* java/security/SecureRandom.java: New file.
      	* java/security/Security.java: New file.
      	* java/security/Signature.java: New file.
      	* java/security/SignatureException.java: New file.
      	* java/security/interfaces/DSAKey.java: New file.
      	* java/security/interfaces/DSAParams.java: New file.
      	* java/security/interfaces/DSAPrivateKey.java: New file.
      	* java/security/interfaces/DSAPublicKey.java: New file.
      	* java/security/interfaces/RSAPrivateCrtKey.java: New file.
      	* java/security/interfaces/RSAPrivateKey.java: New file.
      	* java/security/interfaces/RSAPublicKey.java: New file.
      	* java/security/spec/AlgorithmParameterSpec.java: New file.
      	* java/security/spec/InvalidKeySpecException.java: New file.
      	* java/security/spec/InvalidParameterSpecException.java: New file.
      	* java/security/spec/KeySpec.java: New file.
      	* java/security/spec/RSAPrivateCrtKeySpec.java: New file.
      	* java/security/spec/RSAPrivateKeySpec.java: New file.
      	* java/security/spec/RSAPublicKeySpec.java: New file.
      	* Makefile.am: Added above java.security files.
      	* Makefile.in: Rebuilt.
      
      	* java/security/MessageDigest.java: Rewritten.
      	* java/security/SecureClassLoader.java: Added JDK1.2 comment.
      
      From-SVN: r32461
      Warren Levy committed
  2. 09 Mar, 2000 3 commits
  3. 07 Mar, 2000 2 commits
    • All files: Updated copyright information. · 2ba5f774
      	* All files: Updated copyright information.
      	* COPYING: New file.
      	* COPYING.LIB: Removed.
      	* LIBGCJ_LICENSE: We now use GPL + special exception.
      
      From-SVN: r32387
      Tom Tromey committed
    • resolve.cc (_Jv_SearchMethodInClass): New function. · ddf0fc6c
      2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>
      
              * resolve.cc (_Jv_SearchMethodInClass): New function.
              (_Jv_ResolvePoolEntry): Search superinterfaces for interface
              methods.
              * java/lang/Class.h (_Jv_SearchMethodInClass): New prototype.
      
      2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>
      
              * java/lang/Class.h (union _Jv_IDispatchTable): New declaration.
              (struct _Jv_ifaces): New declaration.
              JV_CLASS: New macro definition.
              (getComponentType): Relocate below isArray() for inlining.
              (getModifiers): Declare `inline'.
              (getSuperclass): Ditto.
              (isArray): Ditto.
              (isPrimitive): Ditto.
              (_Jv_IsAssignableFrom): New prototype.
              (_Jv_LookupInterfaceMethodIdx): New prototype. Predeclare with "C"
              linkage.
              (_Jv_InitClass): Move from natClass.cc. Declare `inline'.
              Check for JV_STATE_DONE before invoking initializeClass().
              (_Jv_PrepareConstantTimeTables): New prototype.
              (_Jv_GetInterfaces): Ditto.
              (_Jv_GenerateITable): Ditto.
              (_Jv_GetMethodString): Ditto.
              (_Jv_AppendPartialITable): Ditto.
              (_Jv_FindIIndex): Ditto.
              depth, ancestors, idt: New class fields.
      
              * java/lang/natClass.cc (isAssignableFrom): Move functionality to
              inline function `_Jv_IsAssignableFrom'. Use that function.
              (isInstance): Declare `inline'.
              (initializeClass): Get lock on class before checking `state'. Unlock
              before calling resolveClass0. Call _Jv_PrepareConstantTimeTables
      	with the lock held.
              (_Jv_LookupInterfaceMethod): Use _Jv_GetMessageString.
              (_Jv_IsAssignableFrom): New inline function. Test assignability
      	using class->depth and ancestor table.
              (_Jv_IsInstanceOf): Use _Jv_IsAssignableFrom.
              (_Jv_CheckCast): Move from prims.cc. Use JV_CLASS and
              _Jv_IsAssignableFrom.
              (_Jv_CheckArrayStore): Ditto.
              (_Jv_LookupInterfaceMethodIdx): New function.
              INITIAL_IOFFSETS_LEN, INITIAL_IFACES_LEN: New #defines.
              (_Jv_PrepareConstantTimeTables): New function.
              (_Jv_IndexOf): Ditto.
              (_Jv_GetInterfaces): Ditto.
              (_Jv_GenerateITable): Ditto.
              (_Jv_GetMethodString): Ditto.
              (_Jv_AppendPartialITable): Ditto.
              iindex_mutex, iindex_mutex_initialized: New static fields.
              (_Jv_FindIIndex): New function.
      
              * java/lang/natClassLoader.cc (_Jv_NewClass): Set new jclass fields.
      
              * prims.cc (_Jv_CheckCast): Moved to natClass.cc.
              (_Jv_CheckArrayStore): Ditto.
              (JvNewCharArray, JvNewBooleanArray, JvNewByteArray, JvNewShortArray,
              JvNewIntArray, JvNewLongArray, JvNewFloatArray, JvNewDoubleArray):
              Moved to gcj/array.h.
              (_Jv_Realloc): New function.
      
              * gcj/cni.h: Move _Jv_PrimClass definitions to gcj/array.h.
      
              * gcj/array.h: _Jv_PrimClass definitions moved from gcj/cni.h.
              (JvNewCharArray, JvNewBooleanArray, JvNewByteArray,
              JvNewShortArray, JvNewIntArray, JvNewLongArray, JvNewFloatArray,
              JvNewDoubleArray): Implementations moved from prims.cc and
              declared `inline'.
      
              * gcj/javaprims.h (_Jv_Realloc): Prototype.
      
              * include/jvm.h (_Jv_LookupInterfaceMethodIdx): Prototype.
      
      From-SVN: r32382
      Bryce McKinlay committed
  4. 05 Mar, 2000 2 commits
  5. 02 Mar, 2000 1 commit
    • java-interp.h: Don't include MethodInvocation.h. · b099f07d
      	* include/java-interp.h: Don't include MethodInvocation.h.
      	(class _Jv_InterpMethod): Don't make MethodInvocation a friend.
      	* Makefile.in: Rebuilt.
      	* Makefile.am (gnu/gcj/runtime/MethodInvocation.h): Removed.
      	(ordinary_java_source_files): Don't mention
      	MethodInvocation.java.
      	* gnu/gcj/runtime/MethodInvocation.java: Removed.
      	* interpret.cc (MethodInvocation::continue1): Removed.
      	(run): Handle exceptions here.
      	* java/lang/ClassLoader.java (defineClass1, defineClass2):
      	Removed.
      	* java/lang/natClassLoader.cc (defineClass0): Catch exceptions
      	here.
      	(defineClass2): Removed.
      
      	* java/lang/reflect/Method.java (hack_trampoline, hack_call):
      	Removed.
      	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Catch
      	exceptions here.
      	(hack_call): Removed.
      
      	* java/lang/Class.h (Class): Removed hackRunInitializers,
      	hackTrampoline.
      	* java/lang/natClass.cc (hackRunInitializers): Removed.
      	(initializeClass): Catch exceptions here.
      	Include ExceptionInInitializerError.h.
      	* java/lang/Class.java (hackTrampoline, hackRunInitializers):
      	Removed.
      
      	* java/lang/Object.h (Object): Don't mention hack12_6.
      	* java/lang/natObject.cc (_Jv_FinalizeObject): Catch exceptions
      	here.
      	* java/lang/Object.java (hack12_6): Removed.
      
      	* java/lang/natThread.cc (run_): Renamed.  Catch exceptions here.
      	(start): Use run_, not run__.
      	* java/lang/Thread.java (run_): Renamed from run__; old run_
      	removed.
      
      	* jni.cc (_Jv_JNI_FindClass): Handle exceptions.
      	(_Jv_JNI_EnsureLocalCapacity): Likewise.
      	(_Jv_JNI_DefineClass): Likewise.
      	(_Jv_JNI_ThrowNew): Likewise.
      	(_Jv_JNI_AllocObject): Likewise.
      	(_Jv_JNI_GetAnyMethodID): Likewise.
      	(_Jv_JNI_CallAnyMethodV): Likewise.
      	(_Jv_JNI_CallAnyMethodA): Likewise.
      	(_Jv_JNI_CallAnyVoidMethodV): Likewise.
      	(_Jv_JNI_CallAnyVoidMethodA): Likewise.
      	(_Jv_JNI_GetAnyFieldID): Likewise.
      	(_Jv_JNI_NewString): Likewise.
      	(_Jv_JNI_NewStringUTF): Likewise.
      	(_Jv_JNI_GetStringUTFChars): Likewise.
      	(_Jv_JNI_NewObjectArray): Likewise.
      	(_Jv_JNI_NewPrimitiveArray): Likewise.
      	(_Jv_JNI_GetPrimitiveArrayRegion): Likewise.
      	(_Jv_JNI_GetStringRegion): Likewise.
      	(_Jv_JNI_GetStringUTFRegion): Likewise.
      	(_Jv_JNI_SetPrimitiveArrayRegion): Likewise.
      	(_Jv_JNI_MonitorEnter): Likewise.
      	(_Jv_JNI_MonitorExit): Likewise.
      	(_Jv_JNI_ToReflectedField): Likewise.
      	(_Jv_JNI_ToReflectedMethod): Likewise.
      	(_Jv_JNI_RegisterNatives): Likewise.
      	(_Jv_JNI_AttachCurrentThread): Likewise.
      	(_Jv_JNI_DestroyJavaVM): Likewise.
      
      From-SVN: r32294
      Tom Tromey committed
  6. 29 Feb, 2000 2 commits
  7. 27 Feb, 2000 1 commit
  8. 26 Feb, 2000 1 commit
  9. 25 Feb, 2000 2 commits
  10. 21 Feb, 2000 1 commit
    • Makefile.in: Rebuilt. · 06440a12
              * Makefile.in: Rebuilt.
      	* Makefile.am (ordinary_java_source_files): Add
              gnu/gcj/io/DefaultMimeTypes.java and gnu/gcj/io/MimeTypes.java
      
              * scripts/MakeDefaultMimeTypes.java: New file.
              * scripts/mime.types: New file.
      	* scripts/classes.pl: Moved from top level.
              * classes.pl: Moved to scripts directory.
      
              * java/net/URLConnection.java: Implement guessContentTypeFromName.
      
              * gnu/gcj/io/MimeTypes.java: New file.
              * gnu/gcj/io/DefaultMimeTypes.java: New file.
      
      From-SVN: r32086
      Anthony Green committed
  11. 19 Feb, 2000 1 commit
  12. 18 Feb, 2000 1 commit
    • jvm.h (_Jv_GetJavaVM): Declare. · 8ade4771
      	* include/jvm.h (_Jv_GetJavaVM): Declare.
      	* include/java-interp.h (_Jv_GetFirstMethod): New function.
      	(_Jv_MethodBase::get_method): New method.
      	(_Jv_JNIMethod::set_function): New method.
      	* jni.cc (_Jv_JNI_UnregisterNatives): New function.
      	(_Jv_JNI_RegisterNatives): New function.
      	(_Jv_JNIFunctions): Updated for new functions.
      	(_Jv_GetJavaVM): New function.
      	(_Jv_JNI_GetJavaVM): Use it.  Now static.
      	(_Jv_JNI_AttachCurrentThread): Create a new JNIEnv if this thread
      	is already a Java thread but does not have a JNIEnv yet.
      
      	* java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
      	function.
      
      From-SVN: r32056
      Tom Tromey committed
  13. 15 Feb, 2000 4 commits
  14. 14 Feb, 2000 1 commit
    • MPN.java (findLowestBit): Made methods public. · 34540fe3
      	* gnu/gcj/math/MPN.java(findLowestBit): Made methods public.
      
      	* java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
      	  New constructor.
      	(min): Implemented.
      	(max): Implemented.
      	(modPow): Rewritten to not use the naive, slow, brute force approach.
      	(isProbablePrime): Implemented.
      	(testBit): Implemented.
      	(flipBit): Implemented.
      	(getLowestSetBit): Implemented.
      
      From-SVN: r31966
      Warren Levy committed
  15. 12 Feb, 2000 1 commit
  16. 11 Feb, 2000 3 commits
  17. 10 Feb, 2000 3 commits
    • natNativeThread.cc: New file. · aaf0766e
      	* gnu/gcj/jni/natNativeThread.cc: New file.
      	* gnu/gcj/jni/NativeThread.java: New file.
      	* java/lang/Thread.java (data): Now a RawData.
      	* include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv):
      	Declare.
      	* Makefile.in: Rebuilt.
      	* Makefile.am (java/lang/Thread.h): New target.
      	(ordinary_java_source_files): Added NativeThread.java.
      	(nat_source_files): Added natNativeThread.cc.
      	* java/lang/natThread.cc: Include <jni.h>
      	(struct natThread): Added `jni_env' field.
      	(_Jv_GetCurrentJNIEnv): New function.
      	(_Jv_SetCurrentJNIEnv): Likewise.
      	(initialize_native): Initialize jni_env.
      	Include RawData.h.
      	* jni.cc (ThreadGroupClass): New define.
      	(_Jv_JNI_InvokeFunctions): New structure.
      	(JNI_GetCreatedJavaVMs): New function.
      	(the_vm): New global.
      	(JNI_GetDefaultJavaVMInitArgs): New function.
      	Include NativeThread.h.
      	(NativeThreadClass): New define.
      	(_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1.
      	(_Jv_JNI_DestroyJavaVM): New function.
      	(_Jv_JNI_AttachCurrentThread): New function.
      	(_Jv_JNI_DetachCurrentThread): New function.
      	(_Jv_JNI_GetEnv): New function.
      	(JNI_CreateJavaVM): New function.
      	(_Jv_JNI_GetJavaVM): New function.
      	(_Jv_JNIFunctions): Added entry for GetJavaVM.
      	* include/jni.h (JavaVMAttachArgs): New structure.
      	(JNI_EDETACHED): New define.
      	(JNI_EVERSION): Likewise.
      	(JavaVM): Define properly.
      	(struct JNIInvokeInterface): New structure.
      	(class _Jv_JavaVM): New class.
      	(JNI_OnLoad, JNI_OnUnload): Declare.
      	(JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM,
      	JNI_GetCreatedJavaVMs): Declare.
      	(JavaVMInitArgs): New typedef.
      	(JavaVMOption): Likewise.
      	(JNI_ERR): New define.
      	(JNI_OK): Likewise.
      
      From-SVN: r31901
      Tom Tromey committed
    • interpret.cc: Don't include fdlibm.h. · 715bdd81
      2000-02-10  Andrew Haley  <aph@cygnus.com>
      
      	* interpret.cc: Don't include fdlibm.h.
      	Replace #if with #ifdef throughout.
      	Declare extern __ieee754_fmod.
      	(continue1): Remove op_getfield, op_getstatic, op_putfield,
      	op_putstatic insns.
      	* resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
      	Search class hierarchy for superclass vtable.
      
      	* java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
      	off the end of a pointer list.
      
      	* java/lang/natThread.cc (stop): Don't abort, throw an exception
      	instead.
      	(suspend): Ditto.
      
      From-SVN: r31897
      Andrew Haley committed
    • natRuntime.cc (_load): Call add_library. · 7e3b6e31
      	* java/lang/natRuntime.cc (_load): Call add_library.
      	(loadLibraryInternal): Likewise.
      
      From-SVN: r31877
      Tom Tromey committed
  18. 08 Feb, 2000 2 commits
  19. 04 Feb, 2000 3 commits
    • Makefile.am: Added MPN.java and BigInteger.java. · 25c449be
      	* Makefile.am: Added MPN.java and BigInteger.java.
      	* Makefile.in: Rebuilt.
      	* gnu/gcj/math/MPN.java: New file.
      	* java/math/BigInteger.java: New file.
      
      From-SVN: r31794
      Warren Levy committed
    • defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase pointers. · facc279f
      	* defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
      	pointers.
      	(handleMethodsEnd): Fixed error messages.  Create a _Jv_JNIMethod
      	if the method is native.
      	* resolve.cc (ncode): Don't handle native methods.
      	(_Jv_JNIMethod::ncode): New method.
      	(_Jv_PrepareClass): Handle native methods.
      	* jni.cc (call): Renamed from _Jv_JNI_conversion_call.
      	Include AbstractMethodError.h.
      	(add_char): New function.
      	(mangled_name): Likewise.
      	* include/java-interp.h (class _Jv_JNIMethod): New class.
      	(class _Jv_MethodBase): New class.
      	(class _Jv_InterpMethod): Derive from _Jv_MethodBase.
      	(_Jv_InterpClass): Changed `interpreted_methods' field to type
      	`_Jv_MethodBase'.
      
      	* include/jvm.h (_Jv_FindSymbolInExecutable): Declare.
      	* java/lang/natRuntime.cc (libraries_size, libraries_count,
      	libraries): New globals.
      	(add_library): New function.
      	(_Jv_FindSymbolInExecutable): New function.
      
      	* java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
      	Now static.
      
      From-SVN: r31790
      Tom Tromey committed
    • Throwable.java (CPlusPlusDemangler): New class. · 43c5c8a6
      2000-02-04  Andrew Haley  <aph@cygnus.com>
      
              * java/lang/Throwable.java (CPlusPlusDemangler): New class.
              (printStackTrace): Use a CPlusPlusDemangler to demangle names.
              * java/lang/natThrowable.cc (printRawStackTrace): Rename
              printStackTrace to printRawStackTrace.
      
      From-SVN: r31785
      Andrew Haley committed
  20. 03 Feb, 2000 2 commits
    • Calendar.java (toString): New method. · 14447d96
      	* java/util/Calendar.java (toString): New method.
      	* java/util/SimpleTimeZone.java (clone): New method.
      	(toString): New method.
      	* java/util/TimeZone.java (clone): New method.
      	* java/text/SimpleDateFormat.java (clone): New method.
      	* java/text/NumberFormat.java (clone): New method.
      	(equals): New method.
      	* java/text/Format.java (clone): New method.
      	* java/text/DateFormatSymbols.java (DateFormatSymbols): New
      	constructor.
      	(clone): New method.
      	* java/text/DateFormat.java (clone): New method.
      	* java/text/Collator.java (clone): New method.
      
      From-SVN: r31775
      Tom Tromey committed
    • PipedOutputStream.java (write(byte[], int, int)): New method. · 7d3151e1
      	* java/io/PipedOutputStream.java (write(byte[], int, int)): New
      	method.
      
      From-SVN: r31774
      Tom Tromey committed
  21. 26 Jan, 2000 2 commits
    • method.h (JvNumMethods): Moved from Class.h. · 355dff4c
      	* gcj/method.h (JvNumMethods): Moved from Class.h.
      	(JvGetFirstMethod): Likewise.
      	* java/lang/Class.h (Object): Updated decl of
      	_Jv_JNI_ToReflectedField.
      	(Object): Added _Jv_JNI_ToReflectedMethod as a friend.
      	* Makefile.in: Rebuilt.
      	* Makefile.am (java/lang/reflect/Field.h): Added `jboolean'
      	argument of _Jv_JNI_ToReflectedField.
      	(java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod
      	as a friend.
      	(java/lang/reflect/Method.h): Likewise.
      	* include/jni.h (class _Jv_JNIEnv): Added `klass' member.  Use
      	__GCJ_JNI_IMPL__.
      	(jweak): New typedef.
      	(struct JNINativeInterface): Correctly declare remaining entries.
      	* jni.cc: Include Class.h, ClassLoader.h.
      	(_Jv_JNI_FindClass): New function.
      	(_Jv_JNI_DefineClass): New function.
      	(_Jv_JNI_conversion_call): New function.
      	(_Jv_JNI_FindClass): Use current class loader to find class.
      	(_Jv_JNI_ExceptionCheck): New function.
      	(_Jv_JNI_FromReflectedField): Now static.
      	(MethodClass): New define.
      	(_Jv_JNI_FromReflectedMethod): New function.
      	(_Jv_JNI_ToReflectedMethod): Likewise.
      	Include Method.h.
      	(_Jv_JNI_IsAssignableFrom): Renamed.
      	(_Jv_JNI_GetStringRegion): New function.
      	Include StringIndexOutOfBoundsException.h.
      	(_Jv_JNI_GetStringUTFRegion): New function.
      	(_Jv_JNIFunctions): Updated for new functions.
      	(_Jv_JNI_GetPrimitiveArrayCritical): New function
      	(_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise.
      	(_Jv_JNI_GetStringCritical): New function.
      	(_Jv_JNI_ReleaseStringCritical): Likewise.
      	(get_throwable): Removed.
      	(GCJ_JV_JNIENV_FRIEND): Removed.
      	(__GCJ_JNI_IMPL__): Define.
      	Include method.h.
      
      From-SVN: r31638
      Tom Tromey committed
    • field.h (struct _Jv_Field): Use "jshort" as type for nameIndex. · 0507a9b1
      	* gcj/field.h (struct _Jv_Field): Use "jshort" as type for
      	nameIndex.  Use "jint" as type for boffset.
      	* java/lang/Class.h (struct _Jv_Method): Made accflags a
      	_Jv_ushort.
      	(Class): Likewise.  Also changed type of method_count,
      	vtable_method_count, size_in_bytes, field_count,
      	static_field_count, interface_count.
      	* gcj/array.h (__JArray): Made `length' a const jsize, not an
      	int.
      
      From-SVN: r31621
      Tom Tromey committed