diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-07-08 04:32:27 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-07-08 04:32:27 +0000 |
commit | 89b578be68dd3d91e551c3ba922f054ead36c4e4 (patch) | |
tree | b704620d1b4bd63427c4b884a49c7ece575dd1e4 /gcc/cp/cp-tree.h | |
parent | beed8fc0bb23590fdfa4665c3ad5b3ca7edb17f7 (diff) | |
download | gcc-89b578be68dd3d91e551c3ba922f054ead36c4e4.zip gcc-89b578be68dd3d91e551c3ba922f054ead36c4e4.tar.gz gcc-89b578be68dd3d91e551c3ba922f054ead36c4e4.tar.bz2 |
cp-tree.h (saved_scope): Remove x_previous_class_type and x_previous_class_values...
* cp-tree.h (saved_scope): Remove x_previous_class_type and
x_previous_class_values; add x_previous_class_level.
(previous_class_type): Remove.
(previous_class_values): Remove.
(previous_class_level): New macro.
* class.c (pushclass): Restore the identifier cache more
expeditiously.
(invalidate_class_lookup_cache): Use vector for class_shadowed and
previous_class_values.
* decl.c (poplevel): Likewise.
* name-lookup.c (cxx_binding_init): New function.
(cxx_binding_make): Use it.
(push_binding): For a binding in a class level, use a vector of
cp_class_binding nodes.
(push_binding_level): New function.
(begin_scope): Use it.
(leave_scope): Do not put class binding levels on the free list.
(print_binding_level): Adjust for the fact that class_shadowed is
a vector.
(poplevel_class): Likewise.
(clear_identifier_class_values): Likewise.
(push_class_level_binding): Likewise.
(set_class_shadows): Remove.
(store_binding): New function.
(store_class_bindings): New function.
(push_to_top_level): Use store_class_bindings as appropriate.
(pop_from_top_level): Use previous_class_level, not
previous_class_type.
* name-lookup.h (cp_class_binding): New type.
(cp_binding_level): Use a vector object for class_shadowed.
(push_binding_level): Declare.
(set_class_shadows): Remove.
From-SVN: r84259
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 87e610e..15cfd84 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -640,8 +640,7 @@ struct saved_scope GTY(()) varray_type lang_base; tree lang_name; tree template_parms; - tree x_previous_class_type; - tree x_previous_class_values; + struct cp_binding_level *x_previous_class_level; tree x_saved_tree; HOST_WIDE_INT x_processing_template_decl; @@ -694,16 +693,10 @@ struct saved_scope GTY(()) #define processing_specialization scope_chain->x_processing_specialization #define processing_explicit_instantiation scope_chain->x_processing_explicit_instantiation -/* _TYPE: the previous type that was a class */ +/* The cached class binding level, from the most recently exited + class, or NULL if none. */ -#define previous_class_type scope_chain->x_previous_class_type - -/* This is a copy of the class_shadowed list of the previous class - binding contour when at global scope. It's used to reset - IDENTIFIER_CLASS_VALUEs when entering another class scope (i.e. a - cache miss). */ - -#define previous_class_values scope_chain->x_previous_class_values +#define previous_class_level scope_chain->x_previous_class_level /* A list of private types mentioned, for deferred access checking. */ |