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