Patch to clean up wasted space

Jason Merrill jason@cygnus.com
Thu Mar 19 01:21:00 GMT 1998


save_eh_status has been calling the wrong function all along.  The current
code in init_eh is useless; the code that used the type was removed a while
back.

push_function_context_to doesn't need to call init_emit;
init_function_start will do that, and calling it here needlessly allocates
space on the permanent_obstack.

Thu Mar 19 00:58:07 1998  Jason Merrill  <jason@yorick.cygnus.com>

	* except.c (init_eh): Do nothing.
	(save_eh_status): Call init_eh_for_function, not init_eh.
	* function.c (push_function_context_to): Don't call init_emit.

Index: except.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/except.c,v
retrieving revision 1.37
diff -c -p -r1.37 except.c
*** except.c	1998/03/16 12:51:39	1.37
--- except.c	1998/03/19 09:00:33
*************** check_exception_handler_labels ()
*** 1788,1796 ****
  void
  init_eh ()
  {
-   /* Generate rtl to reference the variable in which the PC of the
-      current context is saved.  */
-   (void) build_pointer_type (make_node (VOID_TYPE));
  }
  
  /* Initialize the per-function EH information.  */
--- 1788,1793 ----
*************** save_eh_status (p)
*** 1827,1833 ****
    p->protect_list = protect_list;
    p->ehc = current_function_ehc;
  
!   init_eh ();
  }
  
  /* Restore the per-function EH info saved into the area denoted by P.  
--- 1824,1830 ----
    p->protect_list = protect_list;
    p->ehc = current_function_ehc;
  
!   init_eh_for_function ();
  }
  
  /* Restore the per-function EH info saved into the area denoted by P.  
Index: function.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/function.c,v
retrieving revision 1.17
diff -c -p -r1.17 function.c
*** function.c	1998/03/18 07:18:00	1.17
--- function.c	1998/03/19 09:00:34
*************** push_function_context_to (context)
*** 516,522 ****
    save_tree_status (p, context);
    save_storage_status (p);
    save_emit_status (p);
-   init_emit ();
    save_expr_status (p);
    save_stmt_status (p);
    save_varasm_status (p, context);
--- 516,521 ----



More information about the Gcc-bugs mailing list