diff options
| author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-02 20:49:16 +0000 |
|---|---|---|
| committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-02 20:49:16 +0000 |
| commit | b943ebc02ca8c11b980f9d6f2c3d469c2e90bb63 (patch) | |
| tree | 8f5237cf0617ac2ff64933da95c37fa5dde1cba2 | |
| parent | 3eafcdb5bf402c162e8b5f18a77a8afebfcc20a0 (diff) | |
| download | ppe42-gcc-b943ebc02ca8c11b980f9d6f2c3d469c2e90bb63.tar.gz ppe42-gcc-b943ebc02ca8c11b980f9d6f2c3d469c2e90bb63.zip | |
* class.c (current_lang_depth, push_lang_context,
pop_lang_context): Use VEC instead of VARRAY.
* cp-tree.h (saved_scope): Use VEC for lang_base instead of
VARRAY.
* name-lookup.c (push_to_top_level): Use VEC instead of
VARRAY.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99121 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/cp/class.c | 7 | ||||
| -rw-r--r-- | gcc/cp/cp-tree.h | 2 | ||||
| -rw-r--r-- | gcc/cp/name-lookup.c | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b0f06967db2..ee526e2ec13 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -6,6 +6,13 @@ * mangle.c (discriminator_for_local_entity): Likewise. * name-lookup.c (pushtag): Likewise. + * class.c (current_lang_depth, push_lang_context, + pop_lang_context): Use VEC instead of VARRAY. + * cp-tree.h (saved_scope): Use VEC for lang_base instead of + VARRAY. + * name-lookup.c (push_to_top_level): Use VEC instead of + VARRAY. + 2005-05-02 Paolo Bonzini <bonzini@gnu.org> * semantics.c (finish_call_expr): Call resolve_overloaded_builtin diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 89ae74ff91c..6217a2cce7f 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5523,7 +5523,7 @@ pop_nested_class (void) int current_lang_depth (void) { - return VARRAY_ACTIVE_SIZE (current_lang_base); + return VEC_length (tree, current_lang_base); } /* Set global variables CURRENT_LANG_NAME to appropriate value @@ -5532,7 +5532,7 @@ current_lang_depth (void) void push_lang_context (tree name) { - VARRAY_PUSH_TREE (current_lang_base, current_lang_name); + VEC_safe_push (tree, gc, current_lang_base, current_lang_name); if (name == lang_name_cplusplus) { @@ -5567,8 +5567,7 @@ push_lang_context (tree name) void pop_lang_context (void) { - current_lang_name = VARRAY_TOP_TREE (current_lang_base); - VARRAY_POP (current_lang_base); + current_lang_name = VEC_pop (tree, current_lang_base); } /* Type instantiation routines. */ diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 53f19f27c9a..b057581b034 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -659,7 +659,7 @@ struct saved_scope GTY(()) tree class_type; tree access_specifier; tree function_decl; - varray_type lang_base; + VEC(tree,gc) *lang_base; tree lang_name; tree template_parms; struct cp_binding_level *x_previous_class_level; diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 67288d7c277..78f83253390 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4864,7 +4864,7 @@ push_to_top_level (void) scope_chain = s; current_function_decl = NULL_TREE; - VARRAY_TREE_INIT (current_lang_base, 10, "current_lang_base"); + current_lang_base = VEC_alloc (tree, gc, 10); current_lang_name = lang_name_cplusplus; current_namespace = global_namespace; timevar_pop (TV_NAME_LOOKUP); |

