OSDN Git Service

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