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