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