1 2000-02-25 Bryce McKinlay <bryce@albatross.co.nz>
3 * java/net/URLConnection.java (initializeDateFormats): New
5 (getHeaderFieldDate): Call initializeDateFormats if required.
6 locale, dateFormat1, dateFormat2, dateFormat3: Don't initialize
10 2000-02-24 Warren Levy <warrenl@cygnus.com>
12 * java/math/BigInteger.java(ival): Made private.
16 2000-02-20 Anthony Green <green@cygnus.com>
18 * Makefile.in: Rebuilt.
19 * Makefile.am (ordinary_java_source_files): Add
20 gnu/gcj/io/DefaultMimeTypes.java and gnu/gcj/io/MimeTypes.java
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.
27 * java/net/URLConnection.java: Implement guessContentTypeFromName.
29 * gnu/gcj/io/MimeTypes.java: New file.
30 * gnu/gcj/io/DefaultMimeTypes.java: New file.
32 2000-02-20 Tom Tromey <tromey@cygnus.com>
34 * boehm.cc (_Jv_AllocBytes): Clear returned memory.
36 2000-02-19 Bryce McKinlay <bryce@albatross.co.nz>
38 * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
41 2000-02-18 Tom Tromey <tromey@cygnus.com>
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.
55 * java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
58 2000-02-17 Tom Tromey <tromey@cygnus.com>
60 * gcj/field.h (_Jv_Field::getClass): Don't use JvAssert.
63 2000-02-16 Tom Tromey <tromey@cygnus.com>
65 * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
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.
75 * jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
78 2000-02-15 Tom Tromey <tromey@cygnus.com>
80 * resolve.cc (ncode): Set args_raw_size. Compute jni_cif and
82 (init_cif): Added `rtype_p' argument.
83 * include/java-interp.h (class _Jv_MethodBase): Added
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.
90 * jni.cc (mangled_name): Skip leading `(' in signature.
92 * jni.cc (add_char): Added missing `else'.
94 * jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
97 2000-02-15 Bryce McKinlay <bryce@albatross.co.nz>
101 * java/lang/natRuntime.cc (_load): Include library path with
104 * java/lang/natSystem.cc (init_properties): set java.lang.classpath
107 * java/lang/natThread.cc (dumpStack): Removed.
108 * java/lang/Thread.java (dumpStack): Implemented.
110 2000-02-15 Tom Tromey <tromey@cygnus.com>
112 * java/lang/natRuntime.cc (_load): On Unix, prefix library name
113 with `lib' for loadLibrary. Fixes PR gcj/150.
115 2000-02-14 Warren Levy <warrenl@cygnus.com>
117 * gnu/gcj/math/MPN.java(findLowestBit): Made methods public.
119 * java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
123 (modPow): Rewritten to not use the naive, slow, brute force approach.
124 (isProbablePrime): Implemented.
125 (testBit): Implemented.
126 (flipBit): Implemented.
127 (getLowestSetBit): Implemented.
129 2000-02-16 Anthony Green <green@redhat.com>
131 * configure.host: Use the same options for i386 and i486 as we do
134 2000-02-12 Tom Tromey <tromey@cygnus.com>
136 * java/io/File.java (createTempFile): Use low bits from counter,
139 Fri Feb 11 19:48:08 2000 Anthony Green <green@cygnus.com>
141 * THANKS: More thanks.
143 2000-02-11 Tom Tromey <tromey@cygnus.com>
145 * interpret.cc (continue1): Use STOREA, not STOREI, to implement
146 astore instruction. From Hans Boehm.
148 2000-02-11 Warren Levy <warrenl@cygnus.com>
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.
160 (andNot): Implemented.
161 (clearBit): Implemented.
162 (setBit): Implemented.
163 (bitCount): Implemented.
164 (toByteArray): Implemented.
166 2000-02-11 Tom Tromey <tromey@cygnus.com>
168 * java/io/File.java (nextValue): Now synchronized.
170 2000-02-10 Tom Tromey <tromey@cygnus.com>
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
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.
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):
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.
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.
228 2000-02-10 Andrew Haley <aph@cygnus.com>
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,
235 * resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
236 Search class hierarchy for superclass vtable.
238 * java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
239 off the end of a pointer list.
241 * java/lang/natThread.cc (stop): Don't abort, throw an exception
245 2000-02-09 Tom Tromey <tromey@cygnus.com>
247 * java/lang/natRuntime.cc (_load): Call add_library.
248 (loadLibraryInternal): Likewise.
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.
254 2000-02-08 Tom Tromey <tromey@cygnus.com>
256 * java/util/Properties.java (setProperty): New method.
259 2000-02-07 Tom Tromey <tromey@cygnus.com>
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
265 (loadLibrary): Likewise.
268 (loadLibrary, load): Removed.
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.
295 * interpret.cc (PUSHL): Don't use expression statement.
300 * jni.cc (add_char): Conditional on INTERPRETER.
301 (mangled_name): Likewise.
303 * include/java-interp.h (class _Jv_MethodBase): Conditional on
305 (class _Jv_JNIMethod): Likewise.
307 2000-02-04 Warren Levy <warrenl@cygnus.com>
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
313 * java/math/BigInteger.java: New file. Based primarily on
314 Kawa's IntNum.java by Per Bothner <per@bothner.com>.
316 2000-02-04 Tom Tromey <tromey@cygnus.com>
318 * defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
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
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.
341 * java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
344 2000-02-04 Andrew Haley <aph@cygnus.com>
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.
351 2000-02-03 Tom Tromey <tromey@cygnus.com>
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
364 * java/text/DateFormat.java (clone): New method.
365 * java/text/Collator.java (clone): New method.
367 2000-02-03 Tom Tromey <tromey@cygnus.com>
369 * java/io/PipedOutputStream.java (write(byte[], int, int)): New
372 2000-02-01 Tom Tromey <tromey@cygnus.com>
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>.
381 * include/jni.h (class _Jv_JNIEnv): Corrected calls using `...'.
383 * include/jni.h (class _Jv_JNIEnv): Added all C++ inline methods.
385 * jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
386 (_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave
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.
394 * jni.cc (_Jv_JNI_GetField): Specialize for jobject.
395 (_Jv_JNI_GetStaticField): Likewise.
397 2000-01-31 Tom Tromey <tromey@cygnus.com>
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,
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
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
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.
441 Mon Jan 31 00:43:15 2000 Anthony Green <green@redhat.com>
443 * gnu/gcj/convert/natIconv.cc (read): Minor fixes.
446 2000-01-30 Tom Tromey <tromey@cygnus.com>
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
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.
464 2000-01-28 Tom Tromey <tromey@cygnus.com>
466 * Makefile.in: Rebuilt.
467 * Makefile.am (LIBFFIINCS): Added MULTIBUILDTOP.
469 2000-01-26 Tom Tromey <tromey@cygnus.com>
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
481 (java/lang/reflect/Method.h): Likewise.
482 * include/jni.h (class _Jv_JNIEnv): Added `klass' member. Use
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.
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.
511 * resolve.cc (get_ffi_type_from_signature): Handle case where
514 Tue Jan 25 08:51:16 2000 Tom Tromey <tromey@ferrule.cygnus.com>
516 * interpret.cc (run): Don't call println.
517 Don't include PrintStream.h.
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
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
529 2000-01-21 Tom Tromey <tromey@cygnus.com>
531 * java/lang/reflect/natConstructor.cc (newInstance): Use
533 * include/jvm.h: Declare _Jv_CallAnyMethodA.
534 * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
535 from _Jv_CallNonvirtualMethodA. Changed interface; overloaded.
538 (invoke): Use _Jv_CallAnyMethodA.
540 * java/lang/Class.h (Class): Declare JvGetFirstStaticField,
541 JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
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.
564 * boehm.cc (_Jv_MarkObj): Use getNextField, not
565 getNextInstanceField.
567 2000-01-20 Tom Tromey <tromey@cygnus.com>
569 * resolve.cc (StringClass): Removed.
570 * defineclass.cc (StringClass): Removed.
572 2000-01-19 Bryce McKinlay <bryce@albatross.co.nz>
576 2000-01-19 Tom Tromey <tromey@cygnus.com>
578 * interpret.cc (PC_REGISTER_ASM): Removed.
580 * java/lang/natThrowable.cc: Don't use `#pragma implementation'.
583 * All files: Updated copyright to reflect Cygnus purchase.
585 2000-01-18 Bryce McKinlay <bryce@albatross.co.nz>
587 * configure: Rebuilt.
588 * configure.in: Recognize --disable-interpreter.
590 2000-01-18 Andrew Haley <aph@cygnus.com>
592 * name-finder.cc (lookup): Check for dladdr function.
593 acconfig.h (HAVE_DLADDR): Add.
594 configure.in: Check for HAVE_DLADDR
596 include/config.h.in: Rebuilt.
598 2000-01-17 Andrew Haley <aph@cygnus.com>
600 * prims.cc (_Jv_RunMain): Set the name of this executable.
602 2000-01-17 Tom Tromey <tromey@cygnus.com>
604 * java/lang/natThrowable.cc (fillInStackTrace): Return `this' even
605 when backtrace can't be computed.
607 * configure: Rebuilt.
608 * configure.in: Fixed typo in AC_CONFIG_SUBDIRS call.
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.
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.
629 2000-01-15 Tom Tromey <tromey@cygnus.com>
631 * prims.cc (_Jv_PrimClass): Use `JV_STATE_NOTHING', not `0'.
633 2000-01-14 Andrew Haley <aph@cygnus.com>
635 * java/lang/natThrowable.cc: New file.
637 * java/lang/Throwable.java (fillInStackTrace): Make native.
638 (printStackTrace): Call native method to do this.
639 (Throwable): Call fillInStackTrace.
640 (stackTrace): New variable.
642 * include/jvm.h: Add _Jv_ThisExecutable functions.
644 * prims.cc: (_Jv_execName): New variable.
645 (catch_segv): Call fillInStackTrace.
647 (_Jv_ThisExecutable): New functions.
648 (JvRunMain): Set the name of this executable.
650 * Makefile.am: Add java/lang/natThrowable.cc.
652 * Makefile.in: Rebuilt.
654 * acconfig.h: Add HAVE_PROC_SELF_EXE.
656 * configure.in: Force link with __frame_state_for in
657 FORCELIBGCCSPEC. Add new checks for backtrace.
658 * include/config.h.in: Rebuilt.
660 * name-finder.cc: New file.
661 * include/name-finder.h: New file.
663 2000-01-16 Anthony Green <green@cygnus.com>
665 * java/lang/StringBuffer.java (StringBuffer): Don't special case
668 2000-01-16 Jeff Sturm <jsturm@sigma6.com>
670 * java/io/StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).
672 2000-01-13 Tom Tromey <tromey@cygnus.com>
674 * java/lang/natClassLoader.cc (_Jv_FindClass): Register `loader',
675 not system loader, as initiating loader.
677 2000-01-11 Tom Tromey <tromey@cygnus.com>
679 * java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
680 HP/UX. From David Scott Urban.
682 2000-01-10 Jeff Sturm <jsturm@sigma6.com>
684 * java/lang/natMath.cc (pow): Cast args to `double', not
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"'.
691 2000-01-09 Anthony Green <green@cygnus.com>
693 * java/lang/natString.cc (init): Test for overflow condition
694 during out of bounds check.
695 (getChars): Throw StringIndexOutOfBoundsException, not
696 ArrayIndexOutOfBoundsException.
698 (regionMatches): Obey case option during string comparison.
700 * configure.host (ligcj_interpreter): New variable. Enable
701 interpreter by default on IA-32.
702 * configure.in: Examine libgcj_interpreter.
703 * configure: Rebuilt.
705 2000-01-07 Tom Tromey <tromey@cygnus.com>
707 * mauve-libgcj: Don't disable ClassTest.
709 * java/lang/natClass.cc (getClasses): Wrote.
711 2000-01-06 Tom Tromey <tromey@cygnus.com>
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'.
717 2000-01-05 Tom Tromey <tromey@cygnus.com>
719 * java/lang/natClass.cc (getMethod): Compute offset relative to
720 `klass's methods table, not `this's table.
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
728 (COPY): Set appropriate element in `values' vector.
730 * java/lang/natClass.cc: Include <gcj/method.h>.
732 * java/lang/Class.h (_getMethods): Correctly declare as private,
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.
741 (getDeclaredMethod): Return `rmethod'.
742 (finit_name): New global.
743 (getDeclaredMethods): Check for finit_name.
744 (_getMethods): Likewise.
745 (getMethod): Only return public methods.
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.
752 2000-01-04 Tom Tromey <tromey@cygnus.com>
754 * java/lang/Class.h (getSignature): Updated.
755 * java/lang/Class.java (getSignature): Updated.
756 * java/lang/natClass.cc (getSignature): Added `is_constructor'
758 (getConstructor): Ensure constructor is public.
759 (_getConstructors): Check for public-ness of constructor when
760 `declared' is false, not when it is true.
762 2000-01-04 Warren Levy <warrenl@cygnus.com>
764 * java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
766 (receive): Set the sender's address in the DatagramPacket.
768 2000-01-04 Tom Tromey <tromey@cygnus.com>
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
783 (getMethod): Work correctly when class is primitive.
784 (getDeclaredMethods): Likewise. Compute offset using `method',
786 (getDeclaredMethod): Likewise.
787 (getConstructor): Wrote.
788 (ConstructorClass): New define.
789 (getDeclaredConstructor): Wrote.
790 (_getConstructors): New method.
791 (_getFields): New method.
794 * Makefile.in: Rebuilt.
795 * Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.
797 * prims.cc: Remove `#pragma implementation'.
798 * gcj/array.h: Remove `#pragma interface'.
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
805 (getSignature): New method.
806 (getDeclaredMethod): Wrote.
808 Include StringBuffer.h.
809 * java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
810 as a friend. Unconditionally declare _Jv_LookupDeclaredMethod as
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.
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.