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