summaryrefslogtreecommitdiff
path: root/gcc/tree.def
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-05-12 00:24:33 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2015-05-11 22:24:33 +0000
commit5ce039dfe917d694bef1ecb16844f3b1bcb7ed09 (patch)
treeb27aa77b5c6f68e088a61128b1c06c597c6b36f9 /gcc/tree.def
parent20d4397af8a085a17925d3a3a3545748d5ab7fc6 (diff)
class.c (fixup_type_variants): Do not copy TYPE_METHODS
* class.c (fixup_type_variants): Do not copy TYPE_METHODS (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant. * semantics.c (finish_member_declaration): Likewise. * method.c (lazily_declare_fn): Allways add method to main variant list. * dwarf2out.c (gen_member_die): Sanity check that we access TYPE_MAIN_VARIANT for TYPE_METHODS. * function.c (use_register_for_decl): Look for TYPE_MAIN_VARIANT when checking TYPE_METHODS. * tree.c (free_lang_data_in_type): See TYPE_METHODS to error_mark_node if non-null. (build_distinct_type_copy): Clear TYPE_METHODS. (verify_type_variant): Verify that TYPE_METHODS is NULL for variants. (verify_type): Allow TYPE_METHODS to be error_mark_node. * tree.def: Update docs of YTPE_STUB_DECL and TYPE_METHODS. From-SVN: r223021
Diffstat (limited to 'gcc/tree.def')
-rw-r--r--gcc/tree.def7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index ea7bea046d6..56580af664c 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -110,9 +110,12 @@ DEFTREECODE (BLOCK, "block", tcc_exceptional, 0)
particular, since any type which is of some type category (e.g.
an array type or a function type) which cannot either have a name
itself or have named members doesn't really have a "scope" per se.
- The TREE_CHAIN field is used as a forward-references to names for
+ The TYPE_STUB_DECL field is used as a forward-references to names for
ENUMERAL_TYPE, RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE nodes;
- see below. */
+ see below.
+ The TYPE_METHODS points to list of all methods associated with the type.
+ It is non-NULL only at main variant of the type and after free_lang_data
+ it may be set to error_mark_node instead of actual list to save memory. */
/* The ordering of the following codes is optimized for the checking
macros in tree.h. Changing the order will degrade the speed of the