aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-05-02 20:49:16 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-05-02 20:49:16 +0000
commitaff447417f3d5cd331129f0646d5da16e915b3fe (patch)
tree8f5237cf0617ac2ff64933da95c37fa5dde1cba2 /gcc
parent6fb58bba49ae8e0afaf502975e6fa30cbc288ed0 (diff)
downloadgcc-aff447417f3d5cd331129f0646d5da16e915b3fe.zip
gcc-aff447417f3d5cd331129f0646d5da16e915b3fe.tar.gz
gcc-aff447417f3d5cd331129f0646d5da16e915b3fe.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/class.c7
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/name-lookup.c2
4 files changed, 12 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b0f0696..ee526e2 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 89ae74f..6217a2c 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 53f19f2..b057581 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 67288d7..78f8325 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);