Commit Graph

587 Commits

Author SHA1 Message Date
Tom Tromey 5ef57049f9 * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
From-SVN: r32021
2000-02-17 00:54:34 +00:00
Tom Tromey c082d01fa9 calls.c: New file.
* libjava.jni/calls.c: New file.
	* libjava.jni/calls.out: New file.
	* libjava.jni/calls.java: New file.

From-SVN: r32020
2000-02-17 00:49:27 +00:00
Tom Tromey 1adbc4d8be jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
* jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
	(_Jv_JNI_NewObject): Likewise.
	(_Jv_JNI_NewObjectA): Likewise.
	(_Jv_JNI_CallAnyMethodV): In constructor case, pass correct value
	as "return" type to _Jv_CallAnyMethodA.
	(_Jv_JNI_CallAnyMethodA): Likewise.
	(_Jv_JNI_CallAnyVoidMethodV): Likewise.

From-SVN: r32017
2000-02-16 22:42:41 +00:00
Tom Tromey 5b0d59b4e7 throwit.java: New file.
* libjava.jni/throwit.java: New file.
	* libjava.jni/throwit.c: New file.
	* libjava.jni/throwit.out: New file.

From-SVN: r32016
2000-02-16 22:39:36 +00:00
Tom Tromey d77a164002 jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not findClass.
* jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
	findClass.

From-SVN: r32013
2000-02-16 18:42:48 +00:00
Tom Tromey 5bdd3ac1ea findclass.java: New file
* libjava.jni/findclass.java: New file
	* libjava.jni/findclass.c: New file
	* libjava.jni/findclass.out: New file

From-SVN: r32012
2000-02-16 18:41:28 +00:00
Tom Tromey 04297fe74f findclass.java: New file
* libjava.jni/findclass.java: New file
	* libjava.jni/findclass.c: New file
	* libjava.jni/findclass.out: New file

From-SVN: r32011
2000-02-16 18:35:05 +00:00
Bryce McKinlay 432ba90f48 InterfaceDispatch.java: New file.
2000-02-16  Bryce McKinlay  <bryce@albatross.co.nz>

        * libjava.lang/InterfaceDispatch.java: New file.
        * libjava.lang/InterfaceDispatch.out: New file.

From-SVN: r32001
2000-02-16 05:13:46 +00:00
Tom Tromey 73d7c68909 virtual.java: New file.
* libjava.jni/virtual.java: New file.
	* libjava.jni/virtual.c: New file.
	* libjava.jni/virtual.out: New file.
	* libjava.jni/final_method.java: New file.
	* libjava.jni/final_method.c: New file.
	* libjava.jni/final_method.out: New file.
	* libjava.jni/overload.java: New file.
	* libjava.jni/overload.c: New file.
	* libjava.jni/overload.out: New file.
	* libjava.jni/simple_int.java: New file.
	* libjava.jni/simple_int.c: New file.
	* libjava.jni/simple_int.out: New file.
	* libjava.jni/invoke.out: New file.
	* libjava.jni/invoke.c: New file.
	* libjava.jni/invoke.java: New file.

From-SVN: r31996
2000-02-16 00:19:55 +00:00
Tom Tromey d348bda453 resolve.cc (ncode): Set args_raw_size.
* resolve.cc (ncode): Set args_raw_size.  Compute jni_cif and
	jni_arg_types.
	(init_cif): Added `rtype_p' argument.
	* include/java-interp.h (class _Jv_MethodBase): Added
	args_raw_size.
	(class _Jv_InterpMethod): Removed args_raw_size.
	(class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields.
	* jni.cc (call): Pass JNIEnv and (for static methods only) the
	class pointer as well as the ordinary arguments.

From-SVN: r31995
2000-02-16 00:07:34 +00:00
Tom Tromey cdd59e7bdf * jni.cc (mangled_name): Skip leading `(' in signature.
From-SVN: r31993
2000-02-15 22:59:23 +00:00
Tom Tromey abfb784400 * jni.cc (add_char): Added missing `else'.
From-SVN: r31991
2000-02-15 22:42:10 +00:00
Tom Tromey 2d759f7165 jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc fails.
* jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
	fails.

From-SVN: r31986
2000-02-15 20:39:36 +00:00
Bryce McKinlay 6ad91f8611 Updated the NEWS
From-SVN: r31983
2000-02-15 09:35:51 +00:00
Bryce McKinlay 2e5aca8386 Updated ChangeLog
From-SVN: r31982
2000-02-15 08:53:00 +00:00
Bryce McKinlay 12e7d63aec natSystem.cc (init_properties): set java.lang.classpath property.
* java/lang/natSystem.cc (init_properties): set java.lang.classpath
        property.

From-SVN: r31981
2000-02-15 08:52:03 +00:00
Bryce McKinlay b5f853e62b Updated the NEWS
From-SVN: r31980
2000-02-15 08:51:29 +00:00
Bryce McKinlay 1733ad7f10 natRuntime.cc (_load): Include library path with exception message.
* java/lang/natRuntime.cc (_load): Include library path with
        exception message.

From-SVN: r31979
2000-02-15 08:51:04 +00:00
Bryce McKinlay 83379befc0 natThread.cc (dumpStack): Removed.
* java/lang/natThread.cc (dumpStack): Removed.
        * java/lang/Thread.java (dumpStack): Implemented.

From-SVN: r31978
2000-02-15 08:47:16 +00:00
Tom Tromey 26c3229c0b re GNATS gcj/150 (System.loadLibrary() semantics arn't the same as in the JDK)
* java/lang/natRuntime.cc (_load): On Unix, prefix library name
	with `lib' for loadLibrary.  Fixes PR gcj/150.

From-SVN: r31976
2000-02-15 07:53:11 +00:00
Tom Tromey 77de5d85d0 ltdl.c: If HAVE_BOEHM_GC defined, includ gc.h.
* ltdl.c: If HAVE_BOEHM_GC defined, includ gc.h.
	* Makefile.in: Rebuilt.
	* Makefile.am (INCLUDES): New macro.
	* config.h.in, configure: Rebuilt.
	* acconfig.h (HAVE_BOEHM_GC): Define.
	* configure.in: Handle --enable-java-gc.

From-SVN: r31971
2000-02-14 21:59:58 +00:00
Warren Levy 34540fe35e MPN.java (findLowestBit): Made methods public.
* 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
2000-02-14 10:23:29 +00:00
Anthony Green 97ce4a51fa gcj/142
i386 and i486 should configure the same as i586 and i686.

From-SVN: r31954
2000-02-13 18:07:09 +00:00
Anthony Green 6ab17fd868 New test code.
From-SVN: r31952
2000-02-12 23:43:51 +00:00
Anthony Green addcdfec59 New test case.
From-SVN: r31951
2000-02-12 23:09:34 +00:00
Anthony Green 762016bf0a New test case.
From-SVN: r31950
2000-02-12 22:57:18 +00:00
Anthony Green d6455b5baf New test case.
From-SVN: r31949
2000-02-12 22:45:06 +00:00
Tom Tromey dd16866663 File.java (createTempFile): Use low bits from counter, not high bits.
* java/io/File.java (createTempFile): Use low bits from counter,
	not high bits.

From-SVN: r31946
2000-02-12 20:13:42 +00:00
Alexandre Petit-Bianco e35b951f52 inner_interface.out: New file.
2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* libjava.lang/inner_interface.out: New file.
	* libjava.lang/inner_interface.java: New file.
	* libjava.lang/final_int.out: New file.
	* libjava.lang/final_int.java: New file.
	* libjava.lang/final_static_and_friend.out: New file.
	* libjava.lang/final_static_and_friend.java: New file.

From-SVN: r31944
2000-02-12 18:34:50 +00:00
Anthony Green 95311793fe More thanks.
From-SVN: r31942
2000-02-12 03:49:13 +00:00
Tom Tromey 28ec5077d7 interpret.cc (continue1): Use STOREA, not STOREI, to implement astore instruction.
* interpret.cc (continue1): Use STOREA, not STOREI, to implement
	astore instruction.  From Hans Boehm.

From-SVN: r31939
2000-02-11 23:24:28 +00:00
Warren Levy 136b5d77fc BigInteger.java (BigInteger(String, int)): New constructor.
* java/math/BigInteger.java(BigInteger(String, int)): New constructor.
	(BigInteger(String)): New constructor.
	(not): Rewritten using version from Kawa's BitOps class.
	(valueOf): New private methods from Kawa's BitOps class.
	(swappedOp): ditto.
	(bitOp): ditto.
	(setBitOp): ditto.
	(and): Implemented.
	(or): Implemented.
	(xor): Implemented.
	(andNot): Implemented.
	(clearBit): Implemented.
	(setBit): Implemented.
	(bitCount): Implemented.
	(toByteArray): Implemented.

From-SVN: r31926
2000-02-11 19:09:03 +00:00
Tom Tromey 9d381124d8 * java/io/File.java (nextValue): Now synchronized.
From-SVN: r31925
2000-02-11 18:44:37 +00:00
Tom Tromey 304ccb1075 natFileDescriptorPosix.cc (open): Recognize EXCL flag.
* java/io/natFileDescriptorPosix.cc (open): Recognize EXCL flag.
	* java/io/FileDescriptor.java (EXCL): New static field.
	* java/io/File.java (tmpdir): New static field.
	(createTempFile): New method.
	(nextValue): New method.
	* java/lang/natSystem.cc (init_properties): Set java.io.tmpdir
	property.

From-SVN: r31922
2000-02-11 17:32:52 +00:00
Tom Tromey 26439cc59c jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
* include/jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
	(jboolean): Declare as an attributed int, not a bool.
	(_Jv_func): Declare differently for C.

From-SVN: r31907
2000-02-10 23:44:05 +00:00
Tom Tromey aaf0766e9f natNativeThread.cc: New file.
* 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
2000-02-10 20:31:48 +00:00
Andrew Haley 715bdd8117 interpret.cc: Don't include fdlibm.h.
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
2000-02-10 17:16:30 +00:00
Tom Tromey 7e3b6e312a natRuntime.cc (_load): Call add_library.
* java/lang/natRuntime.cc (_load): Call add_library.
	(loadLibraryInternal): Likewise.

From-SVN: r31877
2000-02-10 00:17:10 +00:00
Tom Tromey c56c8c43b9 natIconv.cc (Input_iconv::finalize): Call iconv_close when handle is not NULL.
* gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
	iconv_close when handle is not NULL.  Thanks to Andrew Haley.
	(Output_iconv::finalize): Likewise.

From-SVN: r31876
2000-02-10 00:14:54 +00:00
Alexandre Petit-Bianco d53cc71518 anonarray3.out: New file.
2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* libjava.lang/anonarray3.out: New file.
	* libjava.lang/anonarray3.java: New file.

From-SVN: r31871
2000-02-09 20:49:34 +00:00
Tom Tromey d38c8dab70 * libjava.compile/inner_priv.java: New file.
From-SVN: r31868
2000-02-09 20:33:33 +00:00
Tom Tromey bad196d78e Properties.java (setProperty): New method.
* java/util/Properties.java (setProperty): New method.
	(store): New method.

From-SVN: r31855
2000-02-08 21:30:45 +00:00
Tom Tromey 3fd64b5a09 Runtime.java (_load): Declare.
* java/lang/Runtime.java (_load): Declare.
	(load, loadLibrary): Wrote in terms of _load.
	* java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in
	library.
	(loadLibrary): Likewise.
	Include <jni.h>.
	(_load): New method.
	(loadLibrary, load): Removed.

From-SVN: r31846
2000-02-08 00:26:58 +00:00
Tom Tromey 278abd2849 jni.cc (ThrowableClass): New define.
* jni.cc (ThrowableClass): New define.
	(_Jv_JNI_Throw): Check argument.
	(_Jv_JNI_ThrowNew): Likewise.
	(wrap_value): Don't wrap object if it is NULL.
	(_Jv_JNI_DefineClass): Use wrap_value.
	(_Jv_JNI_FindClass): Likewise.
	(_Jv_JNI_GetSuperclass): Likewise.
	(_Jv_JNI_ExceptionOccurred): Likewise.
	(_Jv_JNI_AllocObject): Likewise.
	(_Jv_JNI_GetObjectClass): Likewise.
	(_Jv_JNI_NewString): Likewise.
	(_Jv_JNI_NewStringUTF): Likewise.
	(_Jv_JNI_NewObjectArray): Likewise.
	(_Jv_JNI_GetObjectArrayElement): Likewise.
	(_Jv_JNI_NewPrimitiveArray): Likewise.
	(_Jv_JNI_ToReflectedField): Likewise.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	(_Jv_JNI_AllocObject): Check argument.
	(_Jv_JNI_NewObjectV): Likewise.
	(_Jv_JNI_NewObject): Likewise.
	(_Jv_JNI_NewObjectA): Likewise.
	(_Jv_JNI_GetObjectClass): Likewise.
	(_Jv_JNI_GetField): Likewise.
	(_Jv_JNI_SetField): Likewise.

From-SVN: r31845
2000-02-08 00:23:09 +00:00
Tom Tromey 7c51d9fb95 interpret.cc (PUSHL): Don't use expression statement.
* interpret.cc (PUSHL): Don't use expression statement.
	(PUSHD): Likewise.
	(LOADL): Likewise.
	(STOREL): Likewise.

From-SVN: r31844
2000-02-08 00:17:28 +00:00
Alexandre Petit-Bianco de9127c1b7 instinit2.out: New file.
* libjava.lang/instinit2.out: New file.
	* libjava.lang/instinit2.java: New file.
	* libjava.lang/instinit.out: New file.
	* libjava.lang/instinit.java: New file.
	* libjava.lang/anonarray2.out: New file.
	* libjava.lang/anonarray2.java: New file.
	* libjava.lang/anonarray.out: New file.
	* libjava.lang/anonarray.java: New file.
	* libjava.lang/nested_with_ctor.out: New file.
	* libjava.lang/nested_with_ctor.java: New file.
	* libjava.lang/anfi.out: New file.
	* libjava.lang/anfi.java: New file.
	* libjava.lang/stub.out: New file.
	* libjava.lang/stub.java: New file.

From-SVN: r31841
2000-02-07 21:40:18 +00:00
Tom Tromey f39b788a15 jni.cc (add_char): Conditional on INTERPRETER.
* jni.cc (add_char): Conditional on INTERPRETER.
	(mangled_name): Likewise.
	(call): Likewise.
	* include/java-interp.h (class _Jv_MethodBase): Conditional on
	INTERPRETER.
	(class _Jv_JNIMethod): Likewise.

From-SVN: r31839
2000-02-07 21:17:30 +00:00
Warren Levy 4f88416976 Added credits for Per Bothner's work on MPN.java and IntNum.java (for
BigInteger).

From-SVN: r31795
2000-02-04 22:11:07 +00:00
Warren Levy 25c449becf Makefile.am: Added MPN.java and BigInteger.java.
* 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
2000-02-04 22:00:36 +00:00
Tom Tromey facc279fc1 defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase pointers.
* 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
2000-02-04 20:49:27 +00:00
Andrew Haley 43c5c8a630 Throwable.java (CPlusPlusDemangler): New class.
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
2000-02-04 16:59:35 +00:00
Tom Tromey 14447d9674 Calendar.java (toString): New method.
* 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
2000-02-03 18:26:51 +00:00
Tom Tromey 7d3151e1c9 PipedOutputStream.java (write(byte[], int, int)): New method.
* java/io/PipedOutputStream.java (write(byte[], int, int)): New
	method.

From-SVN: r31774
2000-02-03 17:17:26 +00:00
Tom Tromey ee6713e782 java-interp.h (_Jv_JNI_conversion_call): Declare.
* include/java-interp.h (_Jv_JNI_conversion_call): Declare.
	* resolve.cc (ncode): Use _Jv_JNI_conversion_call when
	constructing the closure if the function is native.
	* jni.cc (_Jv_JNI_conversion_call): Now returns `void'.  No longer
	a template function, #if'd out, or static.
	Include <java-interp.h>.

From-SVN: r31746
2000-02-02 01:55:03 +00:00
Tom Tromey 8928191114 * include/jni.h (class _Jv_JNIEnv): Corrected calls using `...'.
From-SVN: r31745
2000-02-02 01:47:01 +00:00
Tom Tromey 7d34aa4cff * include/jni.h (class _Jv_JNIEnv): Added all C++ inline methods.
From-SVN: r31739
2000-02-01 21:04:44 +00:00
Tom Tromey ee7f72e41f jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
* jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
	(_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave
	`locals == NULL'.
	(wrap_value): New function.
	(_Jv_JNI_CallAnyMethodV): Use it.
	(_Jv_JNI_CallAnyMethodA): Likewise.
	(_Jv_JNI_GetField): Use wrap_value; removed specialized version.
	(_Jv_JNI_GetStaticField): Likewise.

From-SVN: r31736
2000-02-01 17:36:05 +00:00
Tom Tromey 5dc489c190 jni.cc (_Jv_JNI_GetField): Specialize for jobject.
* jni.cc (_Jv_JNI_GetField): Specialize for jobject.
	(_Jv_JNI_GetStaticField): Likewise.

From-SVN: r31735
2000-02-01 16:32:21 +00:00
Tom Tromey 7e648cf954 prims.cc (_Jv_MallocUnchecked): New function.
* prims.cc (_Jv_MallocUnchecked): New function.
	(main_init): Call _Jv_JNI_Init.
	* include/jvm.h (_Jv_MallocUnchecked): Declare.
	(_Jv_JNI_Init): Declare.
	* jni.cc: Include Hashtable.h, OutOfMemoryError.h, Integer.h,
	<string.h>.
	(_Jv_JNI_NewGlobalRef): New function.
	(_Jv_JNI_DeleteGlobalRef): New function.
	(_Jv_JNI_DeleteLocalRef): New function.
	(_Jv_JNI_conversion_call): Initialize and clear local reference
	frame.
	(_Jv_JNI_NewLocalRef): New function.
	(struct _Jv_JNI_LocalFrame): New structure.
	(_Jv_JNI_PushLocalFrame): New function.
	(_Jv_JNI_EnsureLocalCapacity): New function.
	(FRAME_SIZE): New define.
	(_Jv_JNI_GetStringChars): Mark string, not characters.
	(_Jv_JNI_ReleaseStringChars): Unmark string, not characters.
	(_Jv_JNI_GetPrimitiveArrayElements): Mark array, not elements.
	(_Jv_JNI_ReleasePrimitiveArrayElements): Unmark array, not
	elements.
	(_Jv_JNI_DefineClass): Make return value a local ref.
	(_Jv_JNI_FindClass): Likewise.
	(_Jv_JNI_GetSuperclass): Likewise.
	(_Jv_JNI_ExceptionOccurred): Likewise.
	(_Jv_JNI_AllocObject): Likewise.
	(_Jv_JNI_GetObjectClass): Likewise.
	(_Jv_JNI_CallAnyMethodV): Likewise.
	(_Jv_JNI_NewString): Likewise.
	(_Jv_JNI_NewStringUTF): Likewise.
	(_Jv_JNI_NewObjectArray): Likewise.
	(_Jv_JNI_GetObjectArrayElement): Likewise.
	(_Jv_JNI_ToReflectedField): Likewise.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	(_Jv_JNIFunctions): Updated table for new functions.
	(_Jv_JNI_Init): New function.
	(mark_for_gc): Wrote.
	(unmark_for_gc): Wrote.
	* include/jni.h (struct JNINativeInterface): Removed name from
	PopLocalFrame parameter.
	(class _Jv_JNIEnv): Added `locals' field.

From-SVN: r31730
2000-02-01 06:14:26 +00:00
Anthony Green ab5cffc5e8 natIconv.cc (read): Minor fixes.
* gnu/gcj/convert/natIconv.cc (read): Minor fixes.
    (write): Ditto.

From-SVN: r31712
2000-01-31 08:56:09 +00:00
Tom Tromey 946efde181 config.h.in: Rebuilt.
* include/config.h.in: Rebuilt.
	* acconfig.h (HAVE_ICONV): Define.
	* configure: Rebuilt.
	* configure.in: Check for `iconv' function.
	* gnu/gcj/convert/BytesToUnicode.java (getDecoder): Try iconv if
	no specific encoder exists.
	* gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Try iconv if
	no specific encoder exists.
	* Makefile.in: Rebuilt.
	* Makefile.am (convert_source_files): Mention Input_iconv.java and
	Output_iconv.java.
	(nat_source_files): Added natIconv.cc.
	* gnu/gcj/convert/natIconv.cc: New file.
	* gnu/gcj/convert/Input_iconv.java: New file.
	* gnu/gcj/convert/Output_iconv.java: New file.

From-SVN: r31708
2000-01-31 04:53:47 +00:00
Alexandre Petit-Bianco 33ebdd95a8 final_inner.java: New file.
* libjava.lang/final_inner.java: New file.
	* libjava.lang/final_inner.out: Likewise.

From-SVN: r31704
2000-01-30 22:08:32 +00:00
Tom Tromey d0a844f86b Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (LIBFFIINCS): Added MULTIBUILDTOP.

From-SVN: r31672
2000-01-28 20:00:21 +00:00
Tom Tromey 355dff4cef method.h (JvNumMethods): Moved from Class.h.
* 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
2000-01-26 23:56:36 +00:00
Tom Tromey 673fdf6d77 resolve.cc (get_ffi_type_from_signature): Handle case where boolean is an int.
* resolve.cc (get_ffi_type_from_signature): Handle case where
	boolean is an int.

From-SVN: r31637
2000-01-26 23:44:40 +00:00
Tom Tromey 8de7c9a0eb interpret.cc (run): Don't call println.
* interpret.cc (run): Don't call println.
	Don't include PrintStream.h.

From-SVN: r31622
2000-01-26 00:56:36 +00:00
Tom Tromey 0507a9b19f field.h (struct _Jv_Field): Use "jshort" as type for nameIndex.
* 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
2000-01-26 00:55:50 +00:00
Anthony Green 7bee4c4c0d config.h.in: Rebuilt.
* include/config.h.in: Rebuilt.
	* acconfig.h: Add undef for __NO_MATH_INLINES.
	* configure: Rebuilt.
	* configure.in: Add test for `g++ -O2 -ffloat-store' bug.

From-SVN: r31566
2000-01-22 21:15:58 +00:00
Tom Tromey 8a9220959f natConstructor.cc (newInstance): Use _Jv_CallAnyMethodA.
* java/lang/reflect/natConstructor.cc (newInstance): Use
	_Jv_CallAnyMethodA.
	* include/jvm.h: Declare _Jv_CallAnyMethodA.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
	from _Jv_CallNonvirtualMethodA.  Changed interface; overloaded.
	Include <jni.h>.
	(COPY): Removed.
	(invoke): Use _Jv_CallAnyMethodA.
	(VAL): Redefined.
	* java/lang/Class.h (Class): Declare JvGetFirstStaticField,
	JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
	functions.
	(struct _Jv_Method): Added getNextMethod method.
	(JvNumMethods): New function.
	(JvGetFirstMethod): Likewise.
	* gcj/field.h (JvGetFirstStaticField): New function.
	(JvNumStaticFields): Likewise.
	(getNextField): Renamed from getNextInstanceField.
	(struct _Jv_Field): New method getClass.
	* jni.cc: Wrote many new functions.
	* include/jni.h (JNI_TRUE): Define.
	(JNI_FALSE): Likewise.
	(jobject, jclass, jstring, jarray, jthrowable, jobjectArray,
	jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray,
	jcharArray, jfloatArray, jdoubleArray): New typedefs.
	(jfieldID, jmethodID): Likewise.
	(JNI_COMMIT, JNI_ABORT): New defines.
	(JNINativeMethod): New struct.
	(struct JNINativeInterface): Correctly declared more entries.
	(class _Jv_JNIEnv): Added `ex' member.
	(JNI_VERSION_1_1): New define.
	(JNI_VERSION_1_2): Likewise.

	* boehm.cc (_Jv_MarkObj): Use getNextField, not
	getNextInstanceField.

From-SVN: r31553
2000-01-21 23:50:31 +00:00
Tom Tromey 24823dcf49 * libjava.compile/BlankFinal.java: New file.
From-SVN: r31552
2000-01-21 21:12:47 +00:00
Tom Tromey 0b9309b6e4 resolve.cc (StringClass): Removed.
* resolve.cc (StringClass): Removed.
	* defineclass.cc (StringClass): Removed.

From-SVN: r31539
2000-01-20 17:32:26 +00:00
Bryce McKinlay dda482c1e4 Updated NEWS file.
From-SVN: r31522
2000-01-19 23:08:05 +00:00
Alexandre Petit-Bianco 5170877a05 anon.java, [...]: New files.
2000-01-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* libjava.lang/anon.java, libjava.lang/anon2.java,
	libjava.lang/anon3.java, libjava.lang/anon4.java,
	libjava.lang/direct_read.java, libjava.lang/direct_write.java,
	libjava.lang/indirect.java, libjava.lang/indirect_read.java,
	libjava.lang/indirect_write.java, libjava.lang/inner1.java,
	libjava.lang/inner2.java, libjava.lang/inner3.java,
	libjava.lang/inner4.java, libjava.lang/inner_array.java,
	libjava.lang/multiple_finit.java,
	libjava.lang/private_direct_read.java,
	libjava.lang/private_direct_write.java,
	libjava.lang/private_indirect_read.java,
	libjava.lang/private_indirect_write.java,
	libjava.lang/search_outer.java, libjava.lang/tmi.java,
	libjava.lang/tp.java, libjava.lang/update_outer.java: New files.

From-SVN: r31511
2000-01-19 21:38:43 +00:00
Tom Tromey 74436afa42 * interpret.cc (PC_REGISTER_ASM): Removed.
From-SVN: r31510
2000-01-19 21:08:03 +00:00
Tom Tromey db70b4bd91 natThrowable.cc: Don't use `#pragma implementation'.
* java/lang/natThrowable.cc: Don't use `#pragma implementation'.
	From Bryce McKinlay.

From-SVN: r31505
2000-01-19 18:59:27 +00:00
Tom Tromey 7c734b1758 * All files: Updated copyright to reflect Cygnus purchase.
From-SVN: r31504
2000-01-19 18:39:27 +00:00
Tom Tromey ec39b14af2 * libjava.compile/inner_pub.java: New file.
From-SVN: r31503
2000-01-19 17:28:32 +00:00
Bryce McKinlay f7ccaa38a7 configure: Rebuilt.
2000-01-18  Bryce McKinlay <bryce@albatross.co.nz>

	* configure: Rebuilt.
	* configure.in: Recognize --disable-interpreter.

From-SVN: r31496
2000-01-19 05:06:03 +00:00
Andrew Haley b9f243c201 name-finder.cc (lookup): Check for dladdr function.
2000-01-18  Andrew Haley  <aph@cygnus.com>

	* name-finder.cc (lookup): Check for dladdr function.
	acconfig.h (HAVE_DLADDR): Add.
	configure.in: Check for HAVE_DLADDR
	configure: Rebuilt.
	include/config.h.in:  Rebuilt.

From-SVN: r31487
2000-01-18 14:42:14 +00:00
Andrew Haley 0447654432 prims.cc (_Jv_RunMain): Set the name of this executable.
2000-01-17  Andrew Haley  <aph@cygnus.com>

	* prims.cc (_Jv_RunMain): Set the name of this executable.

From-SVN: r31486
2000-01-18 14:37:34 +00:00
Tom Tromey d269d25cd3 natThrowable.cc (fillInStackTrace): Return `this' even when backtrace can't be computed.
* java/lang/natThrowable.cc (fillInStackTrace): Return `this' even
	when backtrace can't be computed.

From-SVN: r31483
2000-01-18 06:22:13 +00:00
Tom Tromey 4f5a5d5cdb configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Fixed typo in AC_CONFIG_SUBDIRS call.

From-SVN: r31482
2000-01-18 05:33:35 +00:00
Tom Tromey 7af8555855 Runtime.java (loadLibraryInternal): Declare.
* java/lang/Runtime.java (loadLibraryInternal): Declare.
	* java/lang/natClassLoader.cc (_Jv_FindClass): Removed dead copy.
	(_Jv_FindClassInCache): Likewise.
	(_Jv_FindClass): Don't conditionalize body on INTERPRETER.
	(findSystemClass): Try to load class from compiled module.
	Include Runtime.h.
	* java/lang/natRuntime.cc (load): Use UTF-8 copy of filename.
	(loadLibrary): Likewise.
	(lt_preloaded_symbols): Define.
	(loadLibraryInternal): New method.
	* include/config.h.in: Rebuilt.
	* acconfig.h (USE_LTDL): Added.
	* Makefile.am (SUBDIRS): Added $(DIRLTDL).
	(INCLUDES): Added $(INCLTDL).b
	(libgcj_la_DEPENDENCIES): Added $(LIBLTDL).
	(libgcj_la_LIBADD): Likewise.
	* aclocal.m4, configure: Rebuilt.
	* configure.in: Added libltdl support.

From-SVN: r31472
2000-01-17 19:22:20 +00:00
Tom Tromey 06f5673716 Initial revision
From-SVN: r31468
2000-01-17 19:00:44 +00:00
Tom Tromey 451f21ef2d * prims.cc (_Jv_PrimClass): Use `JV_STATE_NOTHING', not `0'.
From-SVN: r31467
2000-01-17 18:56:43 +00:00
Andrew Haley 283a159fe3 natThrowable.cc: New file.
2000-01-14  Andrew Haley  <aph@cygnus.com>

	* java/lang/natThrowable.cc: New file.

	* java/lang/Throwable.java (fillInStackTrace): Make native.
	(printStackTrace): Call native method to do this.
	(Throwable): Call fillInStackTrace.
	(stackTrace): New variable.

	* include/jvm.h: Add _Jv_ThisExecutable functions.

	* prims.cc: (_Jv_execName): New variable.
	(catch_segv): Call fillInStackTrace.
	(catch_fpe): Ditto.
	(_Jv_ThisExecutable): New functions.
	(JvRunMain): Set the name of this executable.

	* Makefile.am: Add java/lang/natThrowable.cc.
	Add name-finder.cc.
	* Makefile.in: Rebuilt.

	* acconfig.h: Add HAVE_PROC_SELF_EXE.

	* configure.in: Force link with __frame_state_for in
	FORCELIBGCCSPEC.  Add new checks for backtrace.
	* include/config.h.in: Rebuilt.

	* name-finder.cc: New file.
	* include/name-finder.h: New file.

From-SVN: r31460
2000-01-17 15:45:24 +00:00
Anthony Green 2a198bc4bf StringBuffer.java (StringBuffer): Don't special case null argument.
2000-01-16  Anthony Green  <green@cygnus.com>

	* java/lang/StringBuffer.java (StringBuffer): Don't special case
	null argument.

From-SVN: r31451
2000-01-17 00:00:43 +00:00
Jeff Sturm 2ce7461bd0 StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).
2000-01-16  Jeff Sturm  <jsturm@sigma6.com>

	* java/io/StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).

From-SVN: r31449
2000-01-16 21:33:46 +00:00
Anthony Green ed4c3661d5 *** empty log message ***
From-SVN: r31448
2000-01-16 21:01:25 +00:00
Anthony Green 31fcb1b9a9 pr83.out: New file.
* libjava.lang/pr83.out: New file.
	* libjava.lang/pr83.java: New file.

	* libjava.lang/pr109.out: New file.
	* libjava.lang/pr109.java: New file.

From-SVN: r31446
2000-01-16 19:55:09 +00:00
Tom Tromey 357100a3ef natClassLoader.cc (_Jv_FindClass): Register `loader', not system loader, as initiating loader.
* java/lang/natClassLoader.cc (_Jv_FindClass): Register `loader',
	not system loader, as initiating loader.

From-SVN: r31395
2000-01-13 18:13:31 +00:00
Tom Tromey b5fba37d0f klass.out: New file.
* libjava.lang/klass.out: New file.
	* libjava.lang/klass.java: New file.

From-SVN: r31333
2000-01-11 18:58:49 +00:00
Tom Tromey 6baee4c5c3 natSystem.cc (getpwuid_adaptor): New adaptor for HP/UX.
* java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
	HP/UX.  From David Scott Urban.

From-SVN: r31332
2000-01-11 18:58:13 +00:00
Jeff Sturm 0cf69affdd natMath.cc (pow): Cast args to `double', not `jdouble'.
2000-01-10  Jeff Sturm  <jsturm@sigma6.com>

	* java/lang/natMath.cc (pow): Cast args to `double', not
	`jdouble'.
	(atan2): Likewise.
	(IEEEremainder): Likewise.
	* java/lang/mprec.h: Don't wrap includes in `extern "C"'.
	* java/lang/fdlibm.h: Don't wrap includes in `extern "C"'.

From-SVN: r31305
2000-01-10 20:02:47 +00:00
Anthony Green b11f64301a natString.cc (init): Test for overflow condition during out of bounds check.
2000-01-09  Anthony Green  <green@cygnus.com>

	* java/lang/natString.cc (init): Test for overflow condition
	during out of bounds check.
	(getChars): Throw StringIndexOutOfBoundsException, not
	ArrayIndexOutOfBoundsException.
	(getBytes): Ditto.
	(regionMatches): Obey case option during string comparison.

	* configure.host (ligcj_interpreter): New variable.  Enable
	interpreter by default on IA-32.
	* configure.in:  Examine libgcj_interpreter.
	* configure: Rebuilt.

From-SVN: r31300
2000-01-09 22:25:54 +00:00
Tom Tromey be63d11f60 * mauve-libgcj: Don't disable ClassTest.
From-SVN: r31278
2000-01-07 20:42:26 +00:00
Tom Tromey bd3a924b10 * java/lang/natClass.cc (getClasses): Wrote.
From-SVN: r31276
2000-01-07 20:23:01 +00:00
Tom Tromey 55ff3de705 natClass.cc (_getConstructors): Correctly check whether method name is the init name.
* java/lang/natClass.cc (_getConstructors): Correctly check
	whether method name is the init name.
	(getMethod): Look at accflags on method in `klass', not `this'.

From-SVN: r31258
2000-01-06 18:18:15 +00:00
Tom Tromey 41ecf9300e natClass.cc (getMethod): Compute offset relative to `klass's methods table, not `this's table.
* java/lang/natClass.cc (getMethod): Compute offset relative to
	`klass's methods table, not `this's table.

	* java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA):
	In unwrapping/widening case, check whether `k' is null, not
	whether it is primitive.  Initialize `num' from `argelts', not
	`paramelts'.  Correct create and pass arguments to ffi_call.
	Don't let presence of `this' argument affect index used to look in
	argument arrays.
	(COPY): Set appropriate element in `values' vector.

From-SVN: r31253
2000-01-06 00:56:21 +00:00
Tom Tromey d6ab24c514 * java/lang/natClass.cc: Include <gcj/method.h>.
From-SVN: r31249
2000-01-05 22:52:54 +00:00
Tom Tromey 1258cadadc Class.h (_getMethods): Correctly declare as private, not public.
* java/lang/Class.h (_getMethods): Correctly declare as private,
	not public.

From-SVN: r31246
2000-01-05 22:29:27 +00:00
Tom Tromey 6f2b93eb2f Class.h (_getMethods): Declare.
* java/lang/Class.h (_getMethods): Declare.
	* java/lang/Class.java (_getMethods): Declare.
	* java/lang/natClass.cc (getDeclaringClass): Always return NULL.
	(getDeclaredClasses): Always return empty array.
	(_getMethods): New method.
	(getMethods): Wrote.
	(getDeclaredMethod): Return `rmethod'.
	(finit_name): New global.
	(getDeclaredMethods): Check for finit_name.
	(_getMethods): Likewise.
	(getMethod): Only return public methods.

From-SVN: r31245
2000-01-05 22:22:10 +00:00
Tom Tromey 5dab1948f6 natMethod.cc (get_ffi_type): Test size of jboolean and select correct ffi type on that basis.
* java/lang/reflect/natMethod.cc (get_ffi_type): Test size of
	jboolean and select correct ffi type on that basis.
	(_Jv_CallNonvirtualMethodA): Handle `void' return type.
	Constructor call always has `void' return type.

From-SVN: r31242
2000-01-05 17:23:34 +00:00
Tom Tromey 95c6cc0ab5 Class.h (getSignature): Updated.
* java/lang/Class.h (getSignature): Updated.
	* java/lang/Class.java (getSignature): Updated.
	* java/lang/natClass.cc (getSignature): Added `is_constructor'
	argument.
	(getConstructor): Ensure constructor is public.
	(_getConstructors): Check for public-ness of constructor when
	`declared' is false, not when it is true.

From-SVN: r31241
2000-01-05 16:35:20 +00:00
Warren Levy 730ecdd3c3 natPlainDatagramSocketImpl.cc (peek): Removed unnecesary comment.
* java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
	comment.
	(receive): Set the sender's address in the DatagramPacket.

From-SVN: r31218
2000-01-04 22:41:58 +00:00
Tom Tromey 0f918fea8b [multiple changes]
2000-01-04  Tom Tromey  <tromey@cygnus.com>

	* java/lang/reflect/natConstructor.cc (newInstance): Pass
	declaring class as return_type argument to
	_Jv_CallNonvirtualMethodA.
	* java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In
	constructor case, create object and use it as `this' argument.
	* java/lang/Class.h (_getConstructors): Declare.
	(_getFields): Declare.
	* java/lang/Class.java (getConstructors): Wrote.
	(_getConstructors): New native method.
	(getDeclaredConstructors): Wrote.
	(_getFields): Declare new native method.
	* java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Removed
	incorrect comment.
	(getMethod): Work correctly when class is primitive.
	(getDeclaredMethods): Likewise.  Compute offset using `method',
	not `mptr'.
	(getDeclaredMethod): Likewise.
	(getConstructor): Wrote.
	(ConstructorClass): New define.
	(getDeclaredConstructor): Wrote.
	(_getConstructors): New method.
	(_getFields): New method.
	(getFields): Wrote.

	* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.

	* prims.cc: Remove `#pragma implementation'.
	* gcj/array.h: Remove `#pragma interface'.

	* prims.cc (_Jv_equaln): New function.
	* java/lang/Class.java (getSignature): Declare.
	* resolve.cc (_Jv_LookupDeclaredMethod): Moved to natClass.cc.
	* java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Moved from
	resolve.cc.
	(getSignature): New method.
	(getDeclaredMethod): Wrote.
	(getMethod): Wrote.
	Include StringBuffer.h.
	* java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
	as a friend.  Unconditionally declare _Jv_LookupDeclaredMethod as
	a friend.
	(getSignature): Declare.
	* include/jvm.h (_Jv_GetTypesFromSignature): Declare.
	(_Jv_equaln): Declare.
	(_Jv_CallNonvirtualMethodA): Declare.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natConstructor.cc.
	(java/lang/reflect/Constructor.h): New target.
	* java/lang/reflect/natConstructor.cc: New file.
	* java/lang/reflect/Constructor.java (newInstance): Now native.
	(declaringClass): Renamed from decl_class.
	(offset): Renamed from index.
	(getType): New native method.
	(getModifiers): Now native.
	(getParameterTypes): Call getType if required.
	(hashCode): Include hash code from declaring class.
	(modifiers): Removed.
	(toString): Call getType if required.
	* gcj/method.h (_Jv_FromReflectedConstructor): New function.
	* java/lang/reflect/natMethod.cc (hack_call): New method.
	Removed `#if 0' around FFI code.
	Include <gnu/gcj/RawData.h>.
	(invoke): Use _Jv_CallNonvirtualMethodA.  Throw
	IllegalArgumentException when argument object and class disagree.
	(_Jv_GetTypesFromSignature): New function.
	(getType): Use it.
	(ObjectClass): New define.
	(_Jv_CallNonvirtualMethodA): New function.
	* java/lang/reflect/Method.java (hack_trampoline): New method.
	(hack_call): New native method.

1999-12-21  Per Bothner  <per@bothner.com>

	* java/lang/natClass.cc (getDeclaredMethods): Correctly compute
	offset in new Method.

From-SVN: r31199
2000-01-04 08:46:52 +00:00
Tom Tromey f540ec2448 mauve.exp (mauve_compute_uses): Let user select specific tests to run.
* libjava.mauve/mauve.exp (mauve_compute_uses): Let user select
	specific tests to run.

From-SVN: r31183
2000-01-03 20:18:19 +00:00
Bryce McKinlay 9310f1eb4c Commit forgotten Thread.java patch.
From-SVN: r31094
1999-12-27 07:33:22 +00:00
Bryce McKinlay 43cbc9430d natObject.cc (notify): Throw message with IllegalMonitorStateException.
1999-12-22  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/natObject.cc (notify): Throw message with
        IllegalMonitorStateException.
        (notifyAll): Ditto.
        (wait): Ditto.
        * java/lang/Thread.java (isInterrupted): Don't clear interrupt_flag.
        (isInterrupted_): New function, which does clear interrupt_flag.
        (interrupt): Use `isInterrupted_'.
        * java/lang/natThread.cc (interrupt): Add comment.
        (join): Set `Prev' in joiner loop.
        Change various calls to `isInterrupted' to use `isInterrupted_'.
        * posix-threads.cc (_Jv_CondWait): Allways use pthread_cond_timedwait
        on linux. Set result to 0 on an interrupt. Test interrupted status
        of java Thread object directly.
        FLAG_INTERRUPTED: removed.
        (_Jv_ThreadStart): Throw OutOfMemoryError if pthread_create fails.
        (_Jv_ThreadInterrupt): Don't set FLAG_INTERRUPTED.
        (_Jv_InitThreads): Don't block SIGINT.
        (_Jv_ThreadWait): Don't configure SIGINT handler.

From-SVN: r31082
1999-12-24 01:00:46 +00:00
Tom Tromey f9f1f4a651 * mauve-libgcj: Added java.lang.reflect.Modifier.toString12.
From-SVN: r31061
1999-12-21 23:50:01 +00:00
Tom Tromey bcc7684092 Modifier.java (STRICT): New constant.
* java/lang/reflect/Modifier.java (STRICT): New constant.
	(isStrict): New method.
	(toString): Added `strict'.

From-SVN: r31040
1999-12-20 23:05:21 +00:00
Anthony Green d352598f80 Alpha Linux changes.
From-SVN: r31030
1999-12-20 05:55:34 +00:00
Anthony Green 7013e7cda9 libgcjdata.c: New file.
1999-12-19  Anthony Green  <green@cygnus.com>

        * libgcjdata.c: New file.
        * libgcj.spec.in: Use @LIBDATASTARTSPEC@ in startfile.
        * configure: Rebuilt.
        * configure.in (LIBDATASTARTSPEC): Force data with a known name
        into the program.
        * Makefile.in: Rebuilt.
        * Makefile.am: Build libgcjdata.a.

        * libgcj.spec.in: Use @FORCELIBGCCSPEC@ in startfile.
        * configure: Rebuilt.
        * configure.in (FORCELIBGCCSPEC): Force important parts of libgcc
        into every program.

From-SVN: r31027
1999-12-20 02:18:11 +00:00
Tom Tromey ccfe7d0a0d re GNATS libgcj/111 (bug in reflection code)
* java/lang/reflect/Method.java (toString): Call getType if
	required.  Partial fix for PR libgcj/111.  From Per Bothner.

From-SVN: r31002
1999-12-18 00:44:00 +00:00
Tom Tromey ce63fdce90 * java/lang/natPosixProcess.cc (startProcess): Don't use sprintf.
From-SVN: r30996
1999-12-17 16:06:17 +00:00
Bryce McKinlay 5ac99d9adc Boolean.java (Boolean(String)): Set Value' to false on a null String constructor parameter.
1999-12-16  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/Boolean.java (Boolean(String)): Set Value' to false on a
        null String constructor parameter.
        * java/net/natPlainSocketImpl.cc: Remove unneccessary sprintf calls
        for exception messages.
        BooleanClass: declare.
        (setOption): Use BooleanClass instead of Class.forName() for
        instanceof test.
        (bind): Cast 4th parameter of setsockopt to char *' for
        compatibility with older Solaris headers.
        * java/net/natPlainDatagramSocketImpl.cc: Remove unneccessary
        sprintf calls for exception messages.
        BooleanClass, IntegerClass: declare.
        (setOption): Use BooleanClass and IntegerClass, not Class.forName()
        for instanceof test.

From-SVN: r30988
1999-12-17 05:11:28 +00:00
Tom Tromey 6150df627a natSystem.cc (init_properties): Don't set user.name or user.home if NO_GETUID defined.
* java/lang/natSystem.cc (init_properties): Don't set user.name or
	user.home if NO_GETUID defined.  Only set user.dir if getcwd
	exists.

	* include/config.h.in: Rebuilt.
	* acconfig.h (NO_GETUID): New define.
	* configure.in: Rebuilt.
	* configure.in: Define NO_GETUID in cross case.  Check for getcwd
	in native case.

From-SVN: r30964
1999-12-15 22:38:56 +00:00
Tom Tromey c97e511d31 re GNATS libgcj/117 (_Jv_PthreadCheckMonitor test is not portable.)
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Handle case
	where no recursive mutexes exist.  Fixes PR libgcj/117.

From-SVN: r30847
1999-12-09 16:57:27 +00:00
Anthony Green d3189ab7da jvm.h: Declare many functions with __attribute__((__malloc__)).
* include/jvm.h: Declare many functions with
	__attribute__((__malloc__)).
	* gcj/javaprims.h: Ditto.

From-SVN: r30794
1999-12-06 06:33:56 +00:00
Anthony Green 38a7fbac35 Updated the thanks list.
From-SVN: r30764
1999-12-03 03:00:39 +00:00
Bryce McKinlay aa620e4294 natString.cc (equalsIgnoreCase): return false if anotherString is null.
* java/lang/natString.cc (equalsIgnoreCase): return false if
        anotherString is null.
        * java/lang/Boolean.java (valueOf): return FALSE if argument is
        null.

From-SVN: r30763
1999-12-02 19:59:30 +00:00
Bryce McKinlay c390b4a687 ServerSocket.java (ServerSocket): Bind to any interface if bindAddr is null.
1999-12-02  Bryce McKinlay  <bryce@albatross.co.nz>

        * libjava/java/net/ServerSocket.java (ServerSocket): Bind to any
        interface if bindAddr is null.

From-SVN: r30755
1999-12-02 10:09:24 +00:00
Tom Tromey 4cb74b7695 re GNATS libgcj/98 (pthread_mutex_init in libjava/posix-threads.cc)
* posix-threads.cc (_Jv_MutexInit): Use _Jv_PthreadGetMutex to get
	mutex to initialize.  Initialize `count' if required.
	Fixes PR libgcj/98.

From-SVN: r30725
1999-11-30 18:53:15 +00:00
Per Bothner 9b811d11de exception.cc: Remove prototype declarations for malloc and free.
1999-11-27  Per Bothner  <per@bothner.com>

	* exception.cc:  Remove prototype declarations for malloc and free.
	These clash with recent versions of glibc, which specifies `throws ()'
	when __cplusplus is defined.  Instead, #include <stdlib.h>.

From-SVN: r30709
1999-11-29 19:43:55 +00:00
Tom Tromey 93d4556218 prims.cc (_Jv_NewObjectArray): Use _Jv_GetArrayElementFromElementType.
* prims.cc (_Jv_NewObjectArray): Use
	_Jv_GetArrayElementFromElementType.
	(_Jv_NewPrimArray): Likewise.
	* java/lang/natObject.cc (clone): Use
	_Jv_GetArrayElementFromElementType instead of sizeof.
	* java/lang/natSystem.cc (arraycopy): Use
	_Jv_GetArrayElementFromElementType.
	* include/jvm.h (_Jv_GetArrayElementFromElementType): New
	function.

From-SVN: r30655
1999-11-25 00:36:51 +00:00
Bryce McKinlay 429d7c746f re GNATS java.net/57 (potential buffer overruns)
1999-11-23  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/net/natPlainSocketImpl.cc: Fix potential buffer overruns in
        Exception messages. PR java.net/57.
        (bind): set SO_REUSEADDR before bind.
        * java/net/natPlainDatagramSocketImpl.cc: Fix potential buffer
        overruns. PR java.net/57.

From-SVN: r30637
1999-11-23 11:40:26 +00:00
Tom Tromey 3cf88fb4e8 sjlj jumbo patch
From-SVN: r30591
1999-11-19 19:13:42 +00:00
Tom Tromey 8cb9ab4b7e * no-threads.cc (_Jv_ThreadStart): Use JvFail and not JvAssert.
From-SVN: r30569
1999-11-18 07:32:50 +00:00
Tom Tromey 5b8c39e0aa natClass.cc (MCACHE_SIZE): Define as a power of 2 minus 1.
* java/lang/natClass.cc (MCACHE_SIZE): Define as a power of 2
	minus 1.
	(method_cache): Made larger.

From-SVN: r30568
1999-11-18 07:19:00 +00:00
Anthony Green a21d059766 ZipFile.java: Compute the offset of the ZipEntry data correctly.
* java/util/zip/ZipFile.java: Compute the offset of the ZipEntry
        data correctly.

From-SVN: r30439
1999-11-07 08:30:31 +00:00
Tom Tromey e4c4f09a1e * java/lang/natThread.cc (destroy): Removed incorrect comment.
From-SVN: r30423
1999-11-05 20:59:40 +00:00
Jeff Sturm 3948f9d08f boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current.
1999-11-05  Jeff Sturm  <jsturm@sigma6.com>

	* boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current.
	* prims.cc (parse_heap_size): Use end, not spec.  Use 1024
	multipler for `k'.

From-SVN: r30418
1999-11-05 17:34:32 +00:00
Tom Tromey ea638d6c94 natThread.cc (stop): Removed argument name.
* java/lang/natThread.cc (stop): Removed argument name.

	* java/lang/ThreadGroup.java (ThreadGroup(int)): No longer
	`private'; now has default access.
	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/ThreadGroup.h): Removed.

From-SVN: r30417
1999-11-05 17:10:17 +00:00
Tom Tromey 397f674e7f natClass.cc (method_cache_count): Removed.
* java/lang/natClass.cc (method_cache_count): Removed.
	(_Jv_FindMethodInCache): Don't loop looking for the hash entry.
	(_Jv_AddMethodToCache): Don't loop.

From-SVN: r30397
1999-11-04 19:47:01 +00:00
Tom Tromey 7f80fbe501 configure.in: Removed `qt' threads case.
* configure.in: Removed `qt' threads case.
	* include/quick-threads.h: Removed.
	* quick-threads.cc: Removed.

From-SVN: r30393
1999-11-04 17:12:25 +00:00
Tom Tromey 16f39e241a quick-threads.h (_Jv_ThreadCancel): Removed.
* include/quick-threads.h (_Jv_ThreadCancel): Removed.
	(_Jv_ThreadDestroy): Likewise.
	* include/no-threads.h (_Jv_ThreadCancel): Removed.
	(_Jv_ThreadDestroy): Likewise.
	* include/posix-threads.h (struct _Jv_Thread_t): Removed
	`exception' field.
	(_Jv_ThreadCancel): Removed decl.
	(_Jv_ThreadDestroy): Removed.
	* posix-threads.cc (_Jv_ThreadCancel): Removed.
	(throw_cleanup): Removed.
	(really_start): Don't push or pop cleanup.
	(_Jv_ThreadInitData): Don't initialize `exception' field.
	* java/lang/Thread.java (stop): Officially unimplemented.
	* java/lang/natThread.cc (stop): Officially unimplemented.

From-SVN: r30392
1999-11-04 16:45:11 +00:00
Tom Tromey f0447047c4 Actually removed files which were supposedly
removed a long time ago.

From-SVN: r30379
1999-11-03 19:25:13 +00:00
Bryce McKinlay 8fbe2d958a posix-threads.cc: Don't include boehm-config.h.
1999-11-02  Bryce McKinlay  <bryce@albatross.co.nz>

        * posix-threads.cc: Don't include boehm-config.h. Include gcconfig.h
        instead.

From-SVN: r30365
1999-11-03 03:10:22 +00:00
Bryce McKinlay 5e4f217316 posix-threads.cc: Don't include boehm-config.h.
1999-11-02  Bryce McKinlay  <bryce@albatross.co.nz>

        * posix-threads.cc: Don't include boehm-config.h.

From-SVN: r30361
1999-11-03 02:13:40 +00:00
Tom Tromey 965fe4f16f * boehm.cc: Don't include boehm-config.h.
From-SVN: r30359
1999-11-03 01:15:40 +00:00
Tom Tromey e40217a763 boehm.cc (_Jv_InitGC): Set GC_java_finalization.
* boehm.cc (_Jv_InitGC): Set GC_java_finalization.
	(sum_blocks): Removed.
	(_Jv_GCFreeMemory): Use GC_get_free_bytes.

From-SVN: r30335
1999-11-02 00:12:10 +00:00
Bryce McKinlay 6b5ba2ce34 PrintStream (PrintStream): Fix illegal usage of "this" before "super".
1999-11-01  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/io/PrintStream (PrintStream): Fix illegal usage of "this"
          before "super".
        * java/io/OutputStreamWriter (OutputStreamWriter): ditto.
        * java/io/InputStreamReader (InputStreamReader): ditto.

From-SVN: r30300
1999-11-01 01:15:37 +00:00
Tom Tromey b8c3c4f014 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/ClassLoader.h): New target.
	* java/lang/natClassLoader.cc (_Jv_FindClass): Removed reference
	to `redirect'.

	* include/java-props.h (_Jv_Compiler_Properties): Changed
	declaration.
	* gcj/array.h (JvRunMain, _Jv_RunMain): Don't declare.
	* include/jvm.h (_Jv_GCSetInitialHeapSize,
	_Jv_GCSetMaximumHeapSize): Declare.
	(JvRunMain, _Jv_RunMain): Declare.
	(_Jv_SetMaximumHeapSize, _Jv_SetInitialHeapSize): Declare.
	* nogc.cc (_Jv_GCSetInitialHeapSize): New function.
	(_Jv_GCSetMaximumHeapSize): Likewise.
	* boehm.cc (_Jv_GCSetInitialHeapSize): New function.
	(_Jv_GCSetMaximumHeapSize): Likewise.
	* prims.cc (parse_heap_size): New function.
	(_Jv_SetInitialHeapSize): Likewise.
	(_Jv_SetMaximumHeapSize): Likewise.
	(_Jv_Compiler_Properties): New global.
	* gij.cc (help): New function.
	(version): Likewise.
	(heap_size): Likewise.
	(heap_max_size): Likewise.
	(main): Parse arguments.  Set _Jv_Compiler_Properties.
	Include <config.h>, <java-props.h>.
	(_Jv_Compiler_Properties): Removed.

From-SVN: r30133
1999-10-22 19:43:41 +00:00
Bryce McKinlay 921150153a Test code for GNATS gcj/71 and GNATS gcj/72.
1999-10-19  Bryce McKinlay  <bryce@albatross.co.nz>

        * libjava.compile/invokeinterface: New directory.
        * libjava.compile/invokeinterface/Test.java: New file. Test code for
        PR gcj/71 and PR gcj/72.
        * libjava.compile/invokeinterface/A.java: New file.
        * libjava.compile/invokeinterface/B.java: New file.

From-SVN: r30094
1999-10-20 01:09:33 +01:00
Tom Tromey 4b84737d47 VMClassLoader.java (getVMClassLoader): New method.
* gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): New
	method.
	(redirect): New static field.
	* java/lang/ClassLoader.java (getSystemClassLoader): Now
	native
	(getVMClassLoader0): Removed.
	* java/lang/natClassLoader.cc (getVMClassLoader0): Removed.
	(redirect): Removed.
	(getSystemClassLoader): Implemented.

From-SVN: r30075
1999-10-18 22:57:07 +00:00
Anthony Green 6c413a50e6 ClassLoader.java (getSystemResource): Use getSystemClassLoader instead of ClassLoader.system.
* java/lang/ClassLoader.java (getSystemResource): Use
        getSystemClassLoader instead of ClassLoader.system.
        (getSystemResourceAsStream): Ditto.

        * java/lang/natClassLoader.cc (redirect): Make static and
        remove #ifdef INTERPRETER so it is always defined.
        (getVMClassLoader0): Remove #ifdef INTERPRETER so it always
        returns a VMClassLoader.

        * java/util/ResourceBundle.java (trySomeGetBundle): Create a
        PropertyResourceBundle if a properties file is found before a
        ResourceBundle class.

From-SVN: r30048
1999-10-17 03:11:50 +00:00
Tom Tromey 76ed0c0a4b gij.cc (main): Formatting fixes.
* gij.cc (main): Formatting fixes.
	(_Jv_Compiler_Properties): Define.
	* java/lang/natSystem.cc (_Jv_Environment_Properties): Don't
	declare.
	(init_properties): Set properites from _Jv_Compiler_Properties.
	* include/java-props.h (_Jv_Compiler_Properties,
	_Jv_Environment_Properties): Declare.

From-SVN: r30020
1999-10-15 16:53:41 +00:00
Tom Tromey 3ae21bfccf * include/java-props.h: Added copyright.
From-SVN: r30018
1999-10-15 15:42:26 +00:00
Anthony Green ffccc6bee2 libtool-version: Catch up by incrementing current.
* libtool-version: Catch up by incrementing current.

        * configure.host: Disable use of GCJ_PROPERTIES for mips-tx39.
        * configure, include/config.h.in: Rebuilt.
        * acconfig.h (DISABLE_GETENV_PROPERTIES): Undefine.
        * configure.in: Added --disable-getenv-properties and new define
        `DISABLE_GETENV_PROPERTIES'.

        * prims.cc (PROCESS_GCJ_PROPERTIES): Define.
        (next_property_key): New function.
        (next_property_value): New function.
        (process_gcj_properties): New function.
        (JvRunMain): Call process_gcj_properties.
        (_JvRunMain): Ditto.

        * java/lang/natSystem.cc (init_properties): Set properties defined
        in GCJ_PROPERTIES.  Also add 1.2 style versioning properties.

        * include/java-props.h: New file.

        * java/lang/natSystem.cc (init_properties): Add new properties to
        conform with Java Product Versioning Specification.

From-SVN: r30007
1999-10-15 06:07:41 +00:00
Tom Tromey 006d4a9b37 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Fixed test for --disable-java-net.

From-SVN: r29931
1999-10-13 00:00:35 +00:00
Tom Tromey f2646bf2fa configure.in (GCJ): Define as "target-gcj", not "target/gcj" when building Canadian cross.
* configure.in (GCJ): Define as "target-gcj", not "target/gcj"
	when building Canadian cross.
	(NATIVE): Don't define when cross-compiling.

From-SVN: r29848
1999-10-06 23:13:37 +00:00
Tom Tromey 97cf151d27 natPlainSocketImpl.cc: Don't include headers if java.net is disabled.
* java/net/natPlainSocketImpl.cc: Don't include headers if
	java.net is disabled.

From-SVN: r29812
1999-10-04 21:37:30 +00:00
Tom Tromey 39acd93283 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (ZINCS): Removed.  This is defined in configure.in
	when needed, and must be left empty when not needed.

From-SVN: r29809
1999-10-04 19:09:09 +00:00
Anthony Green aedf9aa78c Fix changelog entry
From-SVN: r29791
1999-10-04 03:44:07 +00:00
Anthony Green 0d9cd062a0 A little clean up.
From-SVN: r29790
1999-10-04 03:30:54 +00:00
Anthony Green fc78679f9e Refreshed from htdocs
From-SVN: r29768
1999-10-02 16:39:36 +00:00
Steve Chamberlain f3775ba228 Missing file from last commit
From-SVN: r29766
1999-10-02 15:46:27 +00:00
Steve Chamberlain 9a480d6923 The following patches include a couple of fixes for cross toolchains,
and endian bits for the picojava port.  I am committing this (and the
rebuilt Makefile.in/configure files).

From-SVN: r29765
1999-10-02 15:44:24 +00:00
Tom Tromey edf4b387c0 re GNATS gcj/56 (gcj segfaults in jc1 on OK java file)
* libjava.lang/PR56.out: New file.
	* libjava.lang/PR56.java: New file.

From-SVN: r29760
1999-10-02 00:39:04 +00:00
Tom Tromey 4b68fe8a36 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Set classpath when invoking gcj.  Use changequote
	around sed invocation.

	* java/net/natPlainSocketImpl.cc: Stub native functions if
	DISABLE_JAVA_NET is defined.
	* java/net/natPlainDatagramSocketImpl.cc (setTimeToLive): Fixed
	typo in exception string.
	(getTimeToLive): Likewise.
	Stub native functions if DISABLE_JAVA_NET is defined.
	* java/net/natInetAddress.cc: Stub native functions if
	DISABLE_JAVA_NET is defined.
	* configure.host: Disable java.net for mips-tx39.
	* configure, include/config.h.in: Rebuilt.
	* acconfig.h (DISABLE_JAVA_NET): Undefine.
	* configure.in: Added --disable-java-net and new define
	`DISABLE_JAVA_NET'.

From-SVN: r29759
1999-10-02 00:19:01 +00:00
Tom Tromey b65fcf051f * java/net/natPlainDatagramSocketImpl.cc: Indentation fix.
From-SVN: r29737
1999-09-30 22:20:29 +00:00
Bryce McKinlay faf1fdf0b2 README: New file.
1999-09-29  Bryce McKinlay  <bryce@albatross.co.nz>

        * README: New file.

From-SVN: r29717
1999-09-30 03:17:36 +01:00
Tom Tromey 2450ddbbda re GNATS gcj/55 (jc1 dies on implicit String conversion)
* libjava.lang/PR55.out: New file.
	* libjava.lang/PR55.java: New file.

From-SVN: r29714
1999-09-29 23:10:11 +00:00
Tom Tromey ab31268c62 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in (PROCESS): In POSIX case, only set if not already
	set.
	* configure.host (PROCESS): Set in mips-tx39 case.

From-SVN: r29700
1999-09-28 22:16:57 +00:00
Tom Tromey 54ce745286 aclocal.m4, configure: Rebuilt.
* aclocal.m4, configure: Rebuilt.
	* acinclude.m4 (LIB_AC_PROG_CC, LIB_AC_PROG_CXX): Provide

From-SVN: r29698
1999-09-28 20:14:11 +00:00
Tom Tromey 8c14177ca8 sparc-signal.h (SIGNAL_HANDLER): Third argument now a `void *'.
* include/sparc-signal.h (SIGNAL_HANDLER): Third argument now a
	`void *'.
	(MAKE_THROW_FRAME): Cast third argument back to `ucontext_t *'.

From-SVN: r29682
1999-09-27 21:16:40 +00:00
Tom Tromey 98e7ae2962 re GNATS java.util/47 (Date.toString() returns embedded newline)
Fix for PR java.util/47:
	* configure, include/config.h: Rebuilt.
	* configure.in: Don't look for ctime or ctime_r.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Don't mention natDate.cc.
	* java/util/natDate.cc: Removed.
	* java/util/TimeZone.java (tzIDs, rawOffsets, timeZones): New
	static fields.
	(getAvailableIDs): Rewrote.
	(getTimeZone): Rewrote.
	* java/util/Date.java (toGMTString): New method.
	(toLocaleString): New method.
	(toString): Rewrote.

From-SVN: r29656
1999-09-24 19:12:23 +00:00
Tom Tromey 8cd098069c configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Print message when checking to see if gcj can
	handle -fuse-divide-subroutine.

From-SVN: r29628
1999-09-23 19:38:11 +00:00
Tom Tromey f08113ce11 natFirstThread.cc (run): Renamed from `run0'.
* java/lang/natFirstThread.cc (run): Renamed from `run0'.  Removed
	dead code.
	* java/lang/FirstThread.java (run0): Renamed to `run'.
	(run): Removed.

From-SVN: r29626
1999-09-23 19:05:50 +00:00
Tom Tromey 9b0cb28706 re GNATS gcj/51 (Writing on OutputStream of bad Socket kills app with "Broken pipe")
* prims.cc (main_init): New function.
	(JvRunMain): Call it.
	(_Jv_RunMain): Likewise.
	Include <signal.h>.
	(main_init): Ignore SIGPIPE.  Fixes PR 51.

From-SVN: r29625
1999-09-23 18:50:59 +00:00
Tom Tromey 17f4971f7b * libgcj.spec.in: Use `jc1' spec, not `cc1' spec.
From-SVN: r29602
1999-09-22 20:44:41 +00:00
Bryce McKinlay 5ab00e275b MessageFormat.java (MessageFormat(String)): Set the default locale.
1999-09-16  Bryce McKinlay  <bryce@albatross.co.nz>
	* java/text/MessageFormat.java (MessageFormat(String)): Set the
	default locale.
	* java/text/NumberFormat.java: Check that object is a Number. If
	not, throw IllegialArgumentException.

From-SVN: r29574
1999-09-22 05:41:26 +01:00
Tom Tromey 707f5f6d45 Output_UTF8.java (write): Don't exit loop unless both `inlength' and `bytes_todo' are 0.
* gnu/gcj/convert/Output_UTF8.java (write): Don't exit loop unless
        both `inlength' and `bytes_todo' are 0.  Simplified 2-byte case.

From-SVN: r29570
1999-09-21 23:20:43 +00:00
Tom Tromey 5057b5e8d1 posix-threads.h (_Jv_MutexDestroy): Use _Jv_PthreadGetMutex.
* include/posix-threads.h (_Jv_MutexDestroy): Use
	_Jv_PthreadGetMutex.
	(_Jv_MutexLock): Likewise.
	(_Jv_MutexUnlock): Likewise.

From-SVN: r29569
1999-09-21 23:01:23 +00:00
Tom Tromey 49d385e3cd OutputStreamWriter.java (OutputStreamWriter): Reverted previous patch; it too was incorrect.
* java/io/OutputStreamWriter.java (OutputStreamWriter): Reverted
	previous patch; it too was incorrect.
	* java/io/PrintStream.java (PrintStream): Likewise.

From-SVN: r29566
1999-09-21 21:35:41 +00:00
Tom Tromey 118a6ea134 OutputStreamWriter.java (OutputStreamWriter): Don't refer to `this' before calling superclass constructor.
* java/io/OutputStreamWriter.java (OutputStreamWriter): Don't
	refer to `this' before calling superclass constructor.
	* java/io/PrintStream.java (PrintStream): Don't refer to `this'
	before calling superclass constructor.

From-SVN: r29560
1999-09-21 19:49:13 +00:00
Tom Tromey 8801244b4f configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Send output of `-fuse-divide-subroutine' test
	compilation to /dev/null.

From-SVN: r29529
1999-09-20 20:09:42 +00:00
Tom Tromey 86bcc1a3b4 java-insns.h: Turned constants into an enum.
* include/java-insns.h: Turned constants into an enum.  Added
	multiple-inclusion protection.

From-SVN: r29406
1999-09-14 14:19:59 +00:00
Tom Tromey 27e934d8ba configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Build include/Makefile.
	* Makefile.in: Rebuilt.
	* Makefile.am (SUBDIRS): Added gcj and include.
	(install-data-local): New target.
	(extra_headers): New macro.
	* include/Makefile.in: New file.
	* include/Makefile.am: New file.

	* interpret.cc: Don't include gcj/field.h or gcj/cni.h.
	* java/lang/reflect/natField.cc: Don't include gcj/field.h or
	gcj/cni.h.
	* boehm.cc: Don't include java-threads.h or gcj/field.h.
	* resolve.cc: Include config.h.
	* defineclass.cc: Include config.h.
	* include/java-interp.h: Don't include config.h.
	* include/jvm.h: Include java-threads.h, Object.h, java-gc.h,
	cni.h.

	* gcj/javaprims.h: Regenerated namespace decls.
	* classes.pl (scan): Don't put `;' after closing brace.

	* Makefile.in: Rebuilt.
	* Makefile.am (INCLUDES): Added -I for top_srcdir.
	* configure.in: Create gcj/Makefile.
	* gcj/Makefile.in: New file.
	* gcj/Makefile.am: New file.
	* java/lang/Object.h: Don't include any other headers.
	* gcj/array.h: Renamed from include/java-array.h.
	* gcj/field.h: Renamed from include/java-field.h.
	* gcj/method.h: Renamed from include/java-method.h.
	* gcj/cni.h, gcj/javaprims.h: Moved from include/.
	Updated all files to reflect new include structure.

From-SVN: r29278
1999-09-10 22:03:10 +00:00
Tom Tromey f1b856d94e configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Fixed typo; variable is THREADSPEC and not
	THREADSPECS.

From-SVN: r29251
1999-09-10 00:10:04 +00:00
Tom Tromey c45a8466e6 posix-threads.h (_Jv_PthreadCheckMonitor): Reverted previous change and implemented a correct test in the __m_count case.
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Reverted
	previous change and implemented a correct test in the __m_count
	case.

From-SVN: r29209
1999-09-08 17:10:22 +00:00
Tom Tromey 400ec27079 posix-threads.h (_Jv_PthreadCheckMonitor): Changed test in __m_count case.
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Changed test
	in __m_count case.

From-SVN: r29193
1999-09-08 07:01:32 +00:00
Tom Tromey 472236af04 posix-threads.cc (_Jv_CondWait): pthread_ calls return error code and don't set errno.
* posix-threads.cc (_Jv_CondWait): pthread_ calls return error
	code and don't set errno.

From-SVN: r29179
1999-09-08 02:31:33 +00:00
Tom Tromey fd59e3a04e posix-threads.cc (_Jv_CondWait): Check `errno' against EINTR, not `r'.
1999-09-07  Tom Tromey  <tromey@cygnus.com>

	* posix-threads.cc (_Jv_CondWait): Check `errno' against EINTR,
	not `r'.  Changed `done_sleeping' to a `bool'.

1999-09-07  Matt Welsh <mdw@cs.berkeley.edu

	* libjava/posix-threads.cc: Added _Jv_ThreadDataKey.
	Added FLAG_INTERRUPTED to indicate that a thread was interrupted
	by another thread, rather than by the GC.
	(_Jv_CondWait): Prevent premature thread wakeup by GC.
	(_Jv_InitThreads): Initialize _Jv_ThreadDataKey.
	* libjava/include/posix-threads.h (_Jv_ThreadCurrentData): New
	function.

From-SVN: r29177
1999-09-08 00:43:06 +00:00
Tom Tromey 1d189890ae re GNATS libgcj/3 (FileInputStream.available always returns 0)
* configure: Rebuilt.
	* configure.in: Check for fstat function.
	* java/io/natFileDescriptorPosix.cc (available): Use fstat() if
	FIONREAD fails.
This fixes PR 3

From-SVN: r29078
1999-09-03 07:42:40 +00:00
Tom Tromey ec52881776 java-array.h (jobjectArrayjchar): Removed unused declaration.
* include/java-array.h (jobjectArrayjchar): Removed unused
	declaration.

From-SVN: r29068
1999-09-02 23:47:38 +00:00
Tom Tromey 773c6f0076 natClassLoader.cc (_Jv_WaitForState): Call _Jv_PrepareCompiledClass while holding class mutex.
* java/lang/natClassLoader.cc (_Jv_WaitForState): Call
	_Jv_PrepareCompiledClass while holding class mutex.

From-SVN: r29063
1999-09-02 19:33:50 +00:00
Tom Tromey bc5afba452 posix-threads.h (PTHREAD_MUTEX_IS_STRUCT): New define.
* include/posix-threads.h (PTHREAD_MUTEX_IS_STRUCT): New define.
	(_Jv_PthreadGetMutex): Use it.
	(_Jv_PthreadCheckMonitor): Use new M_COUNT macros.
	(_Jv_MutexInit): Use PTHREAD_MUTEX_IS_STRUCT.
	(_Jv_MutexLock): Likewise.
	(_Jv_MutexUnlock): Likewise.
	* include/config.h.in: Rebuilt.
	* acconfig.h (PTHREAD_MUTEX_HAVE_M_COUNT,
	PTHREAD_MUTEX_HAVE___M_COUNT): New undefs.
	* configure: Rebuilt.
	* libgcj.spec.in: Don't mention INTERPSPEC.
	* configure.in (INTERPSPEC): Removed.
	Only run pthreads-related checks when using POSIX threads.  Check
	for m_count and __m_count in mutex structure.

From-SVN: r29048
1999-09-02 06:27:00 +00:00
Matt Welsh a41cb705f6 natClass.cc: Fixed notification of threads when class initialization is complete.
* java/lang/natClass.cc: Fixed notification of threads
	when class initialization is complete.

From-SVN: r29043
1999-09-02 03:46:35 +00:00
Tom Tromey e409a2c8f4 Modifier.java (ALL_FLAGS): New constant.
* java/lang/reflect/Modifier.java (ALL_FLAGS): New constant.
	* resolve.cc: Removed constants defined by
	java.lang.reflect.Modifier.
	Include <java/lang/reflect/Modifier.h>.
	(_Jv_ResolvePoolEntry): Use values from Modifier.
	(_Jv_DetermineVTableIndex): Likewise.
	(_Jv_PrepareClass): Likewise.
	(ncode): Likewise.
	* defineclass.cc (_Jv_ClassReader): Removed constants defined by
	java.lang.reflect.Modifier.
	Include <java/lang/reflect/Modifier.h>.
	(checkExtends): Use values from Modifier.
	(checkImplements): Likewise.
	(handleField): Likewise.
	(handleConstantValueAttribute): Likewise.
	(handleFieldsEnd): Likewise.
	(handleMethod ): Likewise.
	(handleMethodsEnd): Likewise.
	(handleClassBegin): Likewise.
	* interpret.cc: Removed constants defined by
	java.lang.reflect.Modifier.
	(continue1): Use values from Modifier.
	* java/lang/natClassLoader.cc: Removed constants defined by
	java.lang.reflect.Modifier.

From-SVN: r29037
1999-09-01 22:02:20 +00:00
Tom Tromey 6c2a11802a natClassLoader.cc (_Jv_NewClass): Use JV_STATE_NOTHING, not `0'.
* java/lang/natClassLoader.cc (_Jv_NewClass): Use
	JV_STATE_NOTHING, not `0'.
	* java/lang/Class.h: Replaced JV_STATE_ defines with enum.

From-SVN: r29033
1999-09-01 21:05:17 +00:00
Tom Tromey 45329b398e posix-threads.cc (_Jv_CondWait): Use _Jv_PthreadGetMutex.
* posix-threads.cc (_Jv_CondWait): Use _Jv_PthreadGetMutex.
	* include/posix-threads.h (_Jv_Mutex_t): Define as structure,
	except on Linux.
	(_Jv_PthreadGetMutex): New function.
	(_Jv_PthreadCheckMonitor): Use it.
	(_Jv_MutexInit): Likewise.  ALso, initialize `count'.
	(_Jv_MutexLock): Update `count'.
	(_Jv_MutexUnlock): Likewise.
	(_Jv_PthreadCheckMonitor): Use Linux-specific knowledge when
	appropriate.

From-SVN: r29032
1999-09-01 21:03:18 +00:00
Kresten Krab Thorup 4499762c6e * ChangeLog: update.
From-SVN: r29031
1999-09-01 18:49:55 +00:00
Tom Tromey 6e87747b6d posix-threads.cc (_Jv_CondWait): Call _Jv_PthreadCheckMonitor.
* posix-threads.cc (_Jv_CondWait): Call _Jv_PthreadCheckMonitor.
	* include/posix-threads.h (_Jv_PthreadCheckMonitor): New
	function.
	(_Jv_CondNotify): Use it.
	(_Jv_CondNotifyAll): Likewise.

	* java/lang/Class.h (JV_STATE_NOTHING): Correct misspelling.

From-SVN: r29030
1999-09-01 18:29:39 +00:00
Kresten Krab Thorup b1133adfca Makefile.am (.java.lo): Add rule.
* Makefile.am (.java.lo): Add rule.

	* Makefile.in: Rebuilt.

From-SVN: r29029
1999-09-01 18:22:05 +00:00
Tom Tromey 1aaeb2f0b5 jvm.h (_Jv_makeUtf8TypeConst): Removed unused declaration.
* include/jvm.h (_Jv_makeUtf8TypeConst): Removed unused
	declaration.

From-SVN: r29021
1999-09-01 02:36:40 +00:00
Tom Tromey 95c5608516 G19990304_01.out: New file.
* libjava.toshiba/G19990304_01.out: New file.
	* libjava.toshiba/G19990304_01.java: New file.

From-SVN: r28870
1999-08-25 18:38:58 +00:00
Tom Tromey 3d31bc7f58 G19990310_01.out: New file.
* libjava.lang/G19990310_01.out: New file.
	* libjava.lang/G19990310_01.java: New file.

From-SVN: r28865
1999-08-25 17:54:55 +00:00
Bryce McKinlay d55d01bdf8 * posix-threads.cc: Include <errno.h>.
From-SVN: r28831
1999-08-25 01:46:23 +01:00
Tom Tromey 657ac7664c boehm.cc: Undefine TRUE and FALSE.
* boehm.cc: Undefine TRUE and FALSE.

	* posix-threads.cc (_Jv_CondWait): Use ETIMEDOUT, not ETIME.

From-SVN: r28810
1999-08-24 04:01:06 +00:00
Alexandre Oliva b78639f6f2 Added missing whitespace in function calls within adaptors
Pointed out by Tom

From-SVN: r28803
1999-08-22 16:19:31 +00:00
Tom Tromey 33e8c77e61 re GNATS libgcj/40 (wait(timeout) wrongly throws IllegalMonitorState exception)
* posix-threads.cc (_Jv_CondWait): Treat a timeout as a normal
	result.  PR 40.

From-SVN: r28799
1999-08-22 02:37:04 +00:00
Alexandre Oliva ccfe7e4650 configure.in: Check for in_addr_t in netinet/in.h too.
* configure.in: Check for in_addr_t in netinet/in.h too.  Check
for ip_mreq too.
* acconfig.h: Define HAVE_IN_ADDR_T instead of in_addr_t.
(HAVE_STRUCT_IP_MREQ): Added.
* configure, include/config.h.in: Rebuilt.
* java/net/natInetAddress.cc (aton): Typedef in_addr_t to jint
if needed.
* java/net/natPlainDatagramSocketImpl.cc (McastReq, mcastGrp):
Disable if ip_mreq is not available.

From-SVN: r28798
1999-08-21 14:26:44 +00:00
Alexandre Oliva 988f5b7014 Change in_addr_t default to jint
From-SVN: r28796
1999-08-21 13:35:32 +00:00
Alexandre Oliva a3e174eae5 configure.in: Check types ssize_t and in_addr_t.
* configure.in: Check types ssize_t and in_addr_t.
* acconfig.h: Undefine them.
* configure, include/config.h.in: Rebuilt.

From-SVN: r28793
1999-08-21 13:15:55 +00:00
Alexandre Oliva e07eb72abc natSystem.cc (getpwuid_adaptor): New overloaded function that detects the signature of getpwuid_r.
* java/lang/natSystem.cc (getpwuid_adaptor): New overloaded
function that detects the signature of getpwuid_r.
(init_properties): Use it.
* java/util/natDate.cc (ctime_adaptor): Likewise for ctime_r.
(toString): Use it.

From-SVN: r28792
1999-08-21 12:49:39 +00:00
Alexandre Oliva fb82082db3 natSystem.cc (getpwuid_adaptor): New overloaded function that detects the signature of getpwuid_r.
* java/lang/natSystem.cc (getpwuid_adaptor): New overloaded
function that detects the signature of getpwuid_r.
(init_properties): Use it.
* java/util/natDate.cc (ctime_adaptor): Likewise for ctime_r.
(toString): Use it.

From-SVN: r28790
1999-08-21 11:56:24 +00:00
Kresten Krab Thorup f7b4fb110a interpret.cc (continue1): Implement explicit dispatch table.
* interpret.cc (continue1): Implement explicit dispatch table.
	insn_target: Explicit interpreter switch table.
	SAVE_PC: New macro, moves pc saving code into instructions that
	require so.
	NEXT_INSN: New macro, replaces `goto next_insn' in all insns.
	PC_REGISTER_ASM: New macro.
	INLINE_SWITCH: New macro.  Constrols dispatching strategy.
	opcode: Remove local variable.
	{i,l,f,d}{load,store}_{0,1,2,3}: Expand definitions.
	(POKEI): Use _Jv_word.
	(iinc): Use _Jv_word.
	(dupx): Change reference argument (sp) to pointer.
	(jvdump): Remove

	* interpret.cc: Remove instruction timing instrumentation.

	* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Changed
	comment.  Don't use _Jv_ClassNameSamePackage.

	* gnu/gcj/util/path/{SearchPath,ZipFileEntry,DirectoryPathEntry,
	URLPathEntry, CacheEntry}: Removed.

	* Makefile.am (ordinary_java_source_files): Remove gnu/gcj/util/path
	package.
	(.java.lo): Rule removed.

	* Makefile.in: Rebuilt.

From-SVN: r28777
1999-08-20 11:40:35 +00:00
Tom Tromey bd30fa53ca natThread.cc (class locker): New class.
* java/lang/natThread.cc (class locker): New class.
	(join): Use a locker around _Jv_CondWait.
	(sleep): Likewise.

From-SVN: r28770
1999-08-19 22:58:27 +00:00
Tom Tromey 5a0eb8326f ThreadGroup.java: Fixed now-erroneous comment.
* java/lang/ThreadGroup.java: Fixed now-erroneous comment.
	* java/lang/natThread.cc (finish_): Call ThreadGroup.remove.

From-SVN: r28753
1999-08-18 19:51:23 +00:00
Tom Tromey 4c9d8fa8c5 * include/javaprims.h ("Java"): Regenerated namespace decls.
From-SVN: r28749
1999-08-18 16:34:28 +00:00
Kresten Krab Thorup eb4534a636 natClassLoader.cc (_Jv_PrepareCompiledClass): Renamed from _Jv_InternClassStrings.
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Renamed
	from _Jv_InternClassStrings.

	* prims.cc (_Jv_RunMain): New function.
	(JvRunMain): Remove gij-support.

	* gij.cc (main): Use _Jv_RunMain.

	* java/util/zip/ZipFile.java: Call readDirectory in constructor.

	* interpret.cc (PUSHA, PUSHI, PUSHF, PUSHL, PUSHD): Don't store
	argument in temp variable.
	(continue1): For all op_x2y insns, use temp variable for
	intermediate value.  Also remove some comments.

	* java/lang/natClass.cc (newInstance): Call _Jv_InitClass.
	(forName): Don't call _Jv_InitClass.

	* java/lang/Class.java (getResource,getResourceAsStream): Implement.

	* java/util/zip/ZipEntry.java (ZipEntry(ZipEntry)): New construcor.

	* java/util/jar/JarInputStream.java: New file.

	* java/util/jar/JarEntry.java: New file.

	* java/util/jar/JarFile.java: New file.

	* java/net/URLClassLoader.java: New file.

	* java/net/JarURLConnection.java: New file.

	* gnu/gcj/protocol/jar/Handler.java: New file.

	* gnu/gcj/protocol/jar/Connection.java: New file.

	* java/security/SecureClassLoader.java: New file.

	* java/lang/ClassLoader.java (parent): New variable.
	(ClassLoader (ClassLoader)): new constructor.
	(findClass): New method.
	(loadClass): Add default 1.2 implementation.
	(getSystemResourceAsBytes, getResourceAsBytes): Removed.
	(readfully): Removed.

	* gnu/gcj/runtime/VMClassLoader.java: Moved from java/lang.
	(findSystemClass): New method.
	(VMClassLoader): Constructor rewritten.
	(init): New method.
	All other methods removed.

	* java/lang/natClassLoader.cc: Change use of java::lang::VMClassLoader
	to gnu::gcj::runtime::VMClassLoader.
	(_Jv_InternClassStrings): Use _Jv_ResolvePoolEntry.  Also handle
	class entries.
	(VMClassLoader::findSystemClass): renamed from findBootClass.

	* Makefile.am: Add new files.
	(FirstThread.h, ThreadGroup.h): Add _Jv_Main friend.

	* Makefile.in: Rebuilt.

From-SVN: r28748
1999-08-18 14:16:42 +00:00
Tom Tromey 212f5d3026 natThread.cc (sleep): Turn 0 millis and 0 nanos into 1 nano.
* java/lang/natThread.cc (sleep): Turn 0 millis and 0 nanos into 1
	nano.
	* include/quick-threads.h (_Jv_CondWait): Don't round to 0
	inappropriately.

From-SVN: r28742
1999-08-18 03:48:37 +00:00
Tom Tromey db4b04f1f4 From Bryce McKinlay:
* libjava.lang/Array_2.java: New file.
	* libjava.lang/Array_2.out: New file.

From-SVN: r28737
1999-08-17 22:05:56 +00:00
Tom Tromey 086920c39f configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Set DIVIDESPEC to empty string if compiler does
	not support -fuse-divide-subroutine.

From-SVN: r28727
1999-08-16 17:01:52 +00:00
Per Bothner efc3b511cb resolve.cc (_Jv_PrepareClass): Use ClassLoader::resolveClass0.
1999-08-14  Per Bothner  <per@bothner.com>

	* resolve.cc (_Jv_PrepareClass): Use ClassLoader::resolveClass0.
	* java/lang/natClass.cc (initializeClass): Likewise.
	* java/lang/ClassLoader.java (resolveClass0): New static method.
	(resolveClass): Call resolveClass0.
	(findSystemClass): No longer static.

From-SVN: r28711
1999-08-14 19:49:06 +00:00
Alexandre Oliva cb339d0278 javaprims.h (TRUE, FALSE): Redefine as themselves.
1999-08-12  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* include/javaprims.h (TRUE, FALSE): Redefine as themselves.

From-SVN: r28689
1999-08-12 17:31:34 +00:00
Bryce McKinlay 48ff99d10d BitSet.java (set, [...]): specify "1" constant as long.
* java/util/BitSet.java (set, clear, hashCode): specify "1" constant
        as long.

From-SVN: r28680
1999-08-11 22:30:31 +01:00
Anthony Green 7941ceabf0 [multiple changes]
Mon Aug  9 18:33:38 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

        * Makefile: Rebuilt.
	* Makefile.am (toolexeclibdir): Add $(MULTISUBDIR) even for native
	builds.

	* java/net/natPlainSocketImpl.cc: Include <sys/select.h> only if
	present.

	* configure: Rebuilt.
	* configure.in: Properly align --help output, fix capitalization
	and punctuation.
	* acinclude.m4: Likewise.

1999-08-09  Kresten Krab Thorup  <krab@gnu.org>

	* include/javaprims.h (_Jv_word, _Jv_word2): New types.

	* include/java-interp.h (_Jv_InterpMethodInvocation): Use _Jv_word.
	(_Jv_callInterpretedMethod): Unused. Remove.
	(_Jv_InterpMethod::run,run_normal,run_synch_object,run_synch_class):
	Use ffi_raw.
	* include/java-cpool.h (_Jv_get, _Jv_put): Remove.
	(_Jv_{store,load}{Indexes,Int,Float,Long,Double}): Use _Jv_word.
	* boehm.cc (_Jv_MarkObj): Use _Jv_word.
	* interpret.cc: use _Jv_word.
	* defineclass.cc: use_Jv_word.
	* resolve.cc: Use _Jv_word.
	(_Jv_ResolvePoolEntry): Return _Jv_word.
	* java/lang/Class.h (_Jv_Constants): Use _Jv_word for cpool.
	* java/lang/natClassLoader.cc (_Jv_InternClassStrings): Use _Jv_word.

	* interpret.cc (gnu::gcj::runtime::MethodInvocation::continue1):
	Change comment.

From-SVN: r28641
1999-08-10 05:32:23 +00:00
Rainer Orth 05ca950a64 configure.in (sched_yield): Try librt first, then libposix4.
Mon Aug  9 18:33:38 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* configure.in (sched_yield): Try librt first, then libposix4.
	Add -lrt, -lposix4 to THREADSPEC.

From-SVN: r28629
1999-08-09 19:17:20 +00:00
Anthony Green b3967ec43e Primes.java: New file.
* libjava.lang/Primes.java: New file.
	* libjava.lang/Primes.out: New file.

From-SVN: r28613
1999-08-09 06:35:56 +00:00
Anthony Green cb35be5713 * gnu/gcj/util/path/SearchPath.java: Comment out verbose output.
From-SVN: r28608
1999-08-09 01:11:41 +00:00
Anthony Green e3253af520 defineclass.cc (_Jv_VerifyClassName): Verify array names correctly.
* defineclass.cc (_Jv_VerifyClassName): Verify array names
	correctly.

From-SVN: r28606
1999-08-09 00:25:51 +00:00
Anthony Green 58eb6e7cef [multiple changes]
1999-08-09  Anthony Green  <green@cygnus.com>

        * gij.cc: New file.

        * include/config.h.in: Rebuilt.
        * acconfig.h: Add INTERPRETER.

        * configure: Rebuilt.

        * Makefile.in: Rebuilt.
        * Makefile.am (libffi_files): Identify the libffi object files for
        inclusion in libgcj.
        (LIBFFIINCS): Define.

        * interpret.cc (gnu::gcj::runtime::MethodInvocation::continue1):
        Dummy definition for configurations without an interpreter.

        * java/net/natPlainSocketImpl.cc (getOption): Disamiguate call to
        java::lang::Boolean constructor.

        * include/java-interp.h: Always include java-cpool.h.

        * java/lang/natClassLoader.cc (getVMClassLoader0): Always return 0
        when INTERPRETER not defined.

        * java/lang/Class.h (finalize): Define.

        * gnu/gcj/util/path/DirectoryPathEntry.java (getURL): Catch
        IOException from File.getCanonicalPath.
        (getStream): Likewise.

        * NEWS: More news.
        * THANKS: More thanks.

1999-08-09  Kresten Krab Thorup  <krab@gnu.org>

        * resolve.cc (get_ffi_type_from_signature): Generate uint16 for
        jchar type.
        (_Jv_PrepareClass): Allow non-abstract classes to
        have abstract subclasses.
        (_Jv_ResolvePoolEntry): Revert subclass check for protected
        fields and methods.
        * interpret.cc (continue1/perform_invoke): Don't sign extend
        uint16 return val.
        (continue1/lshl,lshr): Push long, not int.
        (continue1/ulshr): Use UINT64, not long long.
        * defineclass.cc (handleFieldsEnd): Handle case when all fields
        are static.
        * java/lang/natClass.cc (forName): Add call to _Jv_InitClass.
        * java/lang/FirstThread.java (run): Add top-level exception
        handler.
        (run0): Renamed from run.

1999-08-08  Kresten Krab Thorup  <krab@gnu.org>

        * configure.in (--with-interpreter): Added.
        * include/config.h.in (INTERPRETER): Added.

        * java/lang/ClassLoader.java: File replaced.
        * java/lang/VMClassLoader.java: New file.
        * java/lang/natClassLoader.cc: New file.
        * gnu/gcj/runtime/MethodInvocation.java: New file.
        * gnu/gcj/util/path/SearchPath.java: New file.
        * gnu/gcj/util/path/PathEntry.java: New file.
        * gnu/gcj/util/path/DirectoryPathEntry.java: New file.
        * gnu/gcj/util/path/ZipPathEntry.java: New file.
        * gnu/gcj/util/path/URLPathEntry.java: New file.
        * gnu/gcj/util/path/CacheEntry.java: New file.
        * include/java-interp.h: New file.
        * include/java-cpool.h: New file.
        * include/java-insns.h: New file.
        * defineclass.cc: New file.
        * interpret.cc: New file.
        * resolve.cc: New file.

        * java/lang/natClass.cc (loaded_classes, _Jv_RegisterClass,
        _Jv_RegisterClasses, _Jv_FindClassInCache, _Jv_FindClass,
        _Jv_NewClass, _Jv_FindArrayClass): Moved to natClassLoader.cc.
        (finalize): New.
        (STATE_NOTHING, STATE_RESOLVED, STATE_IN_PROGRESS, STATE_DONE,
        STATE_ERROR): Moved to java/lang/Class.h and renamed with JV_
        prefix.
        (initializeClass): Use new JV_ prefixed names.  Also, call
        ClassLoader::resolveClass instead of _Jv_ResolveClass.

        * java/lang/Class.h (JV_STATE_PRELOADING, JV_STATE_LOADING,
        JV_STATE_LOADED, JV_STATE_COMPILED, JV_STATE_PREPARED,
        JV_STATE_LINKED): New.
        (_Jv_WaitForState, _Jv_RegisterInitiatingLoader,
        _Jv_UnregisterClass, _Jv_InternClassStrings): New friends.
        (_Jv_IsInterpretedClass, _Jv_InitField, _Jv_LookupDeclaredMethod,
        _Jv_DetermineVTableIndex, _Jv_ResolvePoolEntry, _Jv_PrepareClass,
        _Jv_ClassReader, _Jv_InterpClass, _Jv_InterpMethod,
        _Jv_InterpMethodInvocation): New friends for interpreter.
        (finalize): New.
        (CONSTANT_Class, CONSTANT_String, etc.): Moved to
        include/java-cpool.h and renamed with JV_ prefix.

        * include/jvm.h (_Jv_makeUtf8Const, _Jv_makeUtf8TypeConst): New
        decls.
        (_Jv_UnregisterClass): New decl.

        * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added
        class loader argument.
        (_Jv_FindClass): Use class loader.

        * prims.cc (_Jv_makeUtf8Const): New function.
        (_Jv_NewObjectArray): Change use of _Jv_FindArrayClass.
        (_Jv_NewPrimArray): Ditto.
        (_Jv_FindClassFromSignature): Ditto.
        * java/lang/reflect/natArray.cc (newInstance): Ditto.
        * java/lang/reflect/natMethod.cc (getType): Ditto.

        * include/java-field.h (_Jv_Field::isRef): Make robust for
        non-resolved contexts.

        * boehm.cc (_Jv_MarkObj): Mark interpreter-related fields.
        Also, don't mark class->next field.

        * java/lang/VirtualMachineError.java: Added FIXME note.

        * configure.in (INTERPSPEC): New spec.
        * libgcj.spec.in: Added INTERPSPEC.
        * Makefile.am: Added gcjh friends for java/lang/VMClassLoader and
        gnu/gcj/runtime/MethodInvocation.
        (libgcj_la_SOURCES): Added resolve.cc defineclass.cc interpret.cc.
        (ordinary_java_source_files): Added above mentioned java classes.

        * configure: Rebuilt.
        * Makefile.in: Rebuilt.

From-SVN: r28597
1999-08-08 14:06:23 +00:00
Tom Tromey 7339705d94 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Look for sched_yield in -lrt.

From-SVN: r28554
1999-08-06 20:36:46 +00:00
Mojo Jojo 3a6bdebaa0 Locale.java (CHINESE, [...]): New locales.
1999-08-06  Mojo Jojo <mojojojo@pacbell.net>

	* java/util/Locale.java, CHINESE, ENGLISH, FRENCH, GERMAN,
	ITALIAN, JAPANESE, KOREAN, CANADA_FRENCH, GERMANY, ITALY, KOREA,
	SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE, PRC, TAIWAN, CHINA): New
	locales.
	(toString): Print correctly when `country' is empty.

From-SVN: r28548
1999-08-06 08:38:50 +00:00
Per Bothner 67a6001825 configure.in: Also do AC_SUBST for DIVIDESPEC.
1999-08-04  Per Bothner <per@bothner.com>

	* configure.in:  Also do AC_SUBST for DIVIDESPEC.

From-SVN: r28520
1999-08-05 05:21:44 +00:00
Tom Tromey 825b4dde6b Updated THANKS
From-SVN: r28506
1999-08-04 19:55:25 +00:00
Tom Tromey 5b9bbb3917 aclocal.m4, configure: Rebuilt for new libtool.
* aclocal.m4, configure: Rebuilt for new libtool.

[[Split portion of a mixed commit.]]

From-SVN: r28435.2
1999-08-03 03:07:04 +00:00
Bryce McKinlay 120abe3202 natFile.cc (performMkdir): Remove FIXME.
* java/io/natFile.cc (performMkdir): Remove FIXME.
        * java/io/natFileDescriptorPosix.cc (open): Use 0644 file mode.

From-SVN: r28430
1999-08-03 01:32:14 +01:00
Bryce McKinlay 25fef12b66 ServerSocket.java: Define ANY_IF.
* java/net/ServerSocket.java: Define ANY_IF.
        (ServerSocket (int,int)): Use ANY_IF instead of null to bind to
        all network interfaces.
        * java/net/DatagramSocket.java (DatagramSocket): ditto.
        * java/net/natPlainSocketImpl.cc (bind): Expect 0.0.0' instead of
        null.
        * java/net/natPlainDatagramSocketImpl (bind): Expect 0.0.0'
        instead of null.

From-SVN: r28429
1999-08-03 01:30:53 +01:00
Bryce McKinlay a0e4da0d17 boehm.cc (_Jv_RegisterFinalizer): Cast eth' to GC_PTR.
eth'

        * boehm.cc (_Jv_RegisterFinalizer): Cast 
eth' to GC_PTR.
        * exception.cc (_Jv_Throw): Cast _Jv_type_matcher' to __eh_matcher.

From-SVN: r28428
1999-08-03 01:23:03 +01:00
Alexandre Oliva 130e63de4a configure.in: Check for bstring.h.
1999-08-01  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* configure.in: Check for bstring.h.
	* configure, include/config.h.in: Rebuilt.
	* java/net/natPlainDatagramSocketImpl.cc: #include bstring.h.
	* java/net/natPlainSocketImpl.cc: Likewise.

From-SVN: r28378
1999-08-01 23:39:53 +00:00
Tom Tromey db936a7cbd NEWS: Likewise.
* NEWS: Likewise.
	* THANKS: New file.

From-SVN: r28371
1999-08-01 04:04:04 +00:00
Alexandre Oliva 34c5c0e18c configure.in: Check for struct hostent_data and need for -D_REENTRANT for gethostbyname_r...
1999-07-31  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* configure.in: Check for struct hostent_data and need for
	-D_REENTRANT for gethostbyname_r declaration.
	* java/net/natInetAddress.cc: Define _REENTRANT if needed.
	(lookup): Use hostent_data for fixed_buffer.
	* configure, include/config.h.in: Rebuilt.

From-SVN: r28369
1999-08-01 00:14:32 +00:00
Alexandre Oliva 5f67f48f90 libjava.exp (bytecompile_file): Use `env(SUN_JAVAC)', that defaults to javac, as Sun-javac compiler or compatible.
1999-07-31  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* lib/libjava.exp (bytecompile_file): Use `env(SUN_JAVAC)', that
	defaults to javac, as Sun-javac compiler or compatible.
	(libjava_init): Get GCJ from environment if neither GCJ_UNDER_TEST
	nor TOOL_EXECUTABLE are set.  Set `original_ld_library_path' from
	environment.
	(libjava_arguments): Prepend `.' and `$srcdir/$subdir' to
	CLASSPATH, for `support' sources.  Search for libgcj.spec in
	`$objdir/..', by adding -B to GCJ_UNDER_TEST.  Append
	original_ld_library_path to ld_library_path.
	* libjava.mauve/mauve.exp (test_mauve): Set `env(GCJ)' from
	GCJ_UNDER_TEST, calculated just like in libjava.exp.

From-SVN: r28364
1999-07-31 23:52:52 +00:00
Alexandre Oliva 138607df84 natSystem.cc (arraycopy): Use bcopy if memmove is not available.
1999-07-31  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* java/lang/natSystem.cc (arraycopy): Use bcopy if memmove is not
	available.  Don't cast memmove args to (void*).
	* configure.in: Do not abort if memmove is not available.

From-SVN: r28360
1999-07-31 23:41:15 +00:00
Bryce McKinlay 41296e2a23 natString.cc (substring): optimize where substring is entire String.
1999-07-22  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/natString.cc (substring): optimize where substring is
	entire String.
	* java/io/File.java (getName): don't return separator with file name.
	* java/io/natFile.cc (attr): fix overflow.

From-SVN: r28246
1999-07-26 03:51:44 +01:00
Anthony Green a08b508225 * mauve-libgcj: Disable Object Serialization tests.
From-SVN: r28235
1999-07-25 08:48:25 +00:00
Andrew Haley d342a2e1eb prims.cc (JvRunMain): Always initialize arithexception.
1999-07-19  Andrew Haley  <aph@cygnus.com>

        * prims.cc (JvRunMain): Always initialize arithexception.
        (_Jv_divI): New function.
        (_Jv_remI): New function.
        (_Jv_divJ): New function.
        (_Jv_remI): New function.
        * include/jvm.h: Add these new functions.

        Makefile.am: add DIVIDESPEC.
        aclocal.m4: ditto.
        configure.host: set DIVIDESPEC.
        libgcj.spec.in: pass DIVIDESPEC to compiler.
        configure: rebuilt.
        Makefile.in: rebuilt.

From-SVN: r28211
1999-07-21 15:11:56 +00:00
Warren Levy 33551dfec5 DatagramSocket.java (DatagramSocket(int, InetAddress)): Default to using PlainDatagramSocketImpl.
* java/net/DatagramSocket.java (DatagramSocket(int, InetAddress)):
	Default to using PlainDatagramSocketImpl.
	* java/net/PlainDatagramSocketImpl.java (close): Catch IOException.

From-SVN: r28195
1999-07-20 20:30:42 +00:00
Tom Tromey 9608c09195 * include/stamp-h.in: New file.
From-SVN: r28171
1999-07-19 18:03:31 +00:00
Tom Tromey 51e0d189ed G19990217_02.no-link: New file.
* libjava.compile/G19990217_02.no-link: New file.
	* libjava.compile/test.exp: Look for `.no-link' file.
	* lib/libjava.exp (test_libjava_from_source): Added `no-link'
	option.
	(test_libjava_from_javac): Likewise.  Also, handle package
	information from class name when creating class file name.

From-SVN: r28113
1999-07-15 09:15:26 +00:00
Tom Tromey f160279bf8 test.exp: New file.
* libjava.lang/test.exp: New file.
	* libjava.lang/err9.out: New file.
	* libjava.lang/err9.java: New file.
	* libjava.lang/err8.out: New file.
	* libjava.lang/err8.java: New file.
	* libjava.lang/err7.out: New file.
	* libjava.lang/err7.java: New file.
	* libjava.lang/err6.out: New file.
	* libjava.lang/err6.java: New file.
	* libjava.lang/err5.out: New file.
	* libjava.lang/err5.java: New file.
	* libjava.lang/err4.out: New file.
	* libjava.lang/err4.java: New file.
	* libjava.lang/err3.out: New file.
	* libjava.lang/err3.java: New file.
	* libjava.lang/err2.out: New file.
	* libjava.lang/err2.java: New file.
	* libjava.lang/err13.out: New file.
	* libjava.lang/err13.java: New file.
	* libjava.lang/err12.out: New file.
	* libjava.lang/err12.java: New file.
	* libjava.lang/err11.out: New file.
	* libjava.lang/err11.java: New file.
	* libjava.lang/err10.out: New file.
	* libjava.lang/err10.java: New file.
	* libjava.lang/err1.out: New file.
	* libjava.lang/err1.java: New file.
	* libjava.lang/N19990310_5.out: New file.
	* libjava.lang/N19990310_5.java: New file.
	* libjava.lang/N19990310_4.out: New file.
	* libjava.lang/N19990310_4.java: New file.
	* libjava.lang/N19990310_3.out: New file.
	* libjava.lang/N19990310_3.java: New file.
	* libjava.lang/N19990310_02.out: New file.
	* libjava.lang/N19990310_02.java: New file.
	* libjava.lang/G19990303_02.out: New file.
	* libjava.lang/G19990303_02.java: New file.
	* libjava.lang/G19990303_01.out: New file.
	* libjava.lang/G19990303_01.java: New file.
	* libjava.lang/G19990302_02.out: New file.
	* libjava.lang/G19990302_02.java: New file.
	* libjava.lang/G19990301_01.out: New file.
	* libjava.lang/G19990301_01.java: New file.
	* libjava.compile/N19990317.java: New file.
	* libjava.compile/N19990310_01.java: New file.
	* libjava.compile/G19990225_01.java: New file.
	* libjava.compile/G19990217_02.java: New file.
	* libjava.compile/G19990217_01.java: New file.
	* libjava.compile/G19990210_3.java: New file.
	* libjava.compile/G19990210_2.java: New file.
	* libjava.compile/G19990210_1.java: New file.

From-SVN: r28087
1999-07-13 16:20:44 +00:00
Tom Tromey d4a8b6a2f3 mprec.h: Protect definition of uint32_t with #ifndef _UINT32_T.
* java/lang/mprec.h: Protect definition of uint32_t with #ifndef
	_UINT32_T.

From-SVN: r28065
1999-07-12 09:40:07 +00:00
Andrew Haley 44a6ce434c i386-signal.h (MAKE_THROW_FRAME): Advance EIP by two bytes to make it point after the instruction where the trap...
1999-07-07  Andrew Haley  <aph@cygnus.com>
        * include/i386-signal.h (MAKE_THROW_FRAME): Advance EIP by two
	bytes to make it point after the instruction where the trap
	occurred.
	(HANDLE_DIVIDE_OVERFLOW): Ditto.

From-SVN: r27994
1999-07-07 09:50:46 +00:00
Tom Tromey fd05b13d19 mauve-libgcj: Explicitly enable formerly disabled java.text tests.
* mauve-libgcj: Explicitly enable formerly disabled java.text
	tests.

From-SVN: r27992
1999-07-07 09:30:46 +00:00
Tom Tromey c7f0f62848 mauve-libgcj: Turn off ClassTest test.
* mauve-libgcj: Turn off ClassTest test.  Enable java.text tests
	again.

From-SVN: r27990
1999-07-07 09:12:30 +00:00
Andrew Haley 80be8f05f1 i386-signal.h (MAKE_THROW_FRAME): Advance EIP by two bytes to make it point after the instruction where the trap...
1999-07-07  Andrew Haley  <aph@cygnus.com>
        * include/i386-signal.h (MAKE_THROW_FRAME): Advance EIP by two
	bytes to make it point after the instruction where the trap
	occurred.
	(HANDLE_DIVIDE_OVERFLOW): Ditto.

From-SVN: r27989
1999-07-07 09:09:39 +00:00
Tom Tromey dbdab5fa6c * libjava.lang/Final.xfail: Output fails, not exec.
From-SVN: r27965
1999-07-06 16:18:41 +00:00