aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-09 18:55:37 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-09 18:55:37 +0000
commit0a8a198ceb46752b7b7e8f3f7b259347e4ba45b6 (patch)
treef84e1f0ecc0286b75e180998f1568a69a03904ce /gcc/function.c
parent1814b96be23b7a080f89c548287e4a311b6b96b6 (diff)
downloadgcc-0a8a198ceb46752b7b7e8f3f7b259347e4ba45b6.zip
gcc-0a8a198ceb46752b7b7e8f3f7b259347e4ba45b6.tar.gz
gcc-0a8a198ceb46752b7b7e8f3f7b259347e4ba45b6.tar.bz2
function.h (free_after_compilation): Remove decl parameter.
* 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
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 3f14350..b6e4f87 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -124,9 +124,11 @@ void (*restore_machine_status) PROTO((struct function *));
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;
@@ -323,7 +325,6 @@ push_function_context_to (context)
p->next = outer_function_chain;
outer_function_chain = p;
- p->decl = current_function_decl;
p->fixup_var_refs_queue = 0;
save_tree_status (p);
@@ -390,19 +391,19 @@ pop_function_context ()
/* 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;
@@ -5621,6 +5622,8 @@ prepare_function_start ()
current_function_outgoing_args_size = 0;
+ if (init_lang_status)
+ (*init_lang_status) (current_function);
if (init_machine_status)
(*init_machine_status) (current_function);
}
@@ -5651,6 +5654,7 @@ init_function_start (subr, filename, line)
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. */