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