1 2000-02-20 Anthony Green <green@cygnus.com>
3 * Makefile.in: Rebuilt.
4 * Makefile.am (ordinary_java_source_files): Add
5 gnu/gcj/io/DefaultMimeTypes.java and gnu/gcj/io/MimeTypes.java
7 * scripts/MakeDefaultMimeTypes.java: New file.
8 * scripts/mime.types: New file.
9 * scripts/classes.pl: Moved from top level.
10 * classes.pl: Moved to scripts directory.
12 * java/net/URLConnection.java: Implement guessContentTypeFromName.
14 * gnu/gcj/io/MimeTypes.java: New file.
15 * gnu/gcj/io/DefaultMimeTypes.java: New file.
17 2000-02-20 Tom Tromey <tromey@cygnus.com>
19 * boehm.cc (_Jv_AllocBytes): Clear returned memory.
21 2000-02-19 Bryce McKinlay <bryce@albatross.co.nz>
23 * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
26 2000-02-18 Tom Tromey <tromey@cygnus.com>
28 * include/jvm.h (_Jv_GetJavaVM): Declare.
29 * include/java-interp.h (_Jv_GetFirstMethod): New function.
30 (_Jv_MethodBase::get_method): New method.
31 (_Jv_JNIMethod::set_function): New method.
32 * jni.cc (_Jv_JNI_UnregisterNatives): New function.
33 (_Jv_JNI_RegisterNatives): New function.
34 (_Jv_JNIFunctions): Updated for new functions.
35 (_Jv_GetJavaVM): New function.
36 (_Jv_JNI_GetJavaVM): Use it. Now static.
37 (_Jv_JNI_AttachCurrentThread): Create a new JNIEnv if this thread
38 is already a Java thread but does not have a JNIEnv yet.
40 * java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
43 2000-02-17 Tom Tromey <tromey@cygnus.com>
45 * gcj/field.h (_Jv_Field::getClass): Don't use JvAssert.
48 2000-02-16 Tom Tromey <tromey@cygnus.com>
50 * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
52 * jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
53 (_Jv_JNI_NewObject): Likewise.
54 (_Jv_JNI_NewObjectA): Likewise.
55 (_Jv_JNI_CallAnyMethodV): In constructor case, pass correct value
56 as "return" type to _Jv_CallAnyMethodA.
57 (_Jv_JNI_CallAnyMethodA): Likewise.
58 (_Jv_JNI_CallAnyVoidMethodV): Likewise.
60 * jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
63 2000-02-15 Tom Tromey <tromey@cygnus.com>
65 * resolve.cc (ncode): Set args_raw_size. Compute jni_cif and
67 (init_cif): Added `rtype_p' argument.
68 * include/java-interp.h (class _Jv_MethodBase): Added
70 (class _Jv_InterpMethod): Removed args_raw_size.
71 (class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields.
72 * jni.cc (call): Pass JNIEnv and (for static methods only) the
73 class pointer as well as the ordinary arguments.
75 * jni.cc (mangled_name): Skip leading `(' in signature.
77 * jni.cc (add_char): Added missing `else'.
79 * jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
82 2000-02-15 Bryce McKinlay <bryce@albatross.co.nz>
86 * java/lang/natRuntime.cc (_load): Include library path with
89 * java/lang/natSystem.cc (init_properties): set java.lang.classpath
92 * java/lang/natThread.cc (dumpStack): Removed.
93 * java/lang/Thread.java (dumpStack): Implemented.
95 2000-02-15 Tom Tromey <tromey@cygnus.com>
97 * java/lang/natRuntime.cc (_load): On Unix, prefix library name
98 with `lib' for loadLibrary. Fixes PR gcj/150.
100 2000-02-14 Warren Levy <warrenl@cygnus.com>
102 * gnu/gcj/math/MPN.java(findLowestBit): Made methods public.
104 * java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
108 (modPow): Rewritten to not use the naive, slow, brute force approach.
109 (isProbablePrime): Implemented.
110 (testBit): Implemented.
111 (flipBit): Implemented.
112 (getLowestSetBit): Implemented.
114 2000-02-16 Anthony Green <green@redhat.com>
116 * configure.host: Use the same options for i386 and i486 as we do
119 2000-02-12 Tom Tromey <tromey@cygnus.com>
121 * java/io/File.java (createTempFile): Use low bits from counter,
124 Fri Feb 11 19:48:08 2000 Anthony Green <green@cygnus.com>
126 * THANKS: More thanks.
128 2000-02-11 Tom Tromey <tromey@cygnus.com>
130 * interpret.cc (continue1): Use STOREA, not STOREI, to implement
131 astore instruction. From Hans Boehm.
133 2000-02-11 Warren Levy <warrenl@cygnus.com>
135 * java/math/BigInteger.java(BigInteger(String, int)): New constructor.
136 (BigInteger(String)): New constructor.
137 (not): Rewritten using version from Kawa's BitOps class.
138 (valueOf): New private methods from Kawa's BitOps class.
145 (andNot): Implemented.
146 (clearBit): Implemented.
147 (setBit): Implemented.
148 (bitCount): Implemented.
149 (toByteArray): Implemented.
151 2000-02-11 Tom Tromey <tromey@cygnus.com>
153 * java/io/File.java (nextValue): Now synchronized.
155 2000-02-10 Tom Tromey <tromey@cygnus.com>
157 * java/io/natFileDescriptorPosix.cc (open): Recognize EXCL flag.
158 * java/io/FileDescriptor.java (EXCL): New static field.
159 * java/io/File.java (tmpdir): New static field.
160 (createTempFile): New method.
161 (nextValue): New method.
162 * java/lang/natSystem.cc (init_properties): Set java.io.tmpdir
165 * include/jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
166 (jboolean): Declare as an attributed int, not a bool.
167 (_Jv_func): Declare differently for C.
169 * gnu/gcj/jni/natNativeThread.cc: New file.
170 * gnu/gcj/jni/NativeThread.java: New file.
171 * java/lang/Thread.java (data): Now a RawData.
172 * include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv):
174 * Makefile.in: Rebuilt.
175 * Makefile.am (java/lang/Thread.h): New target.
176 (ordinary_java_source_files): Added NativeThread.java.
177 (nat_source_files): Added natNativeThread.cc.
178 * java/lang/natThread.cc: Include <jni.h>
179 (struct natThread): Added `jni_env' field.
180 (_Jv_GetCurrentJNIEnv): New function.
181 (_Jv_SetCurrentJNIEnv): Likewise.
182 (initialize_native): Initialize jni_env.
184 * jni.cc (ThreadGroupClass): New define.
185 (_Jv_JNI_InvokeFunctions): New structure.
186 (JNI_GetCreatedJavaVMs): New function.
187 (the_vm): New global.
188 (JNI_GetDefaultJavaVMInitArgs): New function.
189 Include NativeThread.h.
190 (NativeThreadClass): New define.
191 (_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1.
192 (_Jv_JNI_DestroyJavaVM): New function.
193 (_Jv_JNI_AttachCurrentThread): New function.
194 (_Jv_JNI_DetachCurrentThread): New function.
195 (_Jv_JNI_GetEnv): New function.
196 (JNI_CreateJavaVM): New function.
197 (_Jv_JNI_GetJavaVM): New function.
198 (_Jv_JNIFunctions): Added entry for GetJavaVM.
199 * include/jni.h (JavaVMAttachArgs): New structure.
200 (JNI_EDETACHED): New define.
201 (JNI_EVERSION): Likewise.
202 (JavaVM): Define properly.
203 (struct JNIInvokeInterface): New structure.
204 (class _Jv_JavaVM): New class.
205 (JNI_OnLoad, JNI_OnUnload): Declare.
206 (JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM,
207 JNI_GetCreatedJavaVMs): Declare.
208 (JavaVMInitArgs): New typedef.
209 (JavaVMOption): Likewise.
210 (JNI_ERR): New define.
213 2000-02-10 Andrew Haley <aph@cygnus.com>
215 * interpret.cc: Don't include fdlibm.h.
216 Replace #if with #ifdef throughout.
217 Declare extern __ieee754_fmod.
218 (continue1): Remove op_getfield, op_getstatic, op_putfield,
220 * resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
221 Search class hierarchy for superclass vtable.
223 * java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
224 off the end of a pointer list.
226 * java/lang/natThread.cc (stop): Don't abort, throw an exception
230 2000-02-09 Tom Tromey <tromey@cygnus.com>
232 * java/lang/natRuntime.cc (_load): Call add_library.
233 (loadLibraryInternal): Likewise.
235 * gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
236 iconv_close when handle is not NULL. Thanks to Andrew Haley.
237 (Output_iconv::finalize): Likewise.
239 2000-02-08 Tom Tromey <tromey@cygnus.com>
241 * java/util/Properties.java (setProperty): New method.
244 2000-02-07 Tom Tromey <tromey@cygnus.com>
246 * java/lang/Runtime.java (_load): Declare.
247 (load, loadLibrary): Wrote in terms of _load.
248 * java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in
250 (loadLibrary): Likewise.
253 (loadLibrary, load): Removed.
255 * jni.cc (ThrowableClass): New define.
256 (_Jv_JNI_Throw): Check argument.
257 (_Jv_JNI_ThrowNew): Likewise.
258 (wrap_value): Don't wrap object if it is NULL.
259 (_Jv_JNI_DefineClass): Use wrap_value.
260 (_Jv_JNI_FindClass): Likewise.
261 (_Jv_JNI_GetSuperclass): Likewise.
262 (_Jv_JNI_ExceptionOccurred): Likewise.
263 (_Jv_JNI_AllocObject): Likewise.
264 (_Jv_JNI_GetObjectClass): Likewise.
265 (_Jv_JNI_NewString): Likewise.
266 (_Jv_JNI_NewStringUTF): Likewise.
267 (_Jv_JNI_NewObjectArray): Likewise.
268 (_Jv_JNI_GetObjectArrayElement): Likewise.
269 (_Jv_JNI_NewPrimitiveArray): Likewise.
270 (_Jv_JNI_ToReflectedField): Likewise.
271 (_Jv_JNI_ToReflectedMethod): Likewise.
272 (_Jv_JNI_AllocObject): Check argument.
273 (_Jv_JNI_NewObjectV): Likewise.
274 (_Jv_JNI_NewObject): Likewise.
275 (_Jv_JNI_NewObjectA): Likewise.
276 (_Jv_JNI_GetObjectClass): Likewise.
277 (_Jv_JNI_GetField): Likewise.
278 (_Jv_JNI_SetField): Likewise.
280 * interpret.cc (PUSHL): Don't use expression statement.
285 * jni.cc (add_char): Conditional on INTERPRETER.
286 (mangled_name): Likewise.
288 * include/java-interp.h (class _Jv_MethodBase): Conditional on
290 (class _Jv_JNIMethod): Likewise.
292 2000-02-04 Warren Levy <warrenl@cygnus.com>
294 * Makefile.am: Added MPN.java and BigInteger.java.
295 * Makefile.in: Rebuilt.
296 * gnu/gcj/math/MPN.java: New file. From Kawa by Per Bothner
298 * java/math/BigInteger.java: New file. Based primarily on
299 Kawa's IntNum.java by Per Bothner <per@bothner.com>.
301 2000-02-04 Tom Tromey <tromey@cygnus.com>
303 * defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
305 (handleMethodsEnd): Fixed error messages. Create a _Jv_JNIMethod
306 if the method is native.
307 * resolve.cc (ncode): Don't handle native methods.
308 (_Jv_JNIMethod::ncode): New method.
309 (_Jv_PrepareClass): Handle native methods.
310 * jni.cc (call): Renamed from _Jv_JNI_conversion_call.
311 Include AbstractMethodError.h.
312 (add_char): New function.
313 (mangled_name): Likewise.
314 * include/java-interp.h (class _Jv_JNIMethod): New class.
315 (class _Jv_MethodBase): New class.
316 (class _Jv_InterpMethod): Derive from _Jv_MethodBase.
317 (_Jv_InterpClass): Changed `interpreted_methods' field to type
320 * include/jvm.h (_Jv_FindSymbolInExecutable): Declare.
321 * java/lang/natRuntime.cc (libraries_size, libraries_count,
322 libraries): New globals.
323 (add_library): New function.
324 (_Jv_FindSymbolInExecutable): New function.
326 * java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
329 2000-02-04 Andrew Haley <aph@cygnus.com>
331 * java/lang/Throwable.java (CPlusPlusDemangler): New class.
332 (printStackTrace): Use a CPlusPlusDemangler to demangle names.
333 * java/lang/natThrowable.cc (printRawStackTrace): Rename
334 printStackTrace to printRawStackTrace.
336 2000-02-03 Tom Tromey <tromey@cygnus.com>
338 * java/util/Calendar.java (toString): New method.
339 * java/util/SimpleTimeZone.java (clone): New method.
340 (toString): New method.
341 * java/util/TimeZone.java (clone): New method.
342 * java/text/SimpleDateFormat.java (clone): New method.
343 * java/text/NumberFormat.java (clone): New method.
344 (equals): New method.
345 * java/text/Format.java (clone): New method.
346 * java/text/DateFormatSymbols.java (DateFormatSymbols): New
349 * java/text/DateFormat.java (clone): New method.
350 * java/text/Collator.java (clone): New method.
352 2000-02-03 Tom Tromey <tromey@cygnus.com>
354 * java/io/PipedOutputStream.java (write(byte[], int, int)): New
357 2000-02-01 Tom Tromey <tromey@cygnus.com>
359 * include/java-interp.h (_Jv_JNI_conversion_call): Declare.
360 * resolve.cc (ncode): Use _Jv_JNI_conversion_call when
361 constructing the closure if the function is native.
362 * jni.cc (_Jv_JNI_conversion_call): Now returns `void'. No longer
363 a template function, #if'd out, or static.
364 Include <java-interp.h>.
366 * include/jni.h (class _Jv_JNIEnv): Corrected calls using `...'.
368 * include/jni.h (class _Jv_JNIEnv): Added all C++ inline methods.
370 * jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
371 (_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave
373 (wrap_value): New function.
374 (_Jv_JNI_CallAnyMethodV): Use it.
375 (_Jv_JNI_CallAnyMethodA): Likewise.
376 (_Jv_JNI_GetField): Use wrap_value; removed specialized version.
377 (_Jv_JNI_GetStaticField): Likewise.
379 * jni.cc (_Jv_JNI_GetField): Specialize for jobject.
380 (_Jv_JNI_GetStaticField): Likewise.
382 2000-01-31 Tom Tromey <tromey@cygnus.com>
384 * prims.cc (_Jv_MallocUnchecked): New function.
385 (main_init): Call _Jv_JNI_Init.
386 * include/jvm.h (_Jv_MallocUnchecked): Declare.
387 (_Jv_JNI_Init): Declare.
388 * jni.cc: Include Hashtable.h, OutOfMemoryError.h, Integer.h,
390 (_Jv_JNI_NewGlobalRef): New function.
391 (_Jv_JNI_DeleteGlobalRef): New function.
392 (_Jv_JNI_DeleteLocalRef): New function.
393 (_Jv_JNI_conversion_call): Initialize and clear local reference
395 (_Jv_JNI_NewLocalRef): New function.
396 (struct _Jv_JNI_LocalFrame): New structure.
397 (_Jv_JNI_PushLocalFrame): New function.
398 (_Jv_JNI_EnsureLocalCapacity): New function.
399 (FRAME_SIZE): New define.
400 (_Jv_JNI_GetStringChars): Mark string, not characters.
401 (_Jv_JNI_ReleaseStringChars): Unmark string, not characters.
402 (_Jv_JNI_GetPrimitiveArrayElements): Mark array, not elements.
403 (_Jv_JNI_ReleasePrimitiveArrayElements): Unmark array, not
405 (_Jv_JNI_DefineClass): Make return value a local ref.
406 (_Jv_JNI_FindClass): Likewise.
407 (_Jv_JNI_GetSuperclass): Likewise.
408 (_Jv_JNI_ExceptionOccurred): Likewise.
409 (_Jv_JNI_AllocObject): Likewise.
410 (_Jv_JNI_GetObjectClass): Likewise.
411 (_Jv_JNI_CallAnyMethodV): Likewise.
412 (_Jv_JNI_NewString): Likewise.
413 (_Jv_JNI_NewStringUTF): Likewise.
414 (_Jv_JNI_NewObjectArray): Likewise.
415 (_Jv_JNI_GetObjectArrayElement): Likewise.
416 (_Jv_JNI_ToReflectedField): Likewise.
417 (_Jv_JNI_ToReflectedMethod): Likewise.
418 (_Jv_JNIFunctions): Updated table for new functions.
419 (_Jv_JNI_Init): New function.
420 (mark_for_gc): Wrote.
421 (unmark_for_gc): Wrote.
422 * include/jni.h (struct JNINativeInterface): Removed name from
423 PopLocalFrame parameter.
424 (class _Jv_JNIEnv): Added `locals' field.
426 Mon Jan 31 00:43:15 2000 Anthony Green <green@redhat.com>
428 * gnu/gcj/convert/natIconv.cc (read): Minor fixes.
431 2000-01-30 Tom Tromey <tromey@cygnus.com>
433 * include/config.h.in: Rebuilt.
434 * acconfig.h (HAVE_ICONV): Define.
435 * configure: Rebuilt.
436 * configure.in: Check for `iconv' function.
437 * gnu/gcj/convert/BytesToUnicode.java (getDecoder): Try iconv if
438 no specific encoder exists.
439 * gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Try iconv if
440 no specific encoder exists.
441 * Makefile.in: Rebuilt.
442 * Makefile.am (convert_source_files): Mention Input_iconv.java and
444 (nat_source_files): Added natIconv.cc.
445 * gnu/gcj/convert/natIconv.cc: New file.
446 * gnu/gcj/convert/Input_iconv.java: New file.
447 * gnu/gcj/convert/Output_iconv.java: New file.
449 2000-01-28 Tom Tromey <tromey@cygnus.com>
451 * Makefile.in: Rebuilt.
452 * Makefile.am (LIBFFIINCS): Added MULTIBUILDTOP.
454 2000-01-26 Tom Tromey <tromey@cygnus.com>
456 * gcj/method.h (JvNumMethods): Moved from Class.h.
457 (JvGetFirstMethod): Likewise.
458 * java/lang/Class.h (Object): Updated decl of
459 _Jv_JNI_ToReflectedField.
460 (Object): Added _Jv_JNI_ToReflectedMethod as a friend.
461 * Makefile.in: Rebuilt.
462 * Makefile.am (java/lang/reflect/Field.h): Added `jboolean'
463 argument of _Jv_JNI_ToReflectedField.
464 (java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod
466 (java/lang/reflect/Method.h): Likewise.
467 * include/jni.h (class _Jv_JNIEnv): Added `klass' member. Use
469 (jweak): New typedef.
470 (struct JNINativeInterface): Correctly declare remaining entries.
471 * jni.cc: Include Class.h, ClassLoader.h.
472 (_Jv_JNI_FindClass): New function.
473 (_Jv_JNI_DefineClass): New function.
474 (_Jv_JNI_conversion_call): New function.
475 (_Jv_JNI_FindClass): Use current class loader to find class.
476 (_Jv_JNI_ExceptionCheck): New function.
477 (_Jv_JNI_FromReflectedField): Now static.
478 (MethodClass): New define.
479 (_Jv_JNI_FromReflectedMethod): New function.
480 (_Jv_JNI_ToReflectedMethod): Likewise.
482 (_Jv_JNI_IsAssignableFrom): Renamed.
483 (_Jv_JNI_GetStringRegion): New function.
484 Include StringIndexOutOfBoundsException.h.
485 (_Jv_JNI_GetStringUTFRegion): New function.
486 (_Jv_JNIFunctions): Updated for new functions.
487 (_Jv_JNI_GetPrimitiveArrayCritical): New function
488 (_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise.
489 (_Jv_JNI_GetStringCritical): New function.
490 (_Jv_JNI_ReleaseStringCritical): Likewise.
491 (get_throwable): Removed.
492 (GCJ_JV_JNIENV_FRIEND): Removed.
493 (__GCJ_JNI_IMPL__): Define.
496 * resolve.cc (get_ffi_type_from_signature): Handle case where
499 Tue Jan 25 08:51:16 2000 Tom Tromey <tromey@ferrule.cygnus.com>
501 * interpret.cc (run): Don't call println.
502 Don't include PrintStream.h.
504 * gcj/field.h (struct _Jv_Field): Use "jshort" as type for
505 nameIndex. Use "jint" as type for boffset.
506 * java/lang/Class.h (struct _Jv_Method): Made accflags a
508 (Class): Likewise. Also changed type of method_count,
509 vtable_method_count, size_in_bytes, field_count,
510 static_field_count, interface_count.
511 * gcj/array.h (__JArray): Made `length' a const jsize, not an
514 2000-01-21 Tom Tromey <tromey@cygnus.com>
516 * java/lang/reflect/natConstructor.cc (newInstance): Use
518 * include/jvm.h: Declare _Jv_CallAnyMethodA.
519 * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
520 from _Jv_CallNonvirtualMethodA. Changed interface; overloaded.
523 (invoke): Use _Jv_CallAnyMethodA.
525 * java/lang/Class.h (Class): Declare JvGetFirstStaticField,
526 JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
528 (struct _Jv_Method): Added getNextMethod method.
529 (JvNumMethods): New function.
530 (JvGetFirstMethod): Likewise.
531 * gcj/field.h (JvGetFirstStaticField): New function.
532 (JvNumStaticFields): Likewise.
533 (getNextField): Renamed from getNextInstanceField.
534 (struct _Jv_Field): New method getClass.
535 * jni.cc: Wrote many new functions.
536 * include/jni.h (JNI_TRUE): Define.
537 (JNI_FALSE): Likewise.
538 (jobject, jclass, jstring, jarray, jthrowable, jobjectArray,
539 jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray,
540 jcharArray, jfloatArray, jdoubleArray): New typedefs.
541 (jfieldID, jmethodID): Likewise.
542 (JNI_COMMIT, JNI_ABORT): New defines.
543 (JNINativeMethod): New struct.
544 (struct JNINativeInterface): Correctly declared more entries.
545 (class _Jv_JNIEnv): Added `ex' member.
546 (JNI_VERSION_1_1): New define.
547 (JNI_VERSION_1_2): Likewise.
549 * boehm.cc (_Jv_MarkObj): Use getNextField, not
550 getNextInstanceField.
552 2000-01-20 Tom Tromey <tromey@cygnus.com>
554 * resolve.cc (StringClass): Removed.
555 * defineclass.cc (StringClass): Removed.
557 2000-01-19 Bryce McKinlay <bryce@albatross.co.nz>
561 2000-01-19 Tom Tromey <tromey@cygnus.com>
563 * interpret.cc (PC_REGISTER_ASM): Removed.
565 * java/lang/natThrowable.cc: Don't use `#pragma implementation'.
568 * All files: Updated copyright to reflect Cygnus purchase.
570 2000-01-18 Bryce McKinlay <bryce@albatross.co.nz>
572 * configure: Rebuilt.
573 * configure.in: Recognize --disable-interpreter.
575 2000-01-18 Andrew Haley <aph@cygnus.com>
577 * name-finder.cc (lookup): Check for dladdr function.
578 acconfig.h (HAVE_DLADDR): Add.
579 configure.in: Check for HAVE_DLADDR
581 include/config.h.in: Rebuilt.
583 2000-01-17 Andrew Haley <aph@cygnus.com>
585 * prims.cc (_Jv_RunMain): Set the name of this executable.
587 2000-01-17 Tom Tromey <tromey@cygnus.com>
589 * java/lang/natThrowable.cc (fillInStackTrace): Return `this' even
590 when backtrace can't be computed.
592 * configure: Rebuilt.
593 * configure.in: Fixed typo in AC_CONFIG_SUBDIRS call.
595 * java/lang/Runtime.java (loadLibraryInternal): Declare.
596 * java/lang/natClassLoader.cc (_Jv_FindClass): Removed dead copy.
597 (_Jv_FindClassInCache): Likewise.
598 (_Jv_FindClass): Don't conditionalize body on INTERPRETER.
599 (findSystemClass): Try to load class from compiled module.
601 * java/lang/natRuntime.cc (load): Use UTF-8 copy of filename.
602 (loadLibrary): Likewise.
603 (lt_preloaded_symbols): Define.
604 (loadLibraryInternal): New method.
605 * include/config.h.in: Rebuilt.
606 * acconfig.h (USE_LTDL): Added.
607 * Makefile.am (SUBDIRS): Added $(DIRLTDL).
608 (INCLUDES): Added $(INCLTDL).
609 (libgcj_la_DEPENDENCIES): Added $(LIBLTDL).
610 (libgcj_la_LIBADD): Likewise.
611 * aclocal.m4, configure: Rebuilt.
612 * configure.in: Added libltdl support.
614 2000-01-15 Tom Tromey <tromey@cygnus.com>
616 * prims.cc (_Jv_PrimClass): Use `JV_STATE_NOTHING', not `0'.
618 2000-01-14 Andrew Haley <aph@cygnus.com>
620 * java/lang/natThrowable.cc: New file.
622 * java/lang/Throwable.java (fillInStackTrace): Make native.
623 (printStackTrace): Call native method to do this.
624 (Throwable): Call fillInStackTrace.
625 (stackTrace): New variable.
627 * include/jvm.h: Add _Jv_ThisExecutable functions.
629 * prims.cc: (_Jv_execName): New variable.
630 (catch_segv): Call fillInStackTrace.
632 (_Jv_ThisExecutable): New functions.
633 (JvRunMain): Set the name of this executable.
635 * Makefile.am: Add java/lang/natThrowable.cc.
637 * Makefile.in: Rebuilt.
639 * acconfig.h: Add HAVE_PROC_SELF_EXE.
641 * configure.in: Force link with __frame_state_for in
642 FORCELIBGCCSPEC. Add new checks for backtrace.
643 * include/config.h.in: Rebuilt.
645 * name-finder.cc: New file.
646 * include/name-finder.h: New file.
648 2000-01-16 Anthony Green <green@cygnus.com>
650 * java/lang/StringBuffer.java (StringBuffer): Don't special case
653 2000-01-16 Jeff Sturm <jsturm@sigma6.com>
655 * java/io/StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).
657 2000-01-13 Tom Tromey <tromey@cygnus.com>
659 * java/lang/natClassLoader.cc (_Jv_FindClass): Register `loader',
660 not system loader, as initiating loader.
662 2000-01-11 Tom Tromey <tromey@cygnus.com>
664 * java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
665 HP/UX. From David Scott Urban.
667 2000-01-10 Jeff Sturm <jsturm@sigma6.com>
669 * java/lang/natMath.cc (pow): Cast args to `double', not
672 (IEEEremainder): Likewise.
673 * java/lang/mprec.h: Don't wrap includes in `extern "C"'.
674 * java/lang/fdlibm.h: Don't wrap includes in `extern "C"'.
676 2000-01-09 Anthony Green <green@cygnus.com>
678 * java/lang/natString.cc (init): Test for overflow condition
679 during out of bounds check.
680 (getChars): Throw StringIndexOutOfBoundsException, not
681 ArrayIndexOutOfBoundsException.
683 (regionMatches): Obey case option during string comparison.
685 * configure.host (ligcj_interpreter): New variable. Enable
686 interpreter by default on IA-32.
687 * configure.in: Examine libgcj_interpreter.
688 * configure: Rebuilt.
690 2000-01-07 Tom Tromey <tromey@cygnus.com>
692 * mauve-libgcj: Don't disable ClassTest.
694 * java/lang/natClass.cc (getClasses): Wrote.
696 2000-01-06 Tom Tromey <tromey@cygnus.com>
698 * java/lang/natClass.cc (_getConstructors): Correctly check
699 whether method name is the init name.
700 (getMethod): Look at accflags on method in `klass', not `this'.
702 2000-01-05 Tom Tromey <tromey@cygnus.com>
704 * java/lang/natClass.cc (getMethod): Compute offset relative to
705 `klass's methods table, not `this's table.
707 * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA):
708 In unwrapping/widening case, check whether `k' is null, not
709 whether it is primitive. Initialize `num' from `argelts', not
710 `paramelts'. Correct create and pass arguments to ffi_call.
711 Don't let presence of `this' argument affect index used to look in
713 (COPY): Set appropriate element in `values' vector.
715 * java/lang/natClass.cc: Include <gcj/method.h>.
717 * java/lang/Class.h (_getMethods): Correctly declare as private,
720 * java/lang/Class.h (_getMethods): Declare.
721 * java/lang/Class.java (_getMethods): Declare.
722 * java/lang/natClass.cc (getDeclaringClass): Always return NULL.
723 (getDeclaredClasses): Always return empty array.
724 (_getMethods): New method.
726 (getDeclaredMethod): Return `rmethod'.
727 (finit_name): New global.
728 (getDeclaredMethods): Check for finit_name.
729 (_getMethods): Likewise.
730 (getMethod): Only return public methods.
732 * java/lang/reflect/natMethod.cc (get_ffi_type): Test size of
733 jboolean and select correct ffi type on that basis.
734 (_Jv_CallNonvirtualMethodA): Handle `void' return type.
735 Constructor call always has `void' return type.
737 2000-01-04 Tom Tromey <tromey@cygnus.com>
739 * java/lang/Class.h (getSignature): Updated.
740 * java/lang/Class.java (getSignature): Updated.
741 * java/lang/natClass.cc (getSignature): Added `is_constructor'
743 (getConstructor): Ensure constructor is public.
744 (_getConstructors): Check for public-ness of constructor when
745 `declared' is false, not when it is true.
747 2000-01-04 Warren Levy <warrenl@cygnus.com>
749 * java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
751 (receive): Set the sender's address in the DatagramPacket.
753 2000-01-04 Tom Tromey <tromey@cygnus.com>
755 * java/lang/reflect/natConstructor.cc (newInstance): Pass
756 declaring class as return_type argument to
757 _Jv_CallNonvirtualMethodA.
758 * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In
759 constructor case, create object and use it as `this' argument.
760 * java/lang/Class.h (_getConstructors): Declare.
761 (_getFields): Declare.
762 * java/lang/Class.java (getConstructors): Wrote.
763 (_getConstructors): New native method.
764 (getDeclaredConstructors): Wrote.
765 (_getFields): Declare new native method.
766 * java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Removed
768 (getMethod): Work correctly when class is primitive.
769 (getDeclaredMethods): Likewise. Compute offset using `method',
771 (getDeclaredMethod): Likewise.
772 (getConstructor): Wrote.
773 (ConstructorClass): New define.
774 (getDeclaredConstructor): Wrote.
775 (_getConstructors): New method.
776 (_getFields): New method.
779 * Makefile.in: Rebuilt.
780 * Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.
782 * prims.cc: Remove `#pragma implementation'.
783 * gcj/array.h: Remove `#pragma interface'.
785 * prims.cc (_Jv_equaln): New function.
786 * java/lang/Class.java (getSignature): Declare.
787 * resolve.cc (_Jv_LookupDeclaredMethod): Moved to natClass.cc.
788 * java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Moved from
790 (getSignature): New method.
791 (getDeclaredMethod): Wrote.
793 Include StringBuffer.h.
794 * java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
795 as a friend. Unconditionally declare _Jv_LookupDeclaredMethod as
797 (getSignature): Declare.
798 * include/jvm.h (_Jv_GetTypesFromSignature): Declare.
799 (_Jv_equaln): Declare.
800 (_Jv_CallNonvirtualMethodA): Declare.
801 * Makefile.in: Rebuilt.
802 * Makefile.am (nat_source_files): Added natConstructor.cc.
803 (java/lang/reflect/Constructor.h): New target.
804 * java/lang/reflect/natConstructor.cc: New file.
805 * java/lang/reflect/Constructor.java (newInstance): Now native.
806 (declaringClass): Renamed from decl_class.
807 (offset): Renamed from index.
808 (getType): New native method.
809 (getModifiers): Now native.
810 (getParameterTypes): Call getType if required.
811 (hashCode): Include hash code from declaring class.
812 (modifiers): Removed.
813 (toString): Call getType if required.
814 * gcj/method.h (_Jv_FromReflectedConstructor): New function.
815 * java/lang/reflect/natMethod.cc (hack_call): New method.
816 Removed `#if 0' around FFI code.
817 Include <gnu/gcj/RawData.h>.
818 (invoke): Use _Jv_CallNonvirtualMethodA. Throw
819 IllegalArgumentException when argument object and class disagree.
820 (_Jv_GetTypesFromSignature): New function.
822 (ObjectClass): New define.
823 (_Jv_CallNonvirtualMethodA): New function.
824 * java/lang/reflect/Method.java (hack_trampoline): New method.
825 (hack_call): New native method.