aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-04-20 09:14:37 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-04-20 09:14:37 +0000
commitb03e38e17e00ea110a2ac9d2d3bc6dc4b3f28bbc (patch)
tree3f6185495bbea2db918ca94306d10976e505c5c8 /gcc/function.c
parentc874e8a3bd29744664f8f52db773080a5d38eaae (diff)
downloadgcc-b03e38e17e00ea110a2ac9d2d3bc6dc4b3f28bbc.zip
gcc-b03e38e17e00ea110a2ac9d2d3bc6dc4b3f28bbc.tar.gz
gcc-b03e38e17e00ea110a2ac9d2d3bc6dc4b3f28bbc.tar.bz2
Makefile.in: Update.
* Makefile.in: Update. * decl.c (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-objc-common.c (c_objc_common_init): Langhooks set elsewhere. * c-tree.h (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. * function.c (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. (push_function_context_to, pop_function_context_from, free_after_parsing, prepare_function_start, ggc_mark_struct_function): Update. * function.h (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. * langhooks-def.h (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK, LANG_HOOKS_FUNCTION_INITIALIZER): New. (LANG_HOOKS_INITIALIZER): Update. (lhd_do_nothing_f): New. * langhooks.h (struct lang_hooks_for_functions): New. (struct lang_hooks): New hooks. * langhooks.c (lhd_do_nothing_f): New. cp: * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, cxx_mark_function_context): New. * decl.c (push_cp_function_context, pop_cp_function_context, mark_cp_function_context): Rename for consistency. (cxx_init_decl_processing): Don't set old hooks. objc: * objc-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. From-SVN: r52551
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/gcc/function.c b/gcc/function.c
index ab3654a..e22273d 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -133,13 +133,6 @@ void (*free_machine_status) PARAMS ((struct function *));
that will need garbage collection. */
void (*mark_machine_status) PARAMS ((struct function *));
-/* Likewise, but for language-specific data. */
-void (*init_lang_status) PARAMS ((struct function *));
-void (*save_lang_status) PARAMS ((struct function *));
-void (*restore_lang_status) PARAMS ((struct function *));
-void (*mark_lang_status) PARAMS ((struct function *));
-void (*free_lang_status) PARAMS ((struct function *));
-
/* The FUNCTION_DECL for an inline function currently being expanded. */
tree inline_function_decl;
@@ -328,7 +321,7 @@ find_function_data (decl)
/* Save the current context for compilation of a nested function.
This is called from language-specific code. The caller should use
- the save_lang_status callback to save any language-specific state,
+ the enter_nested langhook to save any language-specific state,
since this function knows only about language-independent
variables. */
@@ -357,8 +350,7 @@ push_function_context_to (context)
outer_function_chain = p;
p->fixup_var_refs_queue = 0;
- if (save_lang_status)
- (*save_lang_status) (p);
+ (*lang_hooks.function.enter_nested) (p);
cfun = 0;
}
@@ -387,8 +379,7 @@ pop_function_context_from (context)
restore_emit_status (p);
- if (restore_lang_status)
- (*restore_lang_status) (p);
+ (*lang_hooks.function.leave_nested) (p);
/* Finish doing put_var_into_stack for any of our variables which became
addressable during the nested function. If only one entry has to be
@@ -441,8 +432,7 @@ free_after_parsing (f)
/* f->varasm is used by code generation. */
/* f->eh->eh_return_stub_label is used by code generation. */
- if (free_lang_status)
- (*free_lang_status) (f);
+ (*lang_hooks.function.free) (f);
free_stmt_status (f);
}
@@ -6301,8 +6291,7 @@ prepare_function_start ()
current_function_outgoing_args_size = 0;
- if (init_lang_status)
- (*init_lang_status) (cfun);
+ (*lang_hooks.function.init) (cfun);
if (init_machine_status)
(*init_machine_status) (cfun);
}
@@ -8025,8 +8014,7 @@ ggc_mark_struct_function (f)
if (mark_machine_status)
(*mark_machine_status) (f);
- if (mark_lang_status)
- (*mark_lang_status) (f);
+ (*lang_hooks.function.mark) (f);
if (f->original_arg_vector)
ggc_mark_rtvec ((rtvec) f->original_arg_vector);