contrib/gcc-4.7/gcc/cp/class.c
/* Update all of the primary and secondary vtables for T.  Create new
   vtables as required, and initialize their RTTI information.  Each
   of the functions in VIRTUALS is declared in T and may override a
   virtual function from a base class; find and modify the appropriate
   entries to point to the overriding functions.  Returns a list, in
   declaration order, of the virtual functions that are declared in T,
   but do not appear in the primary base class vtable, and which
   should therefore be appended to the end of the vtable for T.  */
Update all of the primary and secondary vtables for T.  Create new
vtables as required, and initialize their RTTI information.  Each
of the functions in VIRTUALS is declared in T and may override a
virtual function from a base class; find and modify the appropriate
entries to point to the overriding functions.  Returns a list, in
declaration order, of the virtual functions that are declared in T,
but do not appear in the primary base class vtable, and which
should therefore be appended to the end of the vtable for T.
Update all of the primary and secondary vtables for T . Create new vtables as required and initialize their RTTI information . Each of the functions in VIRTUALS is declared in T and may override a virtual function from a base class ; find and modify the appropriate entries to point to the overriding functions . Returns a list in declaration order of the virtual functions that are declared in T but do not appear in the primary base class vtable and which should therefore be appended to the end of the vtable for T .
static tree
modify_all_vtables (tree t, tree virtuals)
{
  tree binfo = TYPE_BINFO (t);
  tree *fnsp;
  dfs_walk_once (binfo, dfs_modify_vtables, NULL, t);
  for (fnsp = &virtuals; *fnsp; )
    {
      tree fn = TREE_VALUE (*fnsp);
      if (!value_member (fn, BINFO_VIRTUALS (binfo))
	  || DECL_VINDEX (fn) == error_mark_node)
	{
	  BV_DELTA (*fnsp) = integer_zero_node;
	  BV_VCALL_INDEX (*fnsp) = NULL_TREE;
	  fnsp = &TREE_CHAIN (*fnsp);
	}
      else
	*fnsp = TREE_CHAIN (*fnsp);
    }
  return virtuals;
}
static tree modify_all_vtables ( tree t , tree virtuals ) { tree binfo = TYPE_BINFO ( t ) ; tree * fnsp ; dfs_walk_once ( binfo , dfs_modify_vtables , NULL , t ) ; for ( fnsp = & virtuals ; * fnsp ; ) { tree fn = TREE_VALUE ( * fnsp ) ; if ( ! value_member ( fn , BINFO_VIRTUALS ( binfo ) ) || DECL_VINDEX ( fn ) == error_mark_node ) { BV_DELTA ( * fnsp ) = integer_zero_node ; BV_VCALL_INDEX ( * fnsp ) = NULL_TREE ; fnsp = & TREE_CHAIN ( * fnsp ) ; } else * fnsp = TREE_CHAIN ( * fnsp ) ; } return virtuals ; }
Update all of the primary and secondary vtables for T.  Create new
vtables as required, and initialize their RTTI information.
Update all of the primary and secondary vtables for T . Create new vtables as required and initialize their RTTI information .
/* Update all of the vtables.  */ /* Add virtual functions not already in our primary vtable. These
     will be both those introduced by this class, and those overridden
     from secondary bases.  It does not include virtuals merely
     inherited from secondary bases.  */ /* We don't need to adjust the `this' pointer when
	     calling this function.  */ /* This is a function not already in our vtable.  Keep it.  */ /* We've already got an entry for this function.  Skip it.  */