OSDN Git Service

411965280a5e1bd6be2095b574ccddf35e79a471
[pf3gnuchains/gcc-fork.git] / libjava / ChangeLog
1 Sun Apr  2 08:27:18 2000  Anthony Green  <green@redhat.com>
2
3         * configure: Rebuilt.
4         * configure.in: Add --disable-jvmpi.
5         * include/config.h.in: Rebuilt.
6         * acconfig.h: Add ENABLE_JVMPI.
7          
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.
15
16         * prims.cc (_Jv_AllocObject): Generate JVMPI object allocation
17         events.
18
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.
26
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.
33           
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.
38           
39         * include/jvmpi.h: New file.
40
41 2000-03-27  Bryce McKinlay  <bryce@albatross.co.nz>
42
43         * Makefile.in: New #defines and friends for Thread.h.
44         * Makefile.am: Ditto.
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
48         of mutex.
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 
56         posix-threads.h.
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()
60         returns.
61         * java/lang/Thread.java: (isInterrupted_): Renamed to overloaded
62         `isInterrupted(boolean)'. Clear interrupted flag if clear_flag is
63         set.
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
77         act appropriatly.
78         * include/posix-threads.h: Remove all HAVE_RECURSIVE_MUTEX related
79         #defines and #ifdefs.
80         (struct _Jv_Thread_t): New fields `thread_obj', `wait_cond',
81         `wait_mutex', `next'.
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.
100
101 2000-03-26  Tom Tromey  <tromey@cygnus.com>
102
103         * jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception
104         set, throw it.
105         (call): Don't throw exception here.
106
107 2000-03-26  Tom Tromey  <tromey@cygnus.com>
108
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*.
116
117         * resolve.cc (ncode): Use FFI_PREP_RAW_CLOSURE and FFI_RAW_SIZE.
118
119 2000-03-26  Hans Boehm  <boehm@acm.org>
120
121         * include/java-cpool.h (_Jv_storeLong, _Jv_loadLong,
122         _Jv_storeDouble, _Jv_loadDouble): Define differently on 64 bit
123         machine.
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
128         case.
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.
135  
136 2000-03-24  Warren Levy  <warrenl@cygnus.com>
137
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.
141
142 2000-03-24  Warren Levy  <warrenl@cygnus.com>
143
144         * java/awt/Font.java(isBold): Fix syntax error.
145         (isItalic): ditto.
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.
150
151 2000-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
152
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.
161
162 2000-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
163
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().
170
171 2000-03-19  Warren Levy  <warrenl@cygnus.com>
172
173         * java/awt/Color.java: Specified java.io for Serializable.
174         * java/awt/Toolkit.java: Imported java.net.URL.
175
176 2000-03-19  Warren Levy  <warrenl@cygnus.com>
177
178         * java/awt/Color.java: Rewrote to be more memory efficient (& compile).
179
180 2000-03-16  Warren Levy  <warrenl@cygnus.com>
181
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.
195
196         * java/awt/Font.java (PLAIN): New field.
197         (BOLD): New field.
198         (ITALIC): New field.
199         (ROMAN_BASELINE): New field.
200         (CENTER_BASELINE): New field.
201         (HANGING_BASELINE): New field.
202         (name): New field.
203         (style): New field.
204         (size): 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.
214         (decode): Stubbed.
215         * java/awt/Frame.java (getFont): Stubbed.
216         (postEvent): Stubbed.
217         (remove): 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.
222
223 2000-03-15  Tom Tromey  <tromey@cygnus.com>
224
225         * java/io/natFileDescriptorWin32.cc (winerr): Now static.
226
227         * prims.cc (win32_exception_handler): Reformatted.
228
229         * include/win32-threads.h (_Jv_HaveCondDestroy): New define.
230         (_Jv_HaveMutexDestroy): Likewise.
231
232 2000-03-15 Jon Beniston <jb7216@bristol.ac.uk>
233
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.
249
250 2000-03-14  Tom Tromey  <tromey@cygnus.com>
251
252         * jni.cc (mangled_name): Fixed assertion.
253         (JNI_GetCreatedJavaVMs): Don't comment out `buf_len' argument;
254         turned assert into actual failure.
255
256 2000-03-09  Warren Levy  <warrenl@cygnus.com>
257
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.
261
262 2000-03-09  Warren Levy  <warrenl@cygnus.com>
263
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.
299
300         * java/security/MessageDigest.java: Rewritten.
301         * java/security/SecureClassLoader.java: Added JDK1.2 comment.
302
303 2000-03-09  Bryce McKinlay  <bryce@albatross.co.nz>
304
305         * README: Updated.
306
307 2000-03-09  Bryce McKinlay  <bryce@albatross.co.nz>
308
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
313         class.
314
315 2000-03-08  Tom Tromey  <tromey@cygnus.com>
316
317         * java/lang/reflect/natArray.cc (newInstance): Don't allow array
318         of `void' to be created.
319
320 2000-03-08  Warren Levy  <warrenl@cygnus.com>
321
322         * java/math/BigInteger.java(signum): Handle zero properly.
323
324 2000-03-07  Tom Tromey  <tromey@cygnus.com>
325
326         * All files: Updated copyright information.
327         * COPYING: New file.
328         * COPYING.LIB: Removed.
329         * LIBGCJ_LICENSE: We now use GPL + special exception.
330
331 2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>
332
333         * resolve.cc (_Jv_SearchMethodInClass): New function.
334         (_Jv_ResolvePoolEntry): Search superinterfaces for interface methods.
335         * java/lang/Class.h (_Jv_SearchMethodInClass): New prototype.
336
337 2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>
338
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.
345         (isArray): Ditto.
346         (isPrimitive): Ditto.
347         (_Jv_IsAssignableFrom): New prototype.
348         (_Jv_LookupInterfaceMethodIdx): New prototype. Predeclare with "C"
349         linkage.
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.
359
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 
365         the lock held.
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.
383
384         * java/lang/natClassLoader.cc (_Jv_NewClass): Set new jclass fields.
385
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.
392
393         * gcj/cni.h: Move _Jv_PrimClass definitions to gcj/array.h.
394
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
399         declared `inline'.
400
401         * gcj/javaprims.h (_Jv_Realloc): Prototype.
402
403         * include/jvm.h (_Jv_LookupInterfaceMethodIdx): Prototype.
404
405 2000-03-06  Tom Tromey  <tromey@cygnus.com>
406
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'
411         smaller.
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'
416         argument.
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.
422
423 2000-03-05  Tom Tromey  <tromey@cygnus.com>
424
425         Fix for PR libgcj/43:
426         * include/Makefile.in: Rebuilt.
427         * include/Makefile.am (include_HEADERS): New define.
428
429 2000-03-05  Anthony Green  <green@redhat.com>
430
431         * gcj/javaprims.h ("Java"): Remove FirstThread.
432
433         * configure.host: Fix __NO_MATH_INLNES botch.
434
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.
440         (JvRunMain): Ditto.
441         (_Jv_RunMain): Ditto.
442
443         * gnu/gcj/runtime/FirstThread.java: Moved from java/lang.
444         * gnu/gcj/runtime/natFirstThread.cc: Ditto.
445
446 2000-03-05  Warren Levy  <warrenl@cygnus.com>
447
448         * java/net/DatagramSocket.java(DatagramSocket(int,InetAddress)):
449           Handle null addresses.
450
451 2000-03-04  Anthony Green  <green@redhat.com>
452
453         * configure.host (libgcj_flags): Define __NO_MATH_INLINES.
454         See PR gcj/151.
455
456 2000-03-04  Anthony Green  <green@redhat.com>
457
458         * configure: Rebuilt.
459         * configure.in (ZLIBTESTSPEC): New macro.
460         (GCTESTSPEC): New macro.
461         (LIBGCJTESTSPEC): New macro.
462         * libgcj-test.spec.in: New file.
463
464 2000-03-02  Tom Tromey  <tromey@cygnus.com>
465
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):
476         Removed.
477         * java/lang/natClassLoader.cc (defineClass0): Catch exceptions
478         here.
479         (defineClass2): Removed.
480
481         * java/lang/reflect/Method.java (hack_trampoline, hack_call):
482         Removed.
483         * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Catch
484         exceptions here.
485         (hack_call): Removed.
486
487         * java/lang/Class.h (Class): Removed hackRunInitializers,
488         hackTrampoline.
489         * java/lang/natClass.cc (hackRunInitializers): Removed.
490         (initializeClass): Catch exceptions here.
491         Include ExceptionInInitializerError.h.
492         * java/lang/Class.java (hackTrampoline, hackRunInitializers):
493         Removed.
494
495         * java/lang/Object.h (Object): Don't mention hack12_6.
496         * java/lang/natObject.cc (_Jv_FinalizeObject): Catch exceptions
497         here.
498         * java/lang/Object.java (hack12_6): Removed.
499
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_
503         removed.
504
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.
532
533 2000-02-28  Mo DeJong  <mdejong@cygnus.com>
534
535         * java/util/zip/ZipOutputStream.java(closeEntry) : Fixed
536         error caused by the incorrect casting of a long to an int.
537
538 2000-02-28  Mo DeJong  <mdejong@cygnus.com>
539
540         * java/util/zip/ZipOutputStream.java(write_entry) : Fixed
541         SIGSEV caused by use of the wrong instance variable.
542
543 2000-02-27  Bryce McKinlay  <bryce@albatross.co.nz>
544
545         * java/io/File.java (File(String, String)): For dirPath, treat an
546         empty String the same as `null'.
547
548 2000-02-26  Anthony Green  <green@cygnus.com>
549
550         * gnu/gcj/io/MimeTypes.java: Test for null.
551
552         * jni.cc (_Jv_JNI_AttachCurrentThread): Minor cleanup.
553         (JNI_GetCreatedJavaVMs): Remove compiler warning.
554
555         * java/net/URLConnection.java: Update copyright notice.
556
557 2000-02-25  Tom Tromey  <tromey@cygnus.com>
558
559         * jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on
560         `INTERPRETER'.
561
562 2000-02-25  Bryce McKinlay  <bryce@albatross.co.nz>
563
564         * java/net/URLConnection.java (initializeDateFormats): New
565         private method.
566         (getHeaderFieldDate): Call initializeDateFormats if required.
567         locale, dateFormat1, dateFormat2, dateFormat3: Don't initialize
568         these.
569         Fix for PR libgcj/38.
570
571 2000-02-24  Warren Levy  <warrenl@cygnus.com>
572
573         * java/math/BigInteger.java(ival): Made private.
574         (words): Ditto.
575         (neg): Ditto.
576
577 2000-02-20  Anthony Green  <green@cygnus.com>
578
579         * Makefile.in: Rebuilt.
580         * Makefile.am (ordinary_java_source_files): Add
581         gnu/gcj/io/DefaultMimeTypes.java and gnu/gcj/io/MimeTypes.java
582
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.
587
588         * java/net/URLConnection.java: Implement guessContentTypeFromName.
589
590         * gnu/gcj/io/MimeTypes.java: New file.
591         * gnu/gcj/io/DefaultMimeTypes.java: New file.
592
593 2000-02-20  Tom Tromey  <tromey@cygnus.com>
594
595         * boehm.cc (_Jv_AllocBytes): Clear returned memory.
596
597 2000-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
598
599         * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
600         (setSize): ditto.
601
602 2000-02-18  Tom Tromey  <tromey@cygnus.com>
603
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.
615
616         * java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
617         function.
618
619 2000-02-17  Tom Tromey  <tromey@cygnus.com>
620
621         * gcj/field.h (_Jv_Field::getClass): Don't use JvAssert.
622         Fixes PR gcj/152.
623
624 2000-02-16  Tom Tromey  <tromey@cygnus.com>
625
626         * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
627
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.
635
636         * jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
637         findClass.
638
639 2000-02-15  Tom Tromey  <tromey@cygnus.com>
640
641         * resolve.cc (ncode): Set args_raw_size.  Compute jni_cif and
642         jni_arg_types.
643         (init_cif): Added `rtype_p' argument.
644         * include/java-interp.h (class _Jv_MethodBase): Added
645         args_raw_size.
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.
650
651         * jni.cc (mangled_name): Skip leading `(' in signature.
652
653         * jni.cc (add_char): Added missing `else'.
654
655         * jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
656         fails.
657
658 2000-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
659
660         * NEWS: Updated.
661
662         * java/lang/natRuntime.cc (_load): Include library path with
663         exception message.
664
665         * java/lang/natSystem.cc (init_properties): set java.lang.classpath 
666         property.
667
668         * java/lang/natThread.cc (dumpStack): Removed.
669         * java/lang/Thread.java (dumpStack): Implemented.
670
671 2000-02-15  Tom Tromey  <tromey@cygnus.com>
672
673         * java/lang/natRuntime.cc (_load): On Unix, prefix library name
674         with `lib' for loadLibrary.  Fixes PR gcj/150.
675
676 2000-02-14  Warren Levy  <warrenl@cygnus.com>
677
678         * gnu/gcj/math/MPN.java(findLowestBit): Made methods public.
679
680         * java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
681           New constructor.
682         (min): Implemented.
683         (max): Implemented.
684         (modPow): Rewritten to not use the naive, slow, brute force approach.
685         (isProbablePrime): Implemented.
686         (testBit): Implemented.
687         (flipBit): Implemented.
688         (getLowestSetBit): Implemented.
689
690 2000-02-16  Anthony Green  <green@redhat.com>
691
692         * configure.host: Use the same options for i386 and i486 as we do
693         for i586 and i686.
694
695 2000-02-12  Tom Tromey  <tromey@cygnus.com>
696
697         * java/io/File.java (createTempFile): Use low bits from counter,
698         not high bits.
699
700 Fri Feb 11 19:48:08 2000  Anthony Green  <green@cygnus.com>
701
702         * THANKS: More thanks.
703
704 2000-02-11  Tom Tromey  <tromey@cygnus.com>
705
706         * interpret.cc (continue1): Use STOREA, not STOREI, to implement
707         astore instruction.  From Hans Boehm.
708
709 2000-02-11  Warren Levy  <warrenl@cygnus.com>
710
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.
715         (swappedOp): ditto.
716         (bitOp): ditto.
717         (setBitOp): ditto.
718         (and): Implemented.
719         (or): Implemented.
720         (xor): Implemented.
721         (andNot): Implemented.
722         (clearBit): Implemented.
723         (setBit): Implemented.
724         (bitCount): Implemented.
725         (toByteArray): Implemented.
726
727 2000-02-11  Tom Tromey  <tromey@cygnus.com>
728
729         * java/io/File.java (nextValue): Now synchronized.
730
731 2000-02-10  Tom Tromey  <tromey@cygnus.com>
732
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
739         property.
740
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.
744
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):
749         Declare.
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.
759         Include RawData.h.
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.
787         (JNI_OK): Likewise.
788
789 2000-02-10  Andrew Haley  <aph@cygnus.com>
790
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,
795         op_putstatic insns.
796         * resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
797         Search class hierarchy for superclass vtable.
798
799         * java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
800         off the end of a pointer list.
801
802         * java/lang/natThread.cc (stop): Don't abort, throw an exception
803         instead.
804         (suspend): Ditto.
805         
806 2000-02-09  Tom Tromey  <tromey@cygnus.com>
807
808         * java/lang/natRuntime.cc (_load): Call add_library.
809         (loadLibraryInternal): Likewise.
810
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.
814
815 2000-02-08  Tom Tromey  <tromey@cygnus.com>
816
817         * java/util/Properties.java (setProperty): New method.
818         (store): New method.
819
820 2000-02-07  Tom Tromey  <tromey@cygnus.com>
821
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
825         library.
826         (loadLibrary): Likewise.
827         Include <jni.h>.
828         (_load): New method.
829         (loadLibrary, load): Removed.
830
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.
855
856         * interpret.cc (PUSHL): Don't use expression statement.
857         (PUSHD): Likewise.
858         (LOADL): Likewise.
859         (STOREL): Likewise.
860
861         * jni.cc (add_char): Conditional on INTERPRETER.
862         (mangled_name): Likewise.
863         (call): Likewise.
864         * include/java-interp.h (class _Jv_MethodBase): Conditional on
865         INTERPRETER.
866         (class _Jv_JNIMethod): Likewise.
867
868 2000-02-04  Warren Levy  <warrenl@cygnus.com>
869
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
873         <per@bothner.com>.
874         * java/math/BigInteger.java: New file.  Based primarily on
875         Kawa's IntNum.java by Per Bothner <per@bothner.com>.
876
877 2000-02-04  Tom Tromey  <tromey@cygnus.com>
878
879         * defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
880         pointers.
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
894         `_Jv_MethodBase'.
895
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.
901
902         * java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
903         Now static.
904
905 2000-02-04  Andrew Haley  <aph@cygnus.com>
906
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.
911
912 2000-02-03  Tom Tromey  <tromey@cygnus.com>
913
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
923         constructor.
924         (clone): New method.
925         * java/text/DateFormat.java (clone): New method.
926         * java/text/Collator.java (clone): New method.
927
928 2000-02-03  Tom Tromey  <tromey@cygnus.com>
929
930         * java/io/PipedOutputStream.java (write(byte[], int, int)): New
931         method.
932
933 2000-02-01  Tom Tromey  <tromey@cygnus.com>
934
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>.
941
942         * include/jni.h (class _Jv_JNIEnv): Corrected calls using `...'.
943
944         * include/jni.h (class _Jv_JNIEnv): Added all C++ inline methods.
945
946         * jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
947         (_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave
948         `locals == NULL'.
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.
954
955         * jni.cc (_Jv_JNI_GetField): Specialize for jobject.
956         (_Jv_JNI_GetStaticField): Likewise.
957
958 2000-01-31  Tom Tromey  <tromey@cygnus.com>
959
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,
965         <string.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
970         frame.
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
980         elements.
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.
1001
1002 Mon Jan 31 00:43:15 2000  Anthony Green  <green@redhat.com>
1003
1004         * gnu/gcj/convert/natIconv.cc (read): Minor fixes.
1005         (write): Ditto.
1006
1007 2000-01-30  Tom Tromey  <tromey@cygnus.com>
1008
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
1019         Output_iconv.java.
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.
1024
1025 2000-01-28  Tom Tromey  <tromey@cygnus.com>
1026
1027         * Makefile.in: Rebuilt.
1028         * Makefile.am (LIBFFIINCS): Added MULTIBUILDTOP.
1029
1030 2000-01-26  Tom Tromey  <tromey@cygnus.com>
1031
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
1041         as a friend.
1042         (java/lang/reflect/Method.h): Likewise.
1043         * include/jni.h (class _Jv_JNIEnv): Added `klass' member.  Use
1044         __GCJ_JNI_IMPL__.
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.
1057         Include Method.h.
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.
1070         Include method.h.
1071
1072         * resolve.cc (get_ffi_type_from_signature): Handle case where
1073         boolean is an int.
1074
1075 Tue Jan 25 08:51:16 2000  Tom Tromey  <tromey@ferrule.cygnus.com>
1076
1077         * interpret.cc (run): Don't call println.
1078         Don't include PrintStream.h.
1079
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
1083         _Jv_ushort.
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
1088         int.
1089
1090 2000-01-21  Tom Tromey  <tromey@cygnus.com>
1091
1092         * java/lang/reflect/natConstructor.cc (newInstance): Use
1093         _Jv_CallAnyMethodA.
1094         * include/jvm.h: Declare _Jv_CallAnyMethodA.
1095         * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
1096         from _Jv_CallNonvirtualMethodA.  Changed interface; overloaded.
1097         Include <jni.h>.
1098         (COPY): Removed.
1099         (invoke): Use _Jv_CallAnyMethodA.
1100         (VAL): Redefined.
1101         * java/lang/Class.h (Class): Declare JvGetFirstStaticField,
1102         JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
1103         functions.
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.
1124
1125         * boehm.cc (_Jv_MarkObj): Use getNextField, not
1126         getNextInstanceField.
1127
1128 2000-01-20  Tom Tromey  <tromey@cygnus.com>
1129
1130         * resolve.cc (StringClass): Removed.
1131         * defineclass.cc (StringClass): Removed.
1132
1133 2000-01-19  Bryce McKinlay  <bryce@albatross.co.nz>
1134
1135         * NEWS: updated.
1136
1137 2000-01-19  Tom Tromey  <tromey@cygnus.com>
1138
1139         * interpret.cc (PC_REGISTER_ASM): Removed.
1140
1141         * java/lang/natThrowable.cc: Don't use `#pragma implementation'.
1142         From Bryce McKinlay.
1143
1144         * All files: Updated copyright to reflect Cygnus purchase.
1145
1146 2000-01-18  Bryce McKinlay <bryce@albatross.co.nz>
1147
1148         * configure: Rebuilt.
1149         * configure.in: Recognize --disable-interpreter.
1150
1151 2000-01-18  Andrew Haley  <aph@cygnus.com>
1152
1153         * name-finder.cc (lookup): Check for dladdr function.
1154         acconfig.h (HAVE_DLADDR): Add.
1155         configure.in: Check for HAVE_DLADDR
1156         configure: Rebuilt.
1157         include/config.h.in:  Rebuilt.
1158
1159 2000-01-17  Andrew Haley  <aph@cygnus.com>
1160
1161         * prims.cc (_Jv_RunMain): Set the name of this executable.
1162
1163 2000-01-17  Tom Tromey  <tromey@cygnus.com>
1164
1165         * java/lang/natThrowable.cc (fillInStackTrace): Return `this' even
1166         when backtrace can't be computed.
1167
1168         * configure: Rebuilt.
1169         * configure.in: Fixed typo in AC_CONFIG_SUBDIRS call.
1170
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.
1176         Include Runtime.h.
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.
1189
1190 2000-01-15  Tom Tromey  <tromey@cygnus.com>
1191
1192         * prims.cc (_Jv_PrimClass): Use `JV_STATE_NOTHING', not `0'.
1193
1194 2000-01-14  Andrew Haley  <aph@cygnus.com>
1195
1196         * java/lang/natThrowable.cc: New file.
1197
1198         * java/lang/Throwable.java (fillInStackTrace): Make native.
1199         (printStackTrace): Call native method to do this.
1200         (Throwable): Call fillInStackTrace.
1201         (stackTrace): New variable.
1202         
1203         * include/jvm.h: Add _Jv_ThisExecutable functions.
1204         
1205         * prims.cc: (_Jv_execName): New variable.
1206         (catch_segv): Call fillInStackTrace.
1207         (catch_fpe): Ditto.
1208         (_Jv_ThisExecutable): New functions.
1209         (JvRunMain): Set the name of this executable.
1210
1211         * Makefile.am: Add java/lang/natThrowable.cc.
1212         Add name-finder.cc.
1213         * Makefile.in: Rebuilt.
1214
1215         * acconfig.h: Add HAVE_PROC_SELF_EXE.
1216
1217         * configure.in: Force link with __frame_state_for in
1218         FORCELIBGCCSPEC.  Add new checks for backtrace.
1219         * include/config.h.in: Rebuilt.
1220
1221         * name-finder.cc: New file.
1222         * include/name-finder.h: New file.
1223
1224 2000-01-16  Anthony Green  <green@cygnus.com>
1225
1226         * java/lang/StringBuffer.java (StringBuffer): Don't special case
1227         null argument.
1228
1229 2000-01-16  Jeff Sturm  <jsturm@sigma6.com>
1230
1231         * java/io/StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).
1232
1233 2000-01-13  Tom Tromey  <tromey@cygnus.com>
1234
1235         * java/lang/natClassLoader.cc (_Jv_FindClass): Register `loader',
1236         not system loader, as initiating loader.
1237
1238 2000-01-11  Tom Tromey  <tromey@cygnus.com>
1239
1240         * java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
1241         HP/UX.  From David Scott Urban.
1242
1243 2000-01-10  Jeff Sturm  <jsturm@sigma6.com>
1244
1245         * java/lang/natMath.cc (pow): Cast args to `double', not
1246         `jdouble'.
1247         (atan2): Likewise.
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"'.
1251
1252 2000-01-09  Anthony Green  <green@cygnus.com>
1253
1254         * java/lang/natString.cc (init): Test for overflow condition
1255         during out of bounds check.
1256         (getChars): Throw StringIndexOutOfBoundsException, not
1257         ArrayIndexOutOfBoundsException.
1258         (getBytes): Ditto.
1259         (regionMatches): Obey case option during string comparison.
1260
1261         * configure.host (ligcj_interpreter): New variable.  Enable
1262         interpreter by default on IA-32.
1263         * configure.in:  Examine libgcj_interpreter.
1264         * configure: Rebuilt.
1265
1266 2000-01-07  Tom Tromey  <tromey@cygnus.com>
1267
1268         * mauve-libgcj: Don't disable ClassTest.
1269
1270         * java/lang/natClass.cc (getClasses): Wrote.
1271
1272 2000-01-06  Tom Tromey  <tromey@cygnus.com>
1273
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'.
1277
1278 2000-01-05  Tom Tromey  <tromey@cygnus.com>
1279
1280         * java/lang/natClass.cc (getMethod): Compute offset relative to
1281         `klass's methods table, not `this's table.
1282
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
1288         argument arrays.
1289         (COPY): Set appropriate element in `values' vector.
1290
1291         * java/lang/natClass.cc: Include <gcj/method.h>.
1292
1293         * java/lang/Class.h (_getMethods): Correctly declare as private,
1294         not public.
1295
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.
1307
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.
1312
1313 2000-01-04  Tom Tromey  <tromey@cygnus.com>
1314
1315         * java/lang/Class.h (getSignature): Updated.
1316         * java/lang/Class.java (getSignature): Updated.
1317         * java/lang/natClass.cc (getSignature): Added `is_constructor'
1318         argument.
1319         (getConstructor): Ensure constructor is public.
1320         (_getConstructors): Check for public-ness of constructor when
1321         `declared' is false, not when it is true.
1322
1323 2000-01-04  Warren Levy  <warrenl@cygnus.com>
1324
1325         * java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
1326         comment.
1327         (receive): Set the sender's address in the DatagramPacket.
1328
1329 2000-01-04  Tom Tromey  <tromey@cygnus.com>
1330
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
1343         incorrect comment.
1344         (getMethod): Work correctly when class is primitive.
1345         (getDeclaredMethods): Likewise.  Compute offset using `method',
1346         not `mptr'.
1347         (getDeclaredMethod): Likewise.
1348         (getConstructor): Wrote.
1349         (ConstructorClass): New define.
1350         (getDeclaredConstructor): Wrote.
1351         (_getConstructors): New method.
1352         (_getFields): New method.
1353         (getFields): Wrote.
1354
1355         * Makefile.in: Rebuilt.
1356         * Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.
1357
1358         * prims.cc: Remove `#pragma implementation'.
1359         * gcj/array.h: Remove `#pragma interface'.
1360
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
1365         resolve.cc.
1366         (getSignature): New method.
1367         (getDeclaredMethod): Wrote.
1368         (getMethod): Wrote.
1369         Include StringBuffer.h.
1370         * java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
1371         as a friend.  Unconditionally declare _Jv_LookupDeclaredMethod as
1372         a friend.
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.
1397         (getType): Use it.
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.