From 146e2904bcde57c65ede1a8aed9ee287a239e455 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Thu, 19 May 2005 22:24:26 +0000 Subject: natClassLoader.cc (_Jv_NewClass): Use _Jv_RegisterInitiatingLoader to register array classes, not _Jv_RegisterClass. * java/lang/natClassLoader.cc (_Jv_NewClass): Use _Jv_RegisterInitiatingLoader to register array classes, not _Jv_RegisterClass. (_Jv_RegisterInitiatingLoader): Give up if called very early during bootstrapping. Add a FIXME to handle this case better. From-SVN: r99993 --- libjava/ChangeLog | 8 ++++++++ libjava/java/lang/natClassLoader.cc | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d99537c..738b017 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,13 @@ 2005-05-19 Bryce McKinlay + * java/lang/natClassLoader.cc (_Jv_NewClass): Use + _Jv_RegisterInitiatingLoader to register array classes, not + _Jv_RegisterClass. + (_Jv_RegisterInitiatingLoader): Give up if called very early during + bootstrapping. Add a FIXME to handle this case better. + +2005-05-19 Bryce McKinlay + * Makefile.am (libgcj0_convenience_la): Removed. Don't build a libgcj convenience library. (libgcj_la_SOURCES): New. Move sources here. diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc index 2fa3f49..fb3515b 100644 --- a/libjava/java/lang/natClassLoader.cc +++ b/libjava/java/lang/natClassLoader.cc @@ -127,6 +127,14 @@ _Jv_RegisterInitiatingLoader (jclass klass, java::lang::ClassLoader *loader) { if (! loader) loader = java::lang::VMClassLoader::bootLoader; + if (! loader) + { + // Very early in the bootstrap process, the Bootstrap classloader may + // not exist yet. + // FIXME: We could maintain a list of these and come back and register + // them later. + return; + } loader->loadedClasses->put(klass->name->toString(), klass); } @@ -346,7 +354,7 @@ _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass, ret->superclass = superclass; ret->loader = loader; - _Jv_RegisterClass (ret); + _Jv_RegisterInitiatingLoader (ret, loader); return ret; } -- cgit v1.1