Tom Tromey
3a3d022561
natMethod.cc (_Jv_CallAnyMethodA): Indentation fix.
...
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA):
Indentation fix.
From-SVN: r87825
2004-09-21 22:23:46 +00:00
Per Bothner
b4d49f49bf
javaprims.h (_Jv_Utf8Const): Change struct to a class, with private fields and access methods.
...
* gcj/javaprims.h (_Jv_Utf8Const): Change struct to a class,
with private fields and access methods.
(_Jv_NewStringUTF, _Jv_hashUtf8String): New function declarations.
* gcj/cni.h (_Jv_NewStringUTF): Move to javaprims.h.
* prims.cc (_Jv_Utf8COnst::init): New method implementation.
( _Jv_makeUtf8Const): Rewrite using new constructors.
(hashUtf8String): Rename to +_Jv_hashUtf8String and make non-static.
* defineclass.cc: Use new _Utf8Const access/convenience methods.
* jni.cc: Likewise.
* resolve.cc: Likewise.
* gcj/field.h: Likewise.
* include/jvm.h: Likewise.
* java/lang/Class.h: Likewise.
* java/lang/natClass.cc: Likwise.
* java/lang/natClassLoader.cc: Likewise
* java/lang/reflect/natMethod.cc: Likewise
* verify.cc: Likewise.
(_Jv_BytecodeVerifier::make_utf8_const): Optimize.
(~_Jv_BytecodeVerifier): Don't need second _Jv_Free call.
From-SVN: r85854
2004-08-11 23:53:42 -07:00
Michael Koch
cf6f7d5589
Byte.java, [...]: Fixed javadocs, coding style and argument names all over.
...
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/lang/Byte.java,
java/lang/CharSequence.java,
java/lang/ClassLoader.java,
java/lang/Compiler.java,
java/lang/Double.java,
java/lang/Float.java,
java/lang/Integer.java,
java/lang/Long.java,
java/lang/Math.java,
java/lang/Number.java,
java/lang/Package.java,
java/lang/Runtime.java,
java/lang/RuntimePermission.java,
java/lang/SecurityManager.java,
java/lang/Short.java,
java/lang/StringBuffer.java,
java/lang/System.java,
java/lang/ThreadGroup.java,
java/lang/Throwable.java,
java/lang/reflect/InvocationHandler.java,
java/lang/reflect/Proxy.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80899
2004-04-20 12:30:19 +00:00
Bryce McKinlay
f531010820
class.c (make_class_data): Add new field aux_info.
...
2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_class_data): Add new field aux_info.
* decl.c (java_init_decl_processing): Push type and decl for
`aux_info'.
2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
* gcj/cni.h (JvAllocObject): Remove these obsolete,
undocumented CNI calls.
* include/java-interp.h (_Jv_InterpClass): No longer
extends java.lang.Class.
* java/lang/Class.h (Class): Add new field `aux_info'.
* boehm.cc (_Jv_MarkObj): Update java.lang.Class marking.
* defineclass.cc: Remove Class<->_Jv_InterpClass casts.
Use Class->aux_info instead.
* jni.cc (_Jv_JNI_AllocObject): Use _Jv_AllocObject.
* resolve.cc: Remove Class<->_Jv_InterpClass casts.
Use Class->aux_info instead.
* java/io/natObjectInputStream.cc (allocateObject): Use
_Jv_AllocObject.
* java/lang/natClass.cc (newInstance): Likewise.
* java/lang/natClassLoader.cc (_Jv_NewClass): Likewise.
* java/lang/natObject.cc (clone): Likewise.
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise.
* java/lang/natVMClassLoader.cc (defineClass): Don't use
JvAllocObject. Allocate klass->aux_info here for interpreted
class.
From-SVN: r80875
2004-04-20 02:38:46 +01:00
Bryce McKinlay
d7afe286b3
[multiple changes]
...
2004-04-14 Andrew Haley <aph@redhat.com>
Bryce McKinlay <mckinlay@redhat.com>
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Use
_Jv_LookupInterfaceMethodIdx for calls to interfaces.
* include/jvm.h (_Jv_CallAnyMethodA): Add new face' arg.
* testsuite/libjava.lang/InvokeInterface.java: New file.
* testsuite/libjava.lang/InvokeInterface.out: New file.
2004-04-14 Bryce McKinlay <mckinlay@redhat.com>
* class.c (get_interface_method_index): New function. Return
dispatch index for interface method.
(make_method_value): For interface methods, set index field to
iface dispatch index, not DECL_VINDEX.
* expr.c (build_invokeinterface): Use get_interface_method_index.
From-SVN: r80684
2004-04-14 18:45:20 +01:00
Andrew Haley
50106e8f8d
re PR libgcj/14296 (3.4 regression: Method.Invoke)
...
2004-02-25 Andrew Haley <aph@redhat.com>
PR java/14296:
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Make sure
we have a valid method index.
From-SVN: r78504
2004-02-26 15:22:20 +00:00
Michael Koch
40f8ee2d8d
Array.java: Merged documentation with classpath.
...
2004-01-07 Michael Koch <konqueror@gmx.de>
* java/lang/reflect/Array.java: Merged documentation with classpath.
From-SVN: r75512
2004-01-07 18:46:18 +00:00
Bryce McKinlay
f56228e73f
natMethod.cc (_Jv_CallAnyMethodA): Don't use vtable dispatch for final methods.
...
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Don't use
vtable dispatch for final methods.
From-SVN: r73101
2003-10-30 21:09:45 +00:00
Bryce McKinlay
e0f23fcd49
AccessibleObject.java (secureSetAccessible): Don't check for AccessibleObject.
...
* java/lang/reflect/AccessibleObject.java (secureSetAccessible):
Don't check for AccessibleObject. Update javadocs.
From-SVN: r72943
2003-10-26 02:28:45 +00:00
Bryce McKinlay
b9b5672b49
Constructor.java (toString): Avoid extra whitespace on constructor with no modifiers.
...
2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz>
* java/lang/reflect/Constructor.java (toString): Avoid extra
whitespace on constructor with no modifiers.
* java/lang/reflect/natConstructor.java (newInstance): Look up
caller and perform accessibility check only if constructor is
non-public and accessible flag is not set.
2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz>
* jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA,
_Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't
use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with
is_virtual_call argument.
* include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from
natClass.cc.
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use
_Jv_isVirtualMethod.
* java/lang/reflect/natMethod.cc (invoke): Don't use
_Jv_LookupDeclaredMethod.
(_Jv_CallAnyMethodA): New is_virtual_call argument. If specified,
look up method in target object's vtable.
From-SVN: r72942
2003-10-26 02:25:42 +00:00
Bryce McKinlay
8822f4aaf9
Method.java (toString): Avoid extra whitespace on method with no modifiers.
...
* java/lang/reflect/Method.java (toString): Avoid extra whitespace
on method with no modifiers.
From-SVN: r72919
2003-10-25 07:55:21 +01:00
Bryce McKinlay
a10fd35601
re PR libgcj/11780 (Method.invoke() is slow)
...
PR libgcj/11780:
* java/lang/reflect/natMethod.cc (invoke): Look up caller and
perform accessibility check only if target is non-public and
accessible flag is not set.
* java/lang/reflect/natField.cc (getAddr): Likewise.
From-SVN: r72918
2003-10-25 07:49:20 +01:00
Michael Koch
73a1415eb4
2003-09-25 Michael Koch <konqueror@gmx.de>
...
* java/lang/reflect/Proxy.java
(getProxyClass): Remove workaround for gcj 3.0.x.
From-SVN: r71796
2003-09-25 20:46:14 +00:00
Tom Tromey
b9f42bb060
Proxy.java (generate): Uncomment protection domain code.
...
* java/lang/reflect/Proxy.java (generate): Uncomment protection
domain code.
* java/lang/natClassLoader.cc (defineClass): Added `loader'
argument.
(linkClass0): Now in VMClassLoader.
(markClassErrorState0): Likewise.
(getSystemClassLoaderInternal): New method.
* java/lang/natClass.cc (initializeClass): Use
VMClassLoader::resolveClass.
* java/lang/ClassLoader.java: New version, from Classpath.
* java/lang/Class.java (getProtectionDomain):
protectionDomainPermission and unknownProtectionDomain now in
VMClassLoader.
* java/lang/Class.h: VMClassLoader now a friend class.
* gnu/gcj/runtime/VMClassLoader.java (instance): Now
package-private.
* gcj/javaprims.h: Regenerated class list.
* resolve.cc (_Jv_PrepareClass): Use VMClassLoader::resolveClass.
* java/lang/VMClassLoader.java: New version from Classpath;
modified for libgcj use.
From-SVN: r71765
2003-09-25 07:46:19 +00:00
Tom Tromey
0f56e0cc56
re PR libgcj/12058 (java.lang.reflect.Array.set(Object, int, Object) throws java.lang.IllegalArgumentException)
...
PR java/12058:
* java/lang/reflect/natArray.cc (set): Allow null as argument.
From-SVN: r70813
2003-08-26 14:55:30 +00:00
Tom Tromey
6077db9114
Proxy.java (ProxyData): `pack' now a String.
...
* java/lang/reflect/Proxy.java (ProxyData): `pack' now a String.
(ProxyData.getPackage): New method.
(ProxyData.getProxyData): Use package name, not Package.
(ClassFactory.ClassFactory): Updated.
From-SVN: r70809
2003-08-26 14:37:10 +00:00
Tom Tromey
0da021f5cc
re PR libgcj/11951 (natMethod.cc (_Jv_CallAnyMethodA) should clear ffi_result before ffi_call)
...
PR libgcj/11951:
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Returns
void. Throw VirtualMachineError if ffi fails. Initialize return
value. Added is_jni_call argument; only wrap exception if not a
JNI call. Use descriptive message if operation not supported.
(_Jv_GetTypesFromSignature): Use declaring class' loader to find
array class.
* include/jvm.h (_Jv_CallAnyMethodA): Updated declaration.
* jni.cc (_Jv_JNI_CallAnyMethodV): Updated for new form of
_Jv_CallAnyMethodA.
(_Jv_JNI_CallAnyMethodA): Likewise.
(_Jv_JNI_CallAnyVoidMethodV): Likewise.
(_Jv_JNI_CallAnyVoidMethodA): Likewise.
From-SVN: r70544
2003-08-18 14:36:07 +00:00
Tom Tromey
0196f4e0a5
re PR libgcj/11779 (Field reflection incorrectly throws IllegalAccessException)
...
Fix for PR libgcj/11779:
* java/lang/reflect/natField.cc (getAddr): Skip frames in Field
class.
From-SVN: r70185
2003-08-05 20:06:57 +00:00
Tom Tromey
0d4d227907
Method.java: Updated status comment.
...
* java/lang/reflect/Method.java: Updated status comment.
Imported javadoc from Classpath and re-ordered methods.
* java/lang/reflect/Constructor.java: Reindented. Updated
status comment. Imported javadoc from Classpath and re-ordered
methods.
From-SVN: r70184
2003-08-05 19:50:54 +00:00
Tom Tromey
ffd94572f4
Runtime.java: Comment fix.
...
* java/lang/Runtime.java: Comment fix.
* java/lang/ClassLoader.java (isAncestorOf): New method.
(getParent): Uncommented security check. Use isAncestorOf.
* include/jvm.h (_Jv_CheckAccess): Declare.
* java/lang/reflect/natConstructor.cc (newInstance): Perform
access check.
Include IllegalAccessException.h, ArrayIndexOutOfBoundsException.h.
* java/lang/reflect/natArray.cc (newInstance): Pass caller's
class loader to _Jv_GetArrayClass.
Include ArrayIndexOutOfBoundsException.h.
* java/lang/reflect/Field.java: Update comment to reflect status.
(equals): Fixed indentation.
* java/lang/Class.h (Class): Declare memberAccessCheck, not
checkMemberAccess. Make _Jv_CheckAccess a friend.
* java/lang/Class.java (memberAccessCheck): New method from
Classpath.
(checkMemberAccess): Removed.
(getDeclaredMethod): Use memberAccessCheck.
(getField): Likewise.
(getMethod): Likewise.
* resolve.cc (_Jv_ResolvePoolEntry): Use _Jv_CheckAccess.
(_Jv_SearchMethodInClass): Likewise.
* prims.cc (_Jv_CheckAccess): New function.
* jni.cc (_Jv_JNI_FindClass): Use getClassLoaderInternal.
(_Jv_JNI_GetAnyFieldID): Likewise.
* java/lang/natClass.cc (forName): Use getClassLoaderInternal.
(getClassLoader): Added security check.
(getConstructor): Call memberAccessCheck.
(getDeclaredClasses): Likewise.
(getDeclaredField): Likewise.
(getDeclaredFields): Likewise.
(_getConstructors): Likewise.
(getDeclaredConstructor): Likewise.
(getDeclaredMethods): Likewise.
(getFields): Likewise.
(getMethods): Likewise.
(newInstance): Likewise.
(_Jv_MakeVTable): Put method name in exception.
* java/lang/reflect/natMethod.cc (getType): Use
getClassLoaderInternal.
(_Jv_GetTypesFromSignature): Likewise.
(invoke): Perform access check.
(_Jv_CallAnyMethodA): Removed old FIXME comments.
Include ArrayIndexOutOfBoundsException.h.
* java/lang/reflect/natField.cc (getType): Use
getClassLoaderInternal.
(_Jv_CheckFieldAccessibility): Removed.
(getAddr): Use _Jv_CheckAccess; find caller.
Include ArrayIndexOutOfBoundsException.h.
From-SVN: r69621
2003-07-21 01:54:06 +00:00
Tom Tromey
4544c3f387
Proxy.java: New version from Classpath.
...
* java/lang/reflect/Proxy.java: New version from Classpath.
* java/lang/Package.java: New version from Classpath.
From-SVN: r65007
2003-03-29 01:34:23 +00:00
Hans Boehm
a6fdf2d3bf
natMethod.cc (_Jv_CallAnyMethodA): Allocate a full jvalue for each argument.
...
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Allocate a full
jvalue for each argument. Simplify.
* testsuite/libjava.jni/calls.c (docall),
testsuite/libjava.jni/calls.java (longpb_f): check for argument
misalignment.
From-SVN: r63563
2003-02-28 17:26:29 +00:00
Tom Tromey
a1aba4f9a5
natClassLoader.cc (defineClass0): Removed erroneous comment.
...
* java/lang/natClassLoader.cc (defineClass0): Removed erroneous
comment.
* java/lang/ClassLoader.java (defineClass): Use chained
exception when rethrowing.
* defineclass.cc (handleClassBegin): Mark class as interpreted.
* java/lang/reflect/Modifier.java (INVISIBLE, INTERPRETED): New
constants.
* resolve.cc (_Jv_PrepareMissingMethods): New function.
(_Jv_PrepareClass): Use it.
* include/java-interp.h (_Jv_IsInterpretedClass): Rewrote.
(_Jv_InterpClass): _Jv_PrepareMissingMethods now friend.
* java/lang/Class.h (Class::getModifiers): Mask with ALL_FLAGS.
(Class): _Jv_PrepareMissingMethods now friend.
* java/lang/natClassLoader.cc (defineClass0): Use JvSynchronize.
Record `NULL' for system class loader.
(_Jv_RegisterInitiatingLoader): Use JvSynchronize. Special case
system class loader.
(_Jv_FindClassInCache): Likewise.
(_Jv_UnregisterClass): Use JvSynchronize. Free old loader info.
(_Jv_FindClass): Special case system class loader.
* java/lang/natClass.cc (_Jv_abstractMethodError): New function.
(_Jv_SetVTableEntries): Put _Jv_abstractMethodError into empty
vtable slots.
(_Jv_LayoutVTableMethods): Don't generate vtable slot for a method
in a final class.
(_getDeclaredMethod): Don't return synthetic methods.
(getDeclaredMethods): Likewise.
(_getMethod): Likewise.
(_getMethods): Likewise.
From-SVN: r60319
2002-12-19 19:31:55 +00:00
Mark Wielaard
396a80436c
natField.cc (getBoolean): Use getType().
...
* java/lang/reflect/natField.cc (getBoolean): Use getType().
(getByte): Likewise.
(getShort): Likewise.
(getInt): Likewise.
(getLong): Likewise.
(getFloat): Likewise.
(getDouble): Likewise.
(get): Likewise.
(setChar): Likewise.
(setByte): Likewise.
(setShort): Likewise.
(setInt): Likewise.
(setLong): Likewise.
(setFloat): Likewise.
(setDouble): Likewise.
From-SVN: r58899
2002-11-07 17:57:09 +00:00
Mark Wielaard
de36f65dd1
GNU Classpath merge.
...
2002-10-31 Stephen Crawley <crawley@dstc.edu.au>
* java/lang/Double.java (valueOf): Return new Double(parseDouble(s)).
2002-10-31 Wu Gansha <gansha.wu@intel.com>:
* java/util/ArrayList.java (readObject, writeObject): Only read/write
size items.
2002-10-31 Wu Gansha <gansha.wu@intel.com>:
* java/io/DataInputStream.java (convertFromUTF): Give StringBuffer an
initial estimated size to avoid enlarge buffer frequently.
2002-10-31 Wu Gansha <gansha.wu@intel.com>:
* java/lang/reflect/Proxy.java (ProxyType): Set loader to System
ClassLoader when null.
(ProxyType.hashCode): Loader null check no longer needed.
(ProxyType.sameTypes): New method.
(ProxyType.equals): Use new method.
2002-10-31 Mark Wielaard <mark@klomp.org>
* java/net/URLDecoder.java (decode): Initialize Stringbuffer size to
length of String.
* java/net/URLEncoder.java (encode): Likewise.
2002-10-31 Mark Wielaard <mark@klomp.org>
* java/util/zip/ZipInputStream.java (getNextEntry): Throw IOException
when stream is closed.
(closeEntry): Likewise.
(read): Likewise.
* java/util/zip/ZipOutputStream.java (putNextEntry): Throw
ZipException when no entry active.
(closeEntry): Likewise.
(write): Likewise.
From-SVN: r58772
2002-11-03 20:27:31 +00:00
Tom Tromey
fead5eb589
For PR java/8415:
...
* java/lang/reflect/natMethod.cc (getType): Use _Jv_FindClass.
* prims.cc (_Jv_FindClassFromSignature): Indentation fix.
From-SVN: r58757
2002-11-02 21:33:30 +00:00
Anthony Green
d3cc3f10da
Add Proxy support.
...
From-SVN: r57635
2002-09-30 05:19:09 +00:00
Tom Tromey
f87999337a
natConstructor.cc (newInstance): Initialize class.
...
* java/lang/reflect/natConstructor.cc (newInstance): Initialize
class.
* java/lang/reflect/natMethod.cc (invoke): Initialize class.
From-SVN: r56624
2002-08-27 23:57:17 +00:00
Mark Wielaard
5526ddf6fd
[multiple changes]
...
2002-07-24 Mark Wielaard <mark@klomp.org>
* java/lang/reflect/natField.cc (setAddr): Check isAccessible().
* java/io/ObjectInputStream.java (setBooleanField): Before setting
field call setAccessible(true).
(setByteField): Likewise.
(setCharField): Likewise.
(setDoubleField): Likewise.
(setFloatField): Likewise.
(setIntField): Likewise.
(setLongField): Likewise.
(setShortField): Likewise.
(setObjectField): Likewise.
2002-07-24 Tom Tromey <tromey@redhat.com>
* java/io/ObjectInputStream.java (readObject) [TC_ARRAY]: Don't
use toString() to format array element.
From-SVN: r55711
2002-07-24 16:05:34 +00:00
Tom Tromey
d74bba04e8
natPlainDatagramSocketImpl.cc (BooleanClass): Removed.
...
* java/net/natPlainDatagramSocketImpl.cc (BooleanClass): Removed.
(IntegerClass): Likewise.
* java/lang/natClass.cc (CloneableClass): Removed.
(ObjectClass, ErrorClass, ClassClass, MethodClass, FieldClass,
ConstructorClass): Likewise.
* java/lang/natClassLoader.cc (CloneableClass): Removed.
(ObjectClass, ClassClass, VMClassLoaderClass, ClassLoaderClass,
SerializableClass): Likewise.
* java/lang/reflect/natMethod.cc (BooleanClass): Removed.
(VoidClass, ByteClass, ShortClass, CharacterClass, IntegerClass,
LongClass, FloatClass, DoubleClass): Likewise.
From-SVN: r54977
2002-06-25 05:29:22 +00:00
Tom Tromey
3e1b181a67
AbstractMethodError.java: Re-merged with Classpath.
...
* java/lang/AbstractMethodError.java: Re-merged with Classpath.
* java/lang/ArithmeticException.java: Likewise.
* java/lang/ArrayIndexOutOfBoundsException.java: Likewise.
* java/lang/ArrayStoreException.java: Likewise.
* java/lang/Byte.java: Likewise.
* java/lang/CharSequence.java: Likewise.
* java/lang/ClassCastException.java: Likewise.
* java/lang/ClassCircularityError.java: Likewise.
* java/lang/ClassFormatError.java: Likewise.
* java/lang/CloneNotSupportedException.java: Likewise.
* java/lang/Cloneable.java: Likewise.
* java/lang/Comparable.java: Likewise.
* java/lang/Compiler.java: Likewise.
* java/lang/Error.java: Likewise.
* java/lang/ExceptionInInitializerError.java: Likewise.
* java/lang/IllegalAccessError.java: Likewise.
* java/lang/IllegalAccessException.java: Likewise.
* java/lang/IllegalArgumentException.java: Likewise.
* java/lang/IllegalMonitorStateException.java: Likewise.
* java/lang/IllegalStateException.java: Likewise.
* java/lang/IllegalThreadStateException.java: Likewise.
* java/lang/IncompatibleClassChangeError.java: Likewise.
* java/lang/IndexOutOfBoundsException.java: Likewise.
* java/lang/InheritableThreadLocal.java: Likewise.
* java/lang/InstantiationError.java: Likewise.
* java/lang/InstantiationException.java: Likewise.
* java/lang/InternalError.java: Likewise.
* java/lang/InterruptedException.java: Likewise.
* java/lang/LinkageError.java: Likewise.
* java/lang/NegativeArraySizeException.java: Likewise.
* java/lang/NoClassDefFoundError.java: Likewise.
* java/lang/NoSuchFieldError.java: Likewise.
* java/lang/NoSuchFieldException.java: Likewise.
* java/lang/NoSuchMethodError.java: Likewise.
* java/lang/NoSuchMethodException.java: Likewise.
* java/lang/NullPointerException.java: Likewise.
* java/lang/NumberFormatException.java: Likewise.
* java/lang/OutOfMemoryError.java: Likewise.
* java/lang/Process.java: Likewise.
* java/lang/Runnable.java: Likewise.
* java/lang/RuntimePermission.java: Likewise.
* java/lang/SecurityException.java: Likewise.
* java/lang/Short.java: Likewise.
* java/lang/StackOverflowError.java: Likewise.
* java/lang/StringIndexOutOfBoundsException.java: Likewise.
* java/lang/ThreadDeath.java: Likewise.
* java/lang/ThreadLocal.java: Likewise.
* java/lang/UnknownError.java: Likewise.
* java/lang/UnsatisfiedLinkError.java: Likewise.
* java/lang/UnsupportedClassVersionError.java: Likewise.
* java/lang/UnsupportedOperationException.java: Likewise.
* java/lang/VerifyError.java: Likewise.
* java/lang/VirtualMachineError.java: Likewise.
* java/lang/reflect/InvocationTargetException.java: Likewise.
* java/net/BindException.java: Likewise.
* java/net/ConnectException.java: Likewise.
* java/net/MalformedURLException.java: Likewise.
* java/net/NoRouteToHostException.java: Likewise.
* java/net/ProtocolException.java: Likewise.
* java/net/SocketException.java: Likewise.
* java/net/UnknownHostException.java: Likewise.
* java/net/UnknownServiceException.java: Likewise.
From-SVN: r54656
2002-06-15 19:45:34 +00:00
Mark Wielaard
2801df0ed6
Modifier.java (toString(int,StringBuffer)): Fix ordering.
...
* java/lang/reflect/Modifier.java (toString(int,StringBuffer)): Fix
ordering.
From-SVN: r51848
2002-04-04 08:32:28 +00:00
Anthony Green
562ff1637f
Add pointer support to the reflection code.
...
From-SVN: r50180
2002-03-01 05:36:31 +00:00
Jeff Sturm
a7261b2da0
natMethod.cc (_Jv_CallAnyMethodA): Define ffi_result union for ffi_call result.
...
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA):
Define ffi_result union for ffi_call result. Cast
ffi_result members to jvalue.
From-SVN: r50007
2002-02-24 17:55:44 +00:00
Per Bothner
033509daea
natField.cc (setAddr): New function.
...
* java/lang/reflect/natField.cc (setAddr): New function.
Calls getAddr and then checks that the field isn't final.
(setBoolean. setChar, setByte, setShort, setInt, setLong, setFloat,
setDouble, set): Use setAddr instead of getAddr, to check for FINAL.
(set): Call setAddr before check that new value has right type,
to better match specified semantics.
From-SVN: r49153
2002-01-23 11:42:18 -08:00
Mark Wielaard
92aaa24628
Add license clarification.
...
From-SVN: r49104
2002-01-22 22:40:42 +00:00
Andreas Tobler
66839ef65e
natMethod.cc: Don't include alloca.h.
...
2002-01-07 Andreas Tobler <a.tobler@schweiz.ch>
* java/lang/reflect/natMethod.cc: Don't include alloca.h.
(_Jv_CallAnyMethodA): Convert alloca to __builtin_alloca.
From-SVN: r48656
2002-01-08 20:00:50 +00:00
Tom Tromey
6d88e1c332
Constructor.java (toString): Use more efficient form of Modifier.toString().
...
* java/lang/reflect/Constructor.java (toString): Use more
efficient form of Modifier.toString().
From-SVN: r47031
2001-11-14 23:42:38 +00:00
Tom Tromey
81bc01c265
Re-merges with Classpath, from various people:
...
* java/lang/reflect/Modifier.java: Reindented.
(toString): Only trim trailing space if text was added to
StringBuffer.
* java/lang/reflect/ReflectPermission: Reindented.
From-SVN: r47028
2001-11-14 22:42:42 +00:00
Tom Tromey
852d3dad0d
Re-merges with Classpath, from various people:
...
* java/lang/Double.java (parseDouble): Fixed ordering of
modifiers.
* java/lang/reflect/AccessibleObject.java: Javadoc, reindented.
* java/lang/reflect/Member.java: Reindented.
* java/lang/reflect/Modifier.java: Reindented.
(toString): Only trim trailing space if text was added to
StringBuffer.
* java/util/ConcurrentModificationException.java: Javadoc
updates.
* java/util/EmptyStackException.java: Likewise.
* java/util/NoSuchElementException.java: Likewise.
From-SVN: r47018
2001-11-14 19:11:52 +00:00
Tom Tromey
b8a5867e51
* java/lang/reflect/Field.java: Made many methods private.
...
From-SVN: r46467
2001-10-24 18:06:48 +00:00
Tom Tromey
0a3abdb238
Field.java (Field): New constructor.
...
* java/lang/reflect/Field.java (Field): New constructor.
* java/lang/ClassLoader.java (defineClass(String,byte[],int,int)):
Throw ClassFormatError.
From-SVN: r46458
2001-10-24 04:38:08 +00:00
Tom Tromey
0e91d38470
AccessibleObject.java (checkPermission): Implemented.
...
* java/lang/reflect/AccessibleObject.java (checkPermission):
Implemented.
Updated copyright information.
From-SVN: r46272
2001-10-15 22:45:03 +00:00
Mark Wielaard
ffb0e73a97
* java/lang/reflect/Modifier.java: Merge with Classpath
...
From-SVN: r46019
2001-10-05 00:16:03 +00:00
Tom Tromey
62a040818a
prims.cc (_Jv_NewMultiArrayUnchecked): New method.
...
* prims.cc (_Jv_NewMultiArrayUnchecked): New method.
(_Jv_NewMultiArray): Use it. Check each array dimension.
(_Jv_NewMultiArray): Likewise.
* java/lang/reflect/natMethod.cc (can_widen): Nothing promotes to
`char'.
* java/lang/reflect/natArray.cc (newInstance): Throw
IllegalArgumentException if there are no dimensions.
From-SVN: r45951
2001-10-02 13:44:32 +00:00
Mark Wielaard
cfcdbe5480
DataInput.java: Merge with Classpath.
...
* java/io/DataInput.java: Merge with Classpath.
* java/io/DataOutput.java: Idem.
* java/io/FilenameFilter.java: Idem.
* java/io/Serializable.java: Idem.
* java/lang/Cloneable.java: Idem.
* java/lang/Comparable.java: Idem.
* java/lang/Runnable.java: Idem.
* java/lang/reflect/Member.java: Idem.
* java/net/ContentHandlerFactory.java: Idem.
* java/net/FileNameMap.java: Idem.
* java/net/SocketImplFactory.java: Idem.
* java/net/SocketOptions.java: Idem.
* java/net/URLStreamHandlerFactory.java: Idem.
From-SVN: r45910
2001-09-30 18:04:38 +00:00
Tom Tromey
9d09d14437
re PR libgcj/4208 (Problem using 'null' with Java reflection)
...
* java/lang/reflect/natField.cc (set): Allow for case when the
value is null. Fixes PR libgcj/4208.
From-SVN: r45367
2001-09-04 03:03:33 +00:00
Tom Tromey
7eee682ba8
Makefile.in: Rebuilt.
...
* Makefile.in: Rebuilt.
* Makefile.am (core_java_source_files): Added
UnsupportedClassVersionError.
* java/lang/UnsupportedClassVersionError.java: New file from
Classpath.
* java/io/CharConversionException.java, java/io/EOFException.java,
java/io/FileNotFoundException.java, java/io/IOException.java,
java/io/InterruptedIOException.java,
java/io/ObjectStreamException.java,
java/io/OptionalDataException.java,
java/io/StreamCorruptedException.java,
java/io/SyncFailedException.java,
java/io/UTFDataFormatException.java,
java/io/UnsupportedEncodingException.java,
java/lang/AbstractMethodError.java,
java/lang/ArithmeticException.java,
java/lang/ArrayIndexOutOfBoundsException.java,
java/lang/ArrayStoreException.java,
java/lang/ClassCastException.java,
java/lang/ClassCircularityError.java,
java/lang/ClassFormatError.java,
java/lang/CloneNotSupportedException.java, java/lang/Error.java,
java/lang/Exception.java,
java/lang/ExceptionInInitializerError.java,
java/lang/IllegalAccessError.java,
java/lang/IllegalAccessException.java,
java/lang/IllegalArgumentException.java,
java/lang/IllegalMonitorStateException.java,
java/lang/IllegalStateException.java,
java/lang/IllegalThreadStateException.java,
java/lang/IncompatibleClassChangeError.java,
java/lang/IndexOutOfBoundsException.java,
java/lang/InstantiationError.java,
java/lang/InstantiationException.java,
java/lang/InternalError.java, java/lang/InterruptedException.java,
java/lang/LinkageError.java,
java/lang/NegativeArraySizeException.java,
java/lang/NoClassDefFoundError.java,
java/lang/NoSuchFieldError.java,
java/lang/NoSuchFieldException.java,
java/lang/NoSuchMethodError.java,
java/lang/NoSuchMethodException.java,
java/lang/NullPointerException.java,
java/lang/NumberFormatException.java,
java/lang/OutOfMemoryError.java, java/lang/RuntimeException.java,
java/lang/SecurityException.java,
java/lang/StackOverflowError.java,
java/lang/StringIndexOutOfBoundsException.java,
java/lang/ThreadDeath.java, java/lang/UnknownError.java,
java/lang/UnsatisfiedLinkError.java,
java/lang/UnsupportedOperationException.java,
java/lang/VerifyError.java, java/lang/VirtualMachineError.java,
java/lang/reflect/InvocationTargetException.java,
java/net/BindException.java, java/net/ConnectException.java,
java/net/MalformedURLException.java,
java/net/NoRouteToHostException.java,
java/net/ProtocolException.java, java/net/SocketException.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java,
java/text/ParseException.java: Copied from Classpath, thanks to
Mark Wielaard who did the merge.
* java/lang/System.java (getProperty): Use single argument form of
SecurityManager.checkPropertyAccess.
* Makefile.in: Rebuilt.
* Makefile.am (core_java_source_files): Added VMSecurityManager.
* java/lang/VMSecurityManager.java: New file.
* java/lang/SecurityManager.java: Merged with Classpath.
From-SVN: r45353
2001-09-02 06:18:49 +00:00
Tom Tromey
224b7b7b0c
Field.java (toString): Use Method.appendClassName.
...
* java/lang/reflect/Field.java (toString): Use
Method.appendClassName.
* java/lang/reflect/Constructor.java (toString): Use
Method.appendClassName.
* java/lang/reflect/Method.java: Reindented.
(appendClassName): New method.
(toString): Use it.
* defineclass.cc (handleMethod ): Initialize `throws' field of
method.
(read_one_method_attribute): Handle Exceptions attribute.
* java/lang/reflect/natMethod.cc (ClassClass): Removed.
(ObjectClass): Removed.
(getType): Compute `exception_types'.
* java/lang/Class.h (struct _Jv_Method): Added `throws' field.
From-SVN: r45153
2001-08-24 17:24:44 +00:00
Anthony Green
c8fb98139d
USE_LIBFFI change
...
From-SVN: r42791
2001-06-02 08:49:31 +00:00