Commit 806aa901 by Kazu Hirata Committed by Kazu Hirata

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

	* class.c (local_classes, init_class_processing): Use VEC
	instead of VARRAY.
	* cp-tree.h (local_classes): Likewise.
	* mangle.c (discriminator_for_local_entity): Likewise.
	* name-lookup.c (pushtag): Likewise.

From-SVN: r99115
parent a6e4d85b
2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
* class.c (local_classes, init_class_processing): Use VEC
instead of VARRAY.
* cp-tree.h (local_classes): Likewise.
* mangle.c (discriminator_for_local_entity): Likewise.
* name-lookup.c (pushtag): Likewise.
2005-05-02 Paolo Bonzini <bonzini@gnu.org>
* semantics.c (finish_call_expr): Call resolve_overloaded_builtin
......
......@@ -104,7 +104,7 @@ static class_stack_node_t current_class_stack;
/* An array of all local classes present in this translation unit, in
declaration order. */
varray_type local_classes;
VEC(tree,gc) *local_classes;
static tree get_vfield_name (tree);
static void finish_struct_anon (tree);
......@@ -5324,7 +5324,7 @@ init_class_processing (void)
current_class_stack_size = 10;
current_class_stack
= xmalloc (current_class_stack_size * sizeof (struct class_stack_node));
VARRAY_TREE_INIT (local_classes, 8, "local_classes");
local_classes = VEC_alloc (tree, gc, 8);
ridpointers[(int) RID_PUBLIC] = access_public_node;
ridpointers[(int) RID_PRIVATE] = access_private_node;
......
......@@ -3132,7 +3132,7 @@ extern int current_class_depth;
/* An array of all local classes present in this translation unit, in
declaration order. */
extern GTY(()) varray_type local_classes;
extern GTY(()) VEC(tree,gc) *local_classes;
/* Here's where we control how name mangling takes place. */
......
......@@ -1436,7 +1436,7 @@ discriminator_for_local_entity (tree entity)
{
/* Scan the list of local classes. */
entity = TREE_TYPE (entity);
for (type = &VARRAY_TREE (local_classes, 0); *type != entity; ++type)
for (type = VEC_address (tree, local_classes); *type != entity; ++type)
if (TYPE_IDENTIFIER (*type) == TYPE_IDENTIFIER (entity)
&& TYPE_CONTEXT (*type) == TYPE_CONTEXT (entity))
++discriminator;
......
......@@ -4701,7 +4701,7 @@ pushtag (tree name, tree type, tag_scope scope)
if (TYPE_CONTEXT (type)
&& TREE_CODE (TYPE_CONTEXT (type)) == FUNCTION_DECL
&& !processing_template_decl)
VARRAY_PUSH_TREE (local_classes, type);
VEC_safe_push (tree, gc, local_classes, type);
}
if (b->kind == sk_class
&& !COMPLETE_TYPE_P (current_class_type))
......
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