diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-05-31 23:50:37 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-05-31 23:50:37 +0000 |
commit | c74e2214108d712dc032877cbb60436070cfeafa (patch) | |
tree | 4b05280dd0f1b3a4def3323eb6da74ef8279da45 /libjava/include | |
parent | f1aa7a521a31b60380cf5c2e6913823c8bd18ce5 (diff) | |
download | gcc-c74e2214108d712dc032877cbb60436070cfeafa.zip gcc-c74e2214108d712dc032877cbb60436070cfeafa.tar.gz gcc-c74e2214108d712dc032877cbb60436070cfeafa.tar.bz2 |
prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well.
* prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well.
(_Jv_PrimClass): Set `methods' by calling _Jv_FindArrayClass.
* include/jvm.h (struct _Jv_ArrayVTable): Declare.
(NUM_OBJECT_METHODS): New define.
* java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added
`array_vtable' parameter. Added assertion.
* java/lang/Class.h (_Jv_FindArrayClass): Added `array_vtable'
parameter.
From-SVN: r34312
Diffstat (limited to 'libjava/include')
-rw-r--r-- | libjava/include/jvm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 57f449b..ad187c0 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -34,6 +34,18 @@ struct _Jv_VTable void *method[1]; }; +// Number of virtual methods on object. FIXME: it sucks that we have +// to keep this up to date by hand. +#define NUM_OBJECT_METHODS 5 + +// This structure is the type of an array's vtable. +struct _Jv_ArrayVTable +{ + jclass clas; + // `+1' because there is an extra slot for C++ RTTI compatibility. + void *method[NUM_OBJECT_METHODS + 1]; +}; + union _Jv_word { jobject o; |