summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-06 08:59:39 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-06 08:59:39 +0000
commit8cbe13ee43d0c95095855e6cd330d2f31ce96651 (patch)
tree5393c1bea7b5636f5e0a86e7bef9e43ca5004b68 /gcc
parenta02d3bc94b101e76e718b94abb482cadc8d2b91b (diff)
downloadgcc-8cbe13ee43d0c95095855e6cd330d2f31ce96651.tar.gz
Remove TYPE_NONCOPIED_PARTS.
* tree.h (TYPE_NONCOPIED_PARTS): Remove. (struct tree_type): Remove noncopied_parts. * c-tree.h (TYPE_ACTUAL_ARG_TYPES): Map onto TYPE_BINFO. * expr.c (save_noncopied_parts, init_noncopied_parts): Remove. (fixed_type_p): Remove. (expand_expr, INIT_EXPR): Don't deal with noncopied parts. (expand_expr, MODIFY_EXPR): Likewise. * ggc-common.c (ggc_mark_trees): Remove TYPE_NONCOPIED_PARTS. * doc/c-tree.texi: Remove TYPE_NONCOPIED_PARTS FIXME. cp: Remove TYPE_NONCOPIED_PARTS. * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto CLASSTYPE_PURE_VIRTUALS. (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO. * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS. (layout_class_type): Don't call fixup_inlin_methods here ... (finish_struct_1): ... call it here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45434 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/c-tree.h2
-rw-r--r--gcc/cp/ChangeLog10
-rw-r--r--gcc/cp/class.c7
-rw-r--r--gcc/cp/cp-tree.h5
-rw-r--r--gcc/doc/c-tree.texi2
-rw-r--r--gcc/expr.c120
-rw-r--r--gcc/ggc-common.c1
-rw-r--r--gcc/tree.h2
9 files changed, 36 insertions, 126 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b0be4444415..85512bfe6dd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ Remove TYPE_NONCOPIED_PARTS.
+ * tree.h (TYPE_NONCOPIED_PARTS): Remove.
+ (struct tree_type): Remove noncopied_parts.
+ * c-tree.h (TYPE_ACTUAL_ARG_TYPES): Map onto TYPE_BINFO.
+ * expr.c (save_noncopied_parts, init_noncopied_parts): Remove.
+ (fixed_type_p): Remove.
+ (expand_expr, INIT_EXPR): Don't deal with noncopied parts.
+ (expand_expr, MODIFY_EXPR): Likewise.
+ * ggc-common.c (ggc_mark_trees): Remove TYPE_NONCOPIED_PARTS.
+ * doc/c-tree.texi: Remove TYPE_NONCOPIED_PARTS FIXME.
+
2001-09-06 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/rs6000.c (mask_operand): Use signed vars to avoid
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index 45d14f706b6..6f1833af414 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -135,7 +135,7 @@ struct lang_type
/* For FUNCTION_TYPE, a hidden list of types of arguments. The same as
TYPE_ARG_TYPES for functions with prototypes, but created for functions
without prototypes. */
-#define TYPE_ACTUAL_ARG_TYPES(NODE) TYPE_NONCOPIED_PARTS (NODE)
+#define TYPE_ACTUAL_ARG_TYPES(NODE) TYPE_BINFO (NODE)
/* in c-lang.c and objc-act.c */
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4efd48db8ae..be43b1f50a6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,13 @@
+2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ Remove TYPE_NONCOPIED_PARTS.
+ * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
+ CLASSTYPE_PURE_VIRTUALS.
+ (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
+ * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
+ (layout_class_type): Don't call fixup_inlin_methods here ...
+ (finish_struct_1): ... call it here.
+
2001-09-04 Mark Mitchell <mark@codesourcery.com>
* decl.c (duplicate_decls): Remove code deadling with
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 3a9e38923e1..03aa7f71f5b 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -2189,7 +2189,6 @@ duplicate_tag_error (t)
TYPE_METHODS (t) = NULL_TREE;
TYPE_VFIELD (t) = NULL_TREE;
TYPE_CONTEXT (t) = NULL_TREE;
- TYPE_NONCOPIED_PARTS (t) = NULL_TREE;
/* Clear TYPE_LANG_FLAGS -- those in TYPE_LANG_SPECIFIC are cleared above. */
TYPE_LANG_FLAG_0 (t) = 0;
@@ -4866,10 +4865,6 @@ layout_class_type (t, empty_p, vfuns_p,
if (build_base_fields (rli, empty_p, empty_base_offsets, t))
CLASSTYPE_NEARLY_EMPTY_P (t) = 0;
- /* CLASSTYPE_INLINE_FRIENDS is really TYPE_NONCOPIED_PARTS. Thus,
- we have to save this before we zap TYPE_NONCOPIED_PARTS. */
- fixup_inline_methods (t);
-
/* Layout the non-static data members. */
for (field = non_static_data_members; field; field = TREE_CHAIN (field))
{
@@ -5077,6 +5072,8 @@ finish_struct_1 (t)
vfuns = 0;
CLASSTYPE_RTTI (t) = NULL_TREE;
+ fixup_inline_methods (t);
+
/* Do end-of-class semantic processing: checking the validity of the
bases and members and add implicitly generated methods. */
check_bases_and_members (t, &empty);
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 947c932110a..04837da1d88 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -117,6 +117,7 @@ Boston, MA 02111-1307, USA. */
For a TYPENAME_TYPE, this is TYPENAME_TYPE_FULLNAME.
For a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM,
this is TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
+ For a FUNCTION_TYPE or METHOD_TYPE, this is TYPE_RAISES_EXCEPTIONS
BINFO_VIRTUALS
For a binfo, this is a TREE_LIST. The BV_DELTA of each node
@@ -1266,7 +1267,7 @@ struct lang_type
After the class is defined, these fields hold other information. */
/* List of friends which were defined inline in this class definition. */
-#define CLASSTYPE_INLINE_FRIENDS(NODE) (TYPE_NONCOPIED_PARTS (NODE))
+#define CLASSTYPE_INLINE_FRIENDS(NODE) (CLASSTYPE_PURE_VIRTUALS (NODE))
/* Nonzero for _CLASSTYPE means that operator delete is defined. */
#define TYPE_GETS_DELETE(NODE) (TYPE_LANG_SPECIFIC(NODE)->gets_delete)
@@ -1660,7 +1661,7 @@ struct lang_type
this type can raise. Each TREE_VALUE is a _TYPE. The TREE_VALUE
will be NULL_TREE to indicate a throw specification of `()', or
no exceptions allowed. */
-#define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_NONCOPIED_PARTS (NODE)
+#define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_BINFO (NODE)
/* For FUNCTION_TYPE or METHOD_TYPE, return 1 iff it is declared `throw()'. */
#define TYPE_NOTHROW_P(NODE) \
diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi
index 7d926c75388..9d9c25da6cd 100644
--- a/gcc/doc/c-tree.texi
+++ b/gcc/doc/c-tree.texi
@@ -758,8 +758,6 @@ indicated kind of inheritance was used. If @code{TREE_VIA_VIRTUAL}
holds of a binfo, then its @code{BINFO_TYPE} was inherited from
virtually.
-FIXME: Talk about @code{TYPE_NONCOPIED_PARTS}.
-
The following macros can be used on a tree node representing a class-type.
@ftable @code
diff --git a/gcc/expr.c b/gcc/expr.c
index e8774e46f6c..3d0d93a6a64 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -163,9 +163,6 @@ static rtx store_field PARAMS ((rtx, HOST_WIDE_INT,
unsigned int, HOST_WIDE_INT, int));
static enum memory_use_mode
get_memory_usage_from_modifier PARAMS ((enum expand_modifier));
-static tree save_noncopied_parts PARAMS ((tree, tree));
-static tree init_noncopied_parts PARAMS ((tree, tree));
-static int fixed_type_p PARAMS ((tree));
static rtx var_rtx PARAMS ((tree));
static rtx expand_expr_unaligned PARAMS ((tree, unsigned int *));
static rtx expand_increment PARAMS ((tree, int, int));
@@ -5659,68 +5656,6 @@ force_operand (value, target)
return value;
}
-/* Subroutine of expand_expr:
- save the non-copied parts (LIST) of an expr (LHS), and return a list
- which can restore these values to their previous values,
- should something modify their storage. */
-
-static tree
-save_noncopied_parts (lhs, list)
- tree lhs;
- tree list;
-{
- tree tail;
- tree parts = 0;
-
- for (tail = list; tail; tail = TREE_CHAIN (tail))
- if (TREE_CODE (TREE_VALUE (tail)) == TREE_LIST)
- parts = chainon (parts, save_noncopied_parts (lhs, TREE_VALUE (tail)));
- else
- {
- tree part = TREE_VALUE (tail);
- tree part_type = TREE_TYPE (part);
- tree to_be_saved = build (COMPONENT_REF, part_type, lhs, part);
- rtx target
- = assign_temp (build_qualified_type (part_type,
- (TYPE_QUALS (part_type)
- | TYPE_QUAL_CONST)),
- 0, 1, 1);
-
- parts = tree_cons (to_be_saved,
- build (RTL_EXPR, part_type, NULL_TREE,
- (tree) validize_mem (target)),
- parts);
- store_expr (TREE_PURPOSE (parts),
- RTL_EXPR_RTL (TREE_VALUE (parts)), 0);
- }
- return parts;
-}
-
-/* Subroutine of expand_expr:
- record the non-copied parts (LIST) of an expr (LHS), and return a list
- which specifies the initial values of these parts. */
-
-static tree
-init_noncopied_parts (lhs, list)
- tree lhs;
- tree list;
-{
- tree tail;
- tree parts = 0;
-
- for (tail = list; tail; tail = TREE_CHAIN (tail))
- if (TREE_CODE (TREE_VALUE (tail)) == TREE_LIST)
- parts = chainon (parts, init_noncopied_parts (lhs, TREE_VALUE (tail)));
- else if (TREE_PURPOSE (tail))
- {
- tree part = TREE_VALUE (tail);
- tree part_type = TREE_TYPE (part);
- tree to_be_initialized = build (COMPONENT_REF, part_type, lhs, part);
- parts = tree_cons (TREE_PURPOSE (tail), to_be_initialized, parts);
- }
- return parts;
-}
-
/* Subroutine of expand_expr: return nonzero iff there is no way that
EXP can reference X, which is being modified. TOP_P is nonzero if this
call is going to be used to determine whether we need a temporary
@@ -5945,22 +5880,6 @@ safe_from_p (x, exp, top_p)
return 1;
}
-/* Subroutine of expand_expr: return nonzero iff EXP is an
- expression whose type is statically determinable. */
-
-static int
-fixed_type_p (exp)
- tree exp;
-{
- if (TREE_CODE (exp) == PARM_DECL
- || TREE_CODE (exp) == VAR_DECL
- || TREE_CODE (exp) == CALL_EXPR || TREE_CODE (exp) == TARGET_EXPR
- || TREE_CODE (exp) == COMPONENT_REF
- || TREE_CODE (exp) == ARRAY_REF)
- return 1;
- return 0;
-}
-
/* Subroutine of expand_expr: return rtx if EXP is a
variable or parameter; else return 0. */
@@ -8505,37 +8424,23 @@ expand_expr (exp, target, tmode, modifier)
{
tree lhs = TREE_OPERAND (exp, 0);
tree rhs = TREE_OPERAND (exp, 1);
- tree noncopied_parts = 0;
- tree lhs_type = TREE_TYPE (lhs);
temp = expand_assignment (lhs, rhs, ! ignore, original_target != 0);
- if (TYPE_NONCOPIED_PARTS (lhs_type) != 0 && !fixed_type_p (rhs))
- noncopied_parts
- = init_noncopied_parts (stabilize_reference (lhs),
- TYPE_NONCOPIED_PARTS (lhs_type));
-
- while (noncopied_parts != 0)
- {
- expand_assignment (TREE_VALUE (noncopied_parts),
- TREE_PURPOSE (noncopied_parts), 0, 0);
- noncopied_parts = TREE_CHAIN (noncopied_parts);
- }
return temp;
}
case MODIFY_EXPR:
{
/* If lhs is complex, expand calls in rhs before computing it.
- That's so we don't compute a pointer and save it over a call.
- If lhs is simple, compute it first so we can give it as a
- target if the rhs is just a call. This avoids an extra temp and copy
- and that prevents a partial-subsumption which makes bad code.
- Actually we could treat component_ref's of vars like vars. */
+ That's so we don't compute a pointer and save it over a
+ call. If lhs is simple, compute it first so we can give it
+ as a target if the rhs is just a call. This avoids an
+ extra temp and copy and that prevents a partial-subsumption
+ which makes bad code. Actually we could treat
+ component_ref's of vars like vars. */
tree lhs = TREE_OPERAND (exp, 0);
tree rhs = TREE_OPERAND (exp, 1);
- tree noncopied_parts = 0;
- tree lhs_type = TREE_TYPE (lhs);
temp = 0;
@@ -8571,19 +8476,8 @@ expand_expr (exp, target, tmode, modifier)
return const0_rtx;
}
- if (TYPE_NONCOPIED_PARTS (lhs_type) != 0
- && ! (fixed_type_p (lhs) && fixed_type_p (rhs)))
- noncopied_parts
- = save_noncopied_parts (stabilize_reference (lhs),
- TYPE_NONCOPIED_PARTS (lhs_type));
-
temp = expand_assignment (lhs, rhs, ! ignore, original_target != 0);
- while (noncopied_parts != 0)
- {
- expand_assignment (TREE_PURPOSE (noncopied_parts),
- TREE_VALUE (noncopied_parts), 0, 0);
- noncopied_parts = TREE_CHAIN (noncopied_parts);
- }
+
return temp;
}
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 9745001cae6..fe7cbe51d20 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -399,7 +399,6 @@ ggc_mark_trees ()
ggc_mark_tree (TYPE_NEXT_VARIANT (t));
ggc_mark_tree (TYPE_MAIN_VARIANT (t));
ggc_mark_tree (TYPE_BINFO (t));
- ggc_mark_tree (TYPE_NONCOPIED_PARTS (t));
ggc_mark_tree (TYPE_CONTEXT (t));
lang_mark_tree (t);
break;
diff --git a/gcc/tree.h b/gcc/tree.h
index cf6d2435649..8ef9156d8f1 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -918,7 +918,6 @@ struct tree_block
#define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->type.name)
#define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type.next_variant)
#define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type.main_variant)
-#define TYPE_NONCOPIED_PARTS(NODE) (TYPE_CHECK (NODE)->type.noncopied_parts)
#define TYPE_CONTEXT(NODE) (TYPE_CHECK (NODE)->type.context)
#define TYPE_LANG_SPECIFIC(NODE) (TYPE_CHECK (NODE)->type.lang_specific)
@@ -1191,7 +1190,6 @@ struct tree_type
tree next_variant;
tree main_variant;
tree binfo;
- tree noncopied_parts;
tree context;
HOST_WIDE_INT alias_set;
/* Points to a structure whose details depend on the language in use. */