* 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
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
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)
{
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);
}
\f
/* Type instantiation routines. */
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;
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);