natClassLoader.cc (_Jv_InitNewClassFields): Removed.

* java/lang/natClassLoader.cc (_Jv_InitNewClassFields): Removed.
	(defineClass): Updated.
	(_Jv_NewClass): Likewise.
	* prims.cc (_Jv_InitPrimClass): Don't call
	_Jv_InitNewClassFields.

From-SVN: r72444
This commit is contained in:
Tom Tromey 2003-10-13 22:08:51 +00:00 committed by Tom Tromey
parent c1783330fd
commit b71d486c40
3 changed files with 8 additions and 39 deletions

View File

@ -1,3 +1,11 @@
2003-10-13 Tom Tromey <tromey@redhat.com>
* java/lang/natClassLoader.cc (_Jv_InitNewClassFields): Removed.
(defineClass): Updated.
(_Jv_NewClass): Likewise.
* prims.cc (_Jv_InitPrimClass): Don't call
_Jv_InitNewClassFields.
2003-10-13 Taras Judge <taras.judge@shaw.ca>
PR libgcj/12592

View File

@ -55,7 +55,6 @@ java::lang::VMClassLoader::defineClass (java::lang::ClassLoader *loader,
jclass klass;
klass = (jclass) JvAllocObject (&java::lang::Class::class$,
sizeof (_Jv_InterpClass));
_Jv_InitNewClassFields (klass);
// Synchronize on the class, so that it is not attempted initialized
// until we're done loading.
@ -521,47 +520,11 @@ _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader)
return klass;
}
void
_Jv_InitNewClassFields (jclass ret)
{
ret->next = NULL;
ret->name = NULL;
ret->accflags = 0;
ret->superclass = NULL;
ret->constants.size = 0;
ret->constants.tags = NULL;
ret->constants.data = NULL;
ret->methods = NULL;
ret->method_count = 0;
ret->vtable_method_count = 0;
ret->fields = NULL;
ret->size_in_bytes = 0;
ret->field_count = 0;
ret->static_field_count = 0;
ret->vtable = NULL;
ret->otable_syms = NULL;
ret->atable = NULL;
ret->atable_syms = NULL;
ret->interfaces = NULL;
ret->loader = NULL;
ret->interface_count = 0;
ret->state = JV_STATE_NOTHING;
ret->thread = NULL;
ret->depth = 0;
ret->ancestors = NULL;
ret->idt = NULL;
ret->arrayclass = NULL;
ret->protectionDomain = NULL;
ret->signers = NULL;
ret->chain = NULL;
}
jclass
_Jv_NewClass (_Jv_Utf8Const *name, jclass superclass,
java::lang::ClassLoader *loader)
{
jclass ret = (jclass) JvAllocObject (&java::lang::Class::class$);
_Jv_InitNewClassFields (ret);
ret->name = name;
ret->superclass = superclass;
ret->loader = loader;

View File

@ -633,8 +633,6 @@ _Jv_InitPrimClass (jclass cl, char *cname, char sig, int len,
{
using namespace java::lang::reflect;
_Jv_InitNewClassFields (cl);
// We must set the vtable for the class; the Java constructor
// doesn't do this.
(*(_Jv_VTable **) cl) = java::lang::Class::class$.vtable;