From a8ba17fbbb676afc03507ee5541a76f5c24fad69 Mon Sep 17 00:00:00 2001 From: tromey Date: Wed, 31 May 2000 23:50:37 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34312 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/include/jvm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libjava/include') diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 57f449b7b5a..ad187c090b0 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; -- cgit v1.2.3