This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: RFA: remove some unused gcj code
- From: Tom Tromey <tromey at redhat dot com>
- To: GCC libjava patches <java-patches at gcc dot gnu dot org>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 04 Aug 2003 12:22:01 -0600
- Subject: Patch: RFA: remove some unused gcj code
- Reply-to: tromey at redhat dot com
This patch removes some unused code from gcj.
First, it isn't possible to have a transient method, so I just
removed METHOD_TRANSIENT and updated its users.
Second, there is some code in pushdecl that does nothing.
Ok to commit?
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java-tree.h (METHOD_TRANSIENT): Removed.
* decl.c (pushdecl): Removed some dead code.
* class.c (get_access_flags_from_decl): Can't have transient
method.
(add_method_1): Can't have a transient method.
Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.162
diff -u -r1.162 class.c
--- class.c 25 Jul 2003 10:27:43 -0000 1.162
+++ class.c 4 Aug 2003 18:22:10 -0000
@@ -617,7 +617,6 @@
METHOD_FINAL (fndecl) = DECL_INLINE (fndecl) = 1;
if (access_flags & ACC_SYNCHRONIZED) METHOD_SYNCHRONIZED (fndecl) = 1;
if (access_flags & ACC_ABSTRACT) METHOD_ABSTRACT (fndecl) = 1;
- if (access_flags & ACC_TRANSIENT) METHOD_TRANSIENT (fndecl) = 1;
if (access_flags & ACC_STRICT) METHOD_STRICTFP (fndecl) = 1;
return fndecl;
}
@@ -1033,8 +1032,6 @@
access_flags |= ACC_NATIVE;
if (METHOD_ABSTRACT (decl))
access_flags |= ACC_ABSTRACT;
- if (METHOD_TRANSIENT (decl))
- access_flags |= ACC_TRANSIENT;
if (METHOD_STRICTFP (decl))
access_flags |= ACC_STRICT;
return access_flags;
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/decl.c,v
retrieving revision 1.158
diff -u -r1.158 decl.c
--- decl.c 25 Jul 2003 10:58:33 -0000 1.158
+++ decl.c 4 Aug 2003 18:22:11 -0000
@@ -1014,9 +1014,6 @@
DECL_CONTEXT (x) = current_function_decl;
if (name)
{
- const char *file;
- int line;
-
t = lookup_name_current_level (name);
if (t != 0 && t == error_mark_node)
/* error_mark_node is 0 for a while during initialization! */
@@ -1024,12 +1021,6 @@
t = 0;
error ("%H'%D' used prior to declaration",
&DECL_SOURCE_LOCATION (x), x);
- }
-
- if (t != 0)
- {
- file = DECL_SOURCE_FILE (t);
- line = DECL_SOURCE_LINE (t);
}
/* If we're naming a hitherto-unnamed type, set its TYPE_NAME
Index: java-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/java-tree.h,v
retrieving revision 1.179
diff -u -r1.179 java-tree.h
--- java-tree.h 24 Jul 2003 20:48:13 -0000 1.179
+++ java-tree.h 4 Aug 2003 18:22:12 -0000
@@ -109,8 +109,7 @@
LABEL_IS_SUBR_START (in LABEL_DECL)
CLASS_ABSTRACT (in TYPE_DECL)
FIELD_TRANSIENT (in FIELD_DECL)
- 6: METHOD_TRANSIENT (in FUNCTION_DECL)
- LABEL_CHANGED (in LABEL_DECL)
+ 6: LABEL_CHANGED (in LABEL_DECL)
CLASS_SUPER (in TYPE_DECL, ACC_SUPER flag)
FIELD_LOCAL_ALIAS (in FIELD_DECL)
7: DECL_CONSTRUCTOR_P (in FUNCTION_DECL).
@@ -1308,7 +1307,6 @@
#define METHOD_SYNCHRONIZED(DECL) DECL_LANG_FLAG_4 (DECL)
#define METHOD_NATIVE(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.native)
#define METHOD_ABSTRACT(DECL) DECL_LANG_FLAG_5 (DECL)
-#define METHOD_TRANSIENT(DECL) DECL_LANG_FLAG_6 (DECL)
#define METHOD_STRICTFP(DECL) (DECL_LANG_SPECIFIC (DECL)->u.f.strictfp)
#define JAVA_FILE_P(NODE) TREE_LANG_FLAG_2 (NODE)