Makefile.am: Correct friend function declaration.
* Makefile.am: Correct friend function declaration. * Makefile.in: Regenerated. * include/boehm-gc.h (JV_MARKOBJ_DECL, JV_MARKARRAY_DECL): Add scope to function names. Declare functions directly. * libjava/java/lang/Class.h (java::lang::Class): Correct friend class declaration. (_Jv_InitClass, _Jv_GetArrayClass): Move definition to global scope. * libjava/java/lang/Class.h (java::lang::Object): Correct friend class declaration. From-SVN: r90849
This commit is contained in:
parent
7915fbaa19
commit
21a0c6e02e
6 changed files with 311 additions and 143 deletions
|
@ -1,3 +1,16 @@
|
|||
2004-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
* Makefile.am: Correct friend function declaration.
|
||||
* Makefile.in: Regenerated.
|
||||
* include/boehm-gc.h (JV_MARKOBJ_DECL, JV_MARKARRAY_DECL): Add
|
||||
scope to function names. Declare functions directly.
|
||||
* libjava/java/lang/Class.h
|
||||
(java::lang::Class): Correct friend class declaration.
|
||||
(_Jv_InitClass, _Jv_GetArrayClass): Move definition to global
|
||||
scope.
|
||||
* libjava/java/lang/Class.h
|
||||
(java::lang::Object): Correct friend class declaration.
|
||||
|
||||
2004-11-17 David Daney <ddaney@avtrex.com>
|
||||
|
||||
* java/io/BufferedInputStream.java (skip): Return zero on EOF.
|
||||
|
|
|
@ -640,8 +640,10 @@ $(ordinary_nat_headers) $(xlib_nat_headers): %.h: %.class
|
|||
|
||||
java/lang/ClassLoader.h: java/lang/ClassLoader.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
|
||||
-friend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
|
||||
-prepend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
|
||||
-prepend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
|
||||
-friend 'jclass (::_Jv_FindClass) (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
|
||||
-friend 'void ::_Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/Thread.h: java/lang/Thread.class
|
||||
|
@ -649,45 +651,64 @@ java/lang/Thread.h: java/lang/Thread.class
|
|||
-prepend 'class _Jv_JNIEnv;' \
|
||||
-prepend '#define _JV_NOT_OWNER 1' \
|
||||
-prepend '#define _JV_INTERRUPTED 2' \
|
||||
-friend '_Jv_JNIEnv * _Jv_GetCurrentJNIEnv ();' \
|
||||
-friend 'void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
|
||||
-friend 'void _Jv_ThreadRun (java::lang::Thread* thread);' \
|
||||
-friend 'jint _Jv_AttachCurrentThread(java::lang::Thread* thread);' \
|
||||
-friend 'java::lang::Thread* _Jv_AttachCurrentThread(jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'java::lang::Thread* _Jv_AttachCurrentThreadAsDaemon(jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'jint _Jv_DetachCurrentThread ();' \
|
||||
-prepend '_Jv_JNIEnv * _Jv_GetCurrentJNIEnv ();' \
|
||||
-prepend 'void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
|
||||
-prepend 'void _Jv_ThreadRun (java::lang::Thread* thread);' \
|
||||
-prepend 'jint _Jv_AttachCurrentThread(java::lang::Thread* thread);' \
|
||||
-prepend 'java::lang::Thread* _Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-prepend 'java::lang::Thread* _Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-prepend 'jint _Jv_DetachCurrentThread ();' \
|
||||
-friend '_Jv_JNIEnv * ::_Jv_GetCurrentJNIEnv ();' \
|
||||
-friend 'void ::_Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
|
||||
-friend 'void ::_Jv_ThreadRun (java::lang::Thread* thread);' \
|
||||
-friend 'jint (::_Jv_AttachCurrentThread) (java::lang::Thread* thread);' \
|
||||
-friend 'java::lang::Thread* ::_Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'java::lang::Thread* ::_Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'jint (::_Jv_DetachCurrentThread) ();' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/String.h: java/lang/String.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jchar* _Jv_GetStringChars (jstring str);' \
|
||||
-friend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \
|
||||
-friend 'jstring* _Jv_StringGetSlot (jstring);' \
|
||||
-friend 'jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);' \
|
||||
-friend 'jstring _Jv_NewStringLatin1 (const char*, jsize);' \
|
||||
-friend 'jstring _Jv_AllocString (jsize);' \
|
||||
-prepend 'jchar* _Jv_GetStringChars (jstring str);' \
|
||||
-prepend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \
|
||||
-prepend 'jstring* _Jv_StringGetSlot (jstring);' \
|
||||
-prepend 'jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);' \
|
||||
-prepend 'jstring _Jv_NewStringLatin1 (const char*, jsize);' \
|
||||
-prepend 'jstring _Jv_AllocString (jsize);' \
|
||||
-friend 'jchar* ::_Jv_GetStringChars (jstring str);' \
|
||||
-friend 'jstring* ::_Jv_StringFindSlot (jchar*, jint, jint);' \
|
||||
-friend 'jstring* ::_Jv_StringGetSlot (jstring);' \
|
||||
-friend 'jstring (::_Jv_NewStringUtf8Const) (_Jv_Utf8Const* str);' \
|
||||
-friend 'jstring (::_Jv_NewStringLatin1) (const char*, jsize);' \
|
||||
-friend 'jstring (::_Jv_AllocString) (jsize);' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/reflect/Constructor.h: java/lang/reflect/Constructor.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \
|
||||
-prepend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
-friend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/reflect/Field.h: java/lang/reflect/Field.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \
|
||||
-friend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
|
||||
-prepend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
|
||||
-friend 'jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/reflect/Method.h: java/lang/reflect/Method.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \
|
||||
-prepend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
-friend 'class java::io::ObjectInputStream;' \
|
||||
-friend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/reflect/Proxy.h: java/lang/reflect/Proxy.class
|
||||
|
|
|
@ -23803,8 +23803,10 @@ $(ordinary_nat_headers) $(xlib_nat_headers): %.h: %.class
|
|||
|
||||
java/lang/ClassLoader.h: java/lang/ClassLoader.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
|
||||
-friend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
|
||||
-prepend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
|
||||
-prepend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
|
||||
-friend 'jclass (::_Jv_FindClass) (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
|
||||
-friend 'void ::_Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/Thread.h: java/lang/Thread.class
|
||||
|
@ -23812,45 +23814,64 @@ java/lang/Thread.h: java/lang/Thread.class
|
|||
-prepend 'class _Jv_JNIEnv;' \
|
||||
-prepend '#define _JV_NOT_OWNER 1' \
|
||||
-prepend '#define _JV_INTERRUPTED 2' \
|
||||
-friend '_Jv_JNIEnv * _Jv_GetCurrentJNIEnv ();' \
|
||||
-friend 'void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
|
||||
-friend 'void _Jv_ThreadRun (java::lang::Thread* thread);' \
|
||||
-friend 'jint _Jv_AttachCurrentThread(java::lang::Thread* thread);' \
|
||||
-friend 'java::lang::Thread* _Jv_AttachCurrentThread(jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'java::lang::Thread* _Jv_AttachCurrentThreadAsDaemon(jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'jint _Jv_DetachCurrentThread ();' \
|
||||
-prepend '_Jv_JNIEnv * _Jv_GetCurrentJNIEnv ();' \
|
||||
-prepend 'void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
|
||||
-prepend 'void _Jv_ThreadRun (java::lang::Thread* thread);' \
|
||||
-prepend 'jint _Jv_AttachCurrentThread(java::lang::Thread* thread);' \
|
||||
-prepend 'java::lang::Thread* _Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-prepend 'java::lang::Thread* _Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-prepend 'jint _Jv_DetachCurrentThread ();' \
|
||||
-friend '_Jv_JNIEnv * ::_Jv_GetCurrentJNIEnv ();' \
|
||||
-friend 'void ::_Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
|
||||
-friend 'void ::_Jv_ThreadRun (java::lang::Thread* thread);' \
|
||||
-friend 'jint (::_Jv_AttachCurrentThread) (java::lang::Thread* thread);' \
|
||||
-friend 'java::lang::Thread* ::_Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'java::lang::Thread* ::_Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
|
||||
-friend 'jint (::_Jv_DetachCurrentThread) ();' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/String.h: java/lang/String.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jchar* _Jv_GetStringChars (jstring str);' \
|
||||
-friend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \
|
||||
-friend 'jstring* _Jv_StringGetSlot (jstring);' \
|
||||
-friend 'jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);' \
|
||||
-friend 'jstring _Jv_NewStringLatin1 (const char*, jsize);' \
|
||||
-friend 'jstring _Jv_AllocString (jsize);' \
|
||||
-prepend 'jchar* _Jv_GetStringChars (jstring str);' \
|
||||
-prepend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \
|
||||
-prepend 'jstring* _Jv_StringGetSlot (jstring);' \
|
||||
-prepend 'jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);' \
|
||||
-prepend 'jstring _Jv_NewStringLatin1 (const char*, jsize);' \
|
||||
-prepend 'jstring _Jv_AllocString (jsize);' \
|
||||
-friend 'jchar* ::_Jv_GetStringChars (jstring str);' \
|
||||
-friend 'jstring* ::_Jv_StringFindSlot (jchar*, jint, jint);' \
|
||||
-friend 'jstring* ::_Jv_StringGetSlot (jstring);' \
|
||||
-friend 'jstring (::_Jv_NewStringUtf8Const) (_Jv_Utf8Const* str);' \
|
||||
-friend 'jstring (::_Jv_NewStringLatin1) (const char*, jsize);' \
|
||||
-friend 'jstring (::_Jv_AllocString) (jsize);' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/reflect/Constructor.h: java/lang/reflect/Constructor.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \
|
||||
-prepend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
-friend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/reflect/Field.h: java/lang/reflect/Field.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \
|
||||
-friend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
|
||||
-prepend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
|
||||
-friend 'jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/reflect/Method.h: java/lang/reflect/Method.class
|
||||
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
|
||||
-friend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \
|
||||
-prepend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \
|
||||
-prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *);' \
|
||||
-friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
-friend 'class java::lang::Class;' \
|
||||
-friend 'class java::io::ObjectInputStream;' \
|
||||
-friend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
|
||||
$(basename $<)
|
||||
|
||||
java/lang/reflect/Proxy.h: java/lang/reflect/Proxy.class
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- c++ -*-
|
||||
// boehm-gc.h - Defines for Boehm collector.
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2002 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2002, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -12,13 +12,13 @@ details. */
|
|||
#ifndef __JV_BOEHM_GC__
|
||||
#define __JV_BOEHM_GC__
|
||||
|
||||
#define JV_MARKOBJ_DECL void *_Jv_MarkObj (void *, void *, void *, void *)
|
||||
#define JV_MARKARRAY_DECL void *_Jv_MarkArray (void *, void *, void *, void *)
|
||||
#define JV_MARKOBJ_DECL void *::_Jv_MarkObj (void *, void *, void *, void *)
|
||||
#define JV_MARKARRAY_DECL void *::_Jv_MarkArray (void *, void *, void *, void *)
|
||||
|
||||
extern "C"
|
||||
{
|
||||
JV_MARKOBJ_DECL;
|
||||
JV_MARKARRAY_DECL;
|
||||
void *_Jv_MarkObj (void *, void *, void *, void *);
|
||||
void *_Jv_MarkArray (void *, void *, void *, void *);
|
||||
}
|
||||
|
||||
// Enough stuff to inline _Jv_AllocObj. Ugly.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Class.h - Header file for java.lang.Class. -*- c++ -*-
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -144,11 +144,111 @@ struct _Jv_CatchClass
|
|||
#define JV_CLASS(Obj) ((jclass) (*(_Jv_VTable **) Obj)->clas)
|
||||
|
||||
// Forward declarations for friends of java::lang::Class
|
||||
|
||||
// Friend functions implemented in natClass.cc.
|
||||
_Jv_Method *_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
|
||||
_Jv_Utf8Const *signature);
|
||||
jboolean _Jv_IsAssignableFrom (jclass, jclass);
|
||||
jboolean _Jv_InterfaceAssignableFrom (jclass, jclass);
|
||||
void _Jv_InitClass (jclass klass);
|
||||
|
||||
_Jv_Method* _Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *,
|
||||
_Jv_Utf8Const*);
|
||||
jfieldID JvGetFirstInstanceField (jclass);
|
||||
jint JvNumInstanceFields (jclass);
|
||||
jfieldID JvGetFirstStaticField (jclass);
|
||||
jint JvNumStaticFields (jclass);
|
||||
|
||||
jobject _Jv_AllocObject (jclass);
|
||||
void *_Jv_AllocObj (jint, jclass);
|
||||
void *_Jv_AllocPtrFreeObj (jint, jclass);
|
||||
void *_Jv_AllocArray (jint, jclass);
|
||||
|
||||
jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv *, jclass, jfieldID,
|
||||
jboolean);
|
||||
jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID,
|
||||
jboolean);
|
||||
jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);
|
||||
|
||||
jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);
|
||||
jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);
|
||||
jint JvNumMethods (jclass);
|
||||
jmethodID JvGetFirstMethod (jclass);
|
||||
|
||||
// Friend classes and functions to implement the ClassLoader
|
||||
class java::lang::ClassLoader;
|
||||
class java::lang::VMClassLoader;
|
||||
|
||||
class java::io::ObjectOutputStream;
|
||||
class java::io::ObjectInputStream;
|
||||
class java::io::ObjectStreamClass;
|
||||
|
||||
void _Jv_WaitForState (jclass, int);
|
||||
void _Jv_RegisterClasses (const jclass *classes);
|
||||
void _Jv_RegisterClasses_Counted (const jclass *classes,
|
||||
size_t count);
|
||||
void _Jv_RegisterClassHookDefault (jclass klass);
|
||||
void _Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
|
||||
void _Jv_UnregisterClass (jclass);
|
||||
jclass _Jv_FindClass (_Jv_Utf8Const *name,
|
||||
java::lang::ClassLoader *loader);
|
||||
jclass _Jv_FindClassInCache (_Jv_Utf8Const *name,
|
||||
java::lang::ClassLoader *loader);
|
||||
jclass _Jv_PopClass (void);
|
||||
void _Jv_PushClass (jclass k);
|
||||
void _Jv_NewArrayClass (jclass element,
|
||||
java::lang::ClassLoader *loader,
|
||||
_Jv_VTable *array_vtable = 0);
|
||||
jclass _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass,
|
||||
java::lang::ClassLoader *loader);
|
||||
void _Jv_InitNewClassFields (jclass klass);
|
||||
|
||||
// Friend functions and classes in prims.cc
|
||||
void _Jv_InitPrimClass (jclass, char *, char, int);
|
||||
void _Jv_PrepareCompiledClass (jclass);
|
||||
void _Jv_PrepareConstantTimeTables (jclass);
|
||||
jshort _Jv_GetInterfaces (jclass, _Jv_ifaces *);
|
||||
void _Jv_GenerateITable (jclass, _Jv_ifaces *, jshort *);
|
||||
jstring _Jv_GetMethodString (jclass, _Jv_Utf8Const *);
|
||||
jshort _Jv_AppendPartialITable (jclass, jclass, void **, jshort);
|
||||
jshort _Jv_FindIIndex (jclass *, jshort *, jshort);
|
||||
void _Jv_LinkSymbolTable (jclass);
|
||||
void _Jv_LayoutInterfaceMethods (jclass);
|
||||
void _Jv_LayoutVTableMethods (jclass klass);
|
||||
void _Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *);
|
||||
void _Jv_MakeVTable (jclass);
|
||||
void _Jv_linkExceptionClassTable (jclass);
|
||||
|
||||
jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass,
|
||||
jint flags);
|
||||
jclass _Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader);
|
||||
|
||||
#ifdef INTERPRETER
|
||||
jboolean _Jv_IsInterpretedClass (jclass);
|
||||
void _Jv_InitField (jobject, jclass, _Jv_Field*);
|
||||
void _Jv_InitField (jobject, jclass, int);
|
||||
_Jv_word _Jv_ResolvePoolEntry (jclass, int);
|
||||
_Jv_Method *_Jv_SearchMethodInClass (jclass cls, jclass klass,
|
||||
_Jv_Utf8Const *method_name,
|
||||
_Jv_Utf8Const *method_signature);
|
||||
|
||||
void _Jv_PrepareClass (jclass);
|
||||
void _Jv_PrepareMissingMethods (jclass base, jclass iface_class);
|
||||
|
||||
void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
|
||||
|
||||
class _Jv_ClassReader;
|
||||
class _Jv_InterpClass;
|
||||
class _Jv_InterpMethod;
|
||||
#endif
|
||||
|
||||
class _Jv_BytecodeVerifier;
|
||||
class _Jv_StackTrace;
|
||||
class gnu::gcj::runtime::StackTrace;
|
||||
class java::io::VMObjectStreamClass;
|
||||
|
||||
void _Jv_sharedlib_register_hook (jclass klass);
|
||||
|
||||
|
||||
class java::lang::Class : public java::lang::Object
|
||||
{
|
||||
|
@ -273,43 +373,37 @@ private:
|
|||
static jstring getPackagePortion (jstring);
|
||||
|
||||
// Friend functions implemented in natClass.cc.
|
||||
friend _Jv_Method *_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
|
||||
_Jv_Utf8Const *signature);
|
||||
friend jboolean _Jv_IsAssignableFrom(jclass, jclass);
|
||||
friend jboolean _Jv_InterfaceAssignableFrom (jclass, jclass);
|
||||
friend void *_Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface,
|
||||
int method_idx);
|
||||
friend _Jv_Method *::_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
|
||||
_Jv_Utf8Const *signature);
|
||||
friend jboolean (::_Jv_IsAssignableFrom) (jclass, jclass);
|
||||
friend jboolean (::_Jv_InterfaceAssignableFrom) (jclass, jclass);
|
||||
friend void *::_Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface,
|
||||
int method_idx);
|
||||
|
||||
inline friend void
|
||||
_Jv_InitClass (jclass klass)
|
||||
{
|
||||
if (__builtin_expect (klass->state == JV_STATE_DONE, true))
|
||||
return;
|
||||
klass->initializeClass ();
|
||||
}
|
||||
friend void ::_Jv_InitClass (jclass klass);
|
||||
|
||||
friend _Jv_Method* _Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *,
|
||||
_Jv_Utf8Const*);
|
||||
friend jfieldID JvGetFirstInstanceField (jclass);
|
||||
friend jint JvNumInstanceFields (jclass);
|
||||
friend jfieldID JvGetFirstStaticField (jclass);
|
||||
friend jint JvNumStaticFields (jclass);
|
||||
friend _Jv_Method* ::_Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *,
|
||||
_Jv_Utf8Const*);
|
||||
friend jfieldID (::JvGetFirstInstanceField) (jclass);
|
||||
friend jint (::JvNumInstanceFields) (jclass);
|
||||
friend jfieldID (::JvGetFirstStaticField) (jclass);
|
||||
friend jint (::JvNumStaticFields) (jclass);
|
||||
|
||||
friend jobject _Jv_AllocObject (jclass);
|
||||
friend void *_Jv_AllocObj (jint, jclass);
|
||||
friend void *_Jv_AllocPtrFreeObj (jint, jclass);
|
||||
friend void *_Jv_AllocArray (jint, jclass);
|
||||
friend jobject (::_Jv_AllocObject) (jclass);
|
||||
friend void *::_Jv_AllocObj (jint, jclass);
|
||||
friend void *::_Jv_AllocPtrFreeObj (jint, jclass);
|
||||
friend void *::_Jv_AllocArray (jint, jclass);
|
||||
|
||||
friend jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv *, jclass, jfieldID,
|
||||
jboolean);
|
||||
friend jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID,
|
||||
jboolean);
|
||||
friend jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);
|
||||
friend jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv *, jclass, jfieldID,
|
||||
jboolean);
|
||||
friend jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID,
|
||||
jboolean);
|
||||
friend jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *);
|
||||
|
||||
friend jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);
|
||||
friend jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);
|
||||
friend jint JvNumMethods (jclass);
|
||||
friend jmethodID JvGetFirstMethod (jclass);
|
||||
friend jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *);
|
||||
friend jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *);
|
||||
friend jint (::JvNumMethods) (jclass);
|
||||
friend jmethodID (::JvGetFirstMethod) (jclass);
|
||||
|
||||
// Friends classes and functions to implement the ClassLoader
|
||||
friend class java::lang::ClassLoader;
|
||||
|
@ -319,72 +413,62 @@ private:
|
|||
friend class java::io::ObjectInputStream;
|
||||
friend class java::io::ObjectStreamClass;
|
||||
|
||||
friend void _Jv_WaitForState (jclass, int);
|
||||
friend void _Jv_RegisterClasses (const jclass *classes);
|
||||
friend void _Jv_RegisterClasses_Counted (const jclass *classes,
|
||||
size_t count);
|
||||
friend void _Jv_RegisterClassHookDefault (jclass klass);
|
||||
friend void _Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
|
||||
friend void _Jv_UnregisterClass (jclass);
|
||||
friend jclass _Jv_FindClass (_Jv_Utf8Const *name,
|
||||
java::lang::ClassLoader *loader);
|
||||
friend jclass _Jv_FindClassInCache (_Jv_Utf8Const *name,
|
||||
java::lang::ClassLoader *loader);
|
||||
friend jclass _Jv_PopClass (void);
|
||||
friend void _Jv_PushClass (jclass k);
|
||||
friend void _Jv_NewArrayClass (jclass element,
|
||||
java::lang::ClassLoader *loader,
|
||||
_Jv_VTable *array_vtable = 0);
|
||||
friend jclass _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass,
|
||||
java::lang::ClassLoader *loader);
|
||||
friend void _Jv_InitNewClassFields (jclass klass);
|
||||
friend void ::_Jv_WaitForState (jclass, int);
|
||||
friend void ::_Jv_RegisterClasses (const jclass *classes);
|
||||
friend void ::_Jv_RegisterClasses_Counted (const jclass *classes,
|
||||
size_t count);
|
||||
friend void ::_Jv_RegisterClassHookDefault (jclass klass);
|
||||
friend void ::_Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
|
||||
friend void ::_Jv_UnregisterClass (jclass);
|
||||
friend jclass (::_Jv_FindClass) (_Jv_Utf8Const *name,
|
||||
java::lang::ClassLoader *loader);
|
||||
friend jclass (::_Jv_FindClassInCache) (_Jv_Utf8Const *name,
|
||||
java::lang::ClassLoader *loader);
|
||||
friend jclass (::_Jv_PopClass) (void);
|
||||
friend void ::_Jv_PushClass (jclass k);
|
||||
friend void ::_Jv_NewArrayClass (jclass element,
|
||||
java::lang::ClassLoader *loader,
|
||||
_Jv_VTable *array_vtable);
|
||||
friend jclass (::_Jv_NewClass) (_Jv_Utf8Const *name, jclass superclass,
|
||||
java::lang::ClassLoader *loader);
|
||||
friend void ::_Jv_InitNewClassFields (jclass klass);
|
||||
|
||||
// in prims.cc
|
||||
friend void _Jv_InitPrimClass (jclass, char *, char, int);
|
||||
friend void ::_Jv_InitPrimClass (jclass, char *, char, int);
|
||||
|
||||
friend void _Jv_PrepareCompiledClass (jclass);
|
||||
friend void _Jv_PrepareConstantTimeTables (jclass);
|
||||
friend jshort _Jv_GetInterfaces (jclass, _Jv_ifaces *);
|
||||
friend void _Jv_GenerateITable (jclass, _Jv_ifaces *, jshort *);
|
||||
friend jstring _Jv_GetMethodString(jclass, _Jv_Utf8Const *);
|
||||
friend jshort _Jv_AppendPartialITable (jclass, jclass, void **, jshort);
|
||||
friend jshort _Jv_FindIIndex (jclass *, jshort *, jshort);
|
||||
friend void _Jv_LinkSymbolTable (jclass);
|
||||
friend void _Jv_LayoutInterfaceMethods (jclass);
|
||||
friend void _Jv_LayoutVTableMethods (jclass klass);
|
||||
friend void _Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *);
|
||||
friend void _Jv_MakeVTable (jclass);
|
||||
friend void _Jv_linkExceptionClassTable (jclass);
|
||||
friend void ::_Jv_PrepareCompiledClass (jclass);
|
||||
friend void ::_Jv_PrepareConstantTimeTables (jclass);
|
||||
friend jshort (::_Jv_GetInterfaces) (jclass, _Jv_ifaces *);
|
||||
friend void ::_Jv_GenerateITable (jclass, _Jv_ifaces *, jshort *);
|
||||
friend jstring (::_Jv_GetMethodString) (jclass, _Jv_Utf8Const *);
|
||||
friend jshort (::_Jv_AppendPartialITable) (jclass, jclass, void **, jshort);
|
||||
friend jshort (::_Jv_FindIIndex) (jclass *, jshort *, jshort);
|
||||
friend void ::_Jv_LinkSymbolTable (jclass);
|
||||
friend void ::_Jv_LayoutInterfaceMethods (jclass);
|
||||
friend void ::_Jv_LayoutVTableMethods (jclass klass);
|
||||
friend void ::_Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *);
|
||||
friend void ::_Jv_MakeVTable (jclass);
|
||||
friend void ::_Jv_linkExceptionClassTable (jclass);
|
||||
|
||||
friend jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass,
|
||||
friend jboolean (::_Jv_CheckAccess) (jclass self_klass, jclass other_klass,
|
||||
jint flags);
|
||||
|
||||
// Return array class corresponding to element type KLASS, creating it if
|
||||
// necessary.
|
||||
inline friend jclass
|
||||
_Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader)
|
||||
{
|
||||
extern void _Jv_NewArrayClass (jclass element,
|
||||
java::lang::ClassLoader *loader,
|
||||
_Jv_VTable *array_vtable = 0);
|
||||
if (__builtin_expect (!klass->arrayclass, false))
|
||||
_Jv_NewArrayClass (klass, loader);
|
||||
return klass->arrayclass;
|
||||
}
|
||||
friend jclass (::_Jv_GetArrayClass) (jclass klass,
|
||||
java::lang::ClassLoader *loader);
|
||||
|
||||
#ifdef INTERPRETER
|
||||
friend jboolean _Jv_IsInterpretedClass (jclass);
|
||||
friend void _Jv_InitField (jobject, jclass, _Jv_Field*);
|
||||
friend void _Jv_InitField (jobject, jclass, int);
|
||||
friend _Jv_word _Jv_ResolvePoolEntry (jclass, int);
|
||||
friend _Jv_Method *_Jv_SearchMethodInClass (jclass cls, jclass klass,
|
||||
_Jv_Utf8Const *method_name,
|
||||
_Jv_Utf8Const *method_signature);
|
||||
friend jboolean (::_Jv_IsInterpretedClass) (jclass);
|
||||
friend void ::_Jv_InitField (jobject, jclass, _Jv_Field*);
|
||||
friend void ::_Jv_InitField (jobject, jclass, int);
|
||||
friend _Jv_word (::_Jv_ResolvePoolEntry) (jclass, int);
|
||||
friend _Jv_Method *::_Jv_SearchMethodInClass (jclass cls, jclass klass,
|
||||
_Jv_Utf8Const *method_name,
|
||||
_Jv_Utf8Const *method_signature);
|
||||
|
||||
friend void _Jv_PrepareClass (jclass);
|
||||
friend void _Jv_PrepareMissingMethods (jclass base, jclass iface_class);
|
||||
friend void ::_Jv_PrepareClass (jclass);
|
||||
friend void ::_Jv_PrepareMissingMethods (jclass base, jclass iface_class);
|
||||
|
||||
friend void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
|
||||
friend void ::_Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
|
||||
|
||||
friend class ::_Jv_ClassReader;
|
||||
friend class ::_Jv_InterpClass;
|
||||
|
@ -400,7 +484,7 @@ private:
|
|||
friend class gnu::gcj::runtime::StackTrace;
|
||||
friend class java::io::VMObjectStreamClass;
|
||||
|
||||
friend void _Jv_sharedlib_register_hook (jclass klass);
|
||||
friend void ::_Jv_sharedlib_register_hook (jclass klass);
|
||||
|
||||
// Chain for class pool.
|
||||
jclass next;
|
||||
|
@ -467,4 +551,26 @@ private:
|
|||
void *aux_info;
|
||||
};
|
||||
|
||||
// Inline functions that are friends of java::lang::Class
|
||||
|
||||
inline void _Jv_InitClass (jclass klass)
|
||||
{
|
||||
if (__builtin_expect (klass->state == JV_STATE_DONE, true))
|
||||
return;
|
||||
klass->initializeClass ();
|
||||
}
|
||||
|
||||
// Return array class corresponding to element type KLASS, creating it if
|
||||
// necessary.
|
||||
inline jclass
|
||||
_Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader)
|
||||
{
|
||||
extern void _Jv_NewArrayClass (jclass element,
|
||||
java::lang::ClassLoader *loader,
|
||||
_Jv_VTable *array_vtable = 0);
|
||||
if (__builtin_expect (!klass->arrayclass, false))
|
||||
_Jv_NewArrayClass (klass, loader);
|
||||
return klass->arrayclass;
|
||||
}
|
||||
|
||||
#endif /* __JAVA_LANG_CLASS_H__ */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Object.h - Header file for java.lang.Object. -*- c++ -*-
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -28,6 +28,13 @@ protected:
|
|||
# endif
|
||||
};
|
||||
|
||||
// Forward declarations for friends of java::lang::Object
|
||||
void _Jv_MonitorEnter (jobject obj);
|
||||
void _Jv_MonitorExit (jobject obj);
|
||||
void _Jv_InitializeSyncMutex (void);
|
||||
void _Jv_FinalizeObject (jobject obj);
|
||||
bool _Jv_ObjectCheckMonitor (jobject obj);
|
||||
|
||||
class java::lang::Object : public _JvObjectPrefix
|
||||
{
|
||||
protected:
|
||||
|
@ -45,11 +52,11 @@ public:
|
|||
void wait (void);
|
||||
void wait (jlong timeout);
|
||||
|
||||
friend void _Jv_MonitorEnter (jobject obj);
|
||||
friend void _Jv_MonitorExit (jobject obj);
|
||||
friend void _Jv_InitializeSyncMutex (void);
|
||||
friend void _Jv_FinalizeObject (jobject obj);
|
||||
friend bool _Jv_ObjectCheckMonitor (jobject obj);
|
||||
friend void ::_Jv_MonitorEnter (jobject obj);
|
||||
friend void ::_Jv_MonitorExit (jobject obj);
|
||||
friend void ::_Jv_InitializeSyncMutex (void);
|
||||
friend void ::_Jv_FinalizeObject (jobject obj);
|
||||
friend bool ::_Jv_ObjectCheckMonitor (jobject obj);
|
||||
|
||||
#ifdef JV_MARKOBJ_DECL
|
||||
friend JV_MARKOBJ_DECL;
|
||||
|
|
Loading…
Add table
Reference in a new issue