osprey/kg++fe/gnu/cp/search.c File Reference

#include "config.h"
#include "system.h"
#include "tree.h"
#include "cp-tree.h"
#include "obstack.h"
#include "flags.h"
#include "rtl.h"
#include "output.h"
#include "ggc.h"
#include "toplev.h"
#include "stack.h"

Include dependency graph for search.c:

Go to the source code of this file.

Data Types

type  vbase_info
type  lookup_field_info
type  overlap_info

Defines

#define search_level   stack_level
#define BINFO_ACCESS(NODE)   ((access_kind) ((TREE_LANG_FLAG_1 (NODE) << 1) | TREE_LANG_FLAG_6 (NODE)))
#define SET_BINFO_ACCESS(NODE, ACCESS)

Functions/Subroutines

struct stack_levelpush_stack_level (struct obstack *obstack, char *tp, int size)
struct stack_levelpop_stack_level (struct stack_level *stack)
static int is_subobject_of_p PARAMS ((tree, tree, tree))
static tree dfs_check_overlap PARAMS ((tree, void *))
static base_kind lookup_base_r PARAMS ((tree, tree, base_access, int, tree *))
static int
dynamic_cast_base_recurse 
PARAMS ((tree, tree, int, tree *))
static int covariant_return_p PARAMS ((tree, tree))
static struct search_level
*push_search_level 
PARAMS ((struct stack_level *, struct obstack *))
static struct search_level
*pop_search_level 
PARAMS ((struct stack_level *))
static tree bfs_walk PARAMS ((tree, tree(*)(tree, void *), tree(*)(tree, void *), void *))
static int shared_member_p PARAMS ((tree))
static void setup_class_bindings PARAMS ((tree, int))
static struct search_level * push_search_level (struct stack_level *stack, struct obstack *obstack)
static struct search_level * pop_search_level (struct stack_level *obstack)
static base_kind lookup_base_r (tree binfo, tree base, base_access access, int is_virtual, tree *binfo_ptr)
bool accessible_base_p (tree t, tree base)
tree lookup_base (tree t, tree base, base_access access, base_kind *kind_ptr)
static int dynamic_cast_base_recurse (tree subtype, tree binfo, int via_virtual, tree *offset_ptr)
tree get_dynamic_cast_base_type (tree subtype, tree target)
tree lookup_field_1 (tree type, tree name, bool want_type)
tree current_scope ()
int at_function_scope_p ()
bool at_class_scope_p ()
tree context_for_name_lookup (tree decl)
static tree canonical_binfo (tree binfo)
static tree dfs_canonical_queue (tree binfo, data)
static tree dfs_assert_unmarked_p (tree binfo, data)
static void assert_canonical_unmarked (tree binfo)
static tree shared_marked_p (tree binfo, void *data)
static tree shared_unmarked_p (tree binfo, void *data)
static tree dfs_access_in_type (tree binfo, void *data)
static access_kind access_in_type (tree type, tree decl)
static tree dfs_accessible_queue_p (tree binfo, data)
static tree dfs_accessible_p (tree binfo, void *data)
static int protected_accessible_p (tree decl, tree derived, tree binfo)
static int friend_accessible_p (tree scope, tree decl, tree binfo)
void type_access_control (tree type, tree val)
int accessible_p (tree type, tree decl)
static int is_subobject_of_p_1 (tree parent, tree binfo, tree most_derived)
static int is_subobject_of_p (tree parent, tree binfo, tree most_derived)
static tree lookup_field_queue_p (tree binfo, void *data)
static int template_self_reference_p (tree type, tree decl)
static int shared_member_p (tree t)
static tree lookup_field_r (tree binfo, void *data)
tree build_baselink (tree binfo, tree access_binfo, tree functions, tree optype)
tree lookup_member (tree xbasetype, tree name, int protect, int want_type)
tree lookup_field (tree xbasetype, tree name, int protect, int want_type)
tree lookup_fnfields (tree xbasetype, tree name, int protect)
tree lookup_nested_field (tree name, int complain)
static int lookup_conversion_operator (tree class_type, tree type)
int lookup_fnfields_1 (tree type, tree name)
tree adjust_result_of_qualified_name_lookup (tree decl, tree qualifying_class, tree context_class)
static tree bfs_walk (tree binfo, tree *fn, tree *qfn, void *data)
tree dfs_walk_real (tree binfo, tree *prefn, tree *postfn, tree *qfn, void *data)
tree dfs_walk (tree binfo, tree *fn, tree *qfn, void *data)
static int covariant_return_p (tree brettype, tree drettype)
int check_final_overrider (tree overrider, tree basefn)
int look_for_overrides (tree type, tree fndecl)
tree look_for_overrides_here (tree type, tree fndecl)
static int look_for_overrides_r (tree type, tree fndecl)
tree dfs_unmarked_real_bases_queue_p (tree binfo, void *data)
tree dfs_marked_real_bases_queue_p (tree binfo, void *data)
tree dfs_skip_vbases (tree binfo, data)
static tree dfs_get_pure_virtuals (tree binfo, void *data)
void get_pure_virtuals (tree type)
tree markedp (tree binfo, data)
tree unmarkedp (tree binfo, data)
tree marked_vtable_pathp (tree binfo, data)
tree unmarked_vtable_pathp (tree binfo, data)
static tree marked_pushdecls_p (tree binfo, data)
static tree unmarked_pushdecls_p (tree binfo, data)
tree dfs_unmark (tree binfo, data)
static tree dfs_get_vbase_types (tree binfo, void *data)
static tree dfs_build_inheritance_graph_order (tree binfo, void *data)
void get_vbase_types (tree type)
static tree dfs_find_vbase_instance (tree binfo, void *data)
tree find_vbase_instance (tree base, tree type)
void maybe_suppress_debug_info (tree t)
static tree dfs_debug_mark (tree binfo, data)
static tree dfs_debug_unmarkedp (tree binfo, data)
void note_debug_info_needed (tree type)
static int dependent_base_p (tree binfo)
static void setup_class_bindings (tree name, int type_binding_p)
static tree dfs_push_type_decls (tree binfo, data)
static tree dfs_push_decls (tree binfo, void *data)
void push_class_decls (tree type)
static tree dfs_unuse_fields (tree binfo, data)
void unuse_fields (tree type)
void pop_class_decls ()
void print_search_statistics ()
void init_search_processing ()
void reinit_search_statistics ()
static tree add_conversions (tree binfo, void *data)
tree lookup_conversions (tree type)
static tree dfs_check_overlap (tree empty_binfo, void *data)
static tree dfs_no_overlap_yet (tree binfo, void *data)
int types_overlap_p (tree empty_type, tree next_type)
tree binfo_for_vtable (tree var)
tree binfo_from_vbase (tree binfo)
tree binfo_via_virtual (tree binfo, tree limit)
tree binfo_for_vbase (tree basetype, tree classtype)

Variables

static struct obstack search_obstack
static struct search_level * search_stack


Define Documentation

#define BINFO_ACCESS ( NODE   )     ((access_kind) ((TREE_LANG_FLAG_1 (NODE) << 1) | TREE_LANG_FLAG_6 (NODE)))

#define search_level   stack_level

Definition at line 71 of file search.c.

Referenced by pop_search_level(), and push_search_level().

#define SET_BINFO_ACCESS ( NODE,
ACCESS   ) 

Value:

((TREE_LANG_FLAG_1 (NODE) = ((ACCESS) & 2) != 0), \
   (TREE_LANG_FLAG_6 (NODE) = ((ACCESS) & 1) != 0))

Definition at line 708 of file search.c.

Referenced by dfs_access_in_type().


Function Documentation

static access_kind access_in_type ( tree  type,
tree  decl 
) [static]

bool accessible_base_p ( tree  t,
tree  base 
)

Definition at line 261 of file search.c.

int accessible_p ( tree  type,
tree  decl 
)

static tree add_conversions ( tree  binfo,
void data 
) [static]

tree adjust_result_of_qualified_name_lookup ( tree  decl,
tree  qualifying_class,
tree  context_class 
)

Definition at line 1812 of file search.c.

static void assert_canonical_unmarked ( tree  binfo  )  [static]

Definition at line 670 of file search.c.

References dfs_assert_unmarked_p(), dfs_canonical_queue(), and dfs_walk().

Referenced by access_in_type(), and accessible_p().

bool at_class_scope_p ( void   ) 

Definition at line 605 of file search.c.

int at_function_scope_p ( void   ) 

static tree bfs_walk ( tree  binfo,
tree fn,
tree qfn,
void data 
) [static]

tree binfo_for_vbase ( tree  basetype,
tree  classtype 
)

tree binfo_for_vtable ( tree  var  ) 

tree binfo_from_vbase ( tree  binfo  ) 

Definition at line 3000 of file search.c.

Referenced by get_delta_difference().

tree binfo_via_virtual ( tree  binfo,
tree  limit 
)

tree build_baselink ( tree  binfo,
tree  access_binfo,
tree  functions,
tree  optype 
)

Definition at line 1422 of file search.c.

static tree canonical_binfo ( tree  binfo  )  [static]

int check_final_overrider ( tree  overrider,
tree  basefn 
)

tree context_for_name_lookup ( tree  decl  ) 

static int covariant_return_p ( tree  brettype,
tree  drettype 
) [static]

tree current_scope ( void   ) 

static int dependent_base_p ( tree  binfo  )  [static]

static tree dfs_access_in_type ( tree  binfo,
void data 
) [static]

static tree dfs_accessible_p ( tree  binfo,
void data 
) [static]

static tree dfs_accessible_queue_p ( tree  binfo,
data   
) [static]

static tree dfs_assert_unmarked_p ( tree  binfo,
data   
) [static]

Definition at line 658 of file search.c.

References BINFO_MARKED, my_friendly_assert, and NULL_TREE.

Referenced by assert_canonical_unmarked().

static tree dfs_build_inheritance_graph_order ( tree  binfo,
void data 
) [static]

Definition at line 2403 of file search.c.

References NULL_TREE, SET_BINFO_MARKED, and TREE_CHAIN.

Referenced by get_vbase_types().

static tree dfs_canonical_queue ( tree  binfo,
data   
) [static]

Definition at line 648 of file search.c.

References canonical_binfo().

Referenced by accessible_p(), and assert_canonical_unmarked().

static tree dfs_check_overlap ( tree  empty_binfo,
void data 
) [static]

static tree dfs_debug_mark ( tree  binfo,
data   
) [static]

Definition at line 2528 of file search.c.

References BINFO_TYPE, CLASSTYPE_DEBUG_REQUESTED, and NULL_TREE.

Referenced by note_debug_info_needed().

static tree dfs_debug_unmarkedp ( tree  binfo,
data   
) [static]

Definition at line 2543 of file search.c.

References BINFO_TYPE, CLASSTYPE_DEBUG_REQUESTED, and NULL_TREE.

Referenced by note_debug_info_needed().

static tree dfs_find_vbase_instance ( tree  binfo,
void data 
) [static]

Definition at line 2443 of file search.c.

References base, BINFO_PRIMARY_P, BINFO_TYPE, NULL_TREE, same_type_p, and TREE_VALUE.

Referenced by find_vbase_instance().

static tree dfs_get_pure_virtuals ( tree  binfo,
void data 
) [static]

static tree dfs_get_vbase_types ( tree  binfo,
void data 
) [static]

Definition at line 2384 of file search.c.

References BINFO_TYPE, CLASSTYPE_VBASECLASSES, NULL_TREE, SET_BINFO_MARKED, tree_cons, and TREE_VIA_VIRTUAL.

Referenced by get_vbase_types().

tree dfs_marked_real_bases_queue_p ( tree  binfo,
void data 
)

static tree dfs_no_overlap_yet ( tree  binfo,
void data 
) [static]

Definition at line 2941 of file search.c.

References overlap_info::found_overlap, and NULL_TREE.

Referenced by types_overlap_p().

static tree dfs_push_decls ( tree  binfo,
void data 
) [static]

static tree dfs_push_type_decls ( tree  binfo,
data   
) [static]

tree dfs_skip_vbases ( tree  binfo,
data   
)

Definition at line 2232 of file search.c.

References NULL_TREE, and TREE_VIA_VIRTUAL.

tree dfs_unmark ( tree  binfo,
data   
)

tree dfs_unmarked_real_bases_queue_p ( tree  binfo,
void data 
)

static tree dfs_unuse_fields ( tree  binfo,
data   
) [static]

tree dfs_walk ( tree  binfo,
tree fn,
tree qfn,
void data 
)

tree dfs_walk_real ( tree  binfo,
tree prefn,
tree postfn,
tree qfn,
void data 
)

static int dynamic_cast_base_recurse ( tree  subtype,
tree  binfo,
int  via_virtual,
tree offset_ptr 
) [static]

tree find_vbase_instance ( tree  base,
tree  type 
)

static int friend_accessible_p ( tree  scope,
tree  decl,
tree  binfo 
) [static]

tree get_dynamic_cast_base_type ( tree  subtype,
tree  target 
)

Definition at line 426 of file search.c.

References build_int_2, dynamic_cast_base_recurse(), NULL_TREE, offset, ssizetype, TREE_TYPE, and TYPE_BINFO.

Referenced by build_dynamic_cast_1().

void get_pure_virtuals ( tree  type  ) 

Definition at line 2275 of file search.c.

Referenced by finish_struct_bits().

void get_vbase_types ( tree  type  ) 

void init_search_processing (  ) 

Definition at line 2814 of file search.c.

References gcc_obstack_init, and search_obstack.

Referenced by cxx_init_decl_processing().

static int is_subobject_of_p ( tree  parent,
tree  binfo,
tree  most_derived 
) [static]

static int is_subobject_of_p_1 ( tree  parent,
tree  binfo,
tree  most_derived 
) [static]

int look_for_overrides ( tree  type,
tree  fndecl 
)

Definition at line 2095 of file search.c.

Referenced by check_for_override(), and look_for_overrides_r().

tree look_for_overrides_here ( tree  type,
tree  fndecl 
)

static int look_for_overrides_r ( tree  type,
tree  fndecl 
) [static]

tree lookup_base ( tree  t,
tree  base,
base_access  access,
base_kind kind_ptr 
)

static base_kind lookup_base_r ( tree  binfo,
tree  base,
base_access  access,
int  is_virtual,
tree binfo_ptr 
) [static]

static int lookup_conversion_operator ( tree  class_type,
tree  type 
) [static]

tree lookup_conversions ( tree  type  ) 

tree lookup_field ( tree  xbasetype,
tree  name,
int  protect,
int  want_type 
)

Definition at line 1564 of file search.c.

tree lookup_field_1 ( tree  type,
tree  name,
bool  want_type 
)

Definition at line 451 of file search.c.

static tree lookup_field_queue_p ( tree  binfo,
void data 
) [static]

static tree lookup_field_r ( tree  binfo,
void data 
) [static]

tree lookup_fnfields ( tree  xbasetype,
tree  name,
int  protect 
)

int lookup_fnfields_1 ( tree  type,
tree  name 
)

tree lookup_member ( tree  xbasetype,
tree  name,
int  protect,
int  want_type 
)

tree lookup_nested_field ( tree  name,
int  complain 
)

static tree marked_pushdecls_p ( tree  binfo,
data   
) [static]

Definition at line 2349 of file search.c.

References BINFO_PUSHDECLS_MARKED, BINFO_TYPE, CLASS_TYPE_P, and NULL_TREE.

Referenced by push_class_decls().

tree marked_vtable_pathp ( tree  binfo,
data   
)

Definition at line 2333 of file search.c.

References BINFO_VTABLE_PATH_MARKED, and NULL_TREE.

tree markedp ( tree  binfo,
data   
)

void maybe_suppress_debug_info ( tree  t  ) 

Definition at line 2485 of file search.c.

Referenced by finish_struct_1().

void note_debug_info_needed ( tree  type  ) 

Definition at line 2559 of file search.c.

Referenced by genrtl_finish_function(), layout_var_decl(), and maybe_emit_vtables().

static void setup_class_bindings PARAMS ( (tree, int)   )  [static]

static int shared_member_p PARAMS ( (tree  )  [static]

static tree bfs_walk PARAMS ( (tree, tree(*)(tree, void *), tree(*)(tree, void *), void *)   )  [static]

static struct search_level* pop_search_level PARAMS ( (struct stack_level *)   )  [static, read]

static struct search_level* push_search_level PARAMS ( (struct stack_level *, struct obstack *)   )  [static, read]

static int covariant_return_p PARAMS ( (tree, tree  )  [static]

static int dynamic_cast_base_recurse PARAMS ( (tree, tree, int, tree *)   )  [static]

static base_kind lookup_base_r PARAMS ( (tree, tree, base_access, int, tree *)   )  [static]

static tree dfs_check_overlap PARAMS ( (tree, void *)   )  [static]

static int is_subobject_of_p PARAMS ( (tree, tree, tree  )  [static]

void pop_class_decls (  ) 

Definition at line 2791 of file search.c.

References pop_search_level(), and search_stack.

Referenced by popclass().

static struct search_level* pop_search_level ( struct stack_level obstack  )  [static, read]

Definition at line 146 of file search.c.

References pop_stack_level(), search_level, and stack.

Referenced by pop_class_decls().

struct stack_level* pop_stack_level ( struct stack_level stack  )  [read]

Definition at line 61 of file search.c.

References stack_level::obstack, obstack_free, and stack_level::prev.

Referenced by pop_search_level().

void print_search_statistics ( void   ) 

Definition at line 2800 of file search.c.

Referenced by cxx_print_statistics().

static int protected_accessible_p ( tree  decl,
tree  derived,
tree  binfo 
) [static]

void push_class_decls ( tree  type  ) 

static struct search_level* push_search_level ( struct stack_level stack,
struct obstack obstack 
) [static, read]

Definition at line 133 of file search.c.

References push_stack_level(), and search_level.

Referenced by push_class_decls().

struct stack_level* push_stack_level ( struct obstack obstack,
char *  tp,
int  size 
) [read]

void reinit_search_statistics ( void   ) 

Definition at line 2820 of file search.c.

static void setup_class_bindings ( tree  name,
int  type_binding_p 
) [static]

static tree shared_marked_p ( tree  binfo,
void data 
) [static]

Definition at line 680 of file search.c.

References canonical_binfo(), and markedp().

Referenced by access_in_type().

static int shared_member_p ( tree  t  )  [static]

static tree shared_unmarked_p ( tree  binfo,
void data 
) [static]

Definition at line 692 of file search.c.

References canonical_binfo(), and unmarkedp().

Referenced by access_in_type().

static int template_self_reference_p ( tree  type,
tree  decl 
) [static]

void type_access_control ( tree  type,
tree  val 
)

int types_overlap_p ( tree  empty_type,
tree  next_type 
)

static tree unmarked_pushdecls_p ( tree  binfo,
data   
) [static]

Definition at line 2358 of file search.c.

References BINFO_PUSHDECLS_MARKED, BINFO_TYPE, CLASS_TYPE_P, and NULL_TREE.

Referenced by push_class_decls().

tree unmarked_vtable_pathp ( tree  binfo,
data   
)

Definition at line 2341 of file search.c.

References BINFO_VTABLE_PATH_MARKED, and NULL_TREE.

tree unmarkedp ( tree  binfo,
data   
)

void unuse_fields ( tree  type  ) 

Definition at line 2784 of file search.c.

References dfs_unuse_fields(), dfs_walk(), TYPE_BINFO, and unmarkedp().

Referenced by dfs_unuse_fields(), and pushclass().


Variable Documentation

Definition at line 40 of file search.c.

Referenced by init_search_processing(), and push_class_decls().

struct search_level* search_stack [static]

Definition at line 72 of file search.c.

Referenced by pop_class_decls(), and push_class_decls().


Generated on Wed Apr 8 15:29:39 2009 for Open64 by  doxygen 1.5.6