summaryrefslogtreecommitdiff
path: root/libjava/jni.cc
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-16 08:35:17 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-16 08:35:17 +0000
commit380cddab526fcf3c2f33dc8ebeb61c2d42703f41 (patch)
tree48472b1f97ae998bfbcb469ac6838d504c367998 /libjava/jni.cc
parentc490b220adad350c352aa16b7c0c6c812fc1cd48 (diff)
downloadgcc-380cddab526fcf3c2f33dc8ebeb61c2d42703f41.tar.gz
Eliminate use of C++ static constructors.
* interpret.cc: Remove static Utf8Consts. Use namespace gcj. * jni.cc: Likewise. * resolve.cc: Likewise. * defineclass.cc: Likewise. (_Jv_ClassReader::handleClassBegin): Synchronize call to _Jv_RegisterClass. * include/jvm.h (void_signature, clinit_name, init_name, finit_name): Declare in namespace gcj. * java/lang/Class.h (Class): Remove initialization for primitive types. (friend void _Jv_InitPrimClass): This is in prims.cc. * prims.cc (_Jv_InitPrimClass): Do primitive type initialization here instead. (void_signature, clinit_name, init_name, finit_name): Define in namespace gcj. (_Jv_CreateJavaVM): Call _Jv_InitThreads, _Jv_InitGC, and _Jv_InitializeSyncMutex from here. Initialize Utf8 constants. Initialize primitive types. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Don't call initialization routines. Don't synchronize. * java/lang/natRuntime.cc (_load): Synchronize on java.lang.Class across dlopen call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46282 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jni.cc')
-rw-r--r--libjava/jni.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/libjava/jni.cc b/libjava/jni.cc
index 8f4e4f14e22..8e586fa38f1 100644
--- a/libjava/jni.cc
+++ b/libjava/jni.cc
@@ -48,6 +48,8 @@ details. */
#include <java-interp.h>
#include <java-threads.h>
+using namespace gcj;
+
// This enum is used to select different template instantiations in
// the invocation code.
enum invocation_type
@@ -1502,9 +1504,6 @@ _Jv_JNI_ToReflectedMethod (JNIEnv *env, jclass klass, jmethodID id,
{
using namespace java::lang::reflect;
- // FIXME.
- static _Jv_Utf8Const *init_name = _Jv_makeUtf8Const ("<init>", 6);
-
jobject result = NULL;
try