* function.h (free_after_compilation): Remove decl parameter.
(free_varasm_status0: Likewise.
(free_emit_status): Likewise.
(free_stmt_status): Likewise.
(free_after_compilation): Likewise.
(init_lang_status): New variable.
(free_lang_status): Likewise.
* emit-rtl.c (free_emit_status): Make decl parameter implicit.
* function.c (init_lang_status): New variable.
(free_lang_status): Likewise.
(push_function_context_to): Don't set function::decl here.
(free_after_copmilation): Make decl parameter implicit. Call
free_lang_status if defined.
(prepare_function_start): Call init_lang_status if defined.
(init_function_start): Set function::decl here.
* profile.c (output_func_start_profiler): Don't call pushdecl
until we've actually started the function.
* stmt.c (free_stmt_status): Make decl parameter implicit.
* toplev.c (rest_of_compilation): Don't pass decl to
free_after_compilation.
* varasm.c (free_varasm_status): Likewise.
From-SVN: r29239
+Thu Sep 9 09:40:58 1999 Mark Mitchell <mark@codesourcery.com>
+
+ * function.h (free_after_compilation): Remove decl parameter.
+ (free_varasm_status0: Likewise.
+ (free_emit_status): Likewise.
+ (free_stmt_status): Likewise.
+ (free_after_compilation): Likewise.
+ (init_lang_status): New variable.
+ (free_lang_status): Likewise.
+ * emit-rtl.c (free_emit_status): Make decl parameter implicit.
+ * function.c (init_lang_status): New variable.
+ (free_lang_status): Likewise.
+ (push_function_context_to): Don't set function::decl here.
+ (free_after_copmilation): Make decl parameter implicit. Call
+ free_lang_status if defined.
+ (prepare_function_start): Call init_lang_status if defined.
+ (init_function_start): Set function::decl here.
+ * profile.c (output_func_start_profiler): Don't call pushdecl
+ until we've actually started the function.
+ * stmt.c (free_stmt_status): Make decl parameter implicit.
+ * toplev.c (rest_of_compilation): Don't pass decl to
+ free_after_compilation.
+ * varasm.c (free_varasm_status): Likewise.
+
Thu Sep 9 17:23:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* except.c (call_get_eh_context): Add root when allocating static
/* Clear out all parts of the state in F that can safely be discarded
after the function has been compiled, to let garbage collection
- reclaim the memory. D is the declaration for the function just
- compiled. Its output may have been deferred. */
+ reclaim the memory. */
void
-free_emit_status (f, d)
+free_emit_status (f)
struct function *f;
- tree d;
{
- if (DECL_DEFER_OUTPUT (d))
+ if (DECL_DEFER_OUTPUT (f->decl))
return;
free (f->emit->x_regno_reg_rtx);
void (*mark_machine_status) PROTO((struct function *));
/* Likewise, but for language-specific data. */
+void (*init_lang_status) PROTO((struct function *));
void (*save_lang_status) PROTO((struct function *));
void (*restore_lang_status) PROTO((struct function *));
void (*mark_lang_status) PROTO((struct function *));
+void (*free_lang_status) PROTO((struct function *));
/* The FUNCTION_DECL for an inline function currently being expanded. */
tree inline_function_decl;
p->next = outer_function_chain;
outer_function_chain = p;
- p->decl = current_function_decl;
p->fixup_var_refs_queue = 0;
save_tree_status (p);
/* Clear out all parts of the state in F that can safely be discarded
after the function has been compiled, to let garbage collection
- reclaim the memory. D is the declaration for the function just
- compiled. Its output may have been deferred. */
+ reclaim the memory. */
void
-free_after_compilation (f, d)
+free_after_compilation (f)
struct function *f;
- tree d;
{
- free_emit_status (f, d);
- free_varasm_status (f, d);
- free_stmt_status (f, d);
+ free_emit_status (f);
+ free_varasm_status (f);
+ free_stmt_status (f);
+ if (free_lang_status)
+ (*free_lang_status) (f);
- if (!DECL_DEFER_OUTPUT (d))
+ if (!DECL_DEFER_OUTPUT (f->decl))
{
free (f->x_parm_reg_stack_loc);
f->can_garbage_collect = 1;
current_function_outgoing_args_size = 0;
+ if (init_lang_status)
+ (*init_lang_status) (current_function);
if (init_machine_status)
(*init_machine_status) (current_function);
}
all_functions = current_function;
current_function_name = (*decl_printable_name) (subr, 2);
+ current_function->decl = subr;
/* Nonzero if this is a nested function that uses a static chain. */
extern void (*restore_machine_status) PROTO((struct function *));
/* Likewise, but for language-specific data. */
+extern void (*init_lang_status) PROTO((struct function *));
extern void (*mark_lang_status) PROTO((struct function *));
extern void (*save_lang_status) PROTO((struct function *));
extern void (*restore_lang_status) PROTO((struct function *));
+extern void (*free_lang_status) PROTO((struct function *));
/* Save and restore status information for a nested function. */
extern void save_tree_status PROTO((struct function *));
extern void restore_tree_status PROTO((struct function *));
extern void restore_emit_status PROTO((struct function *));
-extern void free_after_compilation PROTO((struct function *,
- tree));
+extern void free_after_compilation PROTO((struct function *));
extern void init_varasm_status PROTO((struct function *));
-extern void free_varasm_status PROTO((struct function *,
- tree));
-extern void free_emit_status PROTO((struct function *,
- tree));
-extern void free_stmt_status PROTO((struct function *,
- tree));
+extern void free_varasm_status PROTO((struct function *));
+extern void free_emit_status PROTO((struct function *));
+extern void free_stmt_status PROTO((struct function *));
extern rtx get_first_block_beg PROTO((void));
extern void init_virtual_regs PROTO((struct emit_status *));
current_function_decl = fndecl;
DECL_INITIAL (fndecl) = error_mark_node;
temporary_allocation ();
- pushlevel (0);
make_function_rtl (fndecl);
init_function_start (fndecl, input_filename, lineno);
+ pushlevel (0);
expand_function_start (fndecl, 0);
/* Actually generate the code to call __bb_init_func. */
/* Clear out all parts of the state in F that can safely be discarded
after the function has been compiled, to let garbage collection
- reclaim the memory. D is the declaration for the function just
- compiled. Its output may have been deferred. */
+ reclaim the memory. */
void
-free_stmt_status (f, d)
+free_stmt_status (f)
struct function *f;
- tree d ATTRIBUTE_UNUSED;
{
/* We're about to free the function obstack. If we hold pointers to
things allocated there, then we'll try to mark them when we do
init_recog_no_volatile ();
/* We're done with this function. Free up memory if we can. */
- free_after_compilation (current_function, decl);
+ free_after_compilation (current_function);
current_function = 0;
/* Clear out all parts of the state in F that can safely be discarded
after the function has been compiled, to let garbage collection
- reclaim the memory. D is the declaration for the function just
- compiled. Its output may have been deferred. */
+ reclaim the memory. */
void
-free_varasm_status (f, d)
+free_varasm_status (f)
struct function *f;
- tree d;
{
struct varasm_status *p;
- if (DECL_DEFER_OUTPUT (d))
+ if (DECL_DEFER_OUTPUT (f->decl))
return;
p = f->varasm;