langhooks.c (lang_hook_default_clear_binding_stack): New.
* langhooks.c (lang_hook_default_clear_binding_stack): New. (lang_hook_default_get_alias_set): Move next to other alias hooks. * langhooks.h: Prototype lang_hook_default_clear_binding_stack. (LANG_HOOKS_CLEAR_BINDING_STACK): New macro. (LANG_HOOKS_INITIALIZER): Add it. * toplev.h (struct lang_hooks): Add clear_binding_stack. * toplev.c (compile_file): Call lang_hooks.clear_binding_stack instead of a loop calling poplevel. cp: * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to pop_everything. From-SVN: r46492
This commit is contained in:
parent
5037fa8112
commit
37207ee73d
@ -1,3 +1,15 @@
|
||||
2001-10-25 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* langhooks.c (lang_hook_default_clear_binding_stack): New.
|
||||
(lang_hook_default_get_alias_set): Move next to other alias
|
||||
hooks.
|
||||
* langhooks.h: Prototype lang_hook_default_clear_binding_stack.
|
||||
(LANG_HOOKS_CLEAR_BINDING_STACK): New macro.
|
||||
(LANG_HOOKS_INITIALIZER): Add it.
|
||||
* toplev.h (struct lang_hooks): Add clear_binding_stack.
|
||||
* toplev.c (compile_file): Call lang_hooks.clear_binding_stack
|
||||
instead of a loop calling poplevel.
|
||||
|
||||
2001-10-25 Nick Clifton <nickc@cambridge.redhat.com>
|
||||
|
||||
* config/mips/isa3264.h (SUBTARGET_CPP_SIZE_SPEC): Replace
|
||||
@ -37,7 +49,7 @@ Wed Oct 24 18:43:42 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
* dwarf2out.c (file_info_cmp): Always return consistent results.
|
||||
|
||||
2001-10-24 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
|
||||
* stmt.c (expand_end_case): Index jumptables from zero for
|
||||
suitably small values of minval.
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2001-10-25 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
|
||||
pop_everything.
|
||||
|
||||
Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* cp-lang.c (cxx_get_alias_set): New function.
|
||||
@ -108,7 +113,7 @@ Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
2001-10-10 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* parse.y (asm_operand): Allow named operands.
|
||||
* parse.y (asm_operand): Allow named operands.
|
||||
* semantics.c (finish_asm_stmt): Tweek for changed location
|
||||
of the operand constrant.
|
||||
|
||||
@ -144,7 +149,7 @@ Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* class.c (build_vtable_entry_ref): Const-ify.
|
||||
* decl.c (predefined_identifier,
|
||||
initialize_predefined_identifiers): Likewise.
|
||||
initialize_predefined_identifiers): Likewise.
|
||||
* init.c (build_new_1): Likewise.
|
||||
* lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
|
||||
Likewise.
|
||||
|
@ -32,6 +32,8 @@ static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
|
||||
#define LANG_HOOKS_INIT cxx_init
|
||||
#undef LANG_HOOKS_FINISH
|
||||
#define LANG_HOOKS_FINISH cxx_finish
|
||||
#undef LANG_HOOKS_CLEAR_BINDING_STACK
|
||||
#define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything
|
||||
#undef LANG_HOOKS_INIT_OPTIONS
|
||||
#define LANG_HOOKS_INIT_OPTIONS cxx_init_options
|
||||
#undef LANG_HOOKS_DECODE_OPTION
|
||||
|
@ -36,16 +36,6 @@ lang_hook_default_do_nothing ()
|
||||
{
|
||||
}
|
||||
|
||||
/* Provide a default routine for alias sets that always returns -1. This
|
||||
is used by languages that don't need to do anything special. */
|
||||
|
||||
HOST_WIDE_INT
|
||||
lang_hook_default_get_alias_set (t)
|
||||
tree t ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Do nothing; the default hook to decode an option. */
|
||||
|
||||
int
|
||||
@ -56,6 +46,25 @@ lang_hook_default_decode_option (argc, argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Provide a default routine to clear the binding stack. This is used
|
||||
by languages that don't need to do anything special. */
|
||||
void
|
||||
lang_hook_default_clear_binding_stack ()
|
||||
{
|
||||
while (! global_bindings_p ())
|
||||
poplevel (0, 0, 0);
|
||||
}
|
||||
|
||||
/* Provide a default routine for alias sets that always returns -1. This
|
||||
is used by languages that don't need to do anything special. */
|
||||
|
||||
HOST_WIDE_INT
|
||||
lang_hook_default_get_alias_set (t)
|
||||
tree t ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Provide a hook routine for alias sets that always returns 0. This is
|
||||
used by languages that haven't deal with alias sets yet. */
|
||||
|
||||
|
@ -38,9 +38,11 @@ extern HOST_WIDE_INT hook_get_alias_set_0 PARAMS ((tree));
|
||||
extern void lang_hook_default_do_nothing PARAMS ((void));
|
||||
extern int lang_hook_default_decode_option PARAMS ((int, char **));
|
||||
extern HOST_WIDE_INT lang_hook_default_get_alias_set PARAMS ((tree));
|
||||
extern void lang_hook_default_clear_binding_stack PARAMS ((void));
|
||||
|
||||
#define LANG_HOOKS_INIT lang_hook_default_do_nothing
|
||||
#define LANG_HOOKS_FINISH lang_hook_default_do_nothing
|
||||
#define LANG_HOOKS_CLEAR_BINDING_STACK lang_hook_default_clear_binding_stack
|
||||
#define LANG_HOOKS_INIT_OPTIONS lang_hook_default_do_nothing
|
||||
#define LANG_HOOKS_DECODE_OPTION lang_hook_default_decode_option
|
||||
#define LANG_HOOKS_POST_OPTIONS lang_hook_default_do_nothing
|
||||
@ -99,6 +101,7 @@ int tree_inlining_default_hook_anon_aggr_type_p PARAMS ((tree));
|
||||
#define LANG_HOOKS_INITIALIZER { \
|
||||
LANG_HOOKS_INIT, \
|
||||
LANG_HOOKS_FINISH, \
|
||||
LANG_HOOKS_CLEAR_BINDING_STACK, \
|
||||
LANG_HOOKS_INIT_OPTIONS, \
|
||||
LANG_HOOKS_DECODE_OPTION, \
|
||||
LANG_HOOKS_POST_OPTIONS, \
|
||||
|
@ -2334,8 +2334,7 @@ compile_file (name)
|
||||
|
||||
/* In case there were missing block closers,
|
||||
get us back to the global binding level. */
|
||||
while (! global_bindings_p ())
|
||||
poplevel (0, 0, 0);
|
||||
(*lang_hooks.clear_binding_stack) ();
|
||||
|
||||
/* Compilation is now finished except for writing
|
||||
what's left of the symbol table output. */
|
||||
|
@ -149,6 +149,9 @@ struct lang_hooks
|
||||
/* Called last, as a finalizer. */
|
||||
void (*finish) PARAMS ((void));
|
||||
|
||||
/* Called immediately after parsing to clear the binding stack. */
|
||||
void (*clear_binding_stack) PARAMS ((void));
|
||||
|
||||
/* Called to initialize options, before any calls to decode_option. */
|
||||
void (*init_options) PARAMS ((void));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user