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