decl.c (wrapup_globals_for_namespace): Use VEC instead of VARRAY.
* decl.c (wrapup_globals_for_namespace): Use VEC instead of VARRAY. * name-lookup.c (add_decl_to_level, begin_scope): Likewise. * name-lookup.h (cp_binding_level): Change the type of static_decls to VEC(tree,gc)*. From-SVN: r99346
This commit is contained in:
parent
8d9e4906a8
commit
9857866d53
|
@ -1,3 +1,11 @@
|
||||||
|
2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
|
||||||
|
|
||||||
|
* decl.c (wrapup_globals_for_namespace): Use VEC instead of
|
||||||
|
VARRAY.
|
||||||
|
* name-lookup.c (add_decl_to_level, begin_scope): Likewise.
|
||||||
|
* name-lookup.h (cp_binding_level): Change the type of
|
||||||
|
static_decls to VEC(tree,gc)*.
|
||||||
|
|
||||||
2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
|
2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
|
||||||
|
|
||||||
* decl2.c (spew_debug): Remove.
|
* decl2.c (spew_debug): Remove.
|
||||||
|
|
|
@ -786,9 +786,9 @@ int
|
||||||
wrapup_globals_for_namespace (tree namespace, void* data)
|
wrapup_globals_for_namespace (tree namespace, void* data)
|
||||||
{
|
{
|
||||||
struct cp_binding_level *level = NAMESPACE_LEVEL (namespace);
|
struct cp_binding_level *level = NAMESPACE_LEVEL (namespace);
|
||||||
varray_type statics = level->static_decls;
|
VEC(tree,gc) *statics = level->static_decls;
|
||||||
tree *vec = &VARRAY_TREE (statics, 0);
|
tree *vec = VEC_address (tree, statics);
|
||||||
int len = VARRAY_ACTIVE_SIZE (statics);
|
int len = VEC_length (tree, statics);
|
||||||
int last_time = (data != 0);
|
int last_time = (data != 0);
|
||||||
|
|
||||||
if (last_time)
|
if (last_time)
|
||||||
|
|
|
@ -546,7 +546,7 @@ add_decl_to_level (tree decl, cxx_scope *b)
|
||||||
&& (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
|
&& (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
|
||||||
|| (TREE_CODE (decl) == FUNCTION_DECL
|
|| (TREE_CODE (decl) == FUNCTION_DECL
|
||||||
&& (!TREE_PUBLIC (decl) || DECL_DECLARED_INLINE_P (decl))))
|
&& (!TREE_PUBLIC (decl) || DECL_DECLARED_INLINE_P (decl))))
|
||||||
VARRAY_PUSH_TREE (b->static_decls, decl);
|
VEC_safe_push (tree, gc, b->static_decls, decl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1264,11 +1264,11 @@ begin_scope (scope_kind kind, tree entity)
|
||||||
|
|
||||||
case sk_namespace:
|
case sk_namespace:
|
||||||
NAMESPACE_LEVEL (entity) = scope;
|
NAMESPACE_LEVEL (entity) = scope;
|
||||||
VARRAY_TREE_INIT (scope->static_decls,
|
scope->static_decls =
|
||||||
DECL_NAME (entity) == std_identifier
|
VEC_alloc (tree, gc,
|
||||||
|| DECL_NAME (entity) == global_scope_name
|
DECL_NAME (entity) == std_identifier
|
||||||
? 200 : 10,
|
|| DECL_NAME (entity) == global_scope_name
|
||||||
"Static declarations");
|
? 200 : 10);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -188,7 +188,7 @@ struct cp_binding_level GTY(())
|
||||||
tree namespaces;
|
tree namespaces;
|
||||||
|
|
||||||
/* An array of static functions and variables (for namespaces only) */
|
/* An array of static functions and variables (for namespaces only) */
|
||||||
varray_type static_decls;
|
VEC(tree,gc) *static_decls;
|
||||||
|
|
||||||
/* A chain of VTABLE_DECL nodes. */
|
/* A chain of VTABLE_DECL nodes. */
|
||||||
tree vtables;
|
tree vtables;
|
||||||
|
|
Loading…
Reference in New Issue