* cp-tree.h (struct lang_decl): Shrink by reordering fields and
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Sep 2004 15:25:18 +0000 (15:25 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Sep 2004 15:25:18 +0000 (15:25 +0000)
turning operator_code and fixed_offset into bitfields.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88337 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/cp-tree.h

index fa42fad..e636b96 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (struct lang_decl): Shrink by reordering fields and
+       turning operator_code and fixed_offset into bitfields.
+
 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
index 0a2d970..5ff38b7 100644 (file)
@@ -1530,6 +1530,21 @@ struct lang_decl GTY(())
     {
       struct full_lang_decl
       {
+       /* In an overloaded operator, this is the value of
+          DECL_OVERLOADED_OPERATOR_P.  */
+       ENUM_BITFIELD (tree_code) operator_code : 8;
+
+       unsigned u3sel : 1;
+       unsigned pending_inline_p : 1;
+       unsigned spare : 3;
+       
+       /* In a FUNCTION_DECL for which THUNK_P holds this is the
+          THUNK_FIXED_OFFSET.  The largest object that can be
+          thunked is thus 262144, which is what is required [limits].
+          We have to store a signed value as for regular thunks this
+          is <= 0, and for covariant thunks it is >= 0.  */
+       signed fixed_offset : 19;
+
        /* For a non-thunk function decl, this is a tree list of
           friendly classes. For a thunk function decl, it is the
           thunked to function decl.  */
@@ -1546,17 +1561,6 @@ struct lang_decl GTY(())
        /* In a FUNCTION_DECL, this is DECL_CLONED_FUNCTION.  */
        tree cloned_function;
 
-       /* In a FUNCTION_DECL for which THUNK_P holds, this is
-          THUNK_FIXED_OFFSET.  */
-       HOST_WIDE_INT fixed_offset;
-
-       /* In an overloaded operator, this is the value of
-          DECL_OVERLOADED_OPERATOR_P.  */
-       enum tree_code operator_code;
-
-       unsigned u3sel : 1;
-       unsigned pending_inline_p : 1;
-
        union lang_decl_u3
        {
          struct sorted_fields_type * GTY ((tag ("0"), reorder ("resort_sorted_fields")))