Commit 51545682 by Nathan Froyd Committed by Nathan Froyd

split tree_type

split tree_type
gcc/ada/
	* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
	(TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
	(TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.

gcc/cp/
	* cp-tree.h (TYPENAME_TYPE_FULLNAME, TYPEOF_TYPE_EXPR): Use
	TYPE_VALUES_RAW.
	(UNDERLYING_TYPE_TYPE, DECLTYPE_TYPE_EXPR): Likewise.
	(DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): Likewise.
	(TEMPLATE_TYPE_PARM_INDEX): Likewise.

gcc/
	* ggc-page.c (extra_order_size_table): Use struct
	tree_type_non_common.
	* lto-streamer-in.c (unpack_ts_type_value_fields): Rename to...
	(unpack_ts_type_common_value_fields): ...this.  Update comment.
	(unpack_value_fields): Adjust for renaming.
	(lto_input_ts_type_tree_pointers): Split into...
	(lto_input_ts_type_common_tree_pointer): ...this and...
	(lto_input_ts_type_non_common_tree_pointers): ...this.
	(lto_input_tree_pointers): Adjust for above split.
	* lto-streamer-out.c (pack_ts_type_value_fields): Rename to...
	(pack_ts_type_common_value_fields): ...this.  Update comment.
	(lto_output_ts_type_tree_pointers): Split into...
	(lto_output_ts_type_common_tree_pointers): ...this and...
	(lto_output_ts_type_non_common_tree_pointers): ...this.
	(lto_output_tree_pointers): Adjust for above split.
	* lto-streamer.c (check_handled_ts_structures): Mark TS_TYPE_COMMON,
	TS_TYPE_WITH_LANG_SPECIFIC, and TS_TYPE_NON_COMMON as handled.
	* stor-layout.c (vector_type_mode): Adjust location of mode field.
	* tree.h (MARK_TS_TYPE_COMMON, MARK_TS_TYPE_WITH_LANG_SPECIFIC):
	Define.
	(struct tree_type): Split into...
	(struct tree_type_common: ...this and...
	(struct tree_type_with_lang_specific): ...this and...
	(struct tree_type_non_common): ...this.  Adjust accessor macros
	accordingly.
	(TYPE_VALUES_RAW): Define.
	(union tree_node): Update for above changes.
	* tree.c (tree_node_structure_for_code) [tcc_type]: Return
	TS_TYPE_NON_COMMON.
	(initialize_tree_contains_struct) [TS_TYPE]: Use TS_TYPE_COMMON.
	Add TS_TYPE_WITH_LANG_SPECIFIC and TS_TYPE_NON_COMMON.
	(tree_code_size) [tcc_type]: Use struct tree_type_non_common.
	* treestructu.def (TS_TYPE): Remove.
	(TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, TS_TYPE_NON_COMMON):
	Define.

gcc/java/
	* java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.

gcc/lto/
	* lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL.  Adjust
	location of binfo field.
	(lto_fixup_prevailing_decls): Likewise.

gcc/objc/
	* objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Use proper accessors.
	(CLASS_NST_METHODS, CLASS_CLS_METHODS): Likewise.
	(PROTOCOL_NAME, PROTOCOL_NST_METHODS, PROTOCOL_CLS_METHODS): Likewise.

From-SVN: r173658
parent b03c3082
2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
* ggc-page.c (extra_order_size_table): Use struct
tree_type_non_common.
* lto-streamer-in.c (unpack_ts_type_value_fields): Rename to...
(unpack_ts_type_common_value_fields): ...this. Update comment.
(unpack_value_fields): Adjust for renaming.
(lto_input_ts_type_tree_pointers): Split into...
(lto_input_ts_type_common_tree_pointer): ...this and...
(lto_input_ts_type_non_common_tree_pointers): ...this.
(lto_input_tree_pointers): Adjust for above split.
* lto-streamer-out.c (pack_ts_type_value_fields): Rename to...
(pack_ts_type_common_value_fields): ...this. Update comment.
(lto_output_ts_type_tree_pointers): Split into...
(lto_output_ts_type_common_tree_pointers): ...this and...
(lto_output_ts_type_non_common_tree_pointers): ...this.
(lto_output_tree_pointers): Adjust for above split.
* lto-streamer.c (check_handled_ts_structures): Mark TS_TYPE_COMMON,
TS_TYPE_WITH_LANG_SPECIFIC, and TS_TYPE_NON_COMMON as handled.
* stor-layout.c (vector_type_mode): Adjust location of mode field.
* tree.h (MARK_TS_TYPE_COMMON, MARK_TS_TYPE_WITH_LANG_SPECIFIC):
Define.
(struct tree_type): Split into...
(struct tree_type_common: ...this and...
(struct tree_type_with_lang_specific): ...this and...
(struct tree_type_non_common): ...this. Adjust accessor macros
accordingly.
(TYPE_VALUES_RAW): Define.
(union tree_node): Update for above changes.
* tree.c (tree_node_structure_for_code) [tcc_type]: Return
TS_TYPE_NON_COMMON.
(initialize_tree_contains_struct) [TS_TYPE]: Use TS_TYPE_COMMON.
Add TS_TYPE_WITH_LANG_SPECIFIC and TS_TYPE_NON_COMMON.
(tree_code_size) [tcc_type]: Use struct tree_type_non_common.
* treestructu.def (TS_TYPE): Remove.
(TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, TS_TYPE_NON_COMMON):
Define.
2011-05-11 Jakub Jelinek <jakub@redhat.com>
PR debug/48159
......
2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
(TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
(TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
......
......@@ -174,21 +174,21 @@ do { \
this is a conflict on the minval field, but there doesn't seem to be
simple fix, so we'll live with this kludge for now. */
#define TYPE_OBJECT_RECORD_TYPE(NODE) \
(TREE_CHECK2 ((NODE), UNCONSTRAINED_ARRAY_TYPE, ENUMERAL_TYPE)->type.minval)
(TYPE_MINVAL (TREE_CHECK2 ((NODE), UNCONSTRAINED_ARRAY_TYPE, ENUMERAL_TYPE)))
/* For numerical types, this is the GCC lower bound of the type. The GCC
type system is based on the invariant that an object X of a given type
cannot hold at run time a value smaller than its lower bound; otherwise
the behavior is undefined. The optimizer takes advantage of this and
considers that the assertion X >= LB is always true. */
#define TYPE_GCC_MIN_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.minval)
#define TYPE_GCC_MIN_VALUE(NODE) (TYPE_MINVAL (NUMERICAL_TYPE_CHECK (NODE)))
/* For numerical types, this is the GCC upper bound of the type. The GCC
type system is based on the invariant that an object X of a given type
cannot hold at run time a value larger than its upper bound; otherwise
the behavior is undefined. The optimizer takes advantage of this and
considers that the assertion X <= UB is always true. */
#define TYPE_GCC_MAX_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.maxval)
#define TYPE_GCC_MAX_VALUE(NODE) (TYPE_MAXVAL (NUMERICAL_TYPE_CHECK (NODE)))
/* For a FUNCTION_TYPE, if the subprogram has parameters passed by copy in/
copy out, this is the list of nodes used to specify the return values of
......
2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
* cp-tree.h (TYPENAME_TYPE_FULLNAME, TYPEOF_TYPE_EXPR): Use
TYPE_VALUES_RAW.
(UNDERLYING_TYPE_TYPE, DECLTYPE_TYPE_EXPR): Likewise.
(DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): Likewise.
(TEMPLATE_TYPE_PARM_INDEX): Likewise.
2011-05-10 Jason Merrill <jason@redhat.com>
PR c++/48930
......
......@@ -2936,7 +2936,8 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
this is an IDENTIFIER_NODE, and the same as the DECL_NAME on the
corresponding TYPE_DECL. However, this may also be a
TEMPLATE_ID_EXPR if we had something like `typename X::Y<T>'. */
#define TYPENAME_TYPE_FULLNAME(NODE) (TYPENAME_TYPE_CHECK (NODE))->type.values
#define TYPENAME_TYPE_FULLNAME(NODE) \
(TYPE_VALUES_RAW (TYPENAME_TYPE_CHECK (NODE)))
/* True if a TYPENAME_TYPE was declared as an "enum". */
#define TYPENAME_IS_ENUM_P(NODE) \
......@@ -3374,20 +3375,20 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
#define PTRMEM_CST_MEMBER(NODE) (((ptrmem_cst_t)PTRMEM_CST_CHECK (NODE))->member)
/* The expression in question for a TYPEOF_TYPE. */
#define TYPEOF_TYPE_EXPR(NODE) (TYPEOF_TYPE_CHECK (NODE))->type.values
#define TYPEOF_TYPE_EXPR(NODE) (TYPE_VALUES_RAW (TYPEOF_TYPE_CHECK (NODE)))
/* The type in question for an UNDERLYING_TYPE. */
#define UNDERLYING_TYPE_TYPE(NODE) \
(UNDERLYING_TYPE_CHECK (NODE))->type.values
(TYPE_VALUES_RAW (UNDERLYING_TYPE_CHECK (NODE)))
/* The expression in question for a DECLTYPE_TYPE. */
#define DECLTYPE_TYPE_EXPR(NODE) (DECLTYPE_TYPE_CHECK (NODE))->type.values
#define DECLTYPE_TYPE_EXPR(NODE) (TYPE_VALUES_RAW (DECLTYPE_TYPE_CHECK (NODE)))
/* Whether the DECLTYPE_TYPE_EXPR of NODE was originally parsed as an
id-expression or a member-access expression. When false, it was
parsed as a full expression. */
#define DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P(NODE) \
(DECLTYPE_TYPE_CHECK (NODE))->type.string_flag
(DECLTYPE_TYPE_CHECK (NODE))->type_common.string_flag
/* These flags indicate that we want different semantics from normal
decltype: lambda capture just drops references, lambda return also does
......@@ -4358,9 +4359,10 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, TYPENAME_FLAG };
/* These macros are for accessing the fields of TEMPLATE_TYPE_PARM,
TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM nodes. */
#define TEMPLATE_TYPE_PARM_INDEX(NODE) \
(TREE_CHECK3 ((NODE), TEMPLATE_TYPE_PARM, TEMPLATE_TEMPLATE_PARM, \
BOUND_TEMPLATE_TEMPLATE_PARM))->type.values
#define TEMPLATE_TYPE_PARM_INDEX(NODE) \
(TYPE_VALUES_RAW (TREE_CHECK3 ((NODE), TEMPLATE_TYPE_PARM, \
TEMPLATE_TEMPLATE_PARM, \
BOUND_TEMPLATE_TEMPLATE_PARM)))
#define TEMPLATE_TYPE_IDX(NODE) \
(TEMPLATE_PARM_IDX (TEMPLATE_TYPE_PARM_INDEX (NODE)))
#define TEMPLATE_TYPE_LEVEL(NODE) \
......
......@@ -196,7 +196,7 @@ static const size_t extra_order_size_table[] = {
sizeof (struct tree_field_decl),
sizeof (struct tree_parm_decl),
sizeof (struct tree_var_decl),
sizeof (struct tree_type),
sizeof (struct tree_type_non_common),
sizeof (struct function),
sizeof (struct basic_block_def),
sizeof (struct cgraph_node),
......
2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
* java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
* java-tree.h (global_bindings_p): Adjust prototype.
......
......@@ -1331,7 +1331,7 @@ extern tree *type_map;
/* If FUNCTION_TYPE or METHOD_TYPE: cache for build_java_argument_signature. */
#define TYPE_ARGUMENT_SIGNATURE(TYPE) \
(TREE_CHECK2 (TYPE, FUNCTION_TYPE, METHOD_TYPE)->type.minval)
(TYPE_MINVAL (TREE_CHECK2 (TYPE, FUNCTION_TYPE, METHOD_TYPE)))
/* Given an array type, give the type of the elements. */
/* FIXME this use of TREE_TYPE conflicts with something or other. */
......
......@@ -1745,11 +1745,11 @@ unpack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr)
}
/* Unpack all the non-pointer fields of the TS_TYPE structure
/* Unpack all the non-pointer fields of the TS_TYPE_COMMON structure
of expression EXPR from bitpack BP. */
static void
unpack_ts_type_value_fields (struct bitpack_d *bp, tree expr)
unpack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr)
{
enum machine_mode mode;
......@@ -1821,8 +1821,8 @@ unpack_value_fields (struct bitpack_d *bp, tree expr)
if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL))
unpack_ts_function_decl_value_fields (bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE))
unpack_ts_type_value_fields (bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON))
unpack_ts_type_common_value_fields (bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_BLOCK))
unpack_ts_block_value_fields (bp, expr);
......@@ -2099,13 +2099,37 @@ lto_input_ts_function_decl_tree_pointers (struct lto_input_block *ib,
}
/* Read all pointer fields in the TS_TYPE structure of EXPR from input
block IB. DATA_IN contains tables and descriptors for the
/* Read all pointer fields in the TS_TYPE_COMMON structure of EXPR from
input block IB. DATA_IN contains tables and descriptors for the file
being read. */
static void
lto_input_ts_type_common_tree_pointers (struct lto_input_block *ib,
struct data_in *data_in, tree expr)
{
TYPE_SIZE (expr) = lto_input_tree (ib, data_in);
TYPE_SIZE_UNIT (expr) = lto_input_tree (ib, data_in);
TYPE_ATTRIBUTES (expr) = lto_input_tree (ib, data_in);
TYPE_NAME (expr) = lto_input_tree (ib, data_in);
/* Do not stream TYPE_POINTER_TO or TYPE_REFERENCE_TO. They will be
reconstructed during fixup. */
/* Do not stream TYPE_NEXT_VARIANT, we reconstruct the variant lists
during fixup. */
TYPE_MAIN_VARIANT (expr) = lto_input_tree (ib, data_in);
TYPE_CONTEXT (expr) = lto_input_tree (ib, data_in);
/* TYPE_CANONICAL gets re-computed during type merging. */
TYPE_CANONICAL (expr) = NULL_TREE;
TYPE_STUB_DECL (expr) = lto_input_tree (ib, data_in);
}
/* Read all pointer fields in the TS_TYPE_NON_COMMON structure of EXPR
from input block IB. DATA_IN contains tables and descriptors for the
file being read. */
static void
lto_input_ts_type_tree_pointers (struct lto_input_block *ib,
struct data_in *data_in, tree expr)
lto_input_ts_type_non_common_tree_pointers (struct lto_input_block *ib,
struct data_in *data_in,
tree expr)
{
if (TREE_CODE (expr) == ENUMERAL_TYPE)
TYPE_VALUES (expr) = lto_input_tree (ib, data_in);
......@@ -2117,24 +2141,11 @@ lto_input_ts_type_tree_pointers (struct lto_input_block *ib,
|| TREE_CODE (expr) == METHOD_TYPE)
TYPE_ARG_TYPES (expr) = lto_input_tree (ib, data_in);
TYPE_SIZE (expr) = lto_input_tree (ib, data_in);
TYPE_SIZE_UNIT (expr) = lto_input_tree (ib, data_in);
TYPE_ATTRIBUTES (expr) = lto_input_tree (ib, data_in);
TYPE_NAME (expr) = lto_input_tree (ib, data_in);
/* Do not stream TYPE_POINTER_TO or TYPE_REFERENCE_TO nor
TYPE_NEXT_PTR_TO or TYPE_NEXT_REF_TO. */
if (!POINTER_TYPE_P (expr))
TYPE_MINVAL (expr) = lto_input_tree (ib, data_in);
TYPE_MAXVAL (expr) = lto_input_tree (ib, data_in);
TYPE_MAIN_VARIANT (expr) = lto_input_tree (ib, data_in);
/* Do not stream TYPE_NEXT_VARIANT, we reconstruct the variant lists
during fixup. */
if (RECORD_OR_UNION_TYPE_P (expr))
TYPE_BINFO (expr) = lto_input_tree (ib, data_in);
TYPE_CONTEXT (expr) = lto_input_tree (ib, data_in);
/* TYPE_CANONICAL gets re-computed during type merging. */
TYPE_CANONICAL (expr) = NULL_TREE;
TYPE_STUB_DECL (expr) = lto_input_tree (ib, data_in);
}
......@@ -2370,8 +2381,11 @@ lto_input_tree_pointers (struct lto_input_block *ib, struct data_in *data_in,
if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL))
lto_input_ts_function_decl_tree_pointers (ib, data_in, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE))
lto_input_ts_type_tree_pointers (ib, data_in, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON))
lto_input_ts_type_common_tree_pointers (ib, data_in, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE_NON_COMMON))
lto_input_ts_type_non_common_tree_pointers (ib, data_in, expr);
if (CODE_CONTAINS_STRUCT (code, TS_LIST))
lto_input_ts_list_tree_pointers (ib, data_in, expr);
......
......@@ -488,11 +488,11 @@ pack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr)
}
/* Pack all the non-pointer fields of the TS_TYPE structure
/* Pack all the non-pointer fields of the TS_TYPE_COMMON structure
of expression EXPR into bitpack BP. */
static void
pack_ts_type_value_fields (struct bitpack_d *bp, tree expr)
pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr)
{
bp_pack_value (bp, TYPE_PRECISION (expr), 10);
bp_pack_value (bp, TYPE_MODE (expr), 8);
......@@ -560,8 +560,8 @@ pack_value_fields (struct bitpack_d *bp, tree expr)
if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL))
pack_ts_function_decl_value_fields (bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE))
pack_ts_type_value_fields (bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON))
pack_ts_type_common_value_fields (bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_BLOCK))
pack_ts_block_value_fields (bp, expr);
......@@ -949,13 +949,36 @@ lto_output_ts_function_decl_tree_pointers (struct output_block *ob, tree expr,
}
/* Write all pointer fields in the TS_TYPE structure of EXPR to output
block OB. If REF_P is true, write a reference to EXPR's pointer
fields. */
/* Write all pointer fields in the TS_TYPE_COMMON structure of EXPR to
output block OB. If REF_P is true, write a reference to EXPR's
pointer fields. */
static void
lto_output_ts_type_tree_pointers (struct output_block *ob, tree expr,
bool ref_p)
lto_output_ts_type_common_tree_pointers (struct output_block *ob, tree expr,
bool ref_p)
{
lto_output_tree_or_ref (ob, TYPE_SIZE (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_SIZE_UNIT (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_ATTRIBUTES (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_NAME (expr), ref_p);
/* Do not stream TYPE_POINTER_TO or TYPE_REFERENCE_TO. They will be
reconstructed during fixup. */
/* Do not stream TYPE_NEXT_VARIANT, we reconstruct the variant lists
during fixup. */
lto_output_tree_or_ref (ob, TYPE_MAIN_VARIANT (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_CONTEXT (expr), ref_p);
/* TYPE_CANONICAL is re-computed during type merging, so no need
to stream it here. */
lto_output_tree_or_ref (ob, TYPE_STUB_DECL (expr), ref_p);
}
/* Write all pointer fields in the TS_TYPE_NON_COMMON structure of EXPR
to output block OB. If REF_P is true, write a reference to EXPR's
pointer fields. */
static void
lto_output_ts_type_non_common_tree_pointers (struct output_block *ob,
tree expr, bool ref_p)
{
if (TREE_CODE (expr) == ENUMERAL_TYPE)
lto_output_tree_or_ref (ob, TYPE_VALUES (expr), ref_p);
......@@ -967,24 +990,11 @@ lto_output_ts_type_tree_pointers (struct output_block *ob, tree expr,
|| TREE_CODE (expr) == METHOD_TYPE)
lto_output_tree_or_ref (ob, TYPE_ARG_TYPES (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_SIZE (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_SIZE_UNIT (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_ATTRIBUTES (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_NAME (expr), ref_p);
/* Do not stream TYPE_POINTER_TO or TYPE_REFERENCE_TO nor
TYPE_NEXT_PTR_TO or TYPE_NEXT_REF_TO. */
if (!POINTER_TYPE_P (expr))
lto_output_tree_or_ref (ob, TYPE_MINVAL (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_MAXVAL (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_MAIN_VARIANT (expr), ref_p);
/* Do not stream TYPE_NEXT_VARIANT, we reconstruct the variant lists
during fixup. */
if (RECORD_OR_UNION_TYPE_P (expr))
lto_output_tree_or_ref (ob, TYPE_BINFO (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_CONTEXT (expr), ref_p);
/* TYPE_CANONICAL is re-computed during type merging, so no need
to stream it here. */
lto_output_tree_or_ref (ob, TYPE_STUB_DECL (expr), ref_p);
}
......@@ -1183,8 +1193,11 @@ lto_output_tree_pointers (struct output_block *ob, tree expr, bool ref_p)
if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL))
lto_output_ts_function_decl_tree_pointers (ob, expr, ref_p);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE))
lto_output_ts_type_tree_pointers (ob, expr, ref_p);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON))
lto_output_ts_type_common_tree_pointers (ob, expr, ref_p);
if (CODE_CONTAINS_STRUCT (code, TS_TYPE_NON_COMMON))
lto_output_ts_type_non_common_tree_pointers (ob, expr, ref_p);
if (CODE_CONTAINS_STRUCT (code, TS_LIST))
lto_output_ts_list_tree_pointers (ob, expr, ref_p);
......
......@@ -292,7 +292,9 @@ check_handled_ts_structures (void)
handled_p[TS_CONST_DECL] = true;
handled_p[TS_TYPE_DECL] = true;
handled_p[TS_FUNCTION_DECL] = true;
handled_p[TS_TYPE] = true;
handled_p[TS_TYPE_COMMON] = true;
handled_p[TS_TYPE_WITH_LANG_SPECIFIC] = true;
handled_p[TS_TYPE_NON_COMMON] = true;
handled_p[TS_LIST] = true;
handled_p[TS_VEC] = true;
handled_p[TS_EXP] = true;
......
2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
* lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
location of binfo field.
(lto_fixup_prevailing_decls): Likewise.
2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
* lto-lang.c (def_fn_type): Don't call build_function_type, call
......
......@@ -385,11 +385,11 @@ lto_ft_type (tree t)
/* Accessors are for derived node types only. */
if (!POINTER_TYPE_P (t))
LTO_FIXUP_TREE (t->type.minval);
LTO_FIXUP_TREE (t->type.maxval);
LTO_FIXUP_TREE (TYPE_MINVAL (t));
LTO_FIXUP_TREE (TYPE_MAXVAL (t));
/* Accessor is for derived node types only. */
LTO_FIXUP_TREE (t->type.binfo);
LTO_FIXUP_TREE (t->type_non_common.binfo);
LTO_FIXUP_TREE (TYPE_CONTEXT (t));
......@@ -2079,9 +2079,9 @@ lto_fixup_prevailing_decls (tree t)
LTO_NO_PREVAIL (TYPE_ATTRIBUTES (t));
LTO_NO_PREVAIL (TYPE_NAME (t));
LTO_SET_PREVAIL (t->type.minval);
LTO_SET_PREVAIL (t->type.maxval);
LTO_SET_PREVAIL (t->type.binfo);
LTO_SET_PREVAIL (TYPE_MINVAL (t));
LTO_SET_PREVAIL (TYPE_MAXVAL (t));
LTO_SET_PREVAIL (t->type_non_common.binfo);
LTO_SET_PREVAIL (TYPE_CONTEXT (t));
......
2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
* objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Use proper accessors.
(CLASS_NST_METHODS, CLASS_CLS_METHODS): Likewise.
(PROTOCOL_NAME, PROTOCOL_NST_METHODS, PROTOCOL_CLS_METHODS): Likewise.
2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
* objc-runtime-shared-support.h (get_arg_type_list): Delete.
......
......@@ -152,24 +152,24 @@ typedef enum objc_property_assign_semantics {
CATEGORY_INTERFACE_TYPE, CATEGORY_IMPLEMENTATION_TYPE,
PROTOCOL_INTERFACE_TYPE */
/* CLASS_NAME is the name of the class. */
#define CLASS_NAME(CLASS) ((CLASS)->type.name)
#define CLASS_NAME(CLASS) (TYPE_NAME (CLASS))
/* CLASS_SUPER_NAME is the name of the superclass, or, in the case of
categories, it is the name of the category itself. */
#define CLASS_SUPER_NAME(CLASS) (TYPE_CHECK (CLASS)->type.context)
#define CLASS_SUPER_NAME(CLASS) (TYPE_CONTEXT (CLASS))
#define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0)
#define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1)
#define CLASS_NST_METHODS(CLASS) ((CLASS)->type.minval)
#define CLASS_CLS_METHODS(CLASS) ((CLASS)->type.maxval)
#define CLASS_NST_METHODS(CLASS) (TYPE_MINVAL (CLASS))
#define CLASS_CLS_METHODS(CLASS) (TYPE_MAXVAL (CLASS))
#define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 2)
#define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 3)
#define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 4)
#define TOTAL_CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 5)
#define CLASS_HAS_EXCEPTION_ATTR(CLASS) (TYPE_LANG_FLAG_0 (CLASS))
#define PROTOCOL_NAME(CLASS) ((CLASS)->type.name)
#define PROTOCOL_NAME(CLASS) (TYPE_NAME (CLASS))
#define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0)
#define PROTOCOL_NST_METHODS(CLASS) ((CLASS)->type.minval)
#define PROTOCOL_CLS_METHODS(CLASS) ((CLASS)->type.maxval)
#define PROTOCOL_NST_METHODS(CLASS) (TYPE_MINVAL (CLASS))
#define PROTOCOL_CLS_METHODS(CLASS) (TYPE_MAXVAL (CLASS))
#define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1)
#define PROTOCOL_DEFINED(CLASS) TREE_USED (CLASS)
#define PROTOCOL_OPTIONAL_CLS_METHODS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 2)
......
......@@ -2088,12 +2088,12 @@ vector_type_mode (const_tree t)
gcc_assert (TREE_CODE (t) == VECTOR_TYPE);
mode = t->type.mode;
mode = t->type_common.mode;
if (VECTOR_MODE_P (mode)
&& (!targetm.vector_mode_supported_p (mode)
|| !have_regs_of_mode[mode]))
{
enum machine_mode innermode = TREE_TYPE (t)->type.mode;
enum machine_mode innermode = TREE_TYPE (t)->type_common.mode;
/* For integers, try mapping it to a same-sized scalar mode. */
if (GET_MODE_CLASS (innermode) == MODE_INT)
......
......@@ -303,7 +303,7 @@ tree_node_structure_for_code (enum tree_code code)
}
}
case tcc_type:
return TS_TYPE;
return TS_TYPE_NON_COMMON;
case tcc_reference:
case tcc_comparison:
case tcc_unary:
......@@ -385,7 +385,7 @@ initialize_tree_contains_struct (void)
case TS_IDENTIFIER:
case TS_DECL_MINIMAL:
case TS_TYPE:
case TS_TYPE_COMMON:
case TS_LIST:
case TS_VEC:
case TS_EXP:
......@@ -398,6 +398,14 @@ initialize_tree_contains_struct (void)
MARK_TS_COMMON (code);
break;
case TS_TYPE_WITH_LANG_SPECIFIC:
MARK_TS_TYPE_COMMON (code);
break;
case TS_TYPE_NON_COMMON:
MARK_TS_TYPE_WITH_LANG_SPECIFIC (code);
break;
case TS_DECL_COMMON:
MARK_TS_DECL_MINIMAL (code);
break;
......@@ -639,7 +647,7 @@ tree_code_size (enum tree_code code)
}
case tcc_type: /* a type node */
return sizeof (struct tree_type);
return sizeof (struct tree_type_non_common);
case tcc_reference: /* a reference */
case tcc_expression: /* an expression */
......
......@@ -54,7 +54,9 @@ DEFTREESTRUCT(TS_CONST_DECL, "const decl")
DEFTREESTRUCT(TS_TYPE_DECL, "label decl")
DEFTREESTRUCT(TS_FUNCTION_DECL, "function decl")
DEFTREESTRUCT(TS_TRANSLATION_UNIT_DECL, "translation-unit decl")
DEFTREESTRUCT(TS_TYPE, "type")
DEFTREESTRUCT(TS_TYPE_COMMON, "type common")
DEFTREESTRUCT(TS_TYPE_WITH_LANG_SPECIFIC, "type with lang-specific")
DEFTREESTRUCT(TS_TYPE_NON_COMMON, "type non-common")
DEFTREESTRUCT(TS_LIST, "list")
DEFTREESTRUCT(TS_VEC, "vec")
DEFTREESTRUCT(TS_EXP, "exp")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment