This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Java: Clean out "finit_leg_identifier" cruft


Some time ago the name of the generated instance field initializer 
function was renamed from "$finit$" to "finit$". Some code got left in 
to recognise the old name, but it isn't neccessary ("finit$" is never 
used for class files, just for .java->.o compilation). This patch cleans 
it up.

OK to commit?

regards

Bryce.

2001-12-17  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* decl.c (java_init_decl_processing): Don't initialize 
	finit_leg_identifier_node.
	* java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
	(finit_leg_identifier_node): Remove.
	(ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/decl.c,v
retrieving revision 1.115
diff -u -r1.115 decl.c
--- decl.c	2001/12/16 06:09:46	1.115
+++ decl.c	2001/12/20 04:36:34
@@ -577,11 +577,6 @@
   TYPE_identifier_node = get_identifier ("TYPE");
   init_identifier_node = get_identifier ("<init>");
   clinit_identifier_node = get_identifier ("<clinit>");
-  /* Legacy `$finit$' special method identifier. This needs to be
-     recognized as equivalent to `finit$' but isn't generated anymore.  */
-  finit_leg_identifier_node = get_identifier ("$finit$");
-  /* The new `finit$' special method identifier. This one is now
-     generated in place of `$finit$'.  */
   finit_identifier_node = get_identifier ("finit$");
   instinit_identifier_node = get_identifier ("instinit$");
   void_signature_node = get_identifier ("()V");
Index: java-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/java-tree.h,v
retrieving revision 1.131
diff -u -r1.131 java-tree.h
--- java-tree.h	2001/12/16 16:23:49	1.131
+++ java-tree.h	2001/12/20 04:36:36
@@ -304,7 +304,6 @@
   JTI_CLINIT_IDENTIFIER_NODE,      
   JTI_FINIT_IDENTIFIER_NODE,      
   JTI_INSTINIT_IDENTIFIER_NODE,
-  JTI_FINIT_LEG_IDENTIFIER_NODE,  
   JTI_VOID_SIGNATURE_NODE,       
   JTI_LENGTH_IDENTIFIER_NODE,  
   JTI_FINALIZE_IDENTIFIER_NODE,
@@ -504,8 +503,6 @@
   java_global_trees[JTI_CLINIT_IDENTIFIER_NODE]      /* "<clinit>" */
 #define finit_identifier_node \
   java_global_trees[JTI_FINIT_IDENTIFIER_NODE]      /* "finit$" */
-#define finit_leg_identifier_node \
-  java_global_trees[JTI_FINIT_LEG_IDENTIFIER_NODE]  /* "$finit$" */
 /* FIXME "instinit$" and "finit$" should be merged  */
 #define instinit_identifier_node \
   java_global_trees[JTI_INSTINIT_IDENTIFIER_NODE]  /* "instinit$" */
@@ -997,7 +994,7 @@
   struct JCF *jcf;
   struct CPool *cpool;
   tree cpool_data_ref;		/* Cached */
-  tree finit_stmt_list;		/* List of statements $finit$ will use */
+  tree finit_stmt_list;		/* List of statements finit$ will use */
   tree clinit_stmt_list;	/* List of statements <clinit> will use  */
   tree ii_block;		/* Instance initializer block */
   tree dot_class;		/* The decl of the `class$' function that
@@ -1261,12 +1258,7 @@
 /* Predicates on method identifiers. Kept close to other macros using
    them  */
 #define ID_INIT_P(ID)   ((ID) == init_identifier_node)
-/* Match ID to either `$finit$' or `finit$', so that `$finit$'
-   continues to be recognized as an equivalent to `finit$' which is
-   now the preferred name used for the field initialization special
-   method.  */
-#define ID_FINIT_P(ID)  ((ID) == finit_identifier_node \
-			 || (ID) == finit_leg_identifier_node)
+#define ID_FINIT_P(ID)  ((ID) == finit_identifier_node)
 #define ID_CLINIT_P(ID) ((ID) == clinit_identifier_node)
 #define ID_CLASSDOLLAR_P(ID) ((ID) == classdollar_identifier_node)
 #define ID_INSTINIT_P(ID) ((ID) == instinit_identifier_node)
@@ -1426,7 +1418,7 @@
    layout of a class.  */
 #define CLASS_BEING_LAIDOUT(TYPE) TYPE_LANG_FLAG_6 (TYPE)
 
-/* True if class TYPE has a field initializer $finit$ function */
+/* True if class TYPE has a field initializer finit$ function */
 #define CLASS_HAS_FINIT_P(TYPE) TYPE_FINIT_STMT_LIST (TYPE)
 
 /* True if identifier ID was seen while processing a single type import stmt */
Index: parse.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.h,v
retrieving revision 1.81
diff -u -r1.81 parse.h
--- parse.h	2001/12/16 16:23:49	1.81
+++ parse.h	2001/12/20 04:36:36
@@ -261,7 +261,7 @@
   }
 
 /* Skip THIS and artificial parameters found in function decl M and
-   assign the result to C. We don't do that for $finit$, since it's
+   assign the result to C. We don't do that for finit$, since it's
    knowingly called with artificial parms.  */
 #define SKIP_THIS_AND_ARTIFICIAL_PARMS(C,M)			\
   {								\
@@ -321,7 +321,7 @@
   AIPL_FUNCTION_CREATION,	  /* Suitable for artificial method creation */
   AIPL_FUNCTION_DECLARATION,	  /* Suitable for declared methods */
   AIPL_FUNCTION_CTOR_INVOCATION,  /* Invocation of constructors */
-  AIPL_FUNCTION_FINIT_INVOCATION  /* Invocation of $finit$ */
+  AIPL_FUNCTION_FINIT_INVOCATION  /* Invocation of finit$ */
 };
 
 /* Standard error messages */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]