diff options
author | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-15 13:51:09 +0000 |
---|---|---|
committer | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-15 13:51:09 +0000 |
commit | 855ed7a1964539ba000c4d9b368581ad30021236 (patch) | |
tree | 7001b30fe967c813936aad21b5158797ce06906f /gcc/cp/cp-tree.h | |
parent | 99798ba40e3813d50822f00275793e2880383fc7 (diff) | |
download | gcc-855ed7a1964539ba000c4d9b368581ad30021236.tar.gz |
2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
* ptree.c (cxx_print_type): Use formatting markup for integers
when printing template parameter index/level/orig level.
(cxx_print_xnode): Ditto.
* cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
(struct template_parm_index_s): Remove the PARAMETER_PACK member.
Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
HOST_WIDE_INTs.
(struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
rather than a HOST_WIDE_INT.
Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
better bit-packing.
(struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
IN_BASE_INITIALIZER bool bitfields.
(struct cp_declarator): Make KIND a 4-bit field. Make
PARAMETER_PACK_P a bool bitfield just after KIND.
* pt.c (uses_parameter_packs): Destroy the pointer set.
(make_pack_expansion): Ditto.
(check_for_bare_parameter_packs): Ditto.
* name-lookup.c (push_to_top_level): Make need_pop a bool value.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122955 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 2632137eb26..7d6ebc7fcc9 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -56,6 +56,7 @@ struct diagnostic_context; OMP_FOR_GIMPLIFYING_P (in OMP_FOR) BASELINK_QUALIFIED_P (in BASELINK) TARGET_EXPR_IMPLICIT_P (in TARGET_EXPR) + TEMPLATE_PARM_PARAMETER_PACK (in TEMPLATE_PARM_INDEX) 1: IDENTIFIER_VIRTUAL_P (in IDENTIFIER_NODE) TI_PENDING_TEMPLATE_FLAG. TEMPLATE_PARMS_FOR_INLINE. @@ -219,14 +220,10 @@ struct lang_identifier GTY(()) struct template_parm_index_s GTY(()) { struct tree_common common; - HOST_WIDE_INT index; - HOST_WIDE_INT level; - HOST_WIDE_INT orig_level; + int index; + int level; + int orig_level; tree decl; - - /* When true, indicates that this parameter is actually a parameter - pack, for variadic templates. */ - BOOL_BITFIELD parameter_pack; }; typedef struct template_parm_index_s template_parm_index; @@ -703,11 +700,11 @@ struct saved_scope GTY(()) struct cp_binding_level *x_previous_class_level; tree x_saved_tree; - HOST_WIDE_INT x_processing_template_decl; + int x_processing_template_decl; int x_processing_specialization; - bool x_processing_explicit_instantiation; - int need_pop_function_context; - bool skip_evaluation; + BOOL_BITFIELD x_processing_explicit_instantiation : 1; + BOOL_BITFIELD need_pop_function_context : 1; + BOOL_BITFIELD skip_evaluation : 1; struct stmt_tree_s x_stmt_tree; @@ -786,11 +783,11 @@ struct language_function GTY(()) tree x_vtt_parm; tree x_return_value; - int returns_value; - int returns_null; - int returns_abnormally; - int in_function_try_handler; - int in_base_initializer; + BOOL_BITFIELD returns_value : 1; + BOOL_BITFIELD returns_null : 1; + BOOL_BITFIELD returns_abnormally : 1; + BOOL_BITFIELD in_function_try_handler : 1; + BOOL_BITFIELD in_base_initializer : 1; /* True if this function can throw an exception. */ BOOL_BITFIELD can_throw : 1; @@ -3705,7 +3702,8 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; #define TEMPLATE_PARM_DESCENDANTS(NODE) (TREE_CHAIN (NODE)) #define TEMPLATE_PARM_ORIG_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->orig_level) #define TEMPLATE_PARM_DECL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->decl) -#define TEMPLATE_PARM_PARAMETER_PACK(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->parameter_pack) +#define TEMPLATE_PARM_PARAMETER_PACK(NODE) \ + (TREE_LANG_FLAG_0 (TEMPLATE_PARM_INDEX_CHECK (NODE))) /* These macros are for accessing the fields of TEMPLATE_TYPE_PARM, TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM nodes. */ @@ -3901,16 +3899,16 @@ struct cp_parameter_declarator { /* A declarator. */ struct cp_declarator { /* The kind of declarator. */ - cp_declarator_kind kind; + ENUM_BITFIELD (cp_declarator_kind) kind : 4; + /* Whether we parsed an ellipsis (`...') just before the declarator, + to indicate this is a parameter pack. */ + BOOL_BITFIELD parameter_pack_p : 1; /* Attributes that apply to this declarator. */ tree attributes; /* For all but cdk_id and cdk_error, the contained declarator. For cdk_id and cdk_error, guaranteed to be NULL. */ cp_declarator *declarator; location_t id_loc; /* Currently only set for cdk_id. */ - /* Whether we parsed an ellipsis (`...') just before the declarator, - to indicate this is a parameter pack. */ - bool parameter_pack_p; union { /* For identifiers. */ struct { |