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