OSDN Git Service

2000-04-08 Anthony Green <green@cygnus.com>
[pf3gnuchains/gcc-fork.git] / libjava / ChangeLog
1 2000-04-08  Anthony Green  <green@cygnus.com>
2
3         * posix-threads.cc (_Jv_MutexLock): Moved back to posix-threads.h.
4         (_Jv_MutexUnlock): Ditto.
5         * include/posix-threads.h (_Jv_MutexLock): From posix-threads.cc.
6         (_Jv_MutexUnlock): Ditto.
7
8 2000-04-08  Anthony Green  <green@cygnus.com>
9
10         * java/lang/StringBuffer.java (ensureCapacity): Don't call Math::max.
11         (ensureCapacity_unsynchronized): New private method.
12         (append): Use ensureCapacity_unsynchronized.
13
14 2000-04-08  Tom Tromey  <tromey@cygnus.com>
15
16         * Makefile.in: Rebuilt.
17         * Makefile.am (awt_java_source_files): Added new files.
18         * java/awt/IllegalComponentStateException.java: New file.
19         * java/awt/ItemSelectable.java: New file.
20         * java/awt/event/WindowEvent.java: Finished.
21         * java/awt/event/TextEvent.java: Finished.
22         * java/awt/event/ContainerEvent.java: New file.
23         * java/awt/Component.java (getX, getY): New methods.
24         * java/awt/event/PaintEvent.java: New file.
25         * java/awt/event/MouseEvent.java: New file.
26         * java/awt/ActiveEvent.java: New file.
27         * java/awt/event/KeyEvent.java: Finished.
28         * java/awt/event/ItemEvent.java: New file.
29         * java/awt/Adjustable.java: New file.
30         * java/awt/event/InputMethodEvent.java: New file.
31         * java/awt/event/InputEvent.java: Finished.
32         * java/awt/event/FocusEvent.java: New file.
33         * java/awt/event/MouseMotionAdapter.java: New file.
34         * java/awt/event/MouseAdapter.java: New file.
35         * java/awt/event/KeyAdapter.java: New file.
36         * java/awt/event/FocusAdapter.java: New file.
37         * java/awt/event/ContainerAdapter.java: New file.
38         * java/awt/event/ComponentEvent.java: Finished.
39         * java/awt/event/AdjustmentEvent.java: New file.
40         * java/awt/event/ComponentAdapter.java: New file.
41         * java/awt/event/ActionEvent.java: Finished.
42         * java/awt/event/MouseMotionListener.java: New file.
43         * java/awt/event/MouseListener.java: New file.
44         * java/awt/event/ItemListener.java: New file.
45         * java/awt/event/InputMethodListener.java: New file.
46         * java/awt/event/ContainerListener.java: New file.
47         * java/awt/event/FocusListener.java: New file.
48         * java/awt/event/ComponentListener.java: New file.
49         * java/awt/event/AWTEventListener.java: New file.
50         * java/awt/event/AdjustmentListener.java: New file.
51
52 2000-04-08  Anthony Green  <green@cygnus.com>
53
54         * java/lang/natObject.cc (_Jv_MonitorEnter): Only perform null
55         check when we have to.
56
57         * gcj/array.h: Mark elements(JArray<T>& x) and elements(JArray<T>*
58         x) as `inline'.
59
60         * java/util/StringTokenizer.java: Minor optimization.  Eliminates
61         one method call.
62
63         * java/util/Vector.java (VectorEnumeration.nextElement): Manually
64         inline hasMoreElements.
65
66 2000-04-05  Tom Tromey  <tromey@cygnus.com>
67
68         * configure: Rebuilt.
69         * configure.in: Recognize --enable-java-awt.
70         (AWT): New conditional.
71         * Makefile.in: Rebuilt.
72         * Makefile.am (toolexeclib_LTLIBRARIES): Build libgcjawt.la if
73         requested.
74         (libgcjawt_la_SOURCES): New macro.
75         (EXTRA_libgcjawt_la_SOURCES): Likewise.
76         (libgcjawt_la_DEPENDENCIES): Likewise.
77         (libgcjawt_la_LIBADD): Likewise.
78         (libgcjawt_la_LDFLAGS): Likewise.
79         (libgcj.zip): Depend on cond_java_awt_source_files
80         (cond_awt_java_source_files): New macro.
81         (MOSTLYCLEANFILES): Added awto_files.
82         (awto_files): New macro.  Use where javao_files used.
83         (nat_headers): Use cond_awt_java_source_files.
84
85 2000-04-04  Tom Tromey  <tromey@cygnus.com>
86
87         * Makefile.in: Rebuilt.
88         * Makefile.am (awt_java_source_files): Added AWTException.java.
89         * java/awt/AWTException.java: New file.
90
91 2000-04-03  Tom Tromey  <tromey@cygnus.com>
92
93         * include/jvm.h (_Jv_GetArrayElementFromElementType): More
94         commentary from Alex.
95
96         * Makefile.in: Rebuilt.
97         * Makefile.am ($(javao_files)): Depend on libgcj.zip.
98         From H.J. Lu.
99
100 Sun Apr  2 08:27:18 2000  Anthony Green  <green@redhat.com>
101
102         * configure: Rebuilt.
103         * configure.in: Add --disable-jvmpi.
104         * include/config.h.in: Rebuilt.
105         * acconfig.h: Add ENABLE_JVMPI.
106          
107         * include/jvm.h: Declare _Jv_DisableGC and _Jv_EnableGC.
108         (_Jv_JVMPI_Notify_OBJECT_ALLOC): New define.
109         (_Jv_JVMPI_Notify_THREAD_END): New define.
110         (_Jv_JVMPI_Notify_THREAD_END): New define.
111         * prims.cc (_Jv_JVMPI_Notify_OBJECT_ALLOC): Declare.
112         (_Jv_JVMPI_Notify_THREAD_END): Declare.
113         (_Jv_JVMPI_Notify_THREAD_END): Declare.
114
115         * prims.cc (_Jv_AllocObject): Generate JVMPI object allocation
116         events.
117
118         * java/lang/natThread.cc: Include JVMPI headers if necessary.
119         (finish_): Generate JVMPI thread end events.
120         (run_): Generate JVMPI thread start events.
121         * gnu/gcj/runtime/natFirstThread.cc (run): Call JNI_OnLoad for any
122         preloaded JNI library.
123         Include JVMPI headers if necessary.
124         (run): Generate JVMPI thread start events.
125
126         * boehm.cc: Define GC_disable and GC_enable.
127         (_Jv_DisableGC): New function.
128         (_Jv_EnableGC): New function.
129         (disable_gc_mutex): Declare.
130         * nogc.cc (_Jv_DisableGC): New function.
131         (_Jv_EnableGC): New function.
132           
133         * jni.cc (_Jv_JNI_GetEnv): Handle JVMPI interface requests.
134         (_Jv_JVMPI_Interface): Define.
135         (jvmpiEnableEvent): New function.
136         (_Jv_JNI_Init): Initialize _Jv_JVMPI_Interface.
137           
138         * include/jvmpi.h: New file.
139
140 2000-03-27  Bryce McKinlay  <bryce@albatross.co.nz>
141
142         * Makefile.in: New #defines and friends for Thread.h.
143         * Makefile.am: Ditto.
144         * posix-threads.cc: (struct starter): Remove `object'.
145         (_Jv_CondWait): Use interruptable condition variables and new
146         recursive mutexes. New return codes on interrupt or non-ownership
147         of mutex.
148         (_Jv_CondNotify): Ditto.
149         (_Jv_CondNotifyAll): Ditto.
150         (_Jv_ThreadInterrupt): Set thread interrupt flag directly. Interrupt
151         the target thread by signaling its wait condition.
152         (_Jv_ThreadInitData): Set `thread_obj' in the thread data struct,
153         not the starter struct. Initialize wait_mutex and wait_cond.
154         (_Jv_MutexLock): New recursive mutex implementation. Moved from 
155         posix-threads.h.
156         (_Jv_MutexUnlock): Ditto.
157         (really_start): Set info->data->thread from pthread_self() to work 
158         around a race condition. Destroy wait_mutex and wait_cond when run()
159         returns.
160         * java/lang/Thread.java: (isInterrupted_): Renamed to overloaded
161         `isInterrupted(boolean)'. Clear interrupted flag if clear_flag is
162         set.
163         startable_flag: New private field.
164         (Thread): Initialize `startable_flag'.
165         (toString): Check for null thread group.
166         * java/lang/natThread.cc: (struct natThread): New fields 
167         `join_mutex', `join_cond'. Removed fields `joiner', `next'.
168         (class locker): Removed.
169         (initialize_native): Initialize `join_cond' and `join_mutex'.
170         (interrupt): Now just calls _Jv_ThreadInterrupt().
171         (join): Simplified. Just wait on the target thread's join condition.
172         (finish_): Remove join list code. Unset thread group. Signal
173         potential joiners by notifying the dying threads join_cond.
174         (start): Check for illegal restarts.
175         * java/lang/natObject.cc: Check for return value of _Jv_CondWait and
176         act appropriatly.
177         * include/posix-threads.h: Remove all HAVE_RECURSIVE_MUTEX related
178         #defines and #ifdefs.
179         (struct _Jv_Thread_t): New fields `thread_obj', `wait_cond',
180         `wait_mutex', `next'.
181         (struct _Jv_ConditionVariable_t): Define as a struct instead of 
182         directly mapping to pthread_cond_t.
183         (struct _Jv_Mutex_t): New recursive implementation.
184         (_Jv_PthreadCheckMonitor): Reimplemented. Simple `owner' check.
185         _Jv_HaveCondDestroy: Never define this for posix-threads.
186         (_Jv_CondNotify): Remove inline implementation(s), prototype instead.
187         (_Jv_CondNotifyAll): Ditto.
188         (_Jv_MutexLock): Ditto.
189         (_Jv_MutexUnlock): Ditto.
190         (_Jv_MutexInit): Changed to reflect new mutex implementation.
191         (_Jv_MutexDestroy): Ditto.
192         (_Jv_CondDestroy): Removed.
193         (_Jv_PthreadGetMutex): Removed.
194         * include/win32-threads.h: (_Jv_CondNotify): Guess _JV_NOT_OWNER on an 
195         error. Add a FIXME about this.
196         (_Jv_CondNotifyAll): Ditto.
197         * win32-threads.cc: (_Jv_CondWait): Return 0 on a timeout. Guess 
198         _JV_NOT_OWNER on other errors. Add FIXME.
199
200 2000-03-26  Tom Tromey  <tromey@cygnus.com>
201
202         * jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception
203         set, throw it.
204         (call): Don't throw exception here.
205
206 2000-03-26  Tom Tromey  <tromey@cygnus.com>
207
208         * java/lang/mprec.h: Use SIZEOF_VOID_P.
209         * interpret.cc: Use SIZEOF_VOID_P.
210         * include/java-cpool.h (_Jv_storeLong): Use SIZEOF_VOID_P.
211         (_Jv_loadLong): Likewise.
212         (_Jv_storeDouble): Likewise.
213         * configure: Rebuilt.
214         * configure.in: Check size of void*.
215
216         * resolve.cc (ncode): Use FFI_PREP_RAW_CLOSURE and FFI_RAW_SIZE.
217
218 2000-03-26  Hans Boehm  <boehm@acm.org>
219
220         * include/java-cpool.h (_Jv_storeLong, _Jv_loadLong,
221         _Jv_storeDouble, _Jv_loadDouble): Define differently on 64 bit
222         machine.
223         * java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN or
224         __IEEE_LITTLE_ENDIAN appropriately on IA64.
225         * java/lang/mprec.h: Don't define Pack_32 on 64 bit machine.
226         * javaprims.h (_Jv_word): Added `l' and `d' entries in 64 bit
227         case.
228         * resolve.cc (FFI_PREP_RAW_CLOSURE): New define.
229         (FFI_RAW_SIZE): Likewise.
230         (_Jv_InterpMethod::ncode): Use them.
231         * interpret.cc (PUSHL, PUSHD, POPL, POPD, LOADL, LOADD, STOREL,
232         STORED): Define differently on a 64 bit machine.
233         (continue1): Use ffi_java_raw_call when appropriate.
234  
235 2000-03-24  Warren Levy  <warrenl@cygnus.com>
236
237         * java/math/BigInteger.java(divide): Handle the special case when
238         dividing by 1 and the high bit of the dividend is set.
239         (setShiftRight): Handle case when count == 0.
240
241 2000-03-24  Warren Levy  <warrenl@cygnus.com>
242
243         * java/awt/Font.java(isBold): Fix syntax error.
244         (isItalic): ditto.
245         * java/awt/Frame.java(postEvent): ditto.
246         * java/awt/Menu.java(postEvent): ditto.
247         * java/awt/MenuBar.java(postEvent): ditto.
248         * java/awt/Toolkit.java(init): Included a stub.
249
250 2000-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
251
252         * java/awt/Event.java: Add all the event type constants.
253         (Event): Implemented constructors.
254         (controlDown): Implemented.
255         (metaDown): Implemented.
256         (paramString): Stubbed.
257         (shiftDown): Implemented.
258         (toString): Implemented.
259         (translate): Implemented.
260
261 2000-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
262
263         * java/lang/natClass.cc (isInstance): Initialize `this'.
264         (isAssignableFrom): Initialize `this' and `klass'.
265         (_Jv_IsAssignableFrom): If an interface has no idt, it is not 
266         implemented by any loaded class, so return false.
267         * java/lang/natClass.cc (isInstance): Use _Jv_IsAssignableFrom(), 
268         not Class.isAssignableFrom(). Use JV_CLASS, not getClass().
269
270 2000-03-19  Warren Levy  <warrenl@cygnus.com>
271
272         * java/awt/Color.java: Specified java.io for Serializable.
273         * java/awt/Toolkit.java: Imported java.net.URL.
274
275 2000-03-19  Warren Levy  <warrenl@cygnus.com>
276
277         * java/awt/Color.java: Rewrote to be more memory efficient (& compile).
278
279 2000-03-16  Warren Levy  <warrenl@cygnus.com>
280
281         * java/awt/Color.java: New file.
282         * java/awt/Graphics.java: New file.
283         * java/awt/Image.java: New file.
284         * java/awt/Paint.java: New file.
285         * java/awt/PaintContext.java: New file.
286         * java/awt/Transparency.java: New file.
287         * java/util/Collection.java: New file.
288         * java/util/Comparator.java: New file.
289         * java/util/Iterator.java: New file.
290         * java/util/List.java: New file.
291         * java/util/ListIterator.java: New file.
292         * Makefile.am: Added above new files.
293         * Makefile.in: Rebuilt.
294
295         * java/awt/Font.java (PLAIN): New field.
296         (BOLD): New field.
297         (ITALIC): New field.
298         (ROMAN_BASELINE): New field.
299         (CENTER_BASELINE): New field.
300         (HANGING_BASELINE): New field.
301         (name): New field.
302         (style): New field.
303         (size): New field.
304         (pointSize): New field.
305         (Font): Implemented constructor.
306         (isPlain): Implemented method.
307         (isBold): Implemented method.
308         (isItalic): Implemented method.
309         (getName): Implemented method.
310         (getStyle): Implemented method.
311         (getSize): Implemented method.
312         (getSize2D): Implemented method.
313         (decode): Stubbed.
314         * java/awt/Frame.java (getFont): Stubbed.
315         (postEvent): Stubbed.
316         (remove): Stubbed.
317         * java/awt/Menu.java (postEvent): Stubbed.
318         * java/awt/MenuBar.java (getFont): Stubbed.
319         (postEvent): Stubbed.
320         * java/awt/Toolkit.java (getImage): Added abstract method.
321
322 2000-03-15  Tom Tromey  <tromey@cygnus.com>
323
324         * java/io/natFileDescriptorWin32.cc (winerr): Now static.
325
326         * prims.cc (win32_exception_handler): Reformatted.
327
328         * include/win32-threads.h (_Jv_HaveCondDestroy): New define.
329         (_Jv_HaveMutexDestroy): Likewise.
330
331 2000-03-15 Jon Beniston <jb7216@bristol.ac.uk>
332
333         * java/io/natFileDescriptorWin32.cc: New file.
334         * java/io/natFileWin32.cc: New file.
335         * java/net/natInetAddress.cc: Added conditional inclusion of
336         Windows / Winsock headers.
337         * java/net/natPlainDatagramSocketImpl.cc: Added conditional
338         inclusion of Windows / Winsock headers.
339         * java/net/natPlainSocketImpl.cc: Added conditional inclusion of
340         Windows / Winsock headers.
341         * include/win32-signal.h: New file.
342         * include/win32-threads.h: New file.
343         * win32-threads.cc: New file.
344         * exception.cc (win32_get_restart_frame): New function.
345         * prims.cc (win32_exception_handler): New function.
346         (main_init) Performs Winsock initialisation.
347         (main_init) Installs exeception handler.
348
349 2000-03-14  Tom Tromey  <tromey@cygnus.com>
350
351         * jni.cc (mangled_name): Fixed assertion.
352         (JNI_GetCreatedJavaVMs): Don't comment out `buf_len' argument;
353         turned assert into actual failure.
354
355 2000-03-09  Warren Levy  <warrenl@cygnus.com>
356
357         * java/security/Key.java(serialVersionUID): Set to 0 for now.
358         * java/security/interfaces/DSAPrivateKey.java(serialVersionUID): Ditto.
359         * java/security/interfaces/DSAPublicKey.java(serialVersionUID): Ditto.
360
361 2000-03-09  Warren Levy  <warrenl@cygnus.com>
362
363         * java/security/AlgorithmParameterGeneratorSpi.java: New file.
364         * java/security/DigestException.java: New file.
365         * java/security/GeneralSecurityException.java: New file.
366         * java/security/InvalidAlgorithmParameterException.java: New file.
367         * java/security/InvalidKeyException.java: New file.
368         * java/security/InvalidParameterException.java: New file.
369         * java/security/Key.java: New file.
370         * java/security/KeyException.java: New file.
371         * java/security/KeyPair.java: New file.
372         * java/security/KeyPairGenerator.java: New file.
373         * java/security/KeyPairGeneratorSpi.java: New file.
374         * java/security/NoSuchProviderException.java: New file.
375         * java/security/PrivateKey.java: New file.
376         * java/security/Provider.java: New file.
377         * java/security/PublicKey.java: New file.
378         * java/security/SecureRandom.java: New file.
379         * java/security/Security.java: New file.
380         * java/security/Signature.java: New file.
381         * java/security/SignatureException.java: New file.
382         * java/security/interfaces/DSAKey.java: New file.
383         * java/security/interfaces/DSAParams.java: New file.
384         * java/security/interfaces/DSAPrivateKey.java: New file.
385         * java/security/interfaces/DSAPublicKey.java: New file.
386         * java/security/interfaces/RSAPrivateCrtKey.java: New file.
387         * java/security/interfaces/RSAPrivateKey.java: New file.
388         * java/security/interfaces/RSAPublicKey.java: New file.
389         * java/security/spec/AlgorithmParameterSpec.java: New file.
390         * java/security/spec/InvalidKeySpecException.java: New file.
391         * java/security/spec/InvalidParameterSpecException.java: New file.
392         * java/security/spec/KeySpec.java: New file.
393         * java/security/spec/RSAPrivateCrtKeySpec.java: New file.
394         * java/security/spec/RSAPrivateKeySpec.java: New file.
395         * java/security/spec/RSAPublicKeySpec.java: New file.
396         * Makefile.am: Added above java.security files.
397         * Makefile.in: Rebuilt.
398
399         * java/security/MessageDigest.java: Rewritten.
400         * java/security/SecureClassLoader.java: Added JDK1.2 comment.
401
402 2000-03-09  Bryce McKinlay  <bryce@albatross.co.nz>
403
404         * README: Updated.
405
406 2000-03-09  Bryce McKinlay  <bryce@albatross.co.nz>
407
408         * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Call
409         _Jv_PrepareConstantTimeTables.
410         * java/lang/natClass.cc (_Jv_PrepareConstantTimeTables): Array
411         classes should have an IDT, so don't return if klass is an array
412         class.
413
414 2000-03-08  Tom Tromey  <tromey@cygnus.com>
415
416         * java/lang/reflect/natArray.cc (newInstance): Don't allow array
417         of `void' to be created.
418
419 2000-03-08  Warren Levy  <warrenl@cygnus.com>
420
421         * java/math/BigInteger.java(signum): Handle zero properly.
422
423 2000-03-07  Tom Tromey  <tromey@cygnus.com>
424
425         * All files: Updated copyright information.
426         * COPYING: New file.
427         * COPYING.LIB: Removed.
428         * LIBGCJ_LICENSE: We now use GPL + special exception.
429
430 2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>
431
432         * resolve.cc (_Jv_SearchMethodInClass): New function.
433         (_Jv_ResolvePoolEntry): Search superinterfaces for interface methods.
434         * java/lang/Class.h (_Jv_SearchMethodInClass): New prototype.
435
436 2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>
437
438         * java/lang/Class.h (union _Jv_IDispatchTable): New declaration.
439         (struct _Jv_ifaces): New declaration.
440         JV_CLASS: New macro definition.
441         (getComponentType): Relocate below isArray() for inlining.
442         (getModifiers): Declare `inline'.
443         (getSuperclass): Ditto.
444         (isArray): Ditto.
445         (isPrimitive): Ditto.
446         (_Jv_IsAssignableFrom): New prototype.
447         (_Jv_LookupInterfaceMethodIdx): New prototype. Predeclare with "C"
448         linkage.
449         (_Jv_InitClass): Move from natClass.cc. Declare `inline'.
450         Check for JV_STATE_DONE before invoking initializeClass().
451         (_Jv_PrepareConstantTimeTables): New prototype.
452         (_Jv_GetInterfaces): Ditto.
453         (_Jv_GenerateITable): Ditto.
454         (_Jv_GetMethodString): Ditto.
455         (_Jv_AppendPartialITable): Ditto.
456         (_Jv_FindIIndex): Ditto.
457         depth, ancestors, idt: New class fields.
458
459         * java/lang/natClass.cc (isAssignableFrom): Move functionality to
460         inline function `_Jv_IsAssignableFrom'. Use that function.
461         (isInstance): Declare `inline'.
462         (initializeClass): Get lock on class before checking `state'. Unlock 
463         before calling resolveClass0. Call _Jv_PrepareConstantTimeTables with 
464         the lock held.
465         (_Jv_LookupInterfaceMethod): Use _Jv_GetMessageString.
466         (_Jv_IsAssignableFrom): New inline function. Test assignability using 
467         class->depth and ancestor table.
468         (_Jv_IsInstanceOf): Use _Jv_IsAssignableFrom.
469         (_Jv_CheckCast): Move from prims.cc. Use JV_CLASS and
470         _Jv_IsAssignableFrom.
471         (_Jv_CheckArrayStore): Ditto.
472         (_Jv_LookupInterfaceMethodIdx): New function. 
473         INITIAL_IOFFSETS_LEN, INITIAL_IFACES_LEN: New #defines.
474         (_Jv_PrepareConstantTimeTables): New function.
475         (_Jv_IndexOf): Ditto.
476         (_Jv_GetInterfaces): Ditto.
477         (_Jv_GenerateITable): Ditto.
478         (_Jv_GetMethodString): Ditto.
479         (_Jv_AppendPartialITable): Ditto.
480         iindex_mutex, iindex_mutex_initialized: New static fields.
481         (_Jv_FindIIndex): New function.
482
483         * java/lang/natClassLoader.cc (_Jv_NewClass): Set new jclass fields.
484
485         * prims.cc (_Jv_CheckCast): Moved to natClass.cc.
486         (_Jv_CheckArrayStore): Ditto.
487         (JvNewCharArray, JvNewBooleanArray, JvNewByteArray, JvNewShortArray,
488         JvNewIntArray, JvNewLongArray, JvNewFloatArray, JvNewDoubleArray):
489         Moved to gcj/array.h.
490         (_Jv_Realloc): New function.
491
492         * gcj/cni.h: Move _Jv_PrimClass definitions to gcj/array.h.
493
494         * gcj/array.h: _Jv_PrimClass definitions moved from gcj/cni.h.
495         (JvNewCharArray, JvNewBooleanArray, JvNewByteArray,
496         JvNewShortArray, JvNewIntArray, JvNewLongArray, JvNewFloatArray,
497         JvNewDoubleArray): Implementations moved from prims.cc and
498         declared `inline'.
499
500         * gcj/javaprims.h (_Jv_Realloc): Prototype.
501
502         * include/jvm.h (_Jv_LookupInterfaceMethodIdx): Prototype.
503
504 2000-03-06  Tom Tromey  <tromey@cygnus.com>
505
506         * jni.cc (MARK_NONE): New define.
507         (MARK_USER): Likewise.
508         (MARK_SYSTEM): Likewise.
509         (struct _Jv_JNI_LocalFrame): Made `marker' bigger and `size'
510         smaller.
511         (_Jv_JNI_DeleteLocalRef): Use MARK_NONE in assert.
512         (_Jv_JNI_EnsureLocalCapacity): Use MARK_NONE.
513         (_Jv_JNI_PushLocalFrame): Use MARK_USER.
514         (_Jv_JNI_PopLocalFrame): New version with additional `stop'
515         argument.
516         (call): Use MARK_SYSTEM.
517         (_Jv_GetJNIEnvNewFrame): New function.
518         (_Jv_LookupJNIMethod): New function.
519         (_Jv_JNI_PopSystemFrame): New function.
520         (call): Use _Jv_JNI_PopSystemFrame and _Jv_LookupJNIMethod.
521
522 2000-03-05  Tom Tromey  <tromey@cygnus.com>
523
524         Fix for PR libgcj/43:
525         * include/Makefile.in: Rebuilt.
526         * include/Makefile.am (include_HEADERS): New define.
527
528 2000-03-05  Anthony Green  <green@redhat.com>
529
530         * gcj/javaprims.h ("Java"): Remove FirstThread.
531
532         * configure.host: Fix __NO_MATH_INLNES botch.
533
534         * Makefile.in: Rebuilt.
535         * Makefile.am (nat_source_files): Move natFirstThread.cc.
536         (gnu/gcj/runtime/FirstThread.h): Moved.
537         (ordinary_java_source_files): Move FirstThread.java.
538         * prims.cc: Deal with FirstThread movement.
539         (JvRunMain): Ditto.
540         (_Jv_RunMain): Ditto.
541
542         * gnu/gcj/runtime/FirstThread.java: Moved from java/lang.
543         * gnu/gcj/runtime/natFirstThread.cc: Ditto.
544
545 2000-03-05  Warren Levy  <warrenl@cygnus.com>
546
547         * java/net/DatagramSocket.java(DatagramSocket(int,InetAddress)):
548           Handle null addresses.
549
550 2000-03-04  Anthony Green  <green@redhat.com>
551
552         * configure.host (libgcj_flags): Define __NO_MATH_INLINES.
553         See PR gcj/151.
554
555 2000-03-04  Anthony Green  <green@redhat.com>
556
557         * configure: Rebuilt.
558         * configure.in (ZLIBTESTSPEC): New macro.
559         (GCTESTSPEC): New macro.
560         (LIBGCJTESTSPEC): New macro.
561         * libgcj-test.spec.in: New file.
562
563 2000-03-02  Tom Tromey  <tromey@cygnus.com>
564
565         * include/java-interp.h: Don't include MethodInvocation.h.
566         (class _Jv_InterpMethod): Don't make MethodInvocation a friend.
567         * Makefile.in: Rebuilt.
568         * Makefile.am (gnu/gcj/runtime/MethodInvocation.h): Removed.
569         (ordinary_java_source_files): Don't mention
570         MethodInvocation.java.
571         * gnu/gcj/runtime/MethodInvocation.java: Removed.
572         * interpret.cc (MethodInvocation::continue1): Removed.
573         (run): Handle exceptions here.
574         * java/lang/ClassLoader.java (defineClass1, defineClass2):
575         Removed.
576         * java/lang/natClassLoader.cc (defineClass0): Catch exceptions
577         here.
578         (defineClass2): Removed.
579
580         * java/lang/reflect/Method.java (hack_trampoline, hack_call):
581         Removed.
582         * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Catch
583         exceptions here.
584         (hack_call): Removed.
585
586         * java/lang/Class.h (Class): Removed hackRunInitializers,
587         hackTrampoline.
588         * java/lang/natClass.cc (hackRunInitializers): Removed.
589         (initializeClass): Catch exceptions here.
590         Include ExceptionInInitializerError.h.
591         * java/lang/Class.java (hackTrampoline, hackRunInitializers):
592         Removed.
593
594         * java/lang/Object.h (Object): Don't mention hack12_6.
595         * java/lang/natObject.cc (_Jv_FinalizeObject): Catch exceptions
596         here.
597         * java/lang/Object.java (hack12_6): Removed.
598
599         * java/lang/natThread.cc (run_): Renamed.  Catch exceptions here.
600         (start): Use run_, not run__.
601         * java/lang/Thread.java (run_): Renamed from run__; old run_
602         removed.
603
604         * jni.cc (_Jv_JNI_FindClass): Handle exceptions.
605         (_Jv_JNI_EnsureLocalCapacity): Likewise.
606         (_Jv_JNI_DefineClass): Likewise.
607         (_Jv_JNI_ThrowNew): Likewise.
608         (_Jv_JNI_AllocObject): Likewise.
609         (_Jv_JNI_GetAnyMethodID): Likewise.
610         (_Jv_JNI_CallAnyMethodV): Likewise.
611         (_Jv_JNI_CallAnyMethodA): Likewise.
612         (_Jv_JNI_CallAnyVoidMethodV): Likewise.
613         (_Jv_JNI_CallAnyVoidMethodA): Likewise.
614         (_Jv_JNI_GetAnyFieldID): Likewise.
615         (_Jv_JNI_NewString): Likewise.
616         (_Jv_JNI_NewStringUTF): Likewise.
617         (_Jv_JNI_GetStringUTFChars): Likewise.
618         (_Jv_JNI_NewObjectArray): Likewise.
619         (_Jv_JNI_NewPrimitiveArray): Likewise.
620         (_Jv_JNI_GetPrimitiveArrayRegion): Likewise.
621         (_Jv_JNI_GetStringRegion): Likewise.
622         (_Jv_JNI_GetStringUTFRegion): Likewise.
623         (_Jv_JNI_SetPrimitiveArrayRegion): Likewise.
624         (_Jv_JNI_MonitorEnter): Likewise.
625         (_Jv_JNI_MonitorExit): Likewise.
626         (_Jv_JNI_ToReflectedField): Likewise.
627         (_Jv_JNI_ToReflectedMethod): Likewise.
628         (_Jv_JNI_RegisterNatives): Likewise.
629         (_Jv_JNI_AttachCurrentThread): Likewise.
630         (_Jv_JNI_DestroyJavaVM): Likewise.
631
632 2000-02-28  Mo DeJong  <mdejong@cygnus.com>
633
634         * java/util/zip/ZipOutputStream.java(closeEntry) : Fixed
635         error caused by the incorrect casting of a long to an int.
636
637 2000-02-28  Mo DeJong  <mdejong@cygnus.com>
638
639         * java/util/zip/ZipOutputStream.java(write_entry) : Fixed
640         SIGSEV caused by use of the wrong instance variable.
641
642 2000-02-27  Bryce McKinlay  <bryce@albatross.co.nz>
643
644         * java/io/File.java (File(String, String)): For dirPath, treat an
645         empty String the same as `null'.
646
647 2000-02-26  Anthony Green  <green@cygnus.com>
648
649         * gnu/gcj/io/MimeTypes.java: Test for null.
650
651         * jni.cc (_Jv_JNI_AttachCurrentThread): Minor cleanup.
652         (JNI_GetCreatedJavaVMs): Remove compiler warning.
653
654         * java/net/URLConnection.java: Update copyright notice.
655
656 2000-02-25  Tom Tromey  <tromey@cygnus.com>
657
658         * jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on
659         `INTERPRETER'.
660
661 2000-02-25  Bryce McKinlay  <bryce@albatross.co.nz>
662
663         * java/net/URLConnection.java (initializeDateFormats): New
664         private method.
665         (getHeaderFieldDate): Call initializeDateFormats if required.
666         locale, dateFormat1, dateFormat2, dateFormat3: Don't initialize
667         these.
668         Fix for PR libgcj/38.
669
670 2000-02-24  Warren Levy  <warrenl@cygnus.com>
671
672         * java/math/BigInteger.java(ival): Made private.
673         (words): Ditto.
674         (neg): Ditto.
675
676 2000-02-20  Anthony Green  <green@cygnus.com>
677
678         * Makefile.in: Rebuilt.
679         * Makefile.am (ordinary_java_source_files): Add
680         gnu/gcj/io/DefaultMimeTypes.java and gnu/gcj/io/MimeTypes.java
681
682         * scripts/MakeDefaultMimeTypes.java: New file.
683         * scripts/mime.types: New file.
684         * scripts/classes.pl: Moved from top level.
685         * classes.pl: Moved to scripts directory.
686
687         * java/net/URLConnection.java: Implement guessContentTypeFromName.
688
689         * gnu/gcj/io/MimeTypes.java: New file.
690         * gnu/gcj/io/DefaultMimeTypes.java: New file.
691
692 2000-02-20  Tom Tromey  <tromey@cygnus.com>
693
694         * boehm.cc (_Jv_AllocBytes): Clear returned memory.
695
696 2000-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
697
698         * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
699         (setSize): ditto.
700
701 2000-02-18  Tom Tromey  <tromey@cygnus.com>
702
703         * include/jvm.h (_Jv_GetJavaVM): Declare.
704         * include/java-interp.h (_Jv_GetFirstMethod): New function.
705         (_Jv_MethodBase::get_method): New method.
706         (_Jv_JNIMethod::set_function): New method.
707         * jni.cc (_Jv_JNI_UnregisterNatives): New function.
708         (_Jv_JNI_RegisterNatives): New function.
709         (_Jv_JNIFunctions): Updated for new functions.
710         (_Jv_GetJavaVM): New function.
711         (_Jv_JNI_GetJavaVM): Use it.  Now static.
712         (_Jv_JNI_AttachCurrentThread): Create a new JNIEnv if this thread
713         is already a Java thread but does not have a JNIEnv yet.
714
715         * java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
716         function.
717
718 2000-02-17  Tom Tromey  <tromey@cygnus.com>
719
720         * gcj/field.h (_Jv_Field::getClass): Don't use JvAssert.
721         Fixes PR gcj/152.
722
723 2000-02-16  Tom Tromey  <tromey@cygnus.com>
724
725         * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
726
727         * jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
728         (_Jv_JNI_NewObject): Likewise.
729         (_Jv_JNI_NewObjectA): Likewise.
730         (_Jv_JNI_CallAnyMethodV): In constructor case, pass correct value
731         as "return" type to _Jv_CallAnyMethodA.
732         (_Jv_JNI_CallAnyMethodA): Likewise.
733         (_Jv_JNI_CallAnyVoidMethodV): Likewise.
734
735         * jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
736         findClass.
737
738 2000-02-15  Tom Tromey  <tromey@cygnus.com>
739
740         * resolve.cc (ncode): Set args_raw_size.  Compute jni_cif and
741         jni_arg_types.
742         (init_cif): Added `rtype_p' argument.
743         * include/java-interp.h (class _Jv_MethodBase): Added
744         args_raw_size.
745         (class _Jv_InterpMethod): Removed args_raw_size.
746         (class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields.
747         * jni.cc (call): Pass JNIEnv and (for static methods only) the
748         class pointer as well as the ordinary arguments.
749
750         * jni.cc (mangled_name): Skip leading `(' in signature.
751
752         * jni.cc (add_char): Added missing `else'.
753
754         * jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
755         fails.
756
757 2000-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
758
759         * NEWS: Updated.
760
761         * java/lang/natRuntime.cc (_load): Include library path with
762         exception message.
763
764         * java/lang/natSystem.cc (init_properties): set java.lang.classpath 
765         property.
766
767         * java/lang/natThread.cc (dumpStack): Removed.
768         * java/lang/Thread.java (dumpStack): Implemented.
769
770 2000-02-15  Tom Tromey  <tromey@cygnus.com>
771
772         * java/lang/natRuntime.cc (_load): On Unix, prefix library name
773         with `lib' for loadLibrary.  Fixes PR gcj/150.
774
775 2000-02-14  Warren Levy  <warrenl@cygnus.com>
776
777         * gnu/gcj/math/MPN.java(findLowestBit): Made methods public.
778
779         * java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
780           New constructor.
781         (min): Implemented.
782         (max): Implemented.
783         (modPow): Rewritten to not use the naive, slow, brute force approach.
784         (isProbablePrime): Implemented.
785         (testBit): Implemented.
786         (flipBit): Implemented.
787         (getLowestSetBit): Implemented.
788
789 2000-02-16  Anthony Green  <green@redhat.com>
790
791         * configure.host: Use the same options for i386 and i486 as we do
792         for i586 and i686.
793
794 2000-02-12  Tom Tromey  <tromey@cygnus.com>
795
796         * java/io/File.java (createTempFile): Use low bits from counter,
797         not high bits.
798
799 Fri Feb 11 19:48:08 2000  Anthony Green  <green@cygnus.com>
800
801         * THANKS: More thanks.
802
803 2000-02-11  Tom Tromey  <tromey@cygnus.com>
804
805         * interpret.cc (continue1): Use STOREA, not STOREI, to implement
806         astore instruction.  From Hans Boehm.
807
808 2000-02-11  Warren Levy  <warrenl@cygnus.com>
809
810         * java/math/BigInteger.java(BigInteger(String, int)): New constructor.
811         (BigInteger(String)): New constructor.
812         (not): Rewritten using version from Kawa's BitOps class.
813         (valueOf): New private methods from Kawa's BitOps class.
814         (swappedOp): ditto.
815         (bitOp): ditto.
816         (setBitOp): ditto.
817         (and): Implemented.
818         (or): Implemented.
819         (xor): Implemented.
820         (andNot): Implemented.
821         (clearBit): Implemented.
822         (setBit): Implemented.
823         (bitCount): Implemented.
824         (toByteArray): Implemented.
825
826 2000-02-11  Tom Tromey  <tromey@cygnus.com>
827
828         * java/io/File.java (nextValue): Now synchronized.
829
830 2000-02-10  Tom Tromey  <tromey@cygnus.com>
831
832         * java/io/natFileDescriptorPosix.cc (open): Recognize EXCL flag.
833         * java/io/FileDescriptor.java (EXCL): New static field.
834         * java/io/File.java (tmpdir): New static field.
835         (createTempFile): New method.
836         (nextValue): New method.
837         * java/lang/natSystem.cc (init_properties): Set java.io.tmpdir
838         property.
839
840         * include/jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
841         (jboolean): Declare as an attributed int, not a bool.
842         (_Jv_func): Declare differently for C.
843
844         * gnu/gcj/jni/natNativeThread.cc: New file.
845         * gnu/gcj/jni/NativeThread.java: New file.
846         * java/lang/Thread.java (data): Now a RawData.
847         * include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv):
848         Declare.
849         * Makefile.in: Rebuilt.
850         * Makefile.am (java/lang/Thread.h): New target.
851         (ordinary_java_source_files): Added NativeThread.java.
852         (nat_source_files): Added natNativeThread.cc.
853         * java/lang/natThread.cc: Include <jni.h>
854         (struct natThread): Added `jni_env' field.
855         (_Jv_GetCurrentJNIEnv): New function.
856         (_Jv_SetCurrentJNIEnv): Likewise.
857         (initialize_native): Initialize jni_env.
858         Include RawData.h.
859         * jni.cc (ThreadGroupClass): New define.
860         (_Jv_JNI_InvokeFunctions): New structure.
861         (JNI_GetCreatedJavaVMs): New function.
862         (the_vm): New global.
863         (JNI_GetDefaultJavaVMInitArgs): New function.
864         Include NativeThread.h.
865         (NativeThreadClass): New define.
866         (_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1.
867         (_Jv_JNI_DestroyJavaVM): New function.
868         (_Jv_JNI_AttachCurrentThread): New function.
869         (_Jv_JNI_DetachCurrentThread): New function.
870         (_Jv_JNI_GetEnv): New function.
871         (JNI_CreateJavaVM): New function.
872         (_Jv_JNI_GetJavaVM): New function.
873         (_Jv_JNIFunctions): Added entry for GetJavaVM.
874         * include/jni.h (JavaVMAttachArgs): New structure.
875         (JNI_EDETACHED): New define.
876         (JNI_EVERSION): Likewise.
877         (JavaVM): Define properly.
878         (struct JNIInvokeInterface): New structure.
879         (class _Jv_JavaVM): New class.
880         (JNI_OnLoad, JNI_OnUnload): Declare.
881         (JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM,
882         JNI_GetCreatedJavaVMs): Declare.
883         (JavaVMInitArgs): New typedef.
884         (JavaVMOption): Likewise.
885         (JNI_ERR): New define.
886         (JNI_OK): Likewise.
887
888 2000-02-10  Andrew Haley  <aph@cygnus.com>
889
890         * interpret.cc: Don't include fdlibm.h.
891         Replace #if with #ifdef throughout.
892         Declare extern __ieee754_fmod.
893         (continue1): Remove op_getfield, op_getstatic, op_putfield,
894         op_putstatic insns.
895         * resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
896         Search class hierarchy for superclass vtable.
897
898         * java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
899         off the end of a pointer list.
900
901         * java/lang/natThread.cc (stop): Don't abort, throw an exception
902         instead.
903         (suspend): Ditto.
904         
905 2000-02-09  Tom Tromey  <tromey@cygnus.com>
906
907         * java/lang/natRuntime.cc (_load): Call add_library.
908         (loadLibraryInternal): Likewise.
909
910         * gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
911         iconv_close when handle is not NULL.  Thanks to Andrew Haley.
912         (Output_iconv::finalize): Likewise.
913
914 2000-02-08  Tom Tromey  <tromey@cygnus.com>
915
916         * java/util/Properties.java (setProperty): New method.
917         (store): New method.
918
919 2000-02-07  Tom Tromey  <tromey@cygnus.com>
920
921         * java/lang/Runtime.java (_load): Declare.
922         (load, loadLibrary): Wrote in terms of _load.
923         * java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in
924         library.
925         (loadLibrary): Likewise.
926         Include <jni.h>.
927         (_load): New method.
928         (loadLibrary, load): Removed.
929
930         * jni.cc (ThrowableClass): New define.
931         (_Jv_JNI_Throw): Check argument.
932         (_Jv_JNI_ThrowNew): Likewise.
933         (wrap_value): Don't wrap object if it is NULL.
934         (_Jv_JNI_DefineClass): Use wrap_value.
935         (_Jv_JNI_FindClass): Likewise.
936         (_Jv_JNI_GetSuperclass): Likewise.
937         (_Jv_JNI_ExceptionOccurred): Likewise.
938         (_Jv_JNI_AllocObject): Likewise.
939         (_Jv_JNI_GetObjectClass): Likewise.
940         (_Jv_JNI_NewString): Likewise.
941         (_Jv_JNI_NewStringUTF): Likewise.
942         (_Jv_JNI_NewObjectArray): Likewise.
943         (_Jv_JNI_GetObjectArrayElement): Likewise.
944         (_Jv_JNI_NewPrimitiveArray): Likewise.
945         (_Jv_JNI_ToReflectedField): Likewise.
946         (_Jv_JNI_ToReflectedMethod): Likewise.
947         (_Jv_JNI_AllocObject): Check argument.
948         (_Jv_JNI_NewObjectV): Likewise.
949         (_Jv_JNI_NewObject): Likewise.
950         (_Jv_JNI_NewObjectA): Likewise.
951         (_Jv_JNI_GetObjectClass): Likewise.
952         (_Jv_JNI_GetField): Likewise.
953         (_Jv_JNI_SetField): Likewise.
954
955         * interpret.cc (PUSHL): Don't use expression statement.
956         (PUSHD): Likewise.
957         (LOADL): Likewise.
958         (STOREL): Likewise.
959
960         * jni.cc (add_char): Conditional on INTERPRETER.
961         (mangled_name): Likewise.
962         (call): Likewise.
963         * include/java-interp.h (class _Jv_MethodBase): Conditional on
964         INTERPRETER.
965         (class _Jv_JNIMethod): Likewise.
966
967 2000-02-04  Warren Levy  <warrenl@cygnus.com>
968
969         * Makefile.am: Added MPN.java and BigInteger.java.
970         * Makefile.in: Rebuilt.
971         * gnu/gcj/math/MPN.java: New file.  From Kawa by Per Bothner
972         <per@bothner.com>.
973         * java/math/BigInteger.java: New file.  Based primarily on
974         Kawa's IntNum.java by Per Bothner <per@bothner.com>.
975
976 2000-02-04  Tom Tromey  <tromey@cygnus.com>
977
978         * defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
979         pointers.
980         (handleMethodsEnd): Fixed error messages.  Create a _Jv_JNIMethod
981         if the method is native.
982         * resolve.cc (ncode): Don't handle native methods.
983         (_Jv_JNIMethod::ncode): New method.
984         (_Jv_PrepareClass): Handle native methods.
985         * jni.cc (call): Renamed from _Jv_JNI_conversion_call.
986         Include AbstractMethodError.h.
987         (add_char): New function.
988         (mangled_name): Likewise.
989         * include/java-interp.h (class _Jv_JNIMethod): New class.
990         (class _Jv_MethodBase): New class.
991         (class _Jv_InterpMethod): Derive from _Jv_MethodBase.
992         (_Jv_InterpClass): Changed `interpreted_methods' field to type
993         `_Jv_MethodBase'.
994
995         * include/jvm.h (_Jv_FindSymbolInExecutable): Declare.
996         * java/lang/natRuntime.cc (libraries_size, libraries_count,
997         libraries): New globals.
998         (add_library): New function.
999         (_Jv_FindSymbolInExecutable): New function.
1000
1001         * java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
1002         Now static.
1003
1004 2000-02-04  Andrew Haley  <aph@cygnus.com>
1005
1006         * java/lang/Throwable.java (CPlusPlusDemangler): New class.
1007         (printStackTrace): Use a CPlusPlusDemangler to demangle names.
1008         * java/lang/natThrowable.cc (printRawStackTrace): Rename
1009         printStackTrace to printRawStackTrace.
1010
1011 2000-02-03  Tom Tromey  <tromey@cygnus.com>
1012
1013         * java/util/Calendar.java (toString): New method.
1014         * java/util/SimpleTimeZone.java (clone): New method.
1015         (toString): New method.
1016         * java/util/TimeZone.java (clone): New method.
1017         * java/text/SimpleDateFormat.java (clone): New method.
1018         * java/text/NumberFormat.java (clone): New method.
1019         (equals): New method.
1020         * java/text/Format.java (clone): New method.
1021         * java/text/DateFormatSymbols.java (DateFormatSymbols): New
1022         constructor.
1023         (clone): New method.
1024         * java/text/DateFormat.java (clone): New method.
1025         * java/text/Collator.java (clone): New method.
1026
1027 2000-02-03  Tom Tromey  <tromey@cygnus.com>
1028
1029         * java/io/PipedOutputStream.java (write(byte[], int, int)): New
1030         method.
1031
1032 2000-02-01  Tom Tromey  <tromey@cygnus.com>
1033
1034         * include/java-interp.h (_Jv_JNI_conversion_call): Declare.
1035         * resolve.cc (ncode): Use _Jv_JNI_conversion_call when
1036         constructing the closure if the function is native.
1037         * jni.cc (_Jv_JNI_conversion_call): Now returns `void'.  No longer
1038         a template function, #if'd out, or static.
1039         Include <java-interp.h>.
1040
1041         * include/jni.h (class _Jv_JNIEnv): Corrected calls using `...'.
1042
1043         * include/jni.h (class _Jv_JNIEnv): Added all C++ inline methods.
1044
1045         * jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
1046         (_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave
1047         `locals == NULL'.
1048         (wrap_value): New function.
1049         (_Jv_JNI_CallAnyMethodV): Use it.
1050         (_Jv_JNI_CallAnyMethodA): Likewise.
1051         (_Jv_JNI_GetField): Use wrap_value; removed specialized version.
1052         (_Jv_JNI_GetStaticField): Likewise.
1053
1054         * jni.cc (_Jv_JNI_GetField): Specialize for jobject.
1055         (_Jv_JNI_GetStaticField): Likewise.
1056
1057 2000-01-31  Tom Tromey  <tromey@cygnus.com>
1058
1059         * prims.cc (_Jv_MallocUnchecked): New function.
1060         (main_init): Call _Jv_JNI_Init.
1061         * include/jvm.h (_Jv_MallocUnchecked): Declare.
1062         (_Jv_JNI_Init): Declare.
1063         * jni.cc: Include Hashtable.h, OutOfMemoryError.h, Integer.h,
1064         <string.h>.
1065         (_Jv_JNI_NewGlobalRef): New function.
1066         (_Jv_JNI_DeleteGlobalRef): New function.
1067         (_Jv_JNI_DeleteLocalRef): New function.
1068         (_Jv_JNI_conversion_call): Initialize and clear local reference
1069         frame.
1070         (_Jv_JNI_NewLocalRef): New function.
1071         (struct _Jv_JNI_LocalFrame): New structure.
1072         (_Jv_JNI_PushLocalFrame): New function.
1073         (_Jv_JNI_EnsureLocalCapacity): New function.
1074         (FRAME_SIZE): New define.
1075         (_Jv_JNI_GetStringChars): Mark string, not characters.
1076         (_Jv_JNI_ReleaseStringChars): Unmark string, not characters.
1077         (_Jv_JNI_GetPrimitiveArrayElements): Mark array, not elements.
1078         (_Jv_JNI_ReleasePrimitiveArrayElements): Unmark array, not
1079         elements.
1080         (_Jv_JNI_DefineClass): Make return value a local ref.
1081         (_Jv_JNI_FindClass): Likewise.
1082         (_Jv_JNI_GetSuperclass): Likewise.
1083         (_Jv_JNI_ExceptionOccurred): Likewise.
1084         (_Jv_JNI_AllocObject): Likewise.
1085         (_Jv_JNI_GetObjectClass): Likewise.
1086         (_Jv_JNI_CallAnyMethodV): Likewise.
1087         (_Jv_JNI_NewString): Likewise.
1088         (_Jv_JNI_NewStringUTF): Likewise.
1089         (_Jv_JNI_NewObjectArray): Likewise.
1090         (_Jv_JNI_GetObjectArrayElement): Likewise.
1091         (_Jv_JNI_ToReflectedField): Likewise.
1092         (_Jv_JNI_ToReflectedMethod): Likewise.
1093         (_Jv_JNIFunctions): Updated table for new functions.
1094         (_Jv_JNI_Init): New function.
1095         (mark_for_gc): Wrote.
1096         (unmark_for_gc): Wrote.
1097         * include/jni.h (struct JNINativeInterface): Removed name from
1098         PopLocalFrame parameter.
1099         (class _Jv_JNIEnv): Added `locals' field.
1100
1101 Mon Jan 31 00:43:15 2000  Anthony Green  <green@redhat.com>
1102
1103         * gnu/gcj/convert/natIconv.cc (read): Minor fixes.
1104         (write): Ditto.
1105
1106 2000-01-30  Tom Tromey  <tromey@cygnus.com>
1107
1108         * include/config.h.in: Rebuilt.
1109         * acconfig.h (HAVE_ICONV): Define.
1110         * configure: Rebuilt.
1111         * configure.in: Check for `iconv' function.
1112         * gnu/gcj/convert/BytesToUnicode.java (getDecoder): Try iconv if
1113         no specific encoder exists.
1114         * gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Try iconv if
1115         no specific encoder exists.
1116         * Makefile.in: Rebuilt.
1117         * Makefile.am (convert_source_files): Mention Input_iconv.java and
1118         Output_iconv.java.
1119         (nat_source_files): Added natIconv.cc.
1120         * gnu/gcj/convert/natIconv.cc: New file.
1121         * gnu/gcj/convert/Input_iconv.java: New file.
1122         * gnu/gcj/convert/Output_iconv.java: New file.
1123
1124 2000-01-28  Tom Tromey  <tromey@cygnus.com>
1125
1126         * Makefile.in: Rebuilt.
1127         * Makefile.am (LIBFFIINCS): Added MULTIBUILDTOP.
1128
1129 2000-01-26  Tom Tromey  <tromey@cygnus.com>
1130
1131         * gcj/method.h (JvNumMethods): Moved from Class.h.
1132         (JvGetFirstMethod): Likewise.
1133         * java/lang/Class.h (Object): Updated decl of
1134         _Jv_JNI_ToReflectedField.
1135         (Object): Added _Jv_JNI_ToReflectedMethod as a friend.
1136         * Makefile.in: Rebuilt.
1137         * Makefile.am (java/lang/reflect/Field.h): Added `jboolean'
1138         argument of _Jv_JNI_ToReflectedField.
1139         (java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod
1140         as a friend.
1141         (java/lang/reflect/Method.h): Likewise.
1142         * include/jni.h (class _Jv_JNIEnv): Added `klass' member.  Use
1143         __GCJ_JNI_IMPL__.
1144         (jweak): New typedef.
1145         (struct JNINativeInterface): Correctly declare remaining entries.
1146         * jni.cc: Include Class.h, ClassLoader.h.
1147         (_Jv_JNI_FindClass): New function.
1148         (_Jv_JNI_DefineClass): New function.
1149         (_Jv_JNI_conversion_call): New function.
1150         (_Jv_JNI_FindClass): Use current class loader to find class.
1151         (_Jv_JNI_ExceptionCheck): New function.
1152         (_Jv_JNI_FromReflectedField): Now static.
1153         (MethodClass): New define.
1154         (_Jv_JNI_FromReflectedMethod): New function.
1155         (_Jv_JNI_ToReflectedMethod): Likewise.
1156         Include Method.h.
1157         (_Jv_JNI_IsAssignableFrom): Renamed.
1158         (_Jv_JNI_GetStringRegion): New function.
1159         Include StringIndexOutOfBoundsException.h.
1160         (_Jv_JNI_GetStringUTFRegion): New function.
1161         (_Jv_JNIFunctions): Updated for new functions.
1162         (_Jv_JNI_GetPrimitiveArrayCritical): New function
1163         (_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise.
1164         (_Jv_JNI_GetStringCritical): New function.
1165         (_Jv_JNI_ReleaseStringCritical): Likewise.
1166         (get_throwable): Removed.
1167         (GCJ_JV_JNIENV_FRIEND): Removed.
1168         (__GCJ_JNI_IMPL__): Define.
1169         Include method.h.
1170
1171         * resolve.cc (get_ffi_type_from_signature): Handle case where
1172         boolean is an int.
1173
1174 Tue Jan 25 08:51:16 2000  Tom Tromey  <tromey@ferrule.cygnus.com>
1175
1176         * interpret.cc (run): Don't call println.
1177         Don't include PrintStream.h.
1178
1179         * gcj/field.h (struct _Jv_Field): Use "jshort" as type for
1180         nameIndex.  Use "jint" as type for boffset.
1181         * java/lang/Class.h (struct _Jv_Method): Made accflags a
1182         _Jv_ushort.
1183         (Class): Likewise.  Also changed type of method_count,
1184         vtable_method_count, size_in_bytes, field_count,
1185         static_field_count, interface_count.
1186         * gcj/array.h (__JArray): Made `length' a const jsize, not an
1187         int.
1188
1189 2000-01-21  Tom Tromey  <tromey@cygnus.com>
1190
1191         * java/lang/reflect/natConstructor.cc (newInstance): Use
1192         _Jv_CallAnyMethodA.
1193         * include/jvm.h: Declare _Jv_CallAnyMethodA.
1194         * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
1195         from _Jv_CallNonvirtualMethodA.  Changed interface; overloaded.
1196         Include <jni.h>.
1197         (COPY): Removed.
1198         (invoke): Use _Jv_CallAnyMethodA.
1199         (VAL): Redefined.
1200         * java/lang/Class.h (Class): Declare JvGetFirstStaticField,
1201         JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
1202         functions.
1203         (struct _Jv_Method): Added getNextMethod method.
1204         (JvNumMethods): New function.
1205         (JvGetFirstMethod): Likewise.
1206         * gcj/field.h (JvGetFirstStaticField): New function.
1207         (JvNumStaticFields): Likewise.
1208         (getNextField): Renamed from getNextInstanceField.
1209         (struct _Jv_Field): New method getClass.
1210         * jni.cc: Wrote many new functions.
1211         * include/jni.h (JNI_TRUE): Define.
1212         (JNI_FALSE): Likewise.
1213         (jobject, jclass, jstring, jarray, jthrowable, jobjectArray,
1214         jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray,
1215         jcharArray, jfloatArray, jdoubleArray): New typedefs.
1216         (jfieldID, jmethodID): Likewise.
1217         (JNI_COMMIT, JNI_ABORT): New defines.
1218         (JNINativeMethod): New struct.
1219         (struct JNINativeInterface): Correctly declared more entries.
1220         (class _Jv_JNIEnv): Added `ex' member.
1221         (JNI_VERSION_1_1): New define.
1222         (JNI_VERSION_1_2): Likewise.
1223
1224         * boehm.cc (_Jv_MarkObj): Use getNextField, not
1225         getNextInstanceField.
1226
1227 2000-01-20  Tom Tromey  <tromey@cygnus.com>
1228
1229         * resolve.cc (StringClass): Removed.
1230         * defineclass.cc (StringClass): Removed.
1231
1232 2000-01-19  Bryce McKinlay  <bryce@albatross.co.nz>
1233
1234         * NEWS: updated.
1235
1236 2000-01-19  Tom Tromey  <tromey@cygnus.com>
1237
1238         * interpret.cc (PC_REGISTER_ASM): Removed.
1239
1240         * java/lang/natThrowable.cc: Don't use `#pragma implementation'.
1241         From Bryce McKinlay.
1242
1243         * All files: Updated copyright to reflect Cygnus purchase.
1244
1245 2000-01-18  Bryce McKinlay <bryce@albatross.co.nz>
1246
1247         * configure: Rebuilt.
1248         * configure.in: Recognize --disable-interpreter.
1249
1250 2000-01-18  Andrew Haley  <aph@cygnus.com>
1251
1252         * name-finder.cc (lookup): Check for dladdr function.
1253         acconfig.h (HAVE_DLADDR): Add.
1254         configure.in: Check for HAVE_DLADDR
1255         configure: Rebuilt.
1256         include/config.h.in:  Rebuilt.
1257
1258 2000-01-17  Andrew Haley  <aph@cygnus.com>
1259
1260         * prims.cc (_Jv_RunMain): Set the name of this executable.
1261
1262 2000-01-17  Tom Tromey  <tromey@cygnus.com>
1263
1264         * java/lang/natThrowable.cc (fillInStackTrace): Return `this' even
1265         when backtrace can't be computed.
1266
1267         * configure: Rebuilt.
1268         * configure.in: Fixed typo in AC_CONFIG_SUBDIRS call.
1269
1270         * java/lang/Runtime.java (loadLibraryInternal): Declare.
1271         * java/lang/natClassLoader.cc (_Jv_FindClass): Removed dead copy.
1272         (_Jv_FindClassInCache): Likewise.
1273         (_Jv_FindClass): Don't conditionalize body on INTERPRETER.
1274         (findSystemClass): Try to load class from compiled module.
1275         Include Runtime.h.
1276         * java/lang/natRuntime.cc (load): Use UTF-8 copy of filename.
1277         (loadLibrary): Likewise.
1278         (lt_preloaded_symbols): Define.
1279         (loadLibraryInternal): New method.
1280         * include/config.h.in: Rebuilt.
1281         * acconfig.h (USE_LTDL): Added.
1282         * Makefile.am (SUBDIRS): Added $(DIRLTDL).
1283         (INCLUDES): Added $(INCLTDL).
1284         (libgcj_la_DEPENDENCIES): Added $(LIBLTDL).
1285         (libgcj_la_LIBADD): Likewise.
1286         * aclocal.m4, configure: Rebuilt.
1287         * configure.in: Added libltdl support.
1288
1289 2000-01-15  Tom Tromey  <tromey@cygnus.com>
1290
1291         * prims.cc (_Jv_PrimClass): Use `JV_STATE_NOTHING', not `0'.
1292
1293 2000-01-14  Andrew Haley  <aph@cygnus.com>
1294
1295         * java/lang/natThrowable.cc: New file.
1296
1297         * java/lang/Throwable.java (fillInStackTrace): Make native.
1298         (printStackTrace): Call native method to do this.
1299         (Throwable): Call fillInStackTrace.
1300         (stackTrace): New variable.
1301         
1302         * include/jvm.h: Add _Jv_ThisExecutable functions.
1303         
1304         * prims.cc: (_Jv_execName): New variable.
1305         (catch_segv): Call fillInStackTrace.
1306         (catch_fpe): Ditto.
1307         (_Jv_ThisExecutable): New functions.
1308         (JvRunMain): Set the name of this executable.
1309
1310         * Makefile.am: Add java/lang/natThrowable.cc.
1311         Add name-finder.cc.
1312         * Makefile.in: Rebuilt.
1313
1314         * acconfig.h: Add HAVE_PROC_SELF_EXE.
1315
1316         * configure.in: Force link with __frame_state_for in
1317         FORCELIBGCCSPEC.  Add new checks for backtrace.
1318         * include/config.h.in: Rebuilt.
1319
1320         * name-finder.cc: New file.
1321         * include/name-finder.h: New file.
1322
1323 2000-01-16  Anthony Green  <green@cygnus.com>
1324
1325         * java/lang/StringBuffer.java (StringBuffer): Don't special case
1326         null argument.
1327
1328 2000-01-16  Jeff Sturm  <jsturm@sigma6.com>
1329
1330         * java/io/StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).
1331
1332 2000-01-13  Tom Tromey  <tromey@cygnus.com>
1333
1334         * java/lang/natClassLoader.cc (_Jv_FindClass): Register `loader',
1335         not system loader, as initiating loader.
1336
1337 2000-01-11  Tom Tromey  <tromey@cygnus.com>
1338
1339         * java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
1340         HP/UX.  From David Scott Urban.
1341
1342 2000-01-10  Jeff Sturm  <jsturm@sigma6.com>
1343
1344         * java/lang/natMath.cc (pow): Cast args to `double', not
1345         `jdouble'.
1346         (atan2): Likewise.
1347         (IEEEremainder): Likewise.
1348         * java/lang/mprec.h: Don't wrap includes in `extern "C"'.
1349         * java/lang/fdlibm.h: Don't wrap includes in `extern "C"'.
1350
1351 2000-01-09  Anthony Green  <green@cygnus.com>
1352
1353         * java/lang/natString.cc (init): Test for overflow condition
1354         during out of bounds check.
1355         (getChars): Throw StringIndexOutOfBoundsException, not
1356         ArrayIndexOutOfBoundsException.
1357         (getBytes): Ditto.
1358         (regionMatches): Obey case option during string comparison.
1359
1360         * configure.host (ligcj_interpreter): New variable.  Enable
1361         interpreter by default on IA-32.
1362         * configure.in:  Examine libgcj_interpreter.
1363         * configure: Rebuilt.
1364
1365 2000-01-07  Tom Tromey  <tromey@cygnus.com>
1366
1367         * mauve-libgcj: Don't disable ClassTest.
1368
1369         * java/lang/natClass.cc (getClasses): Wrote.
1370
1371 2000-01-06  Tom Tromey  <tromey@cygnus.com>
1372
1373         * java/lang/natClass.cc (_getConstructors): Correctly check
1374         whether method name is the init name.
1375         (getMethod): Look at accflags on method in `klass', not `this'.
1376
1377 2000-01-05  Tom Tromey  <tromey@cygnus.com>
1378
1379         * java/lang/natClass.cc (getMethod): Compute offset relative to
1380         `klass's methods table, not `this's table.
1381
1382         * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA):
1383         In unwrapping/widening case, check whether `k' is null, not
1384         whether it is primitive.  Initialize `num' from `argelts', not
1385         `paramelts'.  Correct create and pass arguments to ffi_call.
1386         Don't let presence of `this' argument affect index used to look in
1387         argument arrays.
1388         (COPY): Set appropriate element in `values' vector.
1389
1390         * java/lang/natClass.cc: Include <gcj/method.h>.
1391
1392         * java/lang/Class.h (_getMethods): Correctly declare as private,
1393         not public.
1394
1395         * java/lang/Class.h (_getMethods): Declare.
1396         * java/lang/Class.java (_getMethods): Declare.
1397         * java/lang/natClass.cc (getDeclaringClass): Always return NULL.
1398         (getDeclaredClasses): Always return empty array.
1399         (_getMethods): New method.
1400         (getMethods): Wrote.
1401         (getDeclaredMethod): Return `rmethod'.
1402         (finit_name): New global.
1403         (getDeclaredMethods): Check for finit_name.
1404         (_getMethods): Likewise.
1405         (getMethod): Only return public methods.
1406
1407         * java/lang/reflect/natMethod.cc (get_ffi_type): Test size of
1408         jboolean and select correct ffi type on that basis.
1409         (_Jv_CallNonvirtualMethodA): Handle `void' return type.
1410         Constructor call always has `void' return type.
1411
1412 2000-01-04  Tom Tromey  <tromey@cygnus.com>
1413
1414         * java/lang/Class.h (getSignature): Updated.
1415         * java/lang/Class.java (getSignature): Updated.
1416         * java/lang/natClass.cc (getSignature): Added `is_constructor'
1417         argument.
1418         (getConstructor): Ensure constructor is public.
1419         (_getConstructors): Check for public-ness of constructor when
1420         `declared' is false, not when it is true.
1421
1422 2000-01-04  Warren Levy  <warrenl@cygnus.com>
1423
1424         * java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
1425         comment.
1426         (receive): Set the sender's address in the DatagramPacket.
1427
1428 2000-01-04  Tom Tromey  <tromey@cygnus.com>
1429
1430         * java/lang/reflect/natConstructor.cc (newInstance): Pass
1431         declaring class as return_type argument to
1432         _Jv_CallNonvirtualMethodA.
1433         * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In
1434         constructor case, create object and use it as `this' argument.
1435         * java/lang/Class.h (_getConstructors): Declare.
1436         (_getFields): Declare.
1437         * java/lang/Class.java (getConstructors): Wrote.
1438         (_getConstructors): New native method.
1439         (getDeclaredConstructors): Wrote.
1440         (_getFields): Declare new native method.
1441         * java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Removed
1442         incorrect comment.
1443         (getMethod): Work correctly when class is primitive.
1444         (getDeclaredMethods): Likewise.  Compute offset using `method',
1445         not `mptr'.
1446         (getDeclaredMethod): Likewise.
1447         (getConstructor): Wrote.
1448         (ConstructorClass): New define.
1449         (getDeclaredConstructor): Wrote.
1450         (_getConstructors): New method.
1451         (_getFields): New method.
1452         (getFields): Wrote.
1453
1454         * Makefile.in: Rebuilt.
1455         * Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.
1456
1457         * prims.cc: Remove `#pragma implementation'.
1458         * gcj/array.h: Remove `#pragma interface'.
1459
1460         * prims.cc (_Jv_equaln): New function.
1461         * java/lang/Class.java (getSignature): Declare.
1462         * resolve.cc (_Jv_LookupDeclaredMethod): Moved to natClass.cc.
1463         * java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Moved from
1464         resolve.cc.
1465         (getSignature): New method.
1466         (getDeclaredMethod): Wrote.
1467         (getMethod): Wrote.
1468         Include StringBuffer.h.
1469         * java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
1470         as a friend.  Unconditionally declare _Jv_LookupDeclaredMethod as
1471         a friend.
1472         (getSignature): Declare.
1473         * include/jvm.h (_Jv_GetTypesFromSignature): Declare.
1474         (_Jv_equaln): Declare.
1475         (_Jv_CallNonvirtualMethodA): Declare.
1476         * Makefile.in: Rebuilt.
1477         * Makefile.am (nat_source_files): Added natConstructor.cc.
1478         (java/lang/reflect/Constructor.h): New target.
1479         * java/lang/reflect/natConstructor.cc: New file.
1480         * java/lang/reflect/Constructor.java (newInstance): Now native.
1481         (declaringClass): Renamed from decl_class.
1482         (offset): Renamed from index.
1483         (getType): New native method.
1484         (getModifiers): Now native.
1485         (getParameterTypes): Call getType if required.
1486         (hashCode): Include hash code from declaring class.
1487         (modifiers): Removed.
1488         (toString): Call getType if required.
1489         * gcj/method.h (_Jv_FromReflectedConstructor): New function.
1490         * java/lang/reflect/natMethod.cc (hack_call): New method.
1491         Removed `#if 0' around FFI code.
1492         Include <gnu/gcj/RawData.h>.
1493         (invoke): Use _Jv_CallNonvirtualMethodA.  Throw
1494         IllegalArgumentException when argument object and class disagree.
1495         (_Jv_GetTypesFromSignature): New function.
1496         (getType): Use it.
1497         (ObjectClass): New define.
1498         (_Jv_CallNonvirtualMethodA): New function.
1499         * java/lang/reflect/Method.java (hack_trampoline): New method.
1500         (hack_call): New native method.