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
This commit is contained in:
Tom Tromey 2000-05-31 23:50:37 +00:00 committed by Tom Tromey
parent f1aa7a521a
commit c74e221410
5 changed files with 45 additions and 7 deletions

View file

@ -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;