This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++ PATCH: various trunk cleanups


A bunch of changes with no impact on functionality, just tidying up the
sources a bit.

Applied to trunk only.

2001-03-20  Jason Merrill  <jason@redhat.com>

	* cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
	* class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
	(import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.

	* cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
	(pending_vtables): Remove.
	* decl2.c (pending_vtables): Remove.
	(import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
	CLASSTYPE_VTABLE_NEEDS_WRITING.
	(import_export_class): Likewise.
	(init_decl2): Don't mark pending_vtables.
	* lex.c (handle_pragma_vtable): Just sorry.
	* pt.c (instantiate_class_template): Don't mess with
	CLASSTYPE_VTABLE_NEEDS_WRITING.
	(mark_class_instantiated): Likewise.
	* ptree.c (print_lang_type): Don't print it.
	* semantics.c (begin_class_definition): Don't set it.

	* pt.c (template_tail): Replace with last_pending_template.
	(maybe_templates, maybe_template_tail): Remove.
	(add_pending_template): Adjust.
	(instantiate_pending_templates): Adjust.

	* cp-tree.h (struct saved_scope): Remove lang_stack field.
	(current_lang_stack): Remove.
	* decl.c (maybe_push_to_top_level): Don't initialize it.
	(duplicate_decls): Use current_lang_depth.
	(xref_basetypes): Likewise.
	* class.c (current_lang_depth): New fn.
	(push_lang_context): Use more varray functionality.
	(pop_lang_context): Likewise.

*** class.c.~1~	Thu Mar 22 00:23:26 2001
--- class.c	Thu Mar 22 00:21:03 2001
*************** pop_nested_class ()
*** 5757,5762 ****
--- 5757,5770 ----
      pop_nested_class ();
  }
  
+ /* Returns the number of extern "LANG" blocks we are nested within.  */
+ 
+ int
+ current_lang_depth ()
+ {
+   return VARRAY_ACTIVE_SIZE (current_lang_base);
+ }
+ 
  /* Set global variables CURRENT_LANG_NAME to appropriate value
     so that behavior of name-mangling machinery is correct.  */
  
*************** void
*** 5764,5778 ****
  push_lang_context (name)
       tree name;
  {
!   *current_lang_stack++ = current_lang_name;
!   if (current_lang_stack - &VARRAY_TREE (current_lang_base, 0)
!       >= (ptrdiff_t) VARRAY_SIZE (current_lang_base))
!     {
!       size_t old_size = VARRAY_SIZE (current_lang_base);
! 
!       VARRAY_GROW (current_lang_base, old_size + 10);
!       current_lang_stack = &VARRAY_TREE (current_lang_base, old_size);
!     }
  
    if (name == lang_name_cplusplus)
      {
--- 5772,5778 ----
  push_lang_context (name)
       tree name;
  {
!   VARRAY_PUSH_TREE (current_lang_base, current_lang_name);
  
    if (name == lang_name_cplusplus)
      {
*************** push_lang_context (name)
*** 5807,5816 ****
  void
  pop_lang_context ()
  {
!   /* Clear the current entry so that garbage collector won't hold on
!      to it.  */
!   *current_lang_stack = NULL_TREE;
!   current_lang_name = *--current_lang_stack;
  }
  
  /* Type instantiation routines.  */
--- 5807,5814 ----
  void
  pop_lang_context ()
  {
!   current_lang_name = VARRAY_TOP_TREE (current_lang_base);
!   VARRAY_POP (current_lang_base);
  }
  
  /* Type instantiation routines.  */
*************** build_vtable_entry (delta, vcall_index, 
*** 7847,7854 ****
  
        fn = TREE_OPERAND (entry, 0);
        if ((!integer_zerop (delta) || vcall_index != NULL_TREE)
! 	  && fn != abort_fndecl
! 	  && !DECL_TINFO_FN_P (fn))
  	{
  	  entry = make_thunk (entry, delta, vcall_index,
  			      generate_with_vtable_p);
--- 7845,7851 ----
  
        fn = TREE_OPERAND (entry, 0);
        if ((!integer_zerop (delta) || vcall_index != NULL_TREE)
! 	  && fn != abort_fndecl)
  	{
  	  entry = make_thunk (entry, delta, vcall_index,
  			      generate_with_vtable_p);
*** cp-tree.h.~1~	Thu Mar 22 00:23:26 2001
--- cp-tree.h	Thu Mar 22 00:14:43 2001
*************** struct saved_scope {
*** 787,793 ****
    tree access_specifier;
    tree function_decl;
    varray_type lang_base;
-   tree *lang_stack;
    tree lang_name;
    tree template_parms;
    tree x_previous_class_type;
--- 787,792 ----
*************** struct saved_scope {
*** 830,836 ****
  
  /* Pointer to the top of the language name stack.  */
  
- #define current_lang_stack scope_chain->lang_stack
  #define current_lang_base scope_chain->lang_base
  #define current_lang_name scope_chain->lang_name
  
--- 829,834 ----
*************** struct lang_type
*** 1296,1302 ****
    unsigned com_interface : 1;
    unsigned non_pod_class : 1;
    unsigned nearly_empty_p : 1;
!   unsigned vtable_needs_writing : 1;
    unsigned has_assign_ref : 1;
    unsigned has_new : 1;
    unsigned has_array_new : 1;
--- 1294,1300 ----
    unsigned com_interface : 1;
    unsigned non_pod_class : 1;
    unsigned nearly_empty_p : 1;
!   unsigned user_align : 1;
    unsigned has_assign_ref : 1;
    unsigned has_new : 1;
    unsigned has_array_new : 1;
*************** struct lang_type
*** 1328,1334 ****
    unsigned has_abstract_assign_ref : 1;
    unsigned non_aggregate : 1;
    unsigned is_partial_instantiation : 1;
-   unsigned user_align : 1;
  
    /* When adding a flag here, consider whether or not it ought to
       apply to a template instance if it applies to the template.  If
--- 1326,1331 ----
*************** struct lang_type
*** 1337,1343 ****
    /* There are some bits left to fill out a 32-bit word.  Keep track
       of this by updating the size of this bitfield whenever you add or
       remove a flag.  */
!   unsigned dummy : 8;
  
    int vsize;
  
--- 1334,1340 ----
    /* There are some bits left to fill out a 32-bit word.  Keep track
       of this by updating the size of this bitfield whenever you add or
       remove a flag.  */
!   unsigned dummy : 9;
  
    int vsize;
  
*************** struct lang_type
*** 1573,1582 ****
     and there is no need to change it.  */
  #define CLASSTYPE_NEEDS_VIRTUAL_REINIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->needs_virtual_reinit)
  
- /* Nonzero means that if this type has virtual functions, that
-    the virtual function table will be written out.  */
- #define CLASSTYPE_VTABLE_NEEDS_WRITING(NODE) (TYPE_LANG_SPECIFIC(NODE)->vtable_needs_writing)
- 
  /* Nonzero means that this type has an X() constructor.  */
  #define TYPE_HAS_DEFAULT_CONSTRUCTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_default_ctor)
  
--- 1570,1575 ----
*************** struct lang_decl_flags
*** 1824,1834 ****
    unsigned pending_inline_p : 1;
    unsigned global_ctor_p : 1;
    unsigned global_dtor_p : 1;
-   unsigned tinfo_fn_p : 1;
    unsigned assignment_operator_p : 1;
    unsigned anticipated_p : 1;
    unsigned generate_with_vtable_p : 1;
!   /* One unused bit.  */
  
    union {
      /* In a FUNCTION_DECL, VAR_DECL, TYPE_DECL, or TEMPLATE_DECL, this
--- 1817,1826 ----
    unsigned pending_inline_p : 1;
    unsigned global_ctor_p : 1;
    unsigned global_dtor_p : 1;
    unsigned assignment_operator_p : 1;
    unsigned anticipated_p : 1;
    unsigned generate_with_vtable_p : 1;
!   /* Two unused bits.  */
  
    union {
      /* In a FUNCTION_DECL, VAR_DECL, TYPE_DECL, or TEMPLATE_DECL, this
*************** struct lang_decl
*** 2032,2048 ****
  #define DECL_HAS_IN_CHARGE_PARM_P(NODE) \
    (DECL_LANG_SPECIFIC (NODE)->decl_flags.has_in_charge_parm_p)
  
- /* Non-zero for a FUNCTION_DECL that declares a type-info function.
-    This only happens in the old abi.  */
- #define DECL_TINFO_FN_P(NODE)					\
-   (TREE_CODE (NODE) == FUNCTION_DECL				\
-    && DECL_ARTIFICIAL (NODE)					\
-    && DECL_LANG_SPECIFIC(NODE)->decl_flags.tinfo_fn_p)
- 
- /* Mark NODE as a type-info function.  */
- #define SET_DECL_TINFO_FN_P(NODE) \
-   (DECL_LANG_SPECIFIC((NODE))->decl_flags.tinfo_fn_p = 1)
- 
  /* Nonzero if NODE is an overloaded `operator delete[]' function.  */
  #define DECL_ARRAY_DELETE_OPERATOR_P(NODE) \
    (DECL_OVERLOADED_OPERATOR_P (NODE) == VEC_DELETE_EXPR)
--- 2024,2029 ----
*************** extern int warn_nontemplate_friend;
*** 3190,3198 ****
  /* A node that is a list (length 1) of error_mark_nodes.  */
  extern tree error_mark_list;
  
- /* A list of virtual function tables we must make sure to write out.  */
- extern tree pending_vtables;
- 
  /* Node for "pointer to (virtual) function".
     This may be distinct from ptr_type_node so gdb can distinguish them.  */
  #define vfunc_ptr_type_node \
--- 3171,3176 ----
*************** extern void pushclass				PARAMS ((tree, 
*** 3727,3732 ****
--- 3705,3711 ----
  extern void popclass				PARAMS ((void));
  extern void push_nested_class			PARAMS ((tree, int));
  extern void pop_nested_class			PARAMS ((void));
+ extern int current_lang_depth			PARAMS ((void));
  extern void push_lang_context			PARAMS ((tree));
  extern void pop_lang_context			PARAMS ((void));
  extern tree instantiate_type			PARAMS ((tree, tree, enum instantiate_type_flags));
*** decl.c.~1~	Thu Mar 22 00:23:26 2001
--- decl.c	Tue Mar 20 13:31:34 2001
*************** maybe_push_to_top_level (pseudo)
*** 2531,2537 ****
    scope_chain = s;
    current_function_decl = NULL_TREE;
    VARRAY_TREE_INIT (current_lang_base, 10, "current_lang_base");
-   current_lang_stack = &VARRAY_TREE (current_lang_base, 0);
    current_lang_name = lang_name_cplusplus;
    current_namespace = global_namespace;
  }
--- 2531,2536 ----
*************** duplicate_decls (newdecl, olddecl)
*** 3313,3320 ****
  	  /* extern "C" int foo ();
  	     int foo () { bar (); }
  	     is OK.  */
! 	  if (current_lang_stack
! 	      == &VARRAY_TREE (current_lang_base, 0))
  	    DECL_LANGUAGE (newdecl) = DECL_LANGUAGE (olddecl);
  	  else
  	    {
--- 3312,3318 ----
  	  /* extern "C" int foo ();
  	     int foo () { bar (); }
  	     is OK.  */
! 	  if (current_lang_depth () == 0)
  	    DECL_LANGUAGE (newdecl) = DECL_LANGUAGE (olddecl);
  	  else
  	    {
*************** xref_basetypes (code_type_node, name, re
*** 12723,12730 ****
  	    }
  
  	  if (TYPE_FOR_JAVA (basetype)
! 	      && (current_lang_stack
! 		  == &VARRAY_TREE (current_lang_base, 0)))
  	    TYPE_FOR_JAVA (ref) = 1;
  
  	  /* Note that the BINFO records which describe individual
--- 12721,12727 ----
  	    }
  
  	  if (TYPE_FOR_JAVA (basetype)
! 	      && (current_lang_depth () == 0))
  	    TYPE_FOR_JAVA (ref) = 1;
  
  	  /* Note that the BINFO records which describe individual
*** decl2.c.~1~	Thu Mar 22 00:23:26 2001
--- decl2.c	Tue Mar 20 15:39:52 2001
*************** static tree get_guard_bits PARAMS ((tree
*** 94,102 ****
  
  extern int current_class_depth;
  
- /* A list of virtual function tables we must make sure to write out.  */
- tree pending_vtables;
- 
  /* A list of static class variables.  This is needed, because a
     static class variable can be declared inside the class without
     an initializer, and then initialized, staticly, outside the class.  */
--- 94,99 ----
*************** finish_static_data_member_decl (decl, in
*** 1514,1520 ****
    DECL_CONTEXT (decl) = current_class_type;
  
    /* We cannot call pushdecl here, because that would fill in the
!      decl of our TREE_CHAIN.  Instead, we modify cp_finish_decl to do
       the right thing, namely, to put this decl out straight away.  */
    /* current_class_type can be NULL_TREE in case of error.  */
    if (!asmspec_tree && current_class_type)
--- 1511,1517 ----
    DECL_CONTEXT (decl) = current_class_type;
  
    /* We cannot call pushdecl here, because that would fill in the
!      TREE_CHAIN of our decl.  Instead, we modify cp_finish_decl to do
       the right thing, namely, to put this decl out straight away.  */
    /* current_class_type can be NULL_TREE in case of error.  */
    if (!asmspec_tree && current_class_type)
*************** mark_vtable_entries (decl)
*** 2297,2303 ****
  
        if (TREE_CODE (fnaddr) != ADDR_EXPR)
  	/* This entry is an offset: a virtual base class offset, a
! 	   virtual call offset, and RTTI offset, etc.  */
  	continue;
  
        fn = TREE_OPERAND (fnaddr, 0);
--- 2294,2300 ----
  
        if (TREE_CODE (fnaddr) != ADDR_EXPR)
  	/* This entry is an offset: a virtual base class offset, a
! 	   virtual call offset, an RTTI offset, etc.  */
  	continue;
  
        fn = TREE_OPERAND (fnaddr, 0);
*************** key_method (type)
*** 2411,2417 ****
         method = TREE_CHAIN (method))
      if (DECL_VINDEX (method) != NULL_TREE
  	&& ! DECL_THIS_INLINE (method)
! 	&& ! DECL_PURE_VIRTUAL_P (method))
        return method;
  
    return NULL_TREE;
--- 2408,2414 ----
         method = TREE_CHAIN (method))
      if (DECL_VINDEX (method) != NULL_TREE
  	&& ! DECL_THIS_INLINE (method)
! 	&& (! DECL_PURE_VIRTUAL_P (method) || DECL_DESTRUCTOR_P (method)))
        return method;
  
    return NULL_TREE;
*************** import_export_vtable (decl, type, final)
*** 2440,2446 ****
    else if (CLASSTYPE_INTERFACE_KNOWN (type))
      {
        TREE_PUBLIC (decl) = 1;
!       DECL_EXTERNAL (decl) = ! CLASSTYPE_VTABLE_NEEDS_WRITING (type);
        DECL_INTERFACE_KNOWN (decl) = 1;
      }
    else
--- 2437,2443 ----
    else if (CLASSTYPE_INTERFACE_KNOWN (type))
      {
        TREE_PUBLIC (decl) = 1;
!       DECL_EXTERNAL (decl) = CLASSTYPE_INTERFACE_ONLY (type);
        DECL_INTERFACE_KNOWN (decl) = 1;
      }
    else
*************** import_export_class (ctype)
*** 2525,2531 ****
    if (import_export)
      {
        SET_CLASSTYPE_INTERFACE_KNOWN (ctype);
-       CLASSTYPE_VTABLE_NEEDS_WRITING (ctype) = (import_export > 0);
        CLASSTYPE_INTERFACE_ONLY (ctype) = (import_export < 0);
      }
  }
--- 2522,2527 ----
*************** import_export_decl (decl)
*** 2695,2701 ****
        else
  	comdat_linkage (decl);
      }
!   else if (DECL_TINFO_FN_P (decl))
      {
        tree ctype = TREE_TYPE (DECL_NAME (decl));
  
--- 2691,2697 ----
        else
  	comdat_linkage (decl);
      }
!   else if (tinfo_decl_p (decl, 0))
      {
        tree ctype = TREE_TYPE (DECL_NAME (decl));
  
*************** init_decl2 ()
*** 5387,5391 ****
    ggc_add_tree_root (&ssdf_decl, 1);
    ggc_add_tree_root (&priority_decl, 1);
    ggc_add_tree_root (&initialize_p_decl, 1);
-   ggc_add_tree_root (&pending_vtables, 1);
  }
--- 5383,5386 ----
*** lex.c.~1~	Thu Mar 22 00:23:26 2001
--- lex.c	Tue Mar 20 13:31:34 2001
*************** static void
*** 1078,1089 ****
  handle_pragma_vtable (dfile)
       cpp_reader *dfile ATTRIBUTE_UNUSED;
  {
!   tree vtbl = parse_strconst_pragma ("vtable", 0);
! 
!   if (vtbl && vtbl != (tree)-1)
!     pending_vtables = tree_cons (NULL_TREE,
! 				 get_identifier (TREE_STRING_POINTER (vtbl)),
! 				 pending_vtables);
  }
  
  static void
--- 1078,1085 ----
  handle_pragma_vtable (dfile)
       cpp_reader *dfile ATTRIBUTE_UNUSED;
  {
!   parse_strconst_pragma ("vtable", 0);
!   sorry ("#pragma vtable no longer supported");
  }
  
  static void
*** optimize.c.~1~	Thu Mar 22 00:23:26 2001
--- optimize.c	Tue Mar 20 13:31:34 2001
*************** expand_call_inline (tp, walk_subtrees, d
*** 686,692 ****
        return NULL_TREE;
      }
  
!   if (TREE_CODE_CLASS (TREE_CODE (t)) == 't')
      /* Because types were not copied in copy_body, CALL_EXPRs beneath
         them should not be expanded.  This can happen if the type is a
         dynamic array type, for example.  */
--- 686,692 ----
        return NULL_TREE;
      }
  
!   if (TYPE_P (t))
      /* Because types were not copied in copy_body, CALL_EXPRs beneath
         them should not be expanded.  This can happen if the type is a
         dynamic array type, for example.  */
*** pt.c.~1~	Thu Mar 22 00:23:26 2001
--- pt.c	Tue Mar 20 13:31:35 2001
*************** extern struct obstack permanent_obstack;
*** 57,66 ****
     (for a function or static data member), or a TYPE (for a class)
     indicating what we are hoping to instantiate.  */
  static tree pending_templates;
! static tree *template_tail = &pending_templates;
! 
! static tree maybe_templates;
! static tree *maybe_template_tail = &maybe_templates;
  
  int processing_template_parmlist;
  static int template_header_count;
--- 57,63 ----
     (for a function or static data member), or a TYPE (for a class)
     indicating what we are hoping to instantiate.  */
  static tree pending_templates;
! static tree last_pending_template;
  
  int processing_template_parmlist;
  static int template_header_count;
*************** void
*** 176,182 ****
  init_pt ()
  {
    ggc_add_tree_root (&pending_templates, 1);
-   ggc_add_tree_root (&maybe_templates, 1);
    ggc_add_tree_root (&saved_trees, 1);
    ggc_add_tree_root (&current_tinst_level, 1);
  }
--- 173,178 ----
*************** add_pending_template (d)
*** 3719,3724 ****
--- 3715,3721 ----
    tree ti = (TYPE_P (d)
  	     ? CLASSTYPE_TEMPLATE_INFO (d)
  	     : DECL_TEMPLATE_INFO (d));
+   tree pt;
    int level;
  
    if (TI_PENDING_TEMPLATE_FLAG (ti))
*************** add_pending_template (d)
*** 3732,3739 ****
    if (level)
      push_tinst_level (d);
  
!   *template_tail = tree_cons (current_tinst_level, d, NULL_TREE);
!   template_tail = &TREE_CHAIN (*template_tail);
    TI_PENDING_TEMPLATE_FLAG (ti) = 1;
  
    if (level)
--- 3729,3742 ----
    if (level)
      push_tinst_level (d);
  
!   pt = tree_cons (current_tinst_level, d, NULL_TREE);
!   if (last_pending_template)
!     TREE_CHAIN (last_pending_template) = pt;
!   else
!     pending_templates = pt;
! 
!   last_pending_template = pt;
! 
    TI_PENDING_TEMPLATE_FLAG (ti) = 1;
  
    if (level)
*************** instantiate_class_template (type)
*** 4962,4985 ****
  	{
  	  CLASSTYPE_INTERFACE_ONLY (type) = interface_only;
  	  SET_CLASSTYPE_INTERFACE_UNKNOWN_X (type, interface_unknown);
- 	  CLASSTYPE_VTABLE_NEEDS_WRITING (type)
- 	    = (! CLASSTYPE_INTERFACE_ONLY (type)
- 	       && CLASSTYPE_INTERFACE_KNOWN (type));
  	}
        else
  	{
  	  CLASSTYPE_INTERFACE_ONLY (type) = CLASSTYPE_INTERFACE_ONLY (pattern);
  	  SET_CLASSTYPE_INTERFACE_UNKNOWN_X
  	    (type, CLASSTYPE_INTERFACE_UNKNOWN (pattern));
- 	  CLASSTYPE_VTABLE_NEEDS_WRITING (type)
- 	    = (! CLASSTYPE_INTERFACE_ONLY (type)
- 	       && CLASSTYPE_INTERFACE_KNOWN (type));
  	}
      }
    else
      {
        SET_CLASSTYPE_INTERFACE_UNKNOWN (type);
-       CLASSTYPE_VTABLE_NEEDS_WRITING (type) = 1;
      }
  
    TYPE_HAS_CONSTRUCTOR (type) = TYPE_HAS_CONSTRUCTOR (pattern);
--- 4965,4981 ----
*************** mark_class_instantiated (t, extern_p)
*** 9471,9477 ****
    SET_CLASSTYPE_EXPLICIT_INSTANTIATION (t);
    SET_CLASSTYPE_INTERFACE_KNOWN (t);
    CLASSTYPE_INTERFACE_ONLY (t) = extern_p;
-   CLASSTYPE_VTABLE_NEEDS_WRITING (t) = ! extern_p;
    TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (t)) = extern_p;
    if (! extern_p)
      {
--- 9467,9472 ----
*************** int
*** 9979,9984 ****
--- 9974,9980 ----
  instantiate_pending_templates ()
  {
    tree *t;
+   tree last = NULL_TREE;
    int instantiated_something = 0;
    int reconsider;
    
*************** instantiate_pending_templates ()
*** 10017,10024 ****
  		/* If INSTANTIATION has been instantiated, then we don't
  		   need to consider it again in the future.  */
  		*t = TREE_CHAIN (*t);
! 	      else 
! 		t = &TREE_CHAIN (*t);
  	    }
  	  else
  	    {
--- 10013,10023 ----
  		/* If INSTANTIATION has been instantiated, then we don't
  		   need to consider it again in the future.  */
  		*t = TREE_CHAIN (*t);
! 	      else
! 		{
! 		  last = *t;
! 		  t = &TREE_CHAIN (*t);
! 		}
  	    }
  	  else
  	    {
*************** instantiate_pending_templates ()
*** 10039,10081 ****
  		/* If INSTANTIATION has been instantiated, then we don't
  		   need to consider it again in the future.  */
  		*t = TREE_CHAIN (*t);
! 	      else 
! 		t = &TREE_CHAIN (*t);
  	    }
  	  tinst_depth = 0;
  	  current_tinst_level = NULL_TREE;
  	}
!       template_tail = t;
! 
!       /* Go through the things that are template instantiations if we are
! 	 using guiding declarations.  */
!       t = &maybe_templates;
!       while (*t)
! 	{
! 	  tree template;
! 	  tree fn;
! 	  tree args;
! 
! 	  fn = TREE_VALUE (*t);
! 
! 	  if (DECL_INITIAL (fn))
! 	    /* If the FN is already defined, then it was either already
! 	       instantiated or, even though guiding declarations were
! 	       allowed, a non-template definition was provided.  */
! 	    ;
! 	  else
! 	    {
! 	      template = TREE_PURPOSE (*t);
! 	      args = get_bindings (template, fn, NULL_TREE);
! 	      fn = instantiate_template (template, args);
! 	      instantiate_decl (fn, /*defer_ok=*/0);
! 	      reconsider = 1;
! 	    }
! 	
! 	  /* Remove this entry from the chain.  */
! 	  *t = TREE_CHAIN (*t);
! 	}
!       maybe_template_tail = t;
      } 
    while (reconsider);
  
--- 10038,10053 ----
  		/* If INSTANTIATION has been instantiated, then we don't
  		   need to consider it again in the future.  */
  		*t = TREE_CHAIN (*t);
! 	      else
! 		{
! 		  last = *t;
! 		  t = &TREE_CHAIN (*t);
! 		}
  	    }
  	  tinst_depth = 0;
  	  current_tinst_level = NULL_TREE;
  	}
!       last_pending_template = last;
      } 
    while (reconsider);
  
*** ptree.c.~1~	Thu Mar 22 00:23:26 2001
--- ptree.c	Tue Mar 20 13:31:36 2001
*************** print_lang_type (file, node, indent)
*** 152,159 ****
  	fprintf (file, " interface-only");
        if (CLASSTYPE_INTERFACE_UNKNOWN (node))
  	fprintf (file, " interface-unknown");
-       if (CLASSTYPE_VTABLE_NEEDS_WRITING (node))
- 	fprintf (file, " vtable-needs-writing");
        print_node (file, "member-functions", CLASSTYPE_METHOD_VEC (node),
  		  indent + 4);
      }
--- 152,157 ----
*** rtti.c.~1~	Thu Mar 22 00:23:26 2001
--- rtti.c	Tue Mar 20 13:31:36 2001
*************** get_tinfo_decl (type)
*** 340,346 ****
      {
        /* The tinfo decl is the type_info object itself.  We make all
           tinfo objects look as type_info, even though they will end up
!          being a subclass of that when emitted.  This means the we'll
           erroneously think we know the dynamic type -- be careful in the
           runtime.  */
        d = build_lang_decl (VAR_DECL, name, tinfo_decl_type);
--- 340,346 ----
      {
        /* The tinfo decl is the type_info object itself.  We make all
           tinfo objects look as type_info, even though they will end up
!          being a subclass of that when emitted.  This means that we'll
           erroneously think we know the dynamic type -- be careful in the
           runtime.  */
        d = build_lang_decl (VAR_DECL, name, tinfo_decl_type);
*** semantics.c.~1~	Thu Mar 22 00:23:26 2001
--- semantics.c	Tue Mar 20 13:31:36 2001
*************** begin_class_definition (t)
*** 1825,1836 ****
  	SET_CLASSTYPE_INTERFACE_UNKNOWN_X
  	  (t, interface_unknown);
        }
-     
-     /* Only leave this bit clear if we know this
-        class is part of an interface-only specification.  */
-     if (! CLASSTYPE_INTERFACE_KNOWN (t)
- 	|| ! CLASSTYPE_INTERFACE_ONLY (t))
-       CLASSTYPE_VTABLE_NEEDS_WRITING (t) = 1;
    }
    reset_specialization();
    
--- 1825,1830 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]