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