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