OSDN Git Service

* class.c (local_classes, init_class_processing): Use VEC
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 May 2005 18:36:24 +0000 (18:36 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 May 2005 18:36:24 +0000 (18:36 +0000)
instead of VARRAY.
* cp-tree.h (local_classes): Likewise.
* mangle.c (discriminator_for_local_entity): Likewise.
* name-lookup.c (pushtag): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99115 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/mangle.c
gcc/cp/name-lookup.c

index a3c529e..b0f0696 100644 (file)
@@ -1,3 +1,11 @@
+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
index 5052aaa..89ae74f 100644 (file)
@@ -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;
index 8712924..53f19f2 100644 (file)
@@ -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;
 \f
 /* Here's where we control how name mangling takes place.  */
 
index 20be571..15a42b1 100644 (file)
@@ -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;
index 634645d..67288d7 100644 (file)
@@ -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))