Lines Matching defs:tree

30 #include "tree.h"
31 #include "cp-tree.h"
38 static int is_subobject_of_p (tree, tree);
39 static tree dfs_lookup_base (tree, void *);
40 static tree dfs_dcast_hint_pre (tree, void *);
41 static tree dfs_dcast_hint_post (tree, void *);
42 static tree dfs_debug_mark (tree, void *);
43 static tree dfs_walk_once_r (tree, tree (*pre_fn) (tree, void *),
44 tree (*post_fn) (tree, void *), void *data);
45 static void dfs_unmark_r (tree);
46 static int check_hidden_convs (tree, int, int, tree, tree, tree);
47 static tree split_conversions (tree, tree, tree, tree);
48 static int lookup_conversions_r (tree, int, int,
49 tree, tree, tree, tree, tree *, tree *);
50 static int look_for_overrides_r (tree, tree);
51 static tree lookup_field_r (tree, void *);
52 static tree dfs_accessible_post (tree, void *);
53 static tree dfs_walk_once_accessible_r (tree, bool, bool,
54 tree (*pre_fn) (tree, void *),
55 tree (*post_fn) (tree, void *),
57 static tree dfs_walk_once_accessible (tree, bool,
58 tree (*pre_fn) (tree, void *),
59 tree (*post_fn) (tree, void *),
61 static tree dfs_access_in_type (tree, void *);
62 static access_kind access_in_type (tree, tree);
63 static int protected_accessible_p (tree, tree, tree);
64 static int friend_accessible_p (tree, tree, tree);
65 static int template_self_reference_p (tree, tree);
66 static tree dfs_get_pure_virtuals (tree, void *);
86 tree t; /* type being searched. */
87 tree base; /* The base type we're looking for. */
88 tree binfo; /* Found binfo. */
99 static tree
100 dfs_lookup_base (tree binfo, void *data_)
159 accessible_base_p (tree t, tree base, bool consider_local_p)
161 tree decl;
192 tree
193 lookup_base (tree t, tree base, base_access access, base_kind *kind_ptr)
195 tree binfo;
196 tree t_binfo;
297 tree subtype; /* The base type we're looking for. */
300 tree offset; /* Best hint offset discovered so far. */
308 static tree
309 dfs_dcast_hint_pre (tree binfo, void *data_)
336 static tree
337 dfs_dcast_hint_post (tree binfo, void *data_)
358 tree
359 dcast_base_hint (tree subtype, tree target)
383 tree
384 lookup_field_1 (tree type, tree name, bool want_type)
386 tree field;
403 tree *fields = &DECL_SORTED_FIELDS (TYPE_NAME (type))->elts[0];
462 tree temp = lookup_field_1 (TREE_TYPE (field), name, want_type);
500 tree
540 tree cs = current_scope ();
549 tree cs = current_scope ();
558 tree cs = current_scope ();
564 tree
565 context_for_name_lookup (tree decl)
573 tree context = DECL_CONTEXT (decl);
598 static tree
599 dfs_access_in_type (tree binfo, void *data)
601 tree decl = (tree) data;
602 tree type = BINFO_TYPE (binfo);
624 tree decl_access = purpose_member (type, DECL_ACCESS (decl));
644 tree base_binfo;
645 VEC(tree,gc) *accesses;
652 tree base_access = VEC_index (tree, accesses, i);
693 access_in_type (tree type, tree decl)
695 tree binfo = TYPE_BINFO (type);
706 of the base-class hierarchy. As we come up the tree, we annotate
717 protected_accessible_p (tree decl, tree derived, tree binfo)
762 tree t = binfo;
777 friend_accessible_p (tree scope, tree decl, tree binfo)
779 tree befriending_classes;
780 tree t;
831 static tree
832 dfs_accessible_post (tree binfo, void *data ATTRIBUTE_UNUSED)
836 tree scope = current_scope ();
854 accessible_p (tree type, tree decl, bool consider_local_p)
856 tree binfo;
857 tree scope;
949 tree type;
951 tree name;
953 tree rval;
955 tree rval_binfo;
958 tree ambiguous;
974 template_self_reference_p (tree type, tree decl)
994 shared_member_p (tree t)
1003 tree fn = OVL_CURRENT (t);
1017 is_subobject_of_p (tree parent, tree binfo)
1019 tree probe;
1037 static tree
1038 lookup_field_r (tree binfo, void *data)
1041 tree type = BINFO_TYPE (binfo);
1042 tree nval = NULL_TREE;
1061 nval = VEC_index (tree, CLASSTYPE_METHOD_VEC (type), idx);
1155 tree
1156 build_baselink (tree binfo, tree access_binfo, tree functions, tree optype)
1158 tree baselink;
1189 tree
1190 lookup_member (tree xbasetype, tree name, int protect, bool want_type)
1192 tree rval, rval_binfo = NULL_TREE;
1193 tree type = NULL_TREE, basetype_path = NULL_TREE;
1298 tree
1299 lookup_field (tree xbasetype, tree name, int protect, bool want_type)
1301 tree rval = lookup_member (xbasetype, name, protect, want_type);
1314 tree
1315 lookup_fnfields (tree xbasetype, tree name, int protect)
1317 tree rval = lookup_member (xbasetype, name, protect, /*want_type=*/false);
1333 lookup_conversion_operator (tree class_type, tree type)
1340 tree fn;
1341 VEC(tree,gc) *methods = CLASSTYPE_METHOD_VEC (class_type);
1344 VEC_iterate (tree, methods, i, fn); ++i)
1370 lookup_fnfields_1 (tree type, tree name)
1372 VEC(tree,gc) *method_vec;
1373 tree fn;
1374 tree tmp;
1427 VEC_iterate (tree, method_vec, i, fn);
1439 hi = VEC_length (tree, method_vec);
1448 tmp = VEC_index (tree, method_vec, i);
1459 for (; VEC_iterate (tree, method_vec, i, fn); ++i)
1475 class_method_index_for_fn (tree class_type, tree function)
1498 tree
1499 adjust_result_of_qualified_name_lookup (tree decl,
1500 tree qualifying_scope,
1501 tree context_class)
1509 tree base;
1543 tree
1544 dfs_walk_all (tree binfo, tree (*pre_fn) (tree, void *),
1545 tree (*post_fn) (tree, void *), void *data)
1547 tree rval;
1549 tree base_binfo;
1586 static tree
1587 dfs_walk_once_r (tree binfo, tree (*pre_fn) (tree, void *),
1588 tree (*post_fn) (tree, void *), void *data)
1590 tree rval;
1592 tree base_binfo;
1638 dfs_unmark_r (tree binfo)
1641 tree base_binfo;
1663 tree
1664 dfs_walk_once (tree binfo, tree (*pre_fn) (tree, void *),
1665 tree (*post_fn) (tree, void *), void *data)
1668 tree rval;
1686 VEC(tree,gc) *vbases;
1688 tree base_binfo;
1691 VEC_iterate (tree, vbases, ix, base_binfo); ix++)
1708 static tree
1709 dfs_walk_once_accessible_r (tree binfo, bool friends_p, bool once,
1710 tree (*pre_fn) (tree, void *),
1711 tree (*post_fn) (tree, void *), void *data)
1713 tree rval = NULL_TREE;
1715 tree base_binfo;
1743 tree scope;
1778 static tree
1779 dfs_walk_once_accessible (tree binfo, bool friends_p,
1780 tree (*pre_fn) (tree, void *),
1781 tree (*post_fn) (tree, void *), void *data)
1784 tree rval = dfs_walk_once_accessible_r (binfo, friends_p, diamond_shaped,
1794 VEC(tree,gc) *vbases;
1796 tree base_binfo;
1799 VEC_iterate (tree, vbases, ix, base_binfo); ix++)
1812 check_final_overrider (tree overrider, tree basefn)
1814 tree over_type = TREE_TYPE (overrider);
1815 tree base_type = TREE_TYPE (basefn);
1816 tree over_return = TREE_TYPE (over_type);
1817 tree base_return = TREE_TYPE (base_type);
1818 tree over_throw = TYPE_RAISES_EXCEPTIONS (over_type);
1819 tree base_throw = TYPE_RAISES_EXCEPTIONS (base_type);
1850 tree binfo = lookup_base (over_return, base_return,
1919 look_for_overrides (tree type, tree fndecl)
1921 tree binfo = TYPE_BINFO (type);
1922 tree base_binfo;
1928 tree basetype = BINFO_TYPE (base_binfo);
1939 tree
1940 look_for_overrides_here (tree type, tree fndecl)
1956 tree fns = VEC_index (tree, CLASSTYPE_METHOD_VEC (type), ix);
1960 tree fn = OVL_CURRENT (fns);
1968 tree btypes = TYPE_ARG_TYPES (TREE_TYPE (fn));
1969 tree dtypes = TYPE_ARG_TYPES (TREE_TYPE (fndecl));
1984 look_for_overrides_r (tree type, tree fndecl)
1986 tree fn = look_for_overrides_here (type, fndecl);
2011 static tree
2012 dfs_get_pure_virtuals (tree binfo, void *data)
2014 tree type = (tree) data;
2021 tree virtuals;
2027 VEC_safe_push (tree, gc, CLASSTYPE_PURE_VIRTUALS (type),
2037 get_pure_virtuals (tree type)
2060 maybe_suppress_debug_info (tree t)
2097 static tree
2098 dfs_debug_mark (tree binfo, void *data ATTRIBUTE_UNUSED)
2100 tree t = BINFO_TYPE (binfo);
2118 note_debug_info_needed (tree type)
2160 bases have been encountered already in the tree walk. PARENT_CONVS
2169 check_hidden_convs (tree binfo, int virtual_depth, int virtualness,
2170 tree to_type, tree parent_convs, tree other_convs)
2172 tree level, probe;
2188 tree *prev, other;
2240 static tree
2241 split_conversions (tree my_convs, tree parent_convs,
2242 tree child_convs, tree other_convs)
2244 tree t;
2245 tree prev;
2272 encountered virtual bases already in the tree walk. PARENT_CONVS &
2275 elsewhere in the tree. Return the conversions found within this
2290 lookup_conversions_r (tree binfo,
2292 tree parent_convs, tree parent_tpl_convs,
2293 tree other_convs, tree other_tpl_convs,
2294 tree *convs, tree *tpl_convs)
2297 tree my_convs = NULL_TREE;
2298 tree my_tpl_convs = NULL_TREE;
2299 tree child_convs = NULL_TREE;
2300 tree child_tpl_convs = NULL_TREE;
2302 tree base_binfo;
2303 VEC(tree,gc) *method_vec = CLASSTYPE_METHOD_VEC (BINFO_TYPE (binfo));
2304 tree conv;
2319 VEC_iterate (tree, method_vec, i, conv);
2322 tree cur = OVL_CURRENT (conv);
2331 tree tpls;
2335 tree tpl = OVL_CURRENT (tpls);
2336 tree type = DECL_CONV_FN_TYPE (tpl);
2353 tree name = DECL_NAME (cur);
2357 tree type = DECL_CONV_FN_TYPE (cur);
2395 tree base_convs, base_tpl_convs;
2430 tree
2431 lookup_conversions (tree type)
2433 tree convs, tpl_convs;
2434 tree list = NULL_TREE;
2447 tree probe, next;
2460 tree probe, next;
2477 tree
2478 binfo_from_vbase (tree binfo)
2492 tree
2493 binfo_via_virtual (tree binfo, tree limit)
2512 tree
2513 copied_binfo (tree binfo, tree here)
2515 tree result = NULL_TREE;
2519 tree t;
2529 tree cbinfo;
2530 tree base_binfo;
2551 tree
2552 binfo_for_vbase (tree base, tree t)
2555 tree binfo;
2556 VEC(tree,gc) *vbases;
2559 VEC_iterate (tree, vbases, ix, binfo); ix++)
2570 tree
2571 original_binfo (tree binfo, tree here)
2573 tree result = NULL;
2583 tree base_binfos;
2589 tree base_binfo;