Commit aff44741 by Kazu Hirata Committed by Kazu Hirata

class.c (current_lang_depth, [...]): Use VEC instead of VARRAY.

	* 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.

From-SVN: r99121
parent 6fb58bba
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
* mangle.c (discriminator_for_local_entity): Likewise. * mangle.c (discriminator_for_local_entity): Likewise.
* name-lookup.c (pushtag): 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> 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
* semantics.c (finish_call_expr): Call resolve_overloaded_builtin * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
......
...@@ -5523,7 +5523,7 @@ pop_nested_class (void) ...@@ -5523,7 +5523,7 @@ pop_nested_class (void)
int int
current_lang_depth (void) 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 /* Set global variables CURRENT_LANG_NAME to appropriate value
...@@ -5532,7 +5532,7 @@ current_lang_depth (void) ...@@ -5532,7 +5532,7 @@ current_lang_depth (void)
void void
push_lang_context (tree name) 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) if (name == lang_name_cplusplus)
{ {
...@@ -5567,8 +5567,7 @@ push_lang_context (tree name) ...@@ -5567,8 +5567,7 @@ push_lang_context (tree name)
void void
pop_lang_context (void) pop_lang_context (void)
{ {
current_lang_name = VARRAY_TOP_TREE (current_lang_base); current_lang_name = VEC_pop (tree, current_lang_base);
VARRAY_POP (current_lang_base);
} }
/* Type instantiation routines. */ /* Type instantiation routines. */
......
...@@ -659,7 +659,7 @@ struct saved_scope GTY(()) ...@@ -659,7 +659,7 @@ struct saved_scope GTY(())
tree class_type; tree class_type;
tree access_specifier; tree access_specifier;
tree function_decl; tree function_decl;
varray_type lang_base; VEC(tree,gc) *lang_base;
tree lang_name; tree lang_name;
tree template_parms; tree template_parms;
struct cp_binding_level *x_previous_class_level; struct cp_binding_level *x_previous_class_level;
......
...@@ -4864,7 +4864,7 @@ push_to_top_level (void) ...@@ -4864,7 +4864,7 @@ push_to_top_level (void)
scope_chain = s; scope_chain = s;
current_function_decl = NULL_TREE; 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_lang_name = lang_name_cplusplus;
current_namespace = global_namespace; current_namespace = global_namespace;
timevar_pop (TV_NAME_LOOKUP); timevar_pop (TV_NAME_LOOKUP);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment