From 84eeda0c97049b5339deb94181ce5a83a12400df Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 30 Sep 2004 15:25:18 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/cp-tree.h | 26 +++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fa42fad9a43..e636b96fda3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-09-30 Nathan Sidwell + + * 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 * decl.c (duplicate_decls): Merge TREE_DEPRECATED. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 0a2d9706e93..5ff38b72575 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"))) -- 2.30.2