diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-19 22:24:26 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-19 22:24:26 +0000 |
commit | 2b7c9eade559b8ef53acd84b70bed970c32836ca (patch) | |
tree | 64f08909c66f04266d262394dfb5d7e7b59c1059 /libjava | |
parent | 8754a0cdda077f211802b535df76dea757e3a471 (diff) | |
download | linaro-gcc-2b7c9eade559b8ef53acd84b70bed970c32836ca.tar.gz linaro-gcc-2b7c9eade559b8ef53acd84b70bed970c32836ca.tar.bz2 linaro-gcc-2b7c9eade559b8ef53acd84b70bed970c32836ca.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99993 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 8 | ||||
-rw-r--r-- | libjava/java/lang/natClassLoader.cc | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d99537cf5ca..738b017e5f0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,13 @@ 2005-05-19 Bryce McKinlay <mckinlay@redhat.com> + * 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 <mckinlay@redhat.com> + * 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 2fa3f49ef1b..fb3515b5a78 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; } |