This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC - Refactor tree.h
- From: Mike Stump <mikestump at comcast dot net>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: Andrew MacLeod <amacleod at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 4 Sep 2013 17:06:42 -0700
- Subject: Re: RFC - Refactor tree.h
- Authentication-results: sourceware.org; auth=none
- References: <20130809223645 dot GA22559 at google dot com> <48A1A20B-1DF2-45A5-9CB6-13CDC6A89A4F at comcast dot net> <cf6d07ba-b8bc-43c2-9f84-e7709ed7730e at email dot android dot com> <5214F775 dot 60702 at redhat dot com> <B962A2B6-233D-4B65-B4BF-CE1B20B0154B at comcast dot net> <52161471 dot 6040408 at redhat dot com> <CAD_=9DTQhKGQHn6KgGJg9bQN9_Ft5DaE3fKJr8OuaALhjQSy+g at mail dot gmail dot com>
On Aug 30, 2013, at 4:22 PM, Diego Novillo <dnovillo@google.com> wrote:
> Thanks for the suggestions. I've incorporated them into the patch.
> It now adds tree-core.h with all the structures, enums, typedefs and
> some fundamental declarations from tree.h. Everything else stays in
> tree.h for now.
So, the comments for the data structures that moved, should also move?!
The below moves one comment that I noticed.
Ok?
Index: tree-core.h
===================================================================
--- tree-core.h (revision 202238)
+++ tree-core.h (working copy)
@@ -1328,6 +1328,11 @@ struct GTY(()) tree_decl_non_common {
tree vindex;
};
+/* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
+ arguments/result/saved_tree fields by front ends. It was either inherit
+ FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
+ which seemed a bit strange. */
+
struct GTY(()) tree_function_decl {
struct tree_decl_non_common common;
Index: tree.h
===================================================================
--- tree.h (revision 202238)
+++ tree.h (working copy)
@@ -2534,11 +2534,6 @@ extern vec<tree, va_gc> **decl_debug_arg
#define DECL_FINAL_P(NODE)\
(FUNCTION_DECL_CHECK (NODE)->decl_with_vis.final)
-/* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
- arguments/result/saved_tree fields by front ends. It was either inherit
- FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
- which seemed a bit strange. */
-
/* The source language of the translation-unit. */
#define TRANSLATION_UNIT_LANGUAGE(NODE) \
(TRANSLATION_UNIT_DECL_CHECK (NODE)->translation_unit_decl.language)