diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-26 02:25:42 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-26 02:25:42 +0000 |
commit | 6aa96c99a6339f2eb2e396d02113be16ddd55129 (patch) | |
tree | 904732224e65247ccdf90cd04bd9cd1ec4f63816 /libjava/include/jvm.h | |
parent | 9312400311fdf596564631e38e18a786e01dcb59 (diff) | |
download | gcc-6aa96c99a6339f2eb2e396d02113be16ddd55129.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include/jvm.h')
-rw-r--r-- | libjava/include/jvm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index b28f61a0e97..e1a5c33bbc6 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -335,6 +335,14 @@ _Jv_VTable::new_vtable (int count) return (_Jv_VTable *) _Jv_AllocBytes (size); } +// Determine if METH gets an entry in a VTable. +static inline jboolean _Jv_isVirtualMethod (_Jv_Method *meth) +{ + using namespace java::lang::reflect; + return (((meth->accflags & (Modifier::STATIC | Modifier::PRIVATE)) == 0) + && meth->name->data[0] != '<'); +} + // This function is used to determine the hash code of an object. inline jint _Jv_HashCode (jobject obj) @@ -418,6 +426,7 @@ extern void _Jv_CallAnyMethodA (jobject obj, jclass return_type, jmethodID meth, jboolean is_constructor, + jboolean is_virtual_call, JArray<jclass> *parameter_types, jvalue *args, jvalue *result, |