From: Bryce McKinlay Date: Sat, 24 Jul 2004 01:17:29 +0000 (+0000) Subject: prims.cc (_Jv_InitPrimClass): Don't create an array class. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ffe4e0376f66ff4db3a098f9c41fd8c8dd3c5ac7;p=gcc.git prims.cc (_Jv_InitPrimClass): Don't create an array class. 2004-07-23 Bryce McKinlay * prims.cc (_Jv_InitPrimClass): Don't create an array class. (_Jv_CreateJavaVM): Don't pass array vtable parameter to _Jv_InitPrimClass. (DECLARE_PRIM_TYPE): Don't declare array vtables. * include/jvm.h (struct _Jv_ArrayVTable): Removed. * java/lang/Class.h (_Jv_InitPrimClass): Update friend declaration. From-SVN: r85109 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index a1280c74b15..bcb9db2da93 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,12 @@ +2004-07-23 Bryce McKinlay + + * prims.cc (_Jv_InitPrimClass): Don't create an array class. + (_Jv_CreateJavaVM): Don't pass array vtable parameter to + _Jv_InitPrimClass. + (DECLARE_PRIM_TYPE): Don't declare array vtables. + * include/jvm.h (struct _Jv_ArrayVTable): Removed. + * java/lang/Class.h (_Jv_InitPrimClass): Update friend declaration. + 2004-07-23 Thomas Fitzsimmons * Makefile.am: Replace jar, rmic and rmiregistry references with diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 7b5e9842c27..b8592772923 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -79,12 +79,6 @@ struct _Jv_VTable // 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 : public _Jv_VTable -{ - vtable_elt extra_method[NUM_OBJECT_METHODS - 1]; -}; - union _Jv_word { jobject o; diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h index de00c2eb2fb..8d2b4a0cf24 100644 --- a/libjava/java/lang/Class.h +++ b/libjava/java/lang/Class.h @@ -328,7 +328,7 @@ private: friend void _Jv_InitNewClassFields (jclass klass); // in prims.cc - friend void _Jv_InitPrimClass (jclass, char *, char, int, _Jv_ArrayVTable *); + friend void _Jv_InitPrimClass (jclass, char *, char, int); friend void _Jv_PrepareCompiledClass (jclass); friend void _Jv_PrepareConstantTimeTables (jclass); diff --git a/libjava/prims.cc b/libjava/prims.cc index a0ad08e738f..0346b02371b 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -670,7 +670,6 @@ _Jv_NewMultiArray (jclass array_type, jint dimensions, ...) // Ensure 8-byte alignment, for hash synchronization. #define DECLARE_PRIM_TYPE(NAME) \ - _Jv_ArrayVTable _Jv_##NAME##VTable; \ java::lang::Class _Jv_##NAME##Class __attribute__ ((aligned (8))); DECLARE_PRIM_TYPE(byte) @@ -684,8 +683,7 @@ DECLARE_PRIM_TYPE(double) DECLARE_PRIM_TYPE(void) void -_Jv_InitPrimClass (jclass cl, char *cname, char sig, int len, - _Jv_ArrayVTable *array_vtable) +_Jv_InitPrimClass (jclass cl, char *cname, char sig, int len) { using namespace java::lang::reflect; @@ -702,8 +700,6 @@ _Jv_InitPrimClass (jclass cl, char *cname, char sig, int len, cl->vtable = JV_PRIMITIVE_VTABLE; cl->state = JV_STATE_DONE; cl->depth = -1; - if (sig != 'V') - _Jv_NewArrayClass (cl, NULL, (_Jv_VTable *) array_vtable); } jclass @@ -976,15 +972,15 @@ _Jv_CreateJavaVM (void* /*vm_args*/) finit_name = _Jv_makeUtf8Const ("finit$", 6); /* Initialize built-in classes to represent primitive TYPEs. */ - _Jv_InitPrimClass (&_Jv_byteClass, "byte", 'B', 1, &_Jv_byteVTable); - _Jv_InitPrimClass (&_Jv_shortClass, "short", 'S', 2, &_Jv_shortVTable); - _Jv_InitPrimClass (&_Jv_intClass, "int", 'I', 4, &_Jv_intVTable); - _Jv_InitPrimClass (&_Jv_longClass, "long", 'J', 8, &_Jv_longVTable); - _Jv_InitPrimClass (&_Jv_booleanClass, "boolean", 'Z', 1, &_Jv_booleanVTable); - _Jv_InitPrimClass (&_Jv_charClass, "char", 'C', 2, &_Jv_charVTable); - _Jv_InitPrimClass (&_Jv_floatClass, "float", 'F', 4, &_Jv_floatVTable); - _Jv_InitPrimClass (&_Jv_doubleClass, "double", 'D', 8, &_Jv_doubleVTable); - _Jv_InitPrimClass (&_Jv_voidClass, "void", 'V', 0, &_Jv_voidVTable); + _Jv_InitPrimClass (&_Jv_byteClass, "byte", 'B', 1); + _Jv_InitPrimClass (&_Jv_shortClass, "short", 'S', 2); + _Jv_InitPrimClass (&_Jv_intClass, "int", 'I', 4); + _Jv_InitPrimClass (&_Jv_longClass, "long", 'J', 8); + _Jv_InitPrimClass (&_Jv_booleanClass, "boolean", 'Z', 1); + _Jv_InitPrimClass (&_Jv_charClass, "char", 'C', 2); + _Jv_InitPrimClass (&_Jv_floatClass, "float", 'F', 4); + _Jv_InitPrimClass (&_Jv_doubleClass, "double", 'D', 8); + _Jv_InitPrimClass (&_Jv_voidClass, "void", 'V', 0); // Turn stack trace generation off while creating exception objects. _Jv_InitClass (&java::lang::VMThrowable::class$);