OSDN Git Service

* java/math/BigInteger.java(ival): Made private.
[pf3gnuchains/gcc-fork.git] / libjava / ChangeLog
1 2000-02-24  Warren Levy  <warrenl@cygnus.com>
2
3         * java/math/BigInteger.java(ival): Made private.
4         (words): Ditto.
5         (neg): Ditto.
6
7 2000-02-20  Anthony Green  <green@cygnus.com>
8
9         * Makefile.in: Rebuilt.
10         * Makefile.am (ordinary_java_source_files): Add
11         gnu/gcj/io/DefaultMimeTypes.java and gnu/gcj/io/MimeTypes.java
12
13         * scripts/MakeDefaultMimeTypes.java: New file.
14         * scripts/mime.types: New file.
15         * scripts/classes.pl: Moved from top level.
16         * classes.pl: Moved to scripts directory.
17
18         * java/net/URLConnection.java: Implement guessContentTypeFromName.
19
20         * gnu/gcj/io/MimeTypes.java: New file.
21         * gnu/gcj/io/DefaultMimeTypes.java: New file.
22
23 2000-02-20  Tom Tromey  <tromey@cygnus.com>
24
25         * boehm.cc (_Jv_AllocBytes): Clear returned memory.
26
27 2000-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
28
29         * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
30         (setSize): ditto.
31
32 2000-02-18  Tom Tromey  <tromey@cygnus.com>
33
34         * include/jvm.h (_Jv_GetJavaVM): Declare.
35         * include/java-interp.h (_Jv_GetFirstMethod): New function.
36         (_Jv_MethodBase::get_method): New method.
37         (_Jv_JNIMethod::set_function): New method.
38         * jni.cc (_Jv_JNI_UnregisterNatives): New function.
39         (_Jv_JNI_RegisterNatives): New function.
40         (_Jv_JNIFunctions): Updated for new functions.
41         (_Jv_GetJavaVM): New function.
42         (_Jv_JNI_GetJavaVM): Use it.  Now static.
43         (_Jv_JNI_AttachCurrentThread): Create a new JNIEnv if this thread
44         is already a Java thread but does not have a JNIEnv yet.
45
46         * java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
47         function.
48
49 2000-02-17  Tom Tromey  <tromey@cygnus.com>
50
51         * gcj/field.h (_Jv_Field::getClass): Don't use JvAssert.
52         Fixes PR gcj/152.
53
54 2000-02-16  Tom Tromey  <tromey@cygnus.com>
55
56         * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
57
58         * jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
59         (_Jv_JNI_NewObject): Likewise.
60         (_Jv_JNI_NewObjectA): Likewise.
61         (_Jv_JNI_CallAnyMethodV): In constructor case, pass correct value
62         as "return" type to _Jv_CallAnyMethodA.
63         (_Jv_JNI_CallAnyMethodA): Likewise.
64         (_Jv_JNI_CallAnyVoidMethodV): Likewise.
65
66         * jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
67         findClass.
68
69 2000-02-15  Tom Tromey  <tromey@cygnus.com>
70
71         * resolve.cc (ncode): Set args_raw_size.  Compute jni_cif and
72         jni_arg_types.
73         (init_cif): Added `rtype_p' argument.
74         * include/java-interp.h (class _Jv_MethodBase): Added
75         args_raw_size.
76         (class _Jv_InterpMethod): Removed args_raw_size.
77         (class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields.
78         * jni.cc (call): Pass JNIEnv and (for static methods only) the
79         class pointer as well as the ordinary arguments.
80
81         * jni.cc (mangled_name): Skip leading `(' in signature.
82
83         * jni.cc (add_char): Added missing `else'.
84
85         * jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
86         fails.
87
88 2000-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
89
90         * NEWS: Updated.
91
92         * java/lang/natRuntime.cc (_load): Include library path with
93         exception message.
94
95         * java/lang/natSystem.cc (init_properties): set java.lang.classpath 
96         property.
97
98         * java/lang/natThread.cc (dumpStack): Removed.
99         * java/lang/Thread.java (dumpStack): Implemented.
100
101 2000-02-15  Tom Tromey  <tromey@cygnus.com>
102
103         * java/lang/natRuntime.cc (_load): On Unix, prefix library name
104         with `lib' for loadLibrary.  Fixes PR gcj/150.
105
106 2000-02-14  Warren Levy  <warrenl@cygnus.com>
107
108         * gnu/gcj/math/MPN.java(findLowestBit): Made methods public.
109
110         * java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
111           New constructor.
112         (min): Implemented.
113         (max): Implemented.
114         (modPow): Rewritten to not use the naive, slow, brute force approach.
115         (isProbablePrime): Implemented.
116         (testBit): Implemented.
117         (flipBit): Implemented.
118         (getLowestSetBit): Implemented.
119
120 2000-02-16  Anthony Green  <green@redhat.com>
121
122         * configure.host: Use the same options for i386 and i486 as we do
123         for i586 and i686.
124
125 2000-02-12  Tom Tromey  <tromey@cygnus.com>
126
127         * java/io/File.java (createTempFile): Use low bits from counter,
128         not high bits.
129
130 Fri Feb 11 19:48:08 2000  Anthony Green  <green@cygnus.com>
131
132         * THANKS: More thanks.
133
134 2000-02-11  Tom Tromey  <tromey@cygnus.com>
135
136         * interpret.cc (continue1): Use STOREA, not STOREI, to implement
137         astore instruction.  From Hans Boehm.
138
139 2000-02-11  Warren Levy  <warrenl@cygnus.com>
140
141         * java/math/BigInteger.java(BigInteger(String, int)): New constructor.
142         (BigInteger(String)): New constructor.
143         (not): Rewritten using version from Kawa's BitOps class.
144         (valueOf): New private methods from Kawa's BitOps class.
145         (swappedOp): ditto.
146         (bitOp): ditto.
147         (setBitOp): ditto.
148         (and): Implemented.
149         (or): Implemented.
150         (xor): Implemented.
151         (andNot): Implemented.
152         (clearBit): Implemented.
153         (setBit): Implemented.
154         (bitCount): Implemented.
155         (toByteArray): Implemented.
156
157 2000-02-11  Tom Tromey  <tromey@cygnus.com>
158
159         * java/io/File.java (nextValue): Now synchronized.
160
161 2000-02-10  Tom Tromey  <tromey@cygnus.com>
162
163         * java/io/natFileDescriptorPosix.cc (open): Recognize EXCL flag.
164         * java/io/FileDescriptor.java (EXCL): New static field.
165         * java/io/File.java (tmpdir): New static field.
166         (createTempFile): New method.
167         (nextValue): New method.
168         * java/lang/natSystem.cc (init_properties): Set java.io.tmpdir
169         property.
170
171         * include/jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
172         (jboolean): Declare as an attributed int, not a bool.
173         (_Jv_func): Declare differently for C.
174
175         * gnu/gcj/jni/natNativeThread.cc: New file.
176         * gnu/gcj/jni/NativeThread.java: New file.
177         * java/lang/Thread.java (data): Now a RawData.
178         * include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv):
179         Declare.
180         * Makefile.in: Rebuilt.
181         * Makefile.am (java/lang/Thread.h): New target.
182         (ordinary_java_source_files): Added NativeThread.java.
183         (nat_source_files): Added natNativeThread.cc.
184         * java/lang/natThread.cc: Include <jni.h>
185         (struct natThread): Added `jni_env' field.
186         (_Jv_GetCurrentJNIEnv): New function.
187         (_Jv_SetCurrentJNIEnv): Likewise.
188         (initialize_native): Initialize jni_env.
189         Include RawData.h.
190         * jni.cc (ThreadGroupClass): New define.
191         (_Jv_JNI_InvokeFunctions): New structure.
192         (JNI_GetCreatedJavaVMs): New function.
193         (the_vm): New global.
194         (JNI_GetDefaultJavaVMInitArgs): New function.
195         Include NativeThread.h.
196         (NativeThreadClass): New define.
197         (_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1.
198         (_Jv_JNI_DestroyJavaVM): New function.
199         (_Jv_JNI_AttachCurrentThread): New function.
200         (_Jv_JNI_DetachCurrentThread): New function.
201         (_Jv_JNI_GetEnv): New function.
202         (JNI_CreateJavaVM): New function.
203         (_Jv_JNI_GetJavaVM): New function.
204         (_Jv_JNIFunctions): Added entry for GetJavaVM.
205         * include/jni.h (JavaVMAttachArgs): New structure.
206         (JNI_EDETACHED): New define.
207         (JNI_EVERSION): Likewise.
208         (JavaVM): Define properly.
209         (struct JNIInvokeInterface): New structure.
210         (class _Jv_JavaVM): New class.
211         (JNI_OnLoad, JNI_OnUnload): Declare.
212         (JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM,
213         JNI_GetCreatedJavaVMs): Declare.
214         (JavaVMInitArgs): New typedef.
215         (JavaVMOption): Likewise.
216         (JNI_ERR): New define.
217         (JNI_OK): Likewise.
218
219 2000-02-10  Andrew Haley  <aph@cygnus.com>
220
221         * interpret.cc: Don't include fdlibm.h.
222         Replace #if with #ifdef throughout.
223         Declare extern __ieee754_fmod.
224         (continue1): Remove op_getfield, op_getstatic, op_putfield,
225         op_putstatic insns.
226         * resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
227         Search class hierarchy for superclass vtable.
228
229         * java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
230         off the end of a pointer list.
231
232         * java/lang/natThread.cc (stop): Don't abort, throw an exception
233         instead.
234         (suspend): Ditto.
235         
236 2000-02-09  Tom Tromey  <tromey@cygnus.com>
237
238         * java/lang/natRuntime.cc (_load): Call add_library.
239         (loadLibraryInternal): Likewise.
240
241         * gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
242         iconv_close when handle is not NULL.  Thanks to Andrew Haley.
243         (Output_iconv::finalize): Likewise.
244
245 2000-02-08  Tom Tromey  <tromey@cygnus.com>
246
247         * java/util/Properties.java (setProperty): New method.
248         (store): New method.
249
250 2000-02-07  Tom Tromey  <tromey@cygnus.com>
251
252         * java/lang/Runtime.java (_load): Declare.
253         (load, loadLibrary): Wrote in terms of _load.
254         * java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in
255         library.
256         (loadLibrary): Likewise.
257         Include <jni.h>.
258         (_load): New method.
259         (loadLibrary, load): Removed.
260
261         * jni.cc (ThrowableClass): New define.
262         (_Jv_JNI_Throw): Check argument.
263         (_Jv_JNI_ThrowNew): Likewise.
264         (wrap_value): Don't wrap object if it is NULL.
265         (_Jv_JNI_DefineClass): Use wrap_value.
266         (_Jv_JNI_FindClass): Likewise.
267         (_Jv_JNI_GetSuperclass): Likewise.
268         (_Jv_JNI_ExceptionOccurred): Likewise.
269         (_Jv_JNI_AllocObject): Likewise.
270         (_Jv_JNI_GetObjectClass): Likewise.
271         (_Jv_JNI_NewString): Likewise.
272         (_Jv_JNI_NewStringUTF): Likewise.
273         (_Jv_JNI_NewObjectArray): Likewise.
274         (_Jv_JNI_GetObjectArrayElement): Likewise.
275         (_Jv_JNI_NewPrimitiveArray): Likewise.
276         (_Jv_JNI_ToReflectedField): Likewise.
277         (_Jv_JNI_ToReflectedMethod): Likewise.
278         (_Jv_JNI_AllocObject): Check argument.
279         (_Jv_JNI_NewObjectV): Likewise.
280         (_Jv_JNI_NewObject): Likewise.
281         (_Jv_JNI_NewObjectA): Likewise.
282         (_Jv_JNI_GetObjectClass): Likewise.
283         (_Jv_JNI_GetField): Likewise.
284         (_Jv_JNI_SetField): Likewise.
285
286         * interpret.cc (PUSHL): Don't use expression statement.
287         (PUSHD): Likewise.
288         (LOADL): Likewise.
289         (STOREL): Likewise.
290
291         * jni.cc (add_char): Conditional on INTERPRETER.
292         (mangled_name): Likewise.
293         (call): Likewise.
294         * include/java-interp.h (class _Jv_MethodBase): Conditional on
295         INTERPRETER.
296         (class _Jv_JNIMethod): Likewise.
297
298 2000-02-04  Warren Levy  <warrenl@cygnus.com>
299
300         * Makefile.am: Added MPN.java and BigInteger.java.
301         * Makefile.in: Rebuilt.
302         * gnu/gcj/math/MPN.java: New file.  From Kawa by Per Bothner
303         <per@bothner.com>.
304         * java/math/BigInteger.java: New file.  Based primarily on
305         Kawa's IntNum.java by Per Bothner <per@bothner.com>.
306
307 2000-02-04  Tom Tromey  <tromey@cygnus.com>
308
309         * defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
310         pointers.
311         (handleMethodsEnd): Fixed error messages.  Create a _Jv_JNIMethod
312         if the method is native.
313         * resolve.cc (ncode): Don't handle native methods.
314         (_Jv_JNIMethod::ncode): New method.
315         (_Jv_PrepareClass): Handle native methods.
316         * jni.cc (call): Renamed from _Jv_JNI_conversion_call.
317         Include AbstractMethodError.h.
318         (add_char): New function.
319         (mangled_name): Likewise.
320         * include/java-interp.h (class _Jv_JNIMethod): New class.
321         (class _Jv_MethodBase): New class.
322         (class _Jv_InterpMethod): Derive from _Jv_MethodBase.
323         (_Jv_InterpClass): Changed `interpreted_methods' field to type
324         `_Jv_MethodBase'.
325
326         * include/jvm.h (_Jv_FindSymbolInExecutable): Declare.
327         * java/lang/natRuntime.cc (libraries_size, libraries_count,
328         libraries): New globals.
329         (add_library): New function.
330         (_Jv_FindSymbolInExecutable): New function.
331
332         * java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
333         Now static.
334
335 2000-02-04  Andrew Haley  <aph@cygnus.com>
336
337         * java/lang/Throwable.java (CPlusPlusDemangler): New class.
338         (printStackTrace): Use a CPlusPlusDemangler to demangle names.
339         * java/lang/natThrowable.cc (printRawStackTrace): Rename
340         printStackTrace to printRawStackTrace.
341
342 2000-02-03  Tom Tromey  <tromey@cygnus.com>
343
344         * java/util/Calendar.java (toString): New method.
345         * java/util/SimpleTimeZone.java (clone): New method.
346         (toString): New method.
347         * java/util/TimeZone.java (clone): New method.
348         * java/text/SimpleDateFormat.java (clone): New method.
349         * java/text/NumberFormat.java (clone): New method.
350         (equals): New method.
351         * java/text/Format.java (clone): New method.
352         * java/text/DateFormatSymbols.java (DateFormatSymbols): New
353         constructor.
354         (clone): New method.
355         * java/text/DateFormat.java (clone): New method.
356         * java/text/Collator.java (clone): New method.
357
358 2000-02-03  Tom Tromey  <tromey@cygnus.com>
359
360         * java/io/PipedOutputStream.java (write(byte[], int, int)): New
361         method.
362
363 2000-02-01  Tom Tromey  <tromey@cygnus.com>
364
365         * include/java-interp.h (_Jv_JNI_conversion_call): Declare.
366         * resolve.cc (ncode): Use _Jv_JNI_conversion_call when
367         constructing the closure if the function is native.
368         * jni.cc (_Jv_JNI_conversion_call): Now returns `void'.  No longer
369         a template function, #if'd out, or static.
370         Include <java-interp.h>.
371
372         * include/jni.h (class _Jv_JNIEnv): Corrected calls using `...'.
373
374         * include/jni.h (class _Jv_JNIEnv): Added all C++ inline methods.
375
376         * jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
377         (_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave
378         `locals == NULL'.
379         (wrap_value): New function.
380         (_Jv_JNI_CallAnyMethodV): Use it.
381         (_Jv_JNI_CallAnyMethodA): Likewise.
382         (_Jv_JNI_GetField): Use wrap_value; removed specialized version.
383         (_Jv_JNI_GetStaticField): Likewise.
384
385         * jni.cc (_Jv_JNI_GetField): Specialize for jobject.
386         (_Jv_JNI_GetStaticField): Likewise.
387
388 2000-01-31  Tom Tromey  <tromey@cygnus.com>
389
390         * prims.cc (_Jv_MallocUnchecked): New function.
391         (main_init): Call _Jv_JNI_Init.
392         * include/jvm.h (_Jv_MallocUnchecked): Declare.
393         (_Jv_JNI_Init): Declare.
394         * jni.cc: Include Hashtable.h, OutOfMemoryError.h, Integer.h,
395         <string.h>.
396         (_Jv_JNI_NewGlobalRef): New function.
397         (_Jv_JNI_DeleteGlobalRef): New function.
398         (_Jv_JNI_DeleteLocalRef): New function.
399         (_Jv_JNI_conversion_call): Initialize and clear local reference
400         frame.
401         (_Jv_JNI_NewLocalRef): New function.
402         (struct _Jv_JNI_LocalFrame): New structure.
403         (_Jv_JNI_PushLocalFrame): New function.
404         (_Jv_JNI_EnsureLocalCapacity): New function.
405         (FRAME_SIZE): New define.
406         (_Jv_JNI_GetStringChars): Mark string, not characters.
407         (_Jv_JNI_ReleaseStringChars): Unmark string, not characters.
408         (_Jv_JNI_GetPrimitiveArrayElements): Mark array, not elements.
409         (_Jv_JNI_ReleasePrimitiveArrayElements): Unmark array, not
410         elements.
411         (_Jv_JNI_DefineClass): Make return value a local ref.
412         (_Jv_JNI_FindClass): Likewise.
413         (_Jv_JNI_GetSuperclass): Likewise.
414         (_Jv_JNI_ExceptionOccurred): Likewise.
415         (_Jv_JNI_AllocObject): Likewise.
416         (_Jv_JNI_GetObjectClass): Likewise.
417         (_Jv_JNI_CallAnyMethodV): Likewise.
418         (_Jv_JNI_NewString): Likewise.
419         (_Jv_JNI_NewStringUTF): Likewise.
420         (_Jv_JNI_NewObjectArray): Likewise.
421         (_Jv_JNI_GetObjectArrayElement): Likewise.
422         (_Jv_JNI_ToReflectedField): Likewise.
423         (_Jv_JNI_ToReflectedMethod): Likewise.
424         (_Jv_JNIFunctions): Updated table for new functions.
425         (_Jv_JNI_Init): New function.
426         (mark_for_gc): Wrote.
427         (unmark_for_gc): Wrote.
428         * include/jni.h (struct JNINativeInterface): Removed name from
429         PopLocalFrame parameter.
430         (class _Jv_JNIEnv): Added `locals' field.
431
432 Mon Jan 31 00:43:15 2000  Anthony Green  <green@redhat.com>
433
434         * gnu/gcj/convert/natIconv.cc (read): Minor fixes.
435         (write): Ditto.
436
437 2000-01-30  Tom Tromey  <tromey@cygnus.com>
438
439         * include/config.h.in: Rebuilt.
440         * acconfig.h (HAVE_ICONV): Define.
441         * configure: Rebuilt.
442         * configure.in: Check for `iconv' function.
443         * gnu/gcj/convert/BytesToUnicode.java (getDecoder): Try iconv if
444         no specific encoder exists.
445         * gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Try iconv if
446         no specific encoder exists.
447         * Makefile.in: Rebuilt.
448         * Makefile.am (convert_source_files): Mention Input_iconv.java and
449         Output_iconv.java.
450         (nat_source_files): Added natIconv.cc.
451         * gnu/gcj/convert/natIconv.cc: New file.
452         * gnu/gcj/convert/Input_iconv.java: New file.
453         * gnu/gcj/convert/Output_iconv.java: New file.
454
455 2000-01-28  Tom Tromey  <tromey@cygnus.com>
456
457         * Makefile.in: Rebuilt.
458         * Makefile.am (LIBFFIINCS): Added MULTIBUILDTOP.
459
460 2000-01-26  Tom Tromey  <tromey@cygnus.com>
461
462         * gcj/method.h (JvNumMethods): Moved from Class.h.
463         (JvGetFirstMethod): Likewise.
464         * java/lang/Class.h (Object): Updated decl of
465         _Jv_JNI_ToReflectedField.
466         (Object): Added _Jv_JNI_ToReflectedMethod as a friend.
467         * Makefile.in: Rebuilt.
468         * Makefile.am (java/lang/reflect/Field.h): Added `jboolean'
469         argument of _Jv_JNI_ToReflectedField.
470         (java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod
471         as a friend.
472         (java/lang/reflect/Method.h): Likewise.
473         * include/jni.h (class _Jv_JNIEnv): Added `klass' member.  Use
474         __GCJ_JNI_IMPL__.
475         (jweak): New typedef.
476         (struct JNINativeInterface): Correctly declare remaining entries.
477         * jni.cc: Include Class.h, ClassLoader.h.
478         (_Jv_JNI_FindClass): New function.
479         (_Jv_JNI_DefineClass): New function.
480         (_Jv_JNI_conversion_call): New function.
481         (_Jv_JNI_FindClass): Use current class loader to find class.
482         (_Jv_JNI_ExceptionCheck): New function.
483         (_Jv_JNI_FromReflectedField): Now static.
484         (MethodClass): New define.
485         (_Jv_JNI_FromReflectedMethod): New function.
486         (_Jv_JNI_ToReflectedMethod): Likewise.
487         Include Method.h.
488         (_Jv_JNI_IsAssignableFrom): Renamed.
489         (_Jv_JNI_GetStringRegion): New function.
490         Include StringIndexOutOfBoundsException.h.
491         (_Jv_JNI_GetStringUTFRegion): New function.
492         (_Jv_JNIFunctions): Updated for new functions.
493         (_Jv_JNI_GetPrimitiveArrayCritical): New function
494         (_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise.
495         (_Jv_JNI_GetStringCritical): New function.
496         (_Jv_JNI_ReleaseStringCritical): Likewise.
497         (get_throwable): Removed.
498         (GCJ_JV_JNIENV_FRIEND): Removed.
499         (__GCJ_JNI_IMPL__): Define.
500         Include method.h.
501
502         * resolve.cc (get_ffi_type_from_signature): Handle case where
503         boolean is an int.
504
505 Tue Jan 25 08:51:16 2000  Tom Tromey  <tromey@ferrule.cygnus.com>
506
507         * interpret.cc (run): Don't call println.
508         Don't include PrintStream.h.
509
510         * gcj/field.h (struct _Jv_Field): Use "jshort" as type for
511         nameIndex.  Use "jint" as type for boffset.
512         * java/lang/Class.h (struct _Jv_Method): Made accflags a
513         _Jv_ushort.
514         (Class): Likewise.  Also changed type of method_count,
515         vtable_method_count, size_in_bytes, field_count,
516         static_field_count, interface_count.
517         * gcj/array.h (__JArray): Made `length' a const jsize, not an
518         int.
519
520 2000-01-21  Tom Tromey  <tromey@cygnus.com>
521
522         * java/lang/reflect/natConstructor.cc (newInstance): Use
523         _Jv_CallAnyMethodA.
524         * include/jvm.h: Declare _Jv_CallAnyMethodA.
525         * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
526         from _Jv_CallNonvirtualMethodA.  Changed interface; overloaded.
527         Include <jni.h>.
528         (COPY): Removed.
529         (invoke): Use _Jv_CallAnyMethodA.
530         (VAL): Redefined.
531         * java/lang/Class.h (Class): Declare JvGetFirstStaticField,
532         JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
533         functions.
534         (struct _Jv_Method): Added getNextMethod method.
535         (JvNumMethods): New function.
536         (JvGetFirstMethod): Likewise.
537         * gcj/field.h (JvGetFirstStaticField): New function.
538         (JvNumStaticFields): Likewise.
539         (getNextField): Renamed from getNextInstanceField.
540         (struct _Jv_Field): New method getClass.
541         * jni.cc: Wrote many new functions.
542         * include/jni.h (JNI_TRUE): Define.
543         (JNI_FALSE): Likewise.
544         (jobject, jclass, jstring, jarray, jthrowable, jobjectArray,
545         jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray,
546         jcharArray, jfloatArray, jdoubleArray): New typedefs.
547         (jfieldID, jmethodID): Likewise.
548         (JNI_COMMIT, JNI_ABORT): New defines.
549         (JNINativeMethod): New struct.
550         (struct JNINativeInterface): Correctly declared more entries.
551         (class _Jv_JNIEnv): Added `ex' member.
552         (JNI_VERSION_1_1): New define.
553         (JNI_VERSION_1_2): Likewise.
554
555         * boehm.cc (_Jv_MarkObj): Use getNextField, not
556         getNextInstanceField.
557
558 2000-01-20  Tom Tromey  <tromey@cygnus.com>
559
560         * resolve.cc (StringClass): Removed.
561         * defineclass.cc (StringClass): Removed.
562
563 2000-01-19  Bryce McKinlay  <bryce@albatross.co.nz>
564
565         * NEWS: updated.
566
567 2000-01-19  Tom Tromey  <tromey@cygnus.com>
568
569         * interpret.cc (PC_REGISTER_ASM): Removed.
570
571         * java/lang/natThrowable.cc: Don't use `#pragma implementation'.
572         From Bryce McKinlay.
573
574         * All files: Updated copyright to reflect Cygnus purchase.
575
576 2000-01-18  Bryce McKinlay <bryce@albatross.co.nz>
577
578         * configure: Rebuilt.
579         * configure.in: Recognize --disable-interpreter.
580
581 2000-01-18  Andrew Haley  <aph@cygnus.com>
582
583         * name-finder.cc (lookup): Check for dladdr function.
584         acconfig.h (HAVE_DLADDR): Add.
585         configure.in: Check for HAVE_DLADDR
586         configure: Rebuilt.
587         include/config.h.in:  Rebuilt.
588
589 2000-01-17  Andrew Haley  <aph@cygnus.com>
590
591         * prims.cc (_Jv_RunMain): Set the name of this executable.
592
593 2000-01-17  Tom Tromey  <tromey@cygnus.com>
594
595         * java/lang/natThrowable.cc (fillInStackTrace): Return `this' even
596         when backtrace can't be computed.
597
598         * configure: Rebuilt.
599         * configure.in: Fixed typo in AC_CONFIG_SUBDIRS call.
600
601         * java/lang/Runtime.java (loadLibraryInternal): Declare.
602         * java/lang/natClassLoader.cc (_Jv_FindClass): Removed dead copy.
603         (_Jv_FindClassInCache): Likewise.
604         (_Jv_FindClass): Don't conditionalize body on INTERPRETER.
605         (findSystemClass): Try to load class from compiled module.
606         Include Runtime.h.
607         * java/lang/natRuntime.cc (load): Use UTF-8 copy of filename.
608         (loadLibrary): Likewise.
609         (lt_preloaded_symbols): Define.
610         (loadLibraryInternal): New method.
611         * include/config.h.in: Rebuilt.
612         * acconfig.h (USE_LTDL): Added.
613         * Makefile.am (SUBDIRS): Added $(DIRLTDL).
614         (INCLUDES): Added $(INCLTDL).
615         (libgcj_la_DEPENDENCIES): Added $(LIBLTDL).
616         (libgcj_la_LIBADD): Likewise.
617         * aclocal.m4, configure: Rebuilt.
618         * configure.in: Added libltdl support.
619
620 2000-01-15  Tom Tromey  <tromey@cygnus.com>
621
622         * prims.cc (_Jv_PrimClass): Use `JV_STATE_NOTHING', not `0'.
623
624 2000-01-14  Andrew Haley  <aph@cygnus.com>
625
626         * java/lang/natThrowable.cc: New file.
627
628         * java/lang/Throwable.java (fillInStackTrace): Make native.
629         (printStackTrace): Call native method to do this.
630         (Throwable): Call fillInStackTrace.
631         (stackTrace): New variable.
632         
633         * include/jvm.h: Add _Jv_ThisExecutable functions.
634         
635         * prims.cc: (_Jv_execName): New variable.
636         (catch_segv): Call fillInStackTrace.
637         (catch_fpe): Ditto.
638         (_Jv_ThisExecutable): New functions.
639         (JvRunMain): Set the name of this executable.
640
641         * Makefile.am: Add java/lang/natThrowable.cc.
642         Add name-finder.cc.
643         * Makefile.in: Rebuilt.
644
645         * acconfig.h: Add HAVE_PROC_SELF_EXE.
646
647         * configure.in: Force link with __frame_state_for in
648         FORCELIBGCCSPEC.  Add new checks for backtrace.
649         * include/config.h.in: Rebuilt.
650
651         * name-finder.cc: New file.
652         * include/name-finder.h: New file.
653
654 2000-01-16  Anthony Green  <green@cygnus.com>
655
656         * java/lang/StringBuffer.java (StringBuffer): Don't special case
657         null argument.
658
659 2000-01-16  Jeff Sturm  <jsturm@sigma6.com>
660
661         * java/io/StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).
662
663 2000-01-13  Tom Tromey  <tromey@cygnus.com>
664
665         * java/lang/natClassLoader.cc (_Jv_FindClass): Register `loader',
666         not system loader, as initiating loader.
667
668 2000-01-11  Tom Tromey  <tromey@cygnus.com>
669
670         * java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
671         HP/UX.  From David Scott Urban.
672
673 2000-01-10  Jeff Sturm  <jsturm@sigma6.com>
674
675         * java/lang/natMath.cc (pow): Cast args to `double', not
676         `jdouble'.
677         (atan2): Likewise.
678         (IEEEremainder): Likewise.
679         * java/lang/mprec.h: Don't wrap includes in `extern "C"'.
680         * java/lang/fdlibm.h: Don't wrap includes in `extern "C"'.
681
682 2000-01-09  Anthony Green  <green@cygnus.com>
683
684         * java/lang/natString.cc (init): Test for overflow condition
685         during out of bounds check.
686         (getChars): Throw StringIndexOutOfBoundsException, not
687         ArrayIndexOutOfBoundsException.
688         (getBytes): Ditto.
689         (regionMatches): Obey case option during string comparison.
690
691         * configure.host (ligcj_interpreter): New variable.  Enable
692         interpreter by default on IA-32.
693         * configure.in:  Examine libgcj_interpreter.
694         * configure: Rebuilt.
695
696 2000-01-07  Tom Tromey  <tromey@cygnus.com>
697
698         * mauve-libgcj: Don't disable ClassTest.
699
700         * java/lang/natClass.cc (getClasses): Wrote.
701
702 2000-01-06  Tom Tromey  <tromey@cygnus.com>
703
704         * java/lang/natClass.cc (_getConstructors): Correctly check
705         whether method name is the init name.
706         (getMethod): Look at accflags on method in `klass', not `this'.
707
708 2000-01-05  Tom Tromey  <tromey@cygnus.com>
709
710         * java/lang/natClass.cc (getMethod): Compute offset relative to
711         `klass's methods table, not `this's table.
712
713         * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA):
714         In unwrapping/widening case, check whether `k' is null, not
715         whether it is primitive.  Initialize `num' from `argelts', not
716         `paramelts'.  Correct create and pass arguments to ffi_call.
717         Don't let presence of `this' argument affect index used to look in
718         argument arrays.
719         (COPY): Set appropriate element in `values' vector.
720
721         * java/lang/natClass.cc: Include <gcj/method.h>.
722
723         * java/lang/Class.h (_getMethods): Correctly declare as private,
724         not public.
725
726         * java/lang/Class.h (_getMethods): Declare.
727         * java/lang/Class.java (_getMethods): Declare.
728         * java/lang/natClass.cc (getDeclaringClass): Always return NULL.
729         (getDeclaredClasses): Always return empty array.
730         (_getMethods): New method.
731         (getMethods): Wrote.
732         (getDeclaredMethod): Return `rmethod'.
733         (finit_name): New global.
734         (getDeclaredMethods): Check for finit_name.
735         (_getMethods): Likewise.
736         (getMethod): Only return public methods.
737
738         * java/lang/reflect/natMethod.cc (get_ffi_type): Test size of
739         jboolean and select correct ffi type on that basis.
740         (_Jv_CallNonvirtualMethodA): Handle `void' return type.
741         Constructor call always has `void' return type.
742
743 2000-01-04  Tom Tromey  <tromey@cygnus.com>
744
745         * java/lang/Class.h (getSignature): Updated.
746         * java/lang/Class.java (getSignature): Updated.
747         * java/lang/natClass.cc (getSignature): Added `is_constructor'
748         argument.
749         (getConstructor): Ensure constructor is public.
750         (_getConstructors): Check for public-ness of constructor when
751         `declared' is false, not when it is true.
752
753 2000-01-04  Warren Levy  <warrenl@cygnus.com>
754
755         * java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
756         comment.
757         (receive): Set the sender's address in the DatagramPacket.
758
759 2000-01-04  Tom Tromey  <tromey@cygnus.com>
760
761         * java/lang/reflect/natConstructor.cc (newInstance): Pass
762         declaring class as return_type argument to
763         _Jv_CallNonvirtualMethodA.
764         * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In
765         constructor case, create object and use it as `this' argument.
766         * java/lang/Class.h (_getConstructors): Declare.
767         (_getFields): Declare.
768         * java/lang/Class.java (getConstructors): Wrote.
769         (_getConstructors): New native method.
770         (getDeclaredConstructors): Wrote.
771         (_getFields): Declare new native method.
772         * java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Removed
773         incorrect comment.
774         (getMethod): Work correctly when class is primitive.
775         (getDeclaredMethods): Likewise.  Compute offset using `method',
776         not `mptr'.
777         (getDeclaredMethod): Likewise.
778         (getConstructor): Wrote.
779         (ConstructorClass): New define.
780         (getDeclaredConstructor): Wrote.
781         (_getConstructors): New method.
782         (_getFields): New method.
783         (getFields): Wrote.
784
785         * Makefile.in: Rebuilt.
786         * Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.
787
788         * prims.cc: Remove `#pragma implementation'.
789         * gcj/array.h: Remove `#pragma interface'.
790
791         * prims.cc (_Jv_equaln): New function.
792         * java/lang/Class.java (getSignature): Declare.
793         * resolve.cc (_Jv_LookupDeclaredMethod): Moved to natClass.cc.
794         * java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Moved from
795         resolve.cc.
796         (getSignature): New method.
797         (getDeclaredMethod): Wrote.
798         (getMethod): Wrote.
799         Include StringBuffer.h.
800         * java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
801         as a friend.  Unconditionally declare _Jv_LookupDeclaredMethod as
802         a friend.
803         (getSignature): Declare.
804         * include/jvm.h (_Jv_GetTypesFromSignature): Declare.
805         (_Jv_equaln): Declare.
806         (_Jv_CallNonvirtualMethodA): Declare.
807         * Makefile.in: Rebuilt.
808         * Makefile.am (nat_source_files): Added natConstructor.cc.
809         (java/lang/reflect/Constructor.h): New target.
810         * java/lang/reflect/natConstructor.cc: New file.
811         * java/lang/reflect/Constructor.java (newInstance): Now native.
812         (declaringClass): Renamed from decl_class.
813         (offset): Renamed from index.
814         (getType): New native method.
815         (getModifiers): Now native.
816         (getParameterTypes): Call getType if required.
817         (hashCode): Include hash code from declaring class.
818         (modifiers): Removed.
819         (toString): Call getType if required.
820         * gcj/method.h (_Jv_FromReflectedConstructor): New function.
821         * java/lang/reflect/natMethod.cc (hack_call): New method.
822         Removed `#if 0' around FFI code.
823         Include <gnu/gcj/RawData.h>.
824         (invoke): Use _Jv_CallNonvirtualMethodA.  Throw
825         IllegalArgumentException when argument object and class disagree.
826         (_Jv_GetTypesFromSignature): New function.
827         (getType): Use it.
828         (ObjectClass): New define.
829         (_Jv_CallNonvirtualMethodA): New function.
830         * java/lang/reflect/Method.java (hack_trampoline): New method.
831         (hack_call): New native method.