This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[BC] Patch: FYI: minor linker cleanups
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 08 Nov 2004 09:47:21 -0700
- Subject: [BC] Patch: FYI: minor linker cleanups
- Reply-to: tromey at redhat dot com
I'm checking this in on the BC branch.
This renames a function that should have been in _Jv_Linker. It also
removes a bunch of unneeded friend declarations.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* include/jvm.h (_Jv_Linker::search_method_in_class): Declare.
* include/java-interp.h (class _Jv_InterpClass)
<_Jv_PrepareMissingMethods>: No longer `friend'.
* java/lang/Class.h (_Jv_SearchMethodInClass): No longer
`friend'.
(_Jv_PrepareMissingMethods, _Jv_PrepareCompiledClass,
_Jv_GetInterfaces, _Jv_GenerateITable, _Jv_FindIIndex,
_Jv_AppendPartialITable, _Jv_LinkSymbolTable,
_Jv_LayoutInterfaceMethods, _Jv_SetVTableEntries, _Jv_MakeVTable,
_Jv_linkExceptionClassTable, _Jv_WaitForState): Likewise.
* link.cc (search_method_in_class): Renamed from
_Jv_SearchMethodInClass.
(resolve_pool_entry): Updated.
Index: link.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Attic/link.cc,v
retrieving revision 1.1.2.11
diff -u -r1.1.2.11 link.cc
--- link.cc 6 Nov 2004 03:47:02 -0000 1.1.2.11
+++ link.cc 8 Nov 2004 16:45:51 -0000
@@ -270,8 +270,8 @@
wait_for_state (klass, JV_STATE_LOADED);
// First search the class itself.
- the_method = _Jv_SearchMethodInClass (owner, klass,
- method_name, method_signature);
+ the_method = search_method_in_class (owner, klass,
+ method_name, method_signature);
if (the_method != 0)
{
@@ -296,8 +296,8 @@
for (int i = 0; i < ifaces.count; i++)
{
jclass cls = ifaces.list[i];
- the_method = _Jv_SearchMethodInClass (cls, klass, method_name,
- method_signature);
+ the_method = search_method_in_class (cls, klass, method_name,
+ method_signature);
if (the_method != 0)
{
found_class = cls;
@@ -315,8 +315,8 @@
for (jclass cls = owner->getSuperclass (); cls != 0;
cls = cls->getSuperclass ())
{
- the_method = _Jv_SearchMethodInClass (cls, klass, method_name,
- method_signature);
+ the_method = search_method_in_class (cls, klass, method_name,
+ method_signature);
if (the_method != 0)
{
found_class = cls;
@@ -391,9 +391,9 @@
// Find a method declared in the cls that is referenced from klass and
// perform access checks.
_Jv_Method *
-_Jv_SearchMethodInClass (jclass cls, jclass klass,
- _Jv_Utf8Const *method_name,
- _Jv_Utf8Const *method_signature)
+_Jv_Linker::search_method_in_class (jclass cls, jclass klass,
+ _Jv_Utf8Const *method_name,
+ _Jv_Utf8Const *method_signature)
{
using namespace java::lang::reflect;
@@ -794,7 +794,7 @@
// Set this to true to enable debugging of indirect dispatch tables/linking.
static bool debug_link = false;
-// _Jv_LinkSymbolTable() scans these two arrays and fills in the
+// link_symbol_table() scans these two arrays and fills in the
// corresponding atable and otable with the addresses of static
// members and the offsets of virtual members.
Index: include/java-interp.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/java-interp.h,v
retrieving revision 1.23.16.5
diff -u -r1.23.16.5 java-interp.h
--- include/java-interp.h 12 Oct 2004 14:52:42 -0000 1.23.16.5
+++ include/java-interp.h 8 Nov 2004 16:45:51 -0000
@@ -162,7 +162,6 @@
friend class _Jv_ClassReader;
friend class _Jv_InterpMethod;
friend class _Jv_InterpreterEngine;
- friend void _Jv_PrepareMissingMethods (jclass base2, jclass iface_class);
friend void _Jv_InitField (jobject, jclass, int);
#ifdef JV_MARKOBJ_DECL
friend JV_MARKOBJ_DECL;
Index: include/jvm.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/jvm.h,v
retrieving revision 1.63.6.11
diff -u -r1.63.6.11 jvm.h
--- include/jvm.h 8 Nov 2004 16:27:26 -0000 1.63.6.11
+++ include/jvm.h 8 Nov 2004 16:45:51 -0000
@@ -269,6 +269,9 @@
static int get_alignment_from_class(jclass);
static void generate_itable(jclass, _Jv_ifaces *, jshort *);
static jshort append_partial_itable(jclass, jclass, void **, jshort);
+ static _Jv_Method *search_method_in_class (jclass, jclass,
+ _Jv_Utf8Const *,
+ _Jv_Utf8Const *);
public:
Index: java/lang/Class.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Class.h,v
retrieving revision 1.63.12.16
diff -u -r1.63.12.16 Class.h
--- java/lang/Class.h 5 Nov 2004 19:30:12 -0000 1.63.12.16
+++ java/lang/Class.h 8 Nov 2004 16:45:51 -0000
@@ -108,7 +108,7 @@
} iface;
};
-// Used by _Jv_GetInterfaces ()
+// Used by _Jv_Linker::get_interfaces ()
struct _Jv_ifaces
{
jclass *list;
@@ -371,18 +371,7 @@
// in prims.cc
friend void _Jv_InitPrimClass (jclass, char *, char, int);
- friend void _Jv_PrepareCompiledClass (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_SetVTableEntries (jclass, _Jv_VTable *, jboolean *);
- friend void _Jv_MakeVTable (jclass);
- friend void _Jv_linkExceptionClassTable (jclass);
- friend void _Jv_WaitForState (jclass klass, int state);
friend jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass,
jint flags);
@@ -407,11 +396,6 @@
#ifdef INTERPRETER
friend jboolean _Jv_IsInterpretedClass (jclass);
friend void _Jv_InitField (jobject, jclass, int);
- friend _Jv_Method *_Jv_SearchMethodInClass (jclass cls, jclass klass,
- _Jv_Utf8Const *method_name,
- _Jv_Utf8Const *method_signature);
-
- friend void _Jv_PrepareMissingMethods (jclass base, jclass iface_class);
friend class _Jv_ClassReader;
friend class _Jv_InterpClass;