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