aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-09-30 15:25:18 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-09-30 15:25:18 +0000
commit84eeda0c97049b5339deb94181ce5a83a12400df (patch)
treef7b7cda23424a91e96496fa042693f3b0b5b6c17
parent0aa360265408066608adbb7d62374d622a896ccd (diff)
downloadgcc-84eeda0c97049b5339deb94181ce5a83a12400df.zip
gcc-84eeda0c97049b5339deb94181ce5a83a12400df.tar.gz
gcc-84eeda0c97049b5339deb94181ce5a83a12400df.tar.bz2
cp-tree.h (struct lang_decl): Shrink by reordering fields and turning operator_code and fixed_offset into...
* cp-tree.h (struct lang_decl): Shrink by reordering fields and turning operator_code and fixed_offset into bitfields. From-SVN: r88337
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h26
2 files changed, 20 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fa42fad..e636b96 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 0a2d970..5ff38b7 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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")))