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]

[patch] Remove middle end #includes from java front end


Hi,

Cleans up some redundant #include's from the java front end. There are
still a couple of middle-end dependencies (just like in the other
front ends) but it's a step in the right direction.

Bootstrapped on x86_64-unknown-linux-gnu.
OK for trunk?

Ciao!
Steven

	* java-gimplify.c: Do not include tm.h, toplev.h.
	* typeck.c: Do not include tm.h.
	* mangle_name.c: Do not include tm.h.
	* jcf-dump.c: Do not include tm.h, ggc.h.
	* class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
	* decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
	and timevar.h.
	* jcf-parse.c: Do not include tm.h and tm_p.h.
	* resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
	target.h, and expr.h.
	* except.c: Do not include tm.h, rtl.h, function.h.
	* builtins.c: Do not include convert.h.  Explain why RTL headers
	have to be included here.
	* verify-glue.c: Do not include tm.h.
	* jcf-depend.c: Do not include tm.h.
	* jcf-reader.c: Include ggc.h.
	* jcf-io.c: Do not include tm.h, toplev.h.
	* expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
	gimple.h.
	* lang.c: Do not include rtl.h, expr.h.

Index: java-gimplify.c
===================================================================
--- java-gimplify.c	(revision 159759)
+++ java-gimplify.c	(working copy)
@@ -25,12 +25,10 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
 #include "java-tree.h"
 #include "tree-dump.h"
 #include "gimple.h"
-#include "toplev.h"

 static tree java_gimplify_block (tree);
 static enum gimplify_status java_gimplify_modify_expr (tree *);
Index: typeck.c
===================================================================
--- typeck.c	(revision 159759)
+++ typeck.c	(working copy)
@@ -27,7 +27,6 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
 #include "obstack.h"
 #include "flags.h"
Index: mangle_name.c
===================================================================
--- mangle_name.c	(revision 159759)
+++ mangle_name.c	(working copy)
@@ -27,7 +27,6 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "jcf.h"
 #include "tree.h"
 #include "java-tree.h"
Index: jcf-dump.c
===================================================================
--- jcf-dump.c	(revision 159759)
+++ jcf-dump.c	(working copy)
@@ -51,8 +51,6 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
-#include "ggc.h"
 #include "intl.h"

 #include "jcf.h"
Index: class.c
===================================================================
--- class.c	(revision 159759)
+++ class.c	(working copy)
@@ -27,9 +27,7 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
-#include "rtl.h"
 #include "flags.h"
 #include "java-tree.h"
 #include "jcf.h"
@@ -38,15 +36,12 @@ The Free Software Foundation is independent of Sun
 #include "output.h"
 #include "parse.h"
 #include "function.h"
-#include "tm_p.h"
 #include "ggc.h"
 #include "stdio.h"
-#include "target.h"
-#include "except.h"
 #include "cgraph.h"
 #include "tree-iterator.h"
-#include "cgraph.h"
 #include "vecprim.h"
+#include "tm.h"         /* FIXME: For gcc_obstack_init from defaults.h.  */

 /* DOS brain-damage */
 #ifndef O_BINARY
Index: decl.c
===================================================================
--- decl.c	(revision 159759)
+++ decl.c	(working copy)
@@ -28,20 +28,14 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
-#include "rtl.h"
 #include "toplev.h"
 #include "flags.h"
 #include "java-tree.h"
 #include "jcf.h"
-#include "function.h"
-#include "expr.h"
 #include "libfuncs.h"
-#include "except.h"
 #include "java-except.h"
 #include "ggc.h"
-#include "timevar.h"
 #include "cgraph.h"
 #include "tree-inline.h"
 #include "target.h"
Index: jcf-parse.c
===================================================================
--- jcf-parse.c	(revision 159759)
+++ jcf-parse.c	(working copy)
@@ -27,7 +27,6 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
 #include "obstack.h"
 #include "flags.h"
@@ -40,7 +39,6 @@ The Free Software Foundation is independent of Sun
 #include "ggc.h"
 #include "debug.h"
 #include "assert.h"
-#include "tm_p.h"
 #include "cgraph.h"
 #include "vecprim.h"
 #include "bitmap.h"
Index: resource.c
===================================================================
--- resource.c	(revision 159759)
+++ resource.c	(working copy)
@@ -25,21 +25,15 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
-#include "rtl.h"
-#include "flags.h"
 #include "java-tree.h"
 #include "jcf.h"
-#include "obstack.h"
 #include "toplev.h"
 #include "output.h"
 #include "parse.h"
 #include "function.h"
 #include "ggc.h"
 #include "stdio.h"
-#include "target.h"
-#include "expr.h"
 #include "tree-iterator.h"
 #include "cgraph.h"

Index: except.c
===================================================================
--- except.c	(revision 159759)
+++ except.c	(working copy)
@@ -25,15 +25,12 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
-#include "rtl.h"
 #include "java-tree.h"
 #include "javaop.h"
 #include "java-opcodes.h"
 #include "jcf.h"
-#include "function.h"
-#include "except.h"
+#include "except.h"	/* for doing_eh.  */
 #include "java-except.h"
 #include "toplev.h"
 #include "tree-iterator.h"
Index: builtins.c
===================================================================
--- builtins.c	(revision 159759)
+++ builtins.c	(working copy)
@@ -34,7 +34,9 @@ The Free Software Foundation is independent of Sun
 #include "langhooks.h"
 #include "java-tree.h"
 #include <stdarg.h>
-#include "convert.h"
+
+/* FIXME: All these headers are necessary for sync_compare_and_swap.
+   Front ends should never have to look at that.  */
 #include "rtl.h"
 #include "insn-codes.h"
 #include "expr.h"
Index: verify-glue.c
===================================================================
--- verify-glue.c	(revision 159759)
+++ verify-glue.c	(working copy)
@@ -27,7 +27,6 @@ The Free Software Foundation is independent of Sun

 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
 #include "parse.h"

Index: jcf-depend.c
===================================================================
--- jcf-depend.c	(revision 159759)
+++ jcf-depend.c	(working copy)
@@ -28,7 +28,6 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "mkdeps.h"

 #include <assert.h>
Index: jcf-reader.c
===================================================================
--- jcf-reader.c	(revision 159759)
+++ jcf-reader.c	(working copy)
@@ -24,6 +24,7 @@ Java and all Java-based marks are trademarks or re
 of Sun Microsystems, Inc. in the United States and other countries.
 The Free Software Foundation is independent of Sun Microsystems, Inc.  */

+#include "ggc.h"
 #include "jcf.h"
 #include "zipfile.h"

Index: jcf-io.c
===================================================================
--- jcf-io.c	(revision 159759)
+++ jcf-io.c	(working copy)
@@ -27,11 +27,9 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"

 #include "jcf.h"
 #include "tree.h"
-#include "toplev.h"
 #include "java-tree.h"
 #include "hashtab.h"
 #include <dirent.h>
Index: expr.c
===================================================================
--- expr.c	(revision 159759)
+++ expr.c	(working copy)
@@ -27,11 +27,8 @@ The Free Software Foundation is independent of Sun
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
-#include "rtl.h"
 #include "flags.h"
-#include "expr.h"
 #include "java-tree.h"
 #include "javaop.h"
 #include "java-opcodes.h"
@@ -39,11 +36,8 @@ The Free Software Foundation is independent of Sun
 #include "java-except.h"
 #include "parse.h"
 #include "toplev.h"
-#include "except.h"
-#include "tm_p.h"
 #include "ggc.h"
 #include "tree-iterator.h"
-#include "gimple.h"
 #include "target.h"

 static void flush_quick_stack (void);
Index: lang.c
===================================================================
--- lang.c	(revision 159759)
+++ lang.c	(working copy)
@@ -30,8 +30,6 @@ The Free Software Foundation is independent of Sun
 #include "tm.h"
 #include "tree.h"
 #include "input.h"
-#include "rtl.h"
-#include "expr.h"
 #include "java-tree.h"
 #include "jcf.h"
 #include "toplev.h"
@@ -45,7 +43,7 @@ The Free Software Foundation is independent of Sun
 #include "tree-dump.h"
 #include "opts.h"
 #include "options.h"
-#include "except.h"
+#include "except.h"	/* For USING_SJLJ_EXCEPTIONS.  */

 static bool java_init (void);
 static void java_finish (void);


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