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