This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: Remove _Jv_InitNewClassFields
- From: Tom Tromey <tromey at redhat dot com>
- To: GCC libjava patches <java-patches at gcc dot gnu dot org>
- Date: 13 Oct 2003 15:59:40 -0600
- Subject: Patch: FYI: Remove _Jv_InitNewClassFields
- Reply-to: tromey at redhat dot com
I'm checking this in on the trunk.
As pointed out by Bryce, this function is not necessary.
Tom
Index: ChangeLog
from 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.
Index: prims.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/prims.cc,v
retrieving revision 1.84
diff -u -r1.84 prims.cc
--- prims.cc 2 Oct 2003 15:34:28 -0000 1.84
+++ prims.cc 13 Oct 2003 22:06:18 -0000
@@ -633,8 +633,6 @@
{
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;
Index: java/lang/natClassLoader.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natClassLoader.cc,v
retrieving revision 1.61
diff -u -r1.61 natClassLoader.cc
--- java/lang/natClassLoader.cc 9 Oct 2003 16:24:55 -0000 1.61
+++ java/lang/natClassLoader.cc 13 Oct 2003 22:06:18 -0000
@@ -55,7 +55,6 @@
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 @@
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;