summaryrefslogtreecommitdiffstats
path: root/libjava/include
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-31 23:50:37 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-31 23:50:37 +0000
commita8ba17fbbb676afc03507ee5541a76f5c24fad69 (patch)
tree4b05280dd0f1b3a4def3323eb6da74ef8279da45 /libjava/include
parent5f526d197ac4455c61d87aa01da276f025183f8b (diff)
downloadppe42-gcc-a8ba17fbbb676afc03507ee5541a76f5c24fad69.tar.gz
ppe42-gcc-a8ba17fbbb676afc03507ee5541a76f5c24fad69.zip
* 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
Diffstat (limited to 'libjava/include')
-rw-r--r--libjava/include/jvm.h12
1 files changed, 12 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud