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