diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-04-20 09:14:37 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-04-20 09:14:37 +0000 |
commit | b03e38e17e00ea110a2ac9d2d3bc6dc4b3f28bbc (patch) | |
tree | 3f6185495bbea2db918ca94306d10976e505c5c8 /gcc/langhooks.h | |
parent | c874e8a3bd29744664f8f52db773080a5d38eaae (diff) | |
download | gcc-b03e38e17e00ea110a2ac9d2d3bc6dc4b3f28bbc.tar.gz |
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/langhooks.h')
-rw-r--r-- | gcc/langhooks.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/langhooks.h b/gcc/langhooks.h index 5b128a7adaa..4ec27db9217 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -57,6 +57,26 @@ struct lang_hooks_for_tree_inlining union tree_node *)); }; +/* Lang hooks for management of language-specific data or status + when entering / leaving functions etc. */ +struct lang_hooks_for_functions +{ + /* Called when entering a function. */ + void (*init) PARAMS ((struct function *)); + + /* Called when leaving a function. */ + void (*free) PARAMS ((struct function *)); + + /* Called when entering a nested function. */ + void (*enter_nested) PARAMS ((struct function *)); + + /* Called when leaving a nested function. */ + void (*leave_nested) PARAMS ((struct function *)); + + /* Lang-specific function data marking for GC. */ + void (*mark) PARAMS ((struct function *)); +}; + /* The following hooks are used by tree-dump.c. */ struct lang_hooks_for_tree_dump @@ -312,6 +332,9 @@ struct lang_hooks warning that the front end does not use such a parser. */ void (*set_yydebug) PARAMS ((int)); + /* Function-related language hooks. */ + struct lang_hooks_for_functions function; + struct lang_hooks_for_tree_inlining tree_inlining; struct lang_hooks_for_tree_dump tree_dump; |