1 Sun Apr 2 08:27:18 2000 Anthony Green <green@redhat.com>
4 * configure.in: Add --disable-jvmpi.
5 * include/config.h.in: Rebuilt.
6 * acconfig.h: Add ENABLE_JVMPI.
8 * include/jvm.h: Declare _Jv_DisableGC and _Jv_EnableGC.
9 (_Jv_JVMPI_Notify_OBJECT_ALLOC): New define.
10 (_Jv_JVMPI_Notify_THREAD_END): New define.
11 (_Jv_JVMPI_Notify_THREAD_END): New define.
12 * prims.cc (_Jv_JVMPI_Notify_OBJECT_ALLOC): Declare.
13 (_Jv_JVMPI_Notify_THREAD_END): Declare.
14 (_Jv_JVMPI_Notify_THREAD_END): Declare.
16 * prims.cc (_Jv_AllocObject): Generate JVMPI object allocation
19 * java/lang/natThread.cc: Include JVMPI headers if necessary.
20 (finish_): Generate JVMPI thread end events.
21 (run_): Generate JVMPI thread start events.
22 * gnu/gcj/runtime/natFirstThread.cc (run): Call JNI_OnLoad for any
23 preloaded JNI library.
24 Include JVMPI headers if necessary.
25 (run): Generate JVMPI thread start events.
27 * boehm.cc: Define GC_disable and GC_enable.
28 (_Jv_DisableGC): New function.
29 (_Jv_EnableGC): New function.
30 (disable_gc_mutex): Declare.
31 * nogc.cc (_Jv_DisableGC): New function.
32 (_Jv_EnableGC): New function.
34 * jni.cc (_Jv_JNI_GetEnv): Handle JVMPI interface requests.
35 (_Jv_JVMPI_Interface): Define.
36 (jvmpiEnableEvent): New function.
37 (_Jv_JNI_Init): Initialize _Jv_JVMPI_Interface.
39 * include/jvmpi.h: New file.
41 2000-03-27 Bryce McKinlay <bryce@albatross.co.nz>
43 * Makefile.in: New #defines and friends for Thread.h.
45 * posix-threads.cc: (struct starter): Remove `object'.
46 (_Jv_CondWait): Use interruptable condition variables and new
47 recursive mutexes. New return codes on interrupt or non-ownership
49 (_Jv_CondNotify): Ditto.
50 (_Jv_CondNotifyAll): Ditto.
51 (_Jv_ThreadInterrupt): Set thread interrupt flag directly. Interrupt
52 the target thread by signaling its wait condition.
53 (_Jv_ThreadInitData): Set `thread_obj' in the thread data struct,
54 not the starter struct. Initialize wait_mutex and wait_cond.
55 (_Jv_MutexLock): New recursive mutex implementation. Moved from
57 (_Jv_MutexUnlock): Ditto.
58 (really_start): Set info->data->thread from pthread_self() to work
59 around a race condition. Destroy wait_mutex and wait_cond when run()
61 * java/lang/Thread.java: (isInterrupted_): Renamed to overloaded
62 `isInterrupted(boolean)'. Clear interrupted flag if clear_flag is
64 startable_flag: New private field.
65 (Thread): Initialize `startable_flag'.
66 (toString): Check for null thread group.
67 * java/lang/natThread.cc: (struct natThread): New fields
68 `join_mutex', `join_cond'. Removed fields `joiner', `next'.
69 (class locker): Removed.
70 (initialize_native): Initialize `join_cond' and `join_mutex'.
71 (interrupt): Now just calls _Jv_ThreadInterrupt().
72 (join): Simplified. Just wait on the target thread's join condition.
73 (finish_): Remove join list code. Unset thread group. Signal
74 potential joiners by notifying the dying threads join_cond.
75 (start): Check for illegal restarts.
76 * java/lang/natObject.cc: Check for return value of _Jv_CondWait and
78 * include/posix-threads.h: Remove all HAVE_RECURSIVE_MUTEX related
80 (struct _Jv_Thread_t): New fields `thread_obj', `wait_cond',
82 (struct _Jv_ConditionVariable_t): Define as a struct instead of
83 directly mapping to pthread_cond_t.
84 (struct _Jv_Mutex_t): New recursive implementation.
85 (_Jv_PthreadCheckMonitor): Reimplemented. Simple `owner' check.
86 _Jv_HaveCondDestroy: Never define this for posix-threads.
87 (_Jv_CondNotify): Remove inline implementation(s), prototype instead.
88 (_Jv_CondNotifyAll): Ditto.
89 (_Jv_MutexLock): Ditto.
90 (_Jv_MutexUnlock): Ditto.
91 (_Jv_MutexInit): Changed to reflect new mutex implementation.
92 (_Jv_MutexDestroy): Ditto.
93 (_Jv_CondDestroy): Removed.
94 (_Jv_PthreadGetMutex): Removed.
95 * include/win32-threads.h: (_Jv_CondNotify): Guess _JV_NOT_OWNER on an
96 error. Add a FIXME about this.
97 (_Jv_CondNotifyAll): Ditto.
98 * win32-threads.cc: (_Jv_CondWait): Return 0 on a timeout. Guess
99 _JV_NOT_OWNER on other errors. Add FIXME.
101 2000-03-26 Tom Tromey <tromey@cygnus.com>
103 * jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception
105 (call): Don't throw exception here.
107 2000-03-26 Tom Tromey <tromey@cygnus.com>
109 * java/lang/mprec.h: Use SIZEOF_VOID_P.
110 * interpret.cc: Use SIZEOF_VOID_P.
111 * include/java-cpool.h (_Jv_storeLong): Use SIZEOF_VOID_P.
112 (_Jv_loadLong): Likewise.
113 (_Jv_storeDouble): Likewise.
114 * configure: Rebuilt.
115 * configure.in: Check size of void*.
117 * resolve.cc (ncode): Use FFI_PREP_RAW_CLOSURE and FFI_RAW_SIZE.
119 2000-03-26 Hans Boehm <boehm@acm.org>
121 * include/java-cpool.h (_Jv_storeLong, _Jv_loadLong,
122 _Jv_storeDouble, _Jv_loadDouble): Define differently on 64 bit
124 * java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN or
125 __IEEE_LITTLE_ENDIAN appropriately on IA64.
126 * java/lang/mprec.h: Don't define Pack_32 on 64 bit machine.
127 * javaprims.h (_Jv_word): Added `l' and `d' entries in 64 bit
129 * resolve.cc (FFI_PREP_RAW_CLOSURE): New define.
130 (FFI_RAW_SIZE): Likewise.
131 (_Jv_InterpMethod::ncode): Use them.
132 * interpret.cc (PUSHL, PUSHD, POPL, POPD, LOADL, LOADD, STOREL,
133 STORED): Define differently on a 64 bit machine.
134 (continue1): Use ffi_java_raw_call when appropriate.
136 2000-03-24 Warren Levy <warrenl@cygnus.com>
138 * java/math/BigInteger.java(divide): Handle the special case when
139 dividing by 1 and the high bit of the dividend is set.
140 (setShiftRight): Handle case when count == 0.
142 2000-03-24 Warren Levy <warrenl@cygnus.com>
144 * java/awt/Font.java(isBold): Fix syntax error.
146 * java/awt/Frame.java(postEvent): ditto.
147 * java/awt/Menu.java(postEvent): ditto.
148 * java/awt/MenuBar.java(postEvent): ditto.
149 * java/awt/Toolkit.java(init): Included a stub.
151 2000-03-21 Bryce McKinlay <bryce@albatross.co.nz>
153 * java/awt/Event.java: Add all the event type constants.
154 (Event): Implemented constructors.
155 (controlDown): Implemented.
156 (metaDown): Implemented.
157 (paramString): Stubbed.
158 (shiftDown): Implemented.
159 (toString): Implemented.
160 (translate): Implemented.
162 2000-03-21 Bryce McKinlay <bryce@albatross.co.nz>
164 * java/lang/natClass.cc (isInstance): Initialize `this'.
165 (isAssignableFrom): Initialize `this' and `klass'.
166 (_Jv_IsAssignableFrom): If an interface has no idt, it is not
167 implemented by any loaded class, so return false.
168 * java/lang/natClass.cc (isInstance): Use _Jv_IsAssignableFrom(),
169 not Class.isAssignableFrom(). Use JV_CLASS, not getClass().
171 2000-03-19 Warren Levy <warrenl@cygnus.com>
173 * java/awt/Color.java: Specified java.io for Serializable.
174 * java/awt/Toolkit.java: Imported java.net.URL.
176 2000-03-19 Warren Levy <warrenl@cygnus.com>
178 * java/awt/Color.java: Rewrote to be more memory efficient (& compile).
180 2000-03-16 Warren Levy <warrenl@cygnus.com>
182 * java/awt/Color.java: New file.
183 * java/awt/Graphics.java: New file.
184 * java/awt/Image.java: New file.
185 * java/awt/Paint.java: New file.
186 * java/awt/PaintContext.java: New file.
187 * java/awt/Transparency.java: New file.
188 * java/util/Collection.java: New file.
189 * java/util/Comparator.java: New file.
190 * java/util/Iterator.java: New file.
191 * java/util/List.java: New file.
192 * java/util/ListIterator.java: New file.
193 * Makefile.am: Added above new files.
194 * Makefile.in: Rebuilt.
196 * java/awt/Font.java (PLAIN): New field.
199 (ROMAN_BASELINE): New field.
200 (CENTER_BASELINE): New field.
201 (HANGING_BASELINE): New field.
205 (pointSize): New field.
206 (Font): Implemented constructor.
207 (isPlain): Implemented method.
208 (isBold): Implemented method.
209 (isItalic): Implemented method.
210 (getName): Implemented method.
211 (getStyle): Implemented method.
212 (getSize): Implemented method.
213 (getSize2D): Implemented method.
215 * java/awt/Frame.java (getFont): Stubbed.
216 (postEvent): Stubbed.
218 * java/awt/Menu.java (postEvent): Stubbed.
219 * java/awt/MenuBar.java (getFont): Stubbed.
220 (postEvent): Stubbed.
221 * java/awt/Toolkit.java (getImage): Added abstract method.
223 2000-03-15 Tom Tromey <tromey@cygnus.com>
225 * java/io/natFileDescriptorWin32.cc (winerr): Now static.
227 * prims.cc (win32_exception_handler): Reformatted.
229 * include/win32-threads.h (_Jv_HaveCondDestroy): New define.
230 (_Jv_HaveMutexDestroy): Likewise.
232 2000-03-15 Jon Beniston <jb7216@bristol.ac.uk>
234 * java/io/natFileDescriptorWin32.cc: New file.
235 * java/io/natFileWin32.cc: New file.
236 * java/net/natInetAddress.cc: Added conditional inclusion of
237 Windows / Winsock headers.
238 * java/net/natPlainDatagramSocketImpl.cc: Added conditional
239 inclusion of Windows / Winsock headers.
240 * java/net/natPlainSocketImpl.cc: Added conditional inclusion of
241 Windows / Winsock headers.
242 * include/win32-signal.h: New file.
243 * include/win32-threads.h: New file.
244 * win32-threads.cc: New file.
245 * exception.cc (win32_get_restart_frame): New function.
246 * prims.cc (win32_exception_handler): New function.
247 (main_init) Performs Winsock initialisation.
248 (main_init) Installs exeception handler.
250 2000-03-14 Tom Tromey <tromey@cygnus.com>
252 * jni.cc (mangled_name): Fixed assertion.
253 (JNI_GetCreatedJavaVMs): Don't comment out `buf_len' argument;
254 turned assert into actual failure.
256 2000-03-09 Warren Levy <warrenl@cygnus.com>
258 * java/security/Key.java(serialVersionUID): Set to 0 for now.
259 * java/security/interfaces/DSAPrivateKey.java(serialVersionUID): Ditto.
260 * java/security/interfaces/DSAPublicKey.java(serialVersionUID): Ditto.
262 2000-03-09 Warren Levy <warrenl@cygnus.com>
264 * java/security/AlgorithmParameterGeneratorSpi.java: New file.
265 * java/security/DigestException.java: New file.
266 * java/security/GeneralSecurityException.java: New file.
267 * java/security/InvalidAlgorithmParameterException.java: New file.
268 * java/security/InvalidKeyException.java: New file.
269 * java/security/InvalidParameterException.java: New file.
270 * java/security/Key.java: New file.
271 * java/security/KeyException.java: New file.
272 * java/security/KeyPair.java: New file.
273 * java/security/KeyPairGenerator.java: New file.
274 * java/security/KeyPairGeneratorSpi.java: New file.
275 * java/security/NoSuchProviderException.java: New file.
276 * java/security/PrivateKey.java: New file.
277 * java/security/Provider.java: New file.
278 * java/security/PublicKey.java: New file.
279 * java/security/SecureRandom.java: New file.
280 * java/security/Security.java: New file.
281 * java/security/Signature.java: New file.
282 * java/security/SignatureException.java: New file.
283 * java/security/interfaces/DSAKey.java: New file.
284 * java/security/interfaces/DSAParams.java: New file.
285 * java/security/interfaces/DSAPrivateKey.java: New file.
286 * java/security/interfaces/DSAPublicKey.java: New file.
287 * java/security/interfaces/RSAPrivateCrtKey.java: New file.
288 * java/security/interfaces/RSAPrivateKey.java: New file.
289 * java/security/interfaces/RSAPublicKey.java: New file.
290 * java/security/spec/AlgorithmParameterSpec.java: New file.
291 * java/security/spec/InvalidKeySpecException.java: New file.
292 * java/security/spec/InvalidParameterSpecException.java: New file.
293 * java/security/spec/KeySpec.java: New file.
294 * java/security/spec/RSAPrivateCrtKeySpec.java: New file.
295 * java/security/spec/RSAPrivateKeySpec.java: New file.
296 * java/security/spec/RSAPublicKeySpec.java: New file.
297 * Makefile.am: Added above java.security files.
298 * Makefile.in: Rebuilt.
300 * java/security/MessageDigest.java: Rewritten.
301 * java/security/SecureClassLoader.java: Added JDK1.2 comment.
303 2000-03-09 Bryce McKinlay <bryce@albatross.co.nz>
307 2000-03-09 Bryce McKinlay <bryce@albatross.co.nz>
309 * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Call
310 _Jv_PrepareConstantTimeTables.
311 * java/lang/natClass.cc (_Jv_PrepareConstantTimeTables): Array
312 classes should have an IDT, so don't return if klass is an array
315 2000-03-08 Tom Tromey <tromey@cygnus.com>
317 * java/lang/reflect/natArray.cc (newInstance): Don't allow array
318 of `void' to be created.
320 2000-03-08 Warren Levy <warrenl@cygnus.com>
322 * java/math/BigInteger.java(signum): Handle zero properly.
324 2000-03-07 Tom Tromey <tromey@cygnus.com>
326 * All files: Updated copyright information.
328 * COPYING.LIB: Removed.
329 * LIBGCJ_LICENSE: We now use GPL + special exception.
331 2000-03-07 Bryce McKinlay <bryce@albatross.co.nz>
333 * resolve.cc (_Jv_SearchMethodInClass): New function.
334 (_Jv_ResolvePoolEntry): Search superinterfaces for interface methods.
335 * java/lang/Class.h (_Jv_SearchMethodInClass): New prototype.
337 2000-03-07 Bryce McKinlay <bryce@albatross.co.nz>
339 * java/lang/Class.h (union _Jv_IDispatchTable): New declaration.
340 (struct _Jv_ifaces): New declaration.
341 JV_CLASS: New macro definition.
342 (getComponentType): Relocate below isArray() for inlining.
343 (getModifiers): Declare `inline'.
344 (getSuperclass): Ditto.
346 (isPrimitive): Ditto.
347 (_Jv_IsAssignableFrom): New prototype.
348 (_Jv_LookupInterfaceMethodIdx): New prototype. Predeclare with "C"
350 (_Jv_InitClass): Move from natClass.cc. Declare `inline'.
351 Check for JV_STATE_DONE before invoking initializeClass().
352 (_Jv_PrepareConstantTimeTables): New prototype.
353 (_Jv_GetInterfaces): Ditto.
354 (_Jv_GenerateITable): Ditto.
355 (_Jv_GetMethodString): Ditto.
356 (_Jv_AppendPartialITable): Ditto.
357 (_Jv_FindIIndex): Ditto.
358 depth, ancestors, idt: New class fields.
360 * java/lang/natClass.cc (isAssignableFrom): Move functionality to
361 inline function `_Jv_IsAssignableFrom'. Use that function.
362 (isInstance): Declare `inline'.
363 (initializeClass): Get lock on class before checking `state'. Unlock
364 before calling resolveClass0. Call _Jv_PrepareConstantTimeTables with
366 (_Jv_LookupInterfaceMethod): Use _Jv_GetMessageString.
367 (_Jv_IsAssignableFrom): New inline function. Test assignability using
368 class->depth and ancestor table.
369 (_Jv_IsInstanceOf): Use _Jv_IsAssignableFrom.
370 (_Jv_CheckCast): Move from prims.cc. Use JV_CLASS and
371 _Jv_IsAssignableFrom.
372 (_Jv_CheckArrayStore): Ditto.
373 (_Jv_LookupInterfaceMethodIdx): New function.
374 INITIAL_IOFFSETS_LEN, INITIAL_IFACES_LEN: New #defines.
375 (_Jv_PrepareConstantTimeTables): New function.
376 (_Jv_IndexOf): Ditto.
377 (_Jv_GetInterfaces): Ditto.
378 (_Jv_GenerateITable): Ditto.
379 (_Jv_GetMethodString): Ditto.
380 (_Jv_AppendPartialITable): Ditto.
381 iindex_mutex, iindex_mutex_initialized: New static fields.
382 (_Jv_FindIIndex): New function.
384 * java/lang/natClassLoader.cc (_Jv_NewClass): Set new jclass fields.
386 * prims.cc (_Jv_CheckCast): Moved to natClass.cc.
387 (_Jv_CheckArrayStore): Ditto.
388 (JvNewCharArray, JvNewBooleanArray, JvNewByteArray, JvNewShortArray,
389 JvNewIntArray, JvNewLongArray, JvNewFloatArray, JvNewDoubleArray):
390 Moved to gcj/array.h.
391 (_Jv_Realloc): New function.
393 * gcj/cni.h: Move _Jv_PrimClass definitions to gcj/array.h.
395 * gcj/array.h: _Jv_PrimClass definitions moved from gcj/cni.h.
396 (JvNewCharArray, JvNewBooleanArray, JvNewByteArray,
397 JvNewShortArray, JvNewIntArray, JvNewLongArray, JvNewFloatArray,
398 JvNewDoubleArray): Implementations moved from prims.cc and
401 * gcj/javaprims.h (_Jv_Realloc): Prototype.
403 * include/jvm.h (_Jv_LookupInterfaceMethodIdx): Prototype.
405 2000-03-06 Tom Tromey <tromey@cygnus.com>
407 * jni.cc (MARK_NONE): New define.
408 (MARK_USER): Likewise.
409 (MARK_SYSTEM): Likewise.
410 (struct _Jv_JNI_LocalFrame): Made `marker' bigger and `size'
412 (_Jv_JNI_DeleteLocalRef): Use MARK_NONE in assert.
413 (_Jv_JNI_EnsureLocalCapacity): Use MARK_NONE.
414 (_Jv_JNI_PushLocalFrame): Use MARK_USER.
415 (_Jv_JNI_PopLocalFrame): New version with additional `stop'
417 (call): Use MARK_SYSTEM.
418 (_Jv_GetJNIEnvNewFrame): New function.
419 (_Jv_LookupJNIMethod): New function.
420 (_Jv_JNI_PopSystemFrame): New function.
421 (call): Use _Jv_JNI_PopSystemFrame and _Jv_LookupJNIMethod.
423 2000-03-05 Tom Tromey <tromey@cygnus.com>
425 Fix for PR libgcj/43:
426 * include/Makefile.in: Rebuilt.
427 * include/Makefile.am (include_HEADERS): New define.
429 2000-03-05 Anthony Green <green@redhat.com>
431 * gcj/javaprims.h ("Java"): Remove FirstThread.
433 * configure.host: Fix __NO_MATH_INLNES botch.
435 * Makefile.in: Rebuilt.
436 * Makefile.am (nat_source_files): Move natFirstThread.cc.
437 (gnu/gcj/runtime/FirstThread.h): Moved.
438 (ordinary_java_source_files): Move FirstThread.java.
439 * prims.cc: Deal with FirstThread movement.
441 (_Jv_RunMain): Ditto.
443 * gnu/gcj/runtime/FirstThread.java: Moved from java/lang.
444 * gnu/gcj/runtime/natFirstThread.cc: Ditto.
446 2000-03-05 Warren Levy <warrenl@cygnus.com>
448 * java/net/DatagramSocket.java(DatagramSocket(int,InetAddress)):
449 Handle null addresses.
451 2000-03-04 Anthony Green <green@redhat.com>
453 * configure.host (libgcj_flags): Define __NO_MATH_INLINES.
456 2000-03-04 Anthony Green <green@redhat.com>
458 * configure: Rebuilt.
459 * configure.in (ZLIBTESTSPEC): New macro.
460 (GCTESTSPEC): New macro.
461 (LIBGCJTESTSPEC): New macro.
462 * libgcj-test.spec.in: New file.
464 2000-03-02 Tom Tromey <tromey@cygnus.com>
466 * include/java-interp.h: Don't include MethodInvocation.h.
467 (class _Jv_InterpMethod): Don't make MethodInvocation a friend.
468 * Makefile.in: Rebuilt.
469 * Makefile.am (gnu/gcj/runtime/MethodInvocation.h): Removed.
470 (ordinary_java_source_files): Don't mention
471 MethodInvocation.java.
472 * gnu/gcj/runtime/MethodInvocation.java: Removed.
473 * interpret.cc (MethodInvocation::continue1): Removed.
474 (run): Handle exceptions here.
475 * java/lang/ClassLoader.java (defineClass1, defineClass2):
477 * java/lang/natClassLoader.cc (defineClass0): Catch exceptions
479 (defineClass2): Removed.
481 * java/lang/reflect/Method.java (hack_trampoline, hack_call):
483 * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Catch
485 (hack_call): Removed.
487 * java/lang/Class.h (Class): Removed hackRunInitializers,
489 * java/lang/natClass.cc (hackRunInitializers): Removed.
490 (initializeClass): Catch exceptions here.
491 Include ExceptionInInitializerError.h.
492 * java/lang/Class.java (hackTrampoline, hackRunInitializers):
495 * java/lang/Object.h (Object): Don't mention hack12_6.
496 * java/lang/natObject.cc (_Jv_FinalizeObject): Catch exceptions
498 * java/lang/Object.java (hack12_6): Removed.
500 * java/lang/natThread.cc (run_): Renamed. Catch exceptions here.
501 (start): Use run_, not run__.
502 * java/lang/Thread.java (run_): Renamed from run__; old run_
505 * jni.cc (_Jv_JNI_FindClass): Handle exceptions.
506 (_Jv_JNI_EnsureLocalCapacity): Likewise.
507 (_Jv_JNI_DefineClass): Likewise.
508 (_Jv_JNI_ThrowNew): Likewise.
509 (_Jv_JNI_AllocObject): Likewise.
510 (_Jv_JNI_GetAnyMethodID): Likewise.
511 (_Jv_JNI_CallAnyMethodV): Likewise.
512 (_Jv_JNI_CallAnyMethodA): Likewise.
513 (_Jv_JNI_CallAnyVoidMethodV): Likewise.
514 (_Jv_JNI_CallAnyVoidMethodA): Likewise.
515 (_Jv_JNI_GetAnyFieldID): Likewise.
516 (_Jv_JNI_NewString): Likewise.
517 (_Jv_JNI_NewStringUTF): Likewise.
518 (_Jv_JNI_GetStringUTFChars): Likewise.
519 (_Jv_JNI_NewObjectArray): Likewise.
520 (_Jv_JNI_NewPrimitiveArray): Likewise.
521 (_Jv_JNI_GetPrimitiveArrayRegion): Likewise.
522 (_Jv_JNI_GetStringRegion): Likewise.
523 (_Jv_JNI_GetStringUTFRegion): Likewise.
524 (_Jv_JNI_SetPrimitiveArrayRegion): Likewise.
525 (_Jv_JNI_MonitorEnter): Likewise.
526 (_Jv_JNI_MonitorExit): Likewise.
527 (_Jv_JNI_ToReflectedField): Likewise.
528 (_Jv_JNI_ToReflectedMethod): Likewise.
529 (_Jv_JNI_RegisterNatives): Likewise.
530 (_Jv_JNI_AttachCurrentThread): Likewise.
531 (_Jv_JNI_DestroyJavaVM): Likewise.
533 2000-02-28 Mo DeJong <mdejong@cygnus.com>
535 * java/util/zip/ZipOutputStream.java(closeEntry) : Fixed
536 error caused by the incorrect casting of a long to an int.
538 2000-02-28 Mo DeJong <mdejong@cygnus.com>
540 * java/util/zip/ZipOutputStream.java(write_entry) : Fixed
541 SIGSEV caused by use of the wrong instance variable.
543 2000-02-27 Bryce McKinlay <bryce@albatross.co.nz>
545 * java/io/File.java (File(String, String)): For dirPath, treat an
546 empty String the same as `null'.
548 2000-02-26 Anthony Green <green@cygnus.com>
550 * gnu/gcj/io/MimeTypes.java: Test for null.
552 * jni.cc (_Jv_JNI_AttachCurrentThread): Minor cleanup.
553 (JNI_GetCreatedJavaVMs): Remove compiler warning.
555 * java/net/URLConnection.java: Update copyright notice.
557 2000-02-25 Tom Tromey <tromey@cygnus.com>
559 * jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on
562 2000-02-25 Bryce McKinlay <bryce@albatross.co.nz>
564 * java/net/URLConnection.java (initializeDateFormats): New
566 (getHeaderFieldDate): Call initializeDateFormats if required.
567 locale, dateFormat1, dateFormat2, dateFormat3: Don't initialize
569 Fix for PR libgcj/38.
571 2000-02-24 Warren Levy <warrenl@cygnus.com>
573 * java/math/BigInteger.java(ival): Made private.
577 2000-02-20 Anthony Green <green@cygnus.com>
579 * Makefile.in: Rebuilt.
580 * Makefile.am (ordinary_java_source_files): Add
581 gnu/gcj/io/DefaultMimeTypes.java and gnu/gcj/io/MimeTypes.java
583 * scripts/MakeDefaultMimeTypes.java: New file.
584 * scripts/mime.types: New file.
585 * scripts/classes.pl: Moved from top level.
586 * classes.pl: Moved to scripts directory.
588 * java/net/URLConnection.java: Implement guessContentTypeFromName.
590 * gnu/gcj/io/MimeTypes.java: New file.
591 * gnu/gcj/io/DefaultMimeTypes.java: New file.
593 2000-02-20 Tom Tromey <tromey@cygnus.com>
595 * boehm.cc (_Jv_AllocBytes): Clear returned memory.
597 2000-02-19 Bryce McKinlay <bryce@albatross.co.nz>
599 * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
602 2000-02-18 Tom Tromey <tromey@cygnus.com>
604 * include/jvm.h (_Jv_GetJavaVM): Declare.
605 * include/java-interp.h (_Jv_GetFirstMethod): New function.
606 (_Jv_MethodBase::get_method): New method.
607 (_Jv_JNIMethod::set_function): New method.
608 * jni.cc (_Jv_JNI_UnregisterNatives): New function.
609 (_Jv_JNI_RegisterNatives): New function.
610 (_Jv_JNIFunctions): Updated for new functions.
611 (_Jv_GetJavaVM): New function.
612 (_Jv_JNI_GetJavaVM): Use it. Now static.
613 (_Jv_JNI_AttachCurrentThread): Create a new JNIEnv if this thread
614 is already a Java thread but does not have a JNIEnv yet.
616 * java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
619 2000-02-17 Tom Tromey <tromey@cygnus.com>
621 * gcj/field.h (_Jv_Field::getClass): Don't use JvAssert.
624 2000-02-16 Tom Tromey <tromey@cygnus.com>
626 * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
628 * jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
629 (_Jv_JNI_NewObject): Likewise.
630 (_Jv_JNI_NewObjectA): Likewise.
631 (_Jv_JNI_CallAnyMethodV): In constructor case, pass correct value
632 as "return" type to _Jv_CallAnyMethodA.
633 (_Jv_JNI_CallAnyMethodA): Likewise.
634 (_Jv_JNI_CallAnyVoidMethodV): Likewise.
636 * jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
639 2000-02-15 Tom Tromey <tromey@cygnus.com>
641 * resolve.cc (ncode): Set args_raw_size. Compute jni_cif and
643 (init_cif): Added `rtype_p' argument.
644 * include/java-interp.h (class _Jv_MethodBase): Added
646 (class _Jv_InterpMethod): Removed args_raw_size.
647 (class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields.
648 * jni.cc (call): Pass JNIEnv and (for static methods only) the
649 class pointer as well as the ordinary arguments.
651 * jni.cc (mangled_name): Skip leading `(' in signature.
653 * jni.cc (add_char): Added missing `else'.
655 * jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
658 2000-02-15 Bryce McKinlay <bryce@albatross.co.nz>
662 * java/lang/natRuntime.cc (_load): Include library path with
665 * java/lang/natSystem.cc (init_properties): set java.lang.classpath
668 * java/lang/natThread.cc (dumpStack): Removed.
669 * java/lang/Thread.java (dumpStack): Implemented.
671 2000-02-15 Tom Tromey <tromey@cygnus.com>
673 * java/lang/natRuntime.cc (_load): On Unix, prefix library name
674 with `lib' for loadLibrary. Fixes PR gcj/150.
676 2000-02-14 Warren Levy <warrenl@cygnus.com>
678 * gnu/gcj/math/MPN.java(findLowestBit): Made methods public.
680 * java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
684 (modPow): Rewritten to not use the naive, slow, brute force approach.
685 (isProbablePrime): Implemented.
686 (testBit): Implemented.
687 (flipBit): Implemented.
688 (getLowestSetBit): Implemented.
690 2000-02-16 Anthony Green <green@redhat.com>
692 * configure.host: Use the same options for i386 and i486 as we do
695 2000-02-12 Tom Tromey <tromey@cygnus.com>
697 * java/io/File.java (createTempFile): Use low bits from counter,
700 Fri Feb 11 19:48:08 2000 Anthony Green <green@cygnus.com>
702 * THANKS: More thanks.
704 2000-02-11 Tom Tromey <tromey@cygnus.com>
706 * interpret.cc (continue1): Use STOREA, not STOREI, to implement
707 astore instruction. From Hans Boehm.
709 2000-02-11 Warren Levy <warrenl@cygnus.com>
711 * java/math/BigInteger.java(BigInteger(String, int)): New constructor.
712 (BigInteger(String)): New constructor.
713 (not): Rewritten using version from Kawa's BitOps class.
714 (valueOf): New private methods from Kawa's BitOps class.
721 (andNot): Implemented.
722 (clearBit): Implemented.
723 (setBit): Implemented.
724 (bitCount): Implemented.
725 (toByteArray): Implemented.
727 2000-02-11 Tom Tromey <tromey@cygnus.com>
729 * java/io/File.java (nextValue): Now synchronized.
731 2000-02-10 Tom Tromey <tromey@cygnus.com>
733 * java/io/natFileDescriptorPosix.cc (open): Recognize EXCL flag.
734 * java/io/FileDescriptor.java (EXCL): New static field.
735 * java/io/File.java (tmpdir): New static field.
736 (createTempFile): New method.
737 (nextValue): New method.
738 * java/lang/natSystem.cc (init_properties): Set java.io.tmpdir
741 * include/jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
742 (jboolean): Declare as an attributed int, not a bool.
743 (_Jv_func): Declare differently for C.
745 * gnu/gcj/jni/natNativeThread.cc: New file.
746 * gnu/gcj/jni/NativeThread.java: New file.
747 * java/lang/Thread.java (data): Now a RawData.
748 * include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv):
750 * Makefile.in: Rebuilt.
751 * Makefile.am (java/lang/Thread.h): New target.
752 (ordinary_java_source_files): Added NativeThread.java.
753 (nat_source_files): Added natNativeThread.cc.
754 * java/lang/natThread.cc: Include <jni.h>
755 (struct natThread): Added `jni_env' field.
756 (_Jv_GetCurrentJNIEnv): New function.
757 (_Jv_SetCurrentJNIEnv): Likewise.
758 (initialize_native): Initialize jni_env.
760 * jni.cc (ThreadGroupClass): New define.
761 (_Jv_JNI_InvokeFunctions): New structure.
762 (JNI_GetCreatedJavaVMs): New function.
763 (the_vm): New global.
764 (JNI_GetDefaultJavaVMInitArgs): New function.
765 Include NativeThread.h.
766 (NativeThreadClass): New define.
767 (_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1.
768 (_Jv_JNI_DestroyJavaVM): New function.
769 (_Jv_JNI_AttachCurrentThread): New function.
770 (_Jv_JNI_DetachCurrentThread): New function.
771 (_Jv_JNI_GetEnv): New function.
772 (JNI_CreateJavaVM): New function.
773 (_Jv_JNI_GetJavaVM): New function.
774 (_Jv_JNIFunctions): Added entry for GetJavaVM.
775 * include/jni.h (JavaVMAttachArgs): New structure.
776 (JNI_EDETACHED): New define.
777 (JNI_EVERSION): Likewise.
778 (JavaVM): Define properly.
779 (struct JNIInvokeInterface): New structure.
780 (class _Jv_JavaVM): New class.
781 (JNI_OnLoad, JNI_OnUnload): Declare.
782 (JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM,
783 JNI_GetCreatedJavaVMs): Declare.
784 (JavaVMInitArgs): New typedef.
785 (JavaVMOption): Likewise.
786 (JNI_ERR): New define.
789 2000-02-10 Andrew Haley <aph@cygnus.com>
791 * interpret.cc: Don't include fdlibm.h.
792 Replace #if with #ifdef throughout.
793 Declare extern __ieee754_fmod.
794 (continue1): Remove op_getfield, op_getstatic, op_putfield,
796 * resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
797 Search class hierarchy for superclass vtable.
799 * java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
800 off the end of a pointer list.
802 * java/lang/natThread.cc (stop): Don't abort, throw an exception
806 2000-02-09 Tom Tromey <tromey@cygnus.com>
808 * java/lang/natRuntime.cc (_load): Call add_library.
809 (loadLibraryInternal): Likewise.
811 * gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
812 iconv_close when handle is not NULL. Thanks to Andrew Haley.
813 (Output_iconv::finalize): Likewise.
815 2000-02-08 Tom Tromey <tromey@cygnus.com>
817 * java/util/Properties.java (setProperty): New method.
820 2000-02-07 Tom Tromey <tromey@cygnus.com>
822 * java/lang/Runtime.java (_load): Declare.
823 (load, loadLibrary): Wrote in terms of _load.
824 * java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in
826 (loadLibrary): Likewise.
829 (loadLibrary, load): Removed.
831 * jni.cc (ThrowableClass): New define.
832 (_Jv_JNI_Throw): Check argument.
833 (_Jv_JNI_ThrowNew): Likewise.
834 (wrap_value): Don't wrap object if it is NULL.
835 (_Jv_JNI_DefineClass): Use wrap_value.
836 (_Jv_JNI_FindClass): Likewise.
837 (_Jv_JNI_GetSuperclass): Likewise.
838 (_Jv_JNI_ExceptionOccurred): Likewise.
839 (_Jv_JNI_AllocObject): Likewise.
840 (_Jv_JNI_GetObjectClass): Likewise.
841 (_Jv_JNI_NewString): Likewise.
842 (_Jv_JNI_NewStringUTF): Likewise.
843 (_Jv_JNI_NewObjectArray): Likewise.
844 (_Jv_JNI_GetObjectArrayElement): Likewise.
845 (_Jv_JNI_NewPrimitiveArray): Likewise.
846 (_Jv_JNI_ToReflectedField): Likewise.
847 (_Jv_JNI_ToReflectedMethod): Likewise.
848 (_Jv_JNI_AllocObject): Check argument.
849 (_Jv_JNI_NewObjectV): Likewise.
850 (_Jv_JNI_NewObject): Likewise.
851 (_Jv_JNI_NewObjectA): Likewise.
852 (_Jv_JNI_GetObjectClass): Likewise.
853 (_Jv_JNI_GetField): Likewise.
854 (_Jv_JNI_SetField): Likewise.
856 * interpret.cc (PUSHL): Don't use expression statement.
861 * jni.cc (add_char): Conditional on INTERPRETER.
862 (mangled_name): Likewise.
864 * include/java-interp.h (class _Jv_MethodBase): Conditional on
866 (class _Jv_JNIMethod): Likewise.
868 2000-02-04 Warren Levy <warrenl@cygnus.com>
870 * Makefile.am: Added MPN.java and BigInteger.java.
871 * Makefile.in: Rebuilt.
872 * gnu/gcj/math/MPN.java: New file. From Kawa by Per Bothner
874 * java/math/BigInteger.java: New file. Based primarily on
875 Kawa's IntNum.java by Per Bothner <per@bothner.com>.
877 2000-02-04 Tom Tromey <tromey@cygnus.com>
879 * defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
881 (handleMethodsEnd): Fixed error messages. Create a _Jv_JNIMethod
882 if the method is native.
883 * resolve.cc (ncode): Don't handle native methods.
884 (_Jv_JNIMethod::ncode): New method.
885 (_Jv_PrepareClass): Handle native methods.
886 * jni.cc (call): Renamed from _Jv_JNI_conversion_call.
887 Include AbstractMethodError.h.
888 (add_char): New function.
889 (mangled_name): Likewise.
890 * include/java-interp.h (class _Jv_JNIMethod): New class.
891 (class _Jv_MethodBase): New class.
892 (class _Jv_InterpMethod): Derive from _Jv_MethodBase.
893 (_Jv_InterpClass): Changed `interpreted_methods' field to type
896 * include/jvm.h (_Jv_FindSymbolInExecutable): Declare.
897 * java/lang/natRuntime.cc (libraries_size, libraries_count,
898 libraries): New globals.
899 (add_library): New function.
900 (_Jv_FindSymbolInExecutable): New function.
902 * java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
905 2000-02-04 Andrew Haley <aph@cygnus.com>
907 * java/lang/Throwable.java (CPlusPlusDemangler): New class.
908 (printStackTrace): Use a CPlusPlusDemangler to demangle names.
909 * java/lang/natThrowable.cc (printRawStackTrace): Rename
910 printStackTrace to printRawStackTrace.
912 2000-02-03 Tom Tromey <tromey@cygnus.com>
914 * java/util/Calendar.java (toString): New method.
915 * java/util/SimpleTimeZone.java (clone): New method.
916 (toString): New method.
917 * java/util/TimeZone.java (clone): New method.
918 * java/text/SimpleDateFormat.java (clone): New method.
919 * java/text/NumberFormat.java (clone): New method.
920 (equals): New method.
921 * java/text/Format.java (clone): New method.
922 * java/text/DateFormatSymbols.java (DateFormatSymbols): New
925 * java/text/DateFormat.java (clone): New method.
926 * java/text/Collator.java (clone): New method.
928 2000-02-03 Tom Tromey <tromey@cygnus.com>
930 * java/io/PipedOutputStream.java (write(byte[], int, int)): New
933 2000-02-01 Tom Tromey <tromey@cygnus.com>
935 * include/java-interp.h (_Jv_JNI_conversion_call): Declare.
936 * resolve.cc (ncode): Use _Jv_JNI_conversion_call when
937 constructing the closure if the function is native.
938 * jni.cc (_Jv_JNI_conversion_call): Now returns `void'. No longer
939 a template function, #if'd out, or static.
940 Include <java-interp.h>.
942 * include/jni.h (class _Jv_JNIEnv): Corrected calls using `...'.
944 * include/jni.h (class _Jv_JNIEnv): Added all C++ inline methods.
946 * jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
947 (_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave
949 (wrap_value): New function.
950 (_Jv_JNI_CallAnyMethodV): Use it.
951 (_Jv_JNI_CallAnyMethodA): Likewise.
952 (_Jv_JNI_GetField): Use wrap_value; removed specialized version.
953 (_Jv_JNI_GetStaticField): Likewise.
955 * jni.cc (_Jv_JNI_GetField): Specialize for jobject.
956 (_Jv_JNI_GetStaticField): Likewise.
958 2000-01-31 Tom Tromey <tromey@cygnus.com>
960 * prims.cc (_Jv_MallocUnchecked): New function.
961 (main_init): Call _Jv_JNI_Init.
962 * include/jvm.h (_Jv_MallocUnchecked): Declare.
963 (_Jv_JNI_Init): Declare.
964 * jni.cc: Include Hashtable.h, OutOfMemoryError.h, Integer.h,
966 (_Jv_JNI_NewGlobalRef): New function.
967 (_Jv_JNI_DeleteGlobalRef): New function.
968 (_Jv_JNI_DeleteLocalRef): New function.
969 (_Jv_JNI_conversion_call): Initialize and clear local reference
971 (_Jv_JNI_NewLocalRef): New function.
972 (struct _Jv_JNI_LocalFrame): New structure.
973 (_Jv_JNI_PushLocalFrame): New function.
974 (_Jv_JNI_EnsureLocalCapacity): New function.
975 (FRAME_SIZE): New define.
976 (_Jv_JNI_GetStringChars): Mark string, not characters.
977 (_Jv_JNI_ReleaseStringChars): Unmark string, not characters.
978 (_Jv_JNI_GetPrimitiveArrayElements): Mark array, not elements.
979 (_Jv_JNI_ReleasePrimitiveArrayElements): Unmark array, not
981 (_Jv_JNI_DefineClass): Make return value a local ref.
982 (_Jv_JNI_FindClass): Likewise.
983 (_Jv_JNI_GetSuperclass): Likewise.
984 (_Jv_JNI_ExceptionOccurred): Likewise.
985 (_Jv_JNI_AllocObject): Likewise.
986 (_Jv_JNI_GetObjectClass): Likewise.
987 (_Jv_JNI_CallAnyMethodV): Likewise.
988 (_Jv_JNI_NewString): Likewise.
989 (_Jv_JNI_NewStringUTF): Likewise.
990 (_Jv_JNI_NewObjectArray): Likewise.
991 (_Jv_JNI_GetObjectArrayElement): Likewise.
992 (_Jv_JNI_ToReflectedField): Likewise.
993 (_Jv_JNI_ToReflectedMethod): Likewise.
994 (_Jv_JNIFunctions): Updated table for new functions.
995 (_Jv_JNI_Init): New function.
996 (mark_for_gc): Wrote.
997 (unmark_for_gc): Wrote.
998 * include/jni.h (struct JNINativeInterface): Removed name from
999 PopLocalFrame parameter.
1000 (class _Jv_JNIEnv): Added `locals' field.
1002 Mon Jan 31 00:43:15 2000 Anthony Green <green@redhat.com>
1004 * gnu/gcj/convert/natIconv.cc (read): Minor fixes.
1007 2000-01-30 Tom Tromey <tromey@cygnus.com>
1009 * include/config.h.in: Rebuilt.
1010 * acconfig.h (HAVE_ICONV): Define.
1011 * configure: Rebuilt.
1012 * configure.in: Check for `iconv' function.
1013 * gnu/gcj/convert/BytesToUnicode.java (getDecoder): Try iconv if
1014 no specific encoder exists.
1015 * gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Try iconv if
1016 no specific encoder exists.
1017 * Makefile.in: Rebuilt.
1018 * Makefile.am (convert_source_files): Mention Input_iconv.java and
1020 (nat_source_files): Added natIconv.cc.
1021 * gnu/gcj/convert/natIconv.cc: New file.
1022 * gnu/gcj/convert/Input_iconv.java: New file.
1023 * gnu/gcj/convert/Output_iconv.java: New file.
1025 2000-01-28 Tom Tromey <tromey@cygnus.com>
1027 * Makefile.in: Rebuilt.
1028 * Makefile.am (LIBFFIINCS): Added MULTIBUILDTOP.
1030 2000-01-26 Tom Tromey <tromey@cygnus.com>
1032 * gcj/method.h (JvNumMethods): Moved from Class.h.
1033 (JvGetFirstMethod): Likewise.
1034 * java/lang/Class.h (Object): Updated decl of
1035 _Jv_JNI_ToReflectedField.
1036 (Object): Added _Jv_JNI_ToReflectedMethod as a friend.
1037 * Makefile.in: Rebuilt.
1038 * Makefile.am (java/lang/reflect/Field.h): Added `jboolean'
1039 argument of _Jv_JNI_ToReflectedField.
1040 (java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod
1042 (java/lang/reflect/Method.h): Likewise.
1043 * include/jni.h (class _Jv_JNIEnv): Added `klass' member. Use
1045 (jweak): New typedef.
1046 (struct JNINativeInterface): Correctly declare remaining entries.
1047 * jni.cc: Include Class.h, ClassLoader.h.
1048 (_Jv_JNI_FindClass): New function.
1049 (_Jv_JNI_DefineClass): New function.
1050 (_Jv_JNI_conversion_call): New function.
1051 (_Jv_JNI_FindClass): Use current class loader to find class.
1052 (_Jv_JNI_ExceptionCheck): New function.
1053 (_Jv_JNI_FromReflectedField): Now static.
1054 (MethodClass): New define.
1055 (_Jv_JNI_FromReflectedMethod): New function.
1056 (_Jv_JNI_ToReflectedMethod): Likewise.
1058 (_Jv_JNI_IsAssignableFrom): Renamed.
1059 (_Jv_JNI_GetStringRegion): New function.
1060 Include StringIndexOutOfBoundsException.h.
1061 (_Jv_JNI_GetStringUTFRegion): New function.
1062 (_Jv_JNIFunctions): Updated for new functions.
1063 (_Jv_JNI_GetPrimitiveArrayCritical): New function
1064 (_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise.
1065 (_Jv_JNI_GetStringCritical): New function.
1066 (_Jv_JNI_ReleaseStringCritical): Likewise.
1067 (get_throwable): Removed.
1068 (GCJ_JV_JNIENV_FRIEND): Removed.
1069 (__GCJ_JNI_IMPL__): Define.
1072 * resolve.cc (get_ffi_type_from_signature): Handle case where
1075 Tue Jan 25 08:51:16 2000 Tom Tromey <tromey@ferrule.cygnus.com>
1077 * interpret.cc (run): Don't call println.
1078 Don't include PrintStream.h.
1080 * gcj/field.h (struct _Jv_Field): Use "jshort" as type for
1081 nameIndex. Use "jint" as type for boffset.
1082 * java/lang/Class.h (struct _Jv_Method): Made accflags a
1084 (Class): Likewise. Also changed type of method_count,
1085 vtable_method_count, size_in_bytes, field_count,
1086 static_field_count, interface_count.
1087 * gcj/array.h (__JArray): Made `length' a const jsize, not an
1090 2000-01-21 Tom Tromey <tromey@cygnus.com>
1092 * java/lang/reflect/natConstructor.cc (newInstance): Use
1094 * include/jvm.h: Declare _Jv_CallAnyMethodA.
1095 * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
1096 from _Jv_CallNonvirtualMethodA. Changed interface; overloaded.
1099 (invoke): Use _Jv_CallAnyMethodA.
1101 * java/lang/Class.h (Class): Declare JvGetFirstStaticField,
1102 JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
1104 (struct _Jv_Method): Added getNextMethod method.
1105 (JvNumMethods): New function.
1106 (JvGetFirstMethod): Likewise.
1107 * gcj/field.h (JvGetFirstStaticField): New function.
1108 (JvNumStaticFields): Likewise.
1109 (getNextField): Renamed from getNextInstanceField.
1110 (struct _Jv_Field): New method getClass.
1111 * jni.cc: Wrote many new functions.
1112 * include/jni.h (JNI_TRUE): Define.
1113 (JNI_FALSE): Likewise.
1114 (jobject, jclass, jstring, jarray, jthrowable, jobjectArray,
1115 jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray,
1116 jcharArray, jfloatArray, jdoubleArray): New typedefs.
1117 (jfieldID, jmethodID): Likewise.
1118 (JNI_COMMIT, JNI_ABORT): New defines.
1119 (JNINativeMethod): New struct.
1120 (struct JNINativeInterface): Correctly declared more entries.
1121 (class _Jv_JNIEnv): Added `ex' member.
1122 (JNI_VERSION_1_1): New define.
1123 (JNI_VERSION_1_2): Likewise.
1125 * boehm.cc (_Jv_MarkObj): Use getNextField, not
1126 getNextInstanceField.
1128 2000-01-20 Tom Tromey <tromey@cygnus.com>
1130 * resolve.cc (StringClass): Removed.
1131 * defineclass.cc (StringClass): Removed.
1133 2000-01-19 Bryce McKinlay <bryce@albatross.co.nz>
1137 2000-01-19 Tom Tromey <tromey@cygnus.com>
1139 * interpret.cc (PC_REGISTER_ASM): Removed.
1141 * java/lang/natThrowable.cc: Don't use `#pragma implementation'.
1142 From Bryce McKinlay.
1144 * All files: Updated copyright to reflect Cygnus purchase.
1146 2000-01-18 Bryce McKinlay <bryce@albatross.co.nz>
1148 * configure: Rebuilt.
1149 * configure.in: Recognize --disable-interpreter.
1151 2000-01-18 Andrew Haley <aph@cygnus.com>
1153 * name-finder.cc (lookup): Check for dladdr function.
1154 acconfig.h (HAVE_DLADDR): Add.
1155 configure.in: Check for HAVE_DLADDR
1157 include/config.h.in: Rebuilt.
1159 2000-01-17 Andrew Haley <aph@cygnus.com>
1161 * prims.cc (_Jv_RunMain): Set the name of this executable.
1163 2000-01-17 Tom Tromey <tromey@cygnus.com>
1165 * java/lang/natThrowable.cc (fillInStackTrace): Return `this' even
1166 when backtrace can't be computed.
1168 * configure: Rebuilt.
1169 * configure.in: Fixed typo in AC_CONFIG_SUBDIRS call.
1171 * java/lang/Runtime.java (loadLibraryInternal): Declare.
1172 * java/lang/natClassLoader.cc (_Jv_FindClass): Removed dead copy.
1173 (_Jv_FindClassInCache): Likewise.
1174 (_Jv_FindClass): Don't conditionalize body on INTERPRETER.
1175 (findSystemClass): Try to load class from compiled module.
1177 * java/lang/natRuntime.cc (load): Use UTF-8 copy of filename.
1178 (loadLibrary): Likewise.
1179 (lt_preloaded_symbols): Define.
1180 (loadLibraryInternal): New method.
1181 * include/config.h.in: Rebuilt.
1182 * acconfig.h (USE_LTDL): Added.
1183 * Makefile.am (SUBDIRS): Added $(DIRLTDL).
1184 (INCLUDES): Added $(INCLTDL).
1185 (libgcj_la_DEPENDENCIES): Added $(LIBLTDL).
1186 (libgcj_la_LIBADD): Likewise.
1187 * aclocal.m4, configure: Rebuilt.
1188 * configure.in: Added libltdl support.
1190 2000-01-15 Tom Tromey <tromey@cygnus.com>
1192 * prims.cc (_Jv_PrimClass): Use `JV_STATE_NOTHING', not `0'.
1194 2000-01-14 Andrew Haley <aph@cygnus.com>
1196 * java/lang/natThrowable.cc: New file.
1198 * java/lang/Throwable.java (fillInStackTrace): Make native.
1199 (printStackTrace): Call native method to do this.
1200 (Throwable): Call fillInStackTrace.
1201 (stackTrace): New variable.
1203 * include/jvm.h: Add _Jv_ThisExecutable functions.
1205 * prims.cc: (_Jv_execName): New variable.
1206 (catch_segv): Call fillInStackTrace.
1208 (_Jv_ThisExecutable): New functions.
1209 (JvRunMain): Set the name of this executable.
1211 * Makefile.am: Add java/lang/natThrowable.cc.
1213 * Makefile.in: Rebuilt.
1215 * acconfig.h: Add HAVE_PROC_SELF_EXE.
1217 * configure.in: Force link with __frame_state_for in
1218 FORCELIBGCCSPEC. Add new checks for backtrace.
1219 * include/config.h.in: Rebuilt.
1221 * name-finder.cc: New file.
1222 * include/name-finder.h: New file.
1224 2000-01-16 Anthony Green <green@cygnus.com>
1226 * java/lang/StringBuffer.java (StringBuffer): Don't special case
1229 2000-01-16 Jeff Sturm <jsturm@sigma6.com>
1231 * java/io/StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).
1233 2000-01-13 Tom Tromey <tromey@cygnus.com>
1235 * java/lang/natClassLoader.cc (_Jv_FindClass): Register `loader',
1236 not system loader, as initiating loader.
1238 2000-01-11 Tom Tromey <tromey@cygnus.com>
1240 * java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
1241 HP/UX. From David Scott Urban.
1243 2000-01-10 Jeff Sturm <jsturm@sigma6.com>
1245 * java/lang/natMath.cc (pow): Cast args to `double', not
1248 (IEEEremainder): Likewise.
1249 * java/lang/mprec.h: Don't wrap includes in `extern "C"'.
1250 * java/lang/fdlibm.h: Don't wrap includes in `extern "C"'.
1252 2000-01-09 Anthony Green <green@cygnus.com>
1254 * java/lang/natString.cc (init): Test for overflow condition
1255 during out of bounds check.
1256 (getChars): Throw StringIndexOutOfBoundsException, not
1257 ArrayIndexOutOfBoundsException.
1259 (regionMatches): Obey case option during string comparison.
1261 * configure.host (ligcj_interpreter): New variable. Enable
1262 interpreter by default on IA-32.
1263 * configure.in: Examine libgcj_interpreter.
1264 * configure: Rebuilt.
1266 2000-01-07 Tom Tromey <tromey@cygnus.com>
1268 * mauve-libgcj: Don't disable ClassTest.
1270 * java/lang/natClass.cc (getClasses): Wrote.
1272 2000-01-06 Tom Tromey <tromey@cygnus.com>
1274 * java/lang/natClass.cc (_getConstructors): Correctly check
1275 whether method name is the init name.
1276 (getMethod): Look at accflags on method in `klass', not `this'.
1278 2000-01-05 Tom Tromey <tromey@cygnus.com>
1280 * java/lang/natClass.cc (getMethod): Compute offset relative to
1281 `klass's methods table, not `this's table.
1283 * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA):
1284 In unwrapping/widening case, check whether `k' is null, not
1285 whether it is primitive. Initialize `num' from `argelts', not
1286 `paramelts'. Correct create and pass arguments to ffi_call.
1287 Don't let presence of `this' argument affect index used to look in
1289 (COPY): Set appropriate element in `values' vector.
1291 * java/lang/natClass.cc: Include <gcj/method.h>.
1293 * java/lang/Class.h (_getMethods): Correctly declare as private,
1296 * java/lang/Class.h (_getMethods): Declare.
1297 * java/lang/Class.java (_getMethods): Declare.
1298 * java/lang/natClass.cc (getDeclaringClass): Always return NULL.
1299 (getDeclaredClasses): Always return empty array.
1300 (_getMethods): New method.
1301 (getMethods): Wrote.
1302 (getDeclaredMethod): Return `rmethod'.
1303 (finit_name): New global.
1304 (getDeclaredMethods): Check for finit_name.
1305 (_getMethods): Likewise.
1306 (getMethod): Only return public methods.
1308 * java/lang/reflect/natMethod.cc (get_ffi_type): Test size of
1309 jboolean and select correct ffi type on that basis.
1310 (_Jv_CallNonvirtualMethodA): Handle `void' return type.
1311 Constructor call always has `void' return type.
1313 2000-01-04 Tom Tromey <tromey@cygnus.com>
1315 * java/lang/Class.h (getSignature): Updated.
1316 * java/lang/Class.java (getSignature): Updated.
1317 * java/lang/natClass.cc (getSignature): Added `is_constructor'
1319 (getConstructor): Ensure constructor is public.
1320 (_getConstructors): Check for public-ness of constructor when
1321 `declared' is false, not when it is true.
1323 2000-01-04 Warren Levy <warrenl@cygnus.com>
1325 * java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
1327 (receive): Set the sender's address in the DatagramPacket.
1329 2000-01-04 Tom Tromey <tromey@cygnus.com>
1331 * java/lang/reflect/natConstructor.cc (newInstance): Pass
1332 declaring class as return_type argument to
1333 _Jv_CallNonvirtualMethodA.
1334 * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In
1335 constructor case, create object and use it as `this' argument.
1336 * java/lang/Class.h (_getConstructors): Declare.
1337 (_getFields): Declare.
1338 * java/lang/Class.java (getConstructors): Wrote.
1339 (_getConstructors): New native method.
1340 (getDeclaredConstructors): Wrote.
1341 (_getFields): Declare new native method.
1342 * java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Removed
1344 (getMethod): Work correctly when class is primitive.
1345 (getDeclaredMethods): Likewise. Compute offset using `method',
1347 (getDeclaredMethod): Likewise.
1348 (getConstructor): Wrote.
1349 (ConstructorClass): New define.
1350 (getDeclaredConstructor): Wrote.
1351 (_getConstructors): New method.
1352 (_getFields): New method.
1355 * Makefile.in: Rebuilt.
1356 * Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.
1358 * prims.cc: Remove `#pragma implementation'.
1359 * gcj/array.h: Remove `#pragma interface'.
1361 * prims.cc (_Jv_equaln): New function.
1362 * java/lang/Class.java (getSignature): Declare.
1363 * resolve.cc (_Jv_LookupDeclaredMethod): Moved to natClass.cc.
1364 * java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Moved from
1366 (getSignature): New method.
1367 (getDeclaredMethod): Wrote.
1369 Include StringBuffer.h.
1370 * java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
1371 as a friend. Unconditionally declare _Jv_LookupDeclaredMethod as
1373 (getSignature): Declare.
1374 * include/jvm.h (_Jv_GetTypesFromSignature): Declare.
1375 (_Jv_equaln): Declare.
1376 (_Jv_CallNonvirtualMethodA): Declare.
1377 * Makefile.in: Rebuilt.
1378 * Makefile.am (nat_source_files): Added natConstructor.cc.
1379 (java/lang/reflect/Constructor.h): New target.
1380 * java/lang/reflect/natConstructor.cc: New file.
1381 * java/lang/reflect/Constructor.java (newInstance): Now native.
1382 (declaringClass): Renamed from decl_class.
1383 (offset): Renamed from index.
1384 (getType): New native method.
1385 (getModifiers): Now native.
1386 (getParameterTypes): Call getType if required.
1387 (hashCode): Include hash code from declaring class.
1388 (modifiers): Removed.
1389 (toString): Call getType if required.
1390 * gcj/method.h (_Jv_FromReflectedConstructor): New function.
1391 * java/lang/reflect/natMethod.cc (hack_call): New method.
1392 Removed `#if 0' around FFI code.
1393 Include <gnu/gcj/RawData.h>.
1394 (invoke): Use _Jv_CallNonvirtualMethodA. Throw
1395 IllegalArgumentException when argument object and class disagree.
1396 (_Jv_GetTypesFromSignature): New function.
1398 (ObjectClass): New define.
1399 (_Jv_CallNonvirtualMethodA): New function.
1400 * java/lang/reflect/Method.java (hack_trampoline): New method.
1401 (hack_call): New native method.