diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-10 19:39:26 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-10 19:39:26 +0000 |
commit | 743d66d0d409fc453f1172d70bdbb5bf5bfc4737 (patch) | |
tree | 966d2f436ef2b2ebadf80447ac97eca99afd09f7 /libjava/prims.cc | |
parent | 4c7c159ad4a0f7ba527305497199ceb813f1a3b8 (diff) | |
download | gcc-743d66d0d409fc453f1172d70bdbb5bf5bfc4737.tar.gz |
PR libgcj/12016, PR libgcj/18405, PR libgcj/17738:
* java/lang/Package.java (getPackages): Use VMClassLoader when
appropriate.
(getPackage): Likewise.
* prims.cc (_Jv_CreateJavaVM): Call
_Jv_RegisterBootstrapPackages.
* include/jvm.h (_Jv_RegisterBootstrapPackages): Declare.
* java/lang/VMClassLoader.java (getPackage): Rewrote.
(getPackages): Likewise.
(definedPackages): New field.
(definePackageForNative): New method.
* java/lang/Class.h (_Jv_FindClassInCache): Updated.
* java/lang/natVMClassLoader.cc (loadClass): Updated.
* defineclass.cc (handleClassBegin): Use
ClassLoader.findLoadedClass.
* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader):
Rewrote.
(struct _Jv_LoaderInfo): Removed.
(initiated_classes): Likewise.
(_Jv_UnregisterClass): Don't use initiated_classes.
(_Jv_FindClassInCache): Likewise. Removed 'loader' argument.
(_Jv_FindClass): Register classes found during boostrap.
(BOOTSTRAP_CLASS_LIST_SIZE): New define.
(bootstrap_class_list): New global.
(bootstrap_index): Likewise.
(_Jv_RegisterBootstrapPackages): New function.
* gnu/gcj/runtime/natVMClassLoader.cc (findClass): Call
definePackageForNative.
(findClass): Updated.
* gnu/gcj/runtime/VMClassLoader.java (definePackageForNative):
New method.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r-- | libjava/prims.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc index e3d5750cd1c..ac48d0dd9e3 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -1,6 +1,6 @@ // prims.cc - Code for core of runtime environment. -/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation This file is part of libgcj. @@ -968,6 +968,8 @@ _Jv_CreateJavaVM (void* /*vm_args*/) // system loader, by having it read the class path. gnu::gcj::runtime::VMClassLoader::initialize(); + _Jv_RegisterBootstrapPackages(); + no_memory = new java::lang::OutOfMemoryError; java::lang::VMThrowable::trace_enabled = 1; |