+2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
+
+ * class.c (vtbl_init_data_s): Change the type of fns to
+ VEC(tree,gc)*.
+ (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
+ Use VEC instead of VARRAY.
+
2005-05-07 Richard Sandiford <rsandifo@redhat.com>
* mangle.c: Remove a reference to the MIPS -mint64 option.
tree vbase;
/* The functions in vbase for which we have already provided vcall
offsets. */
- varray_type fns;
+ VEC(tree,gc) *fns;
/* The vtable index of the next vcall or vbase offset. */
tree index;
/* Nonzero if we are building the initializer for the primary
/* Create an array for keeping track of the functions we've
processed. When we see multiple functions with the same
signature, we share the vcall offsets. */
- VARRAY_TREE_INIT (vid.fns, 32, "fns");
+ vid.fns = VEC_alloc (tree, gc, 32);
/* Add the vcall and vbase offset entries. */
build_vcall_and_vbase_vtbl_entries (binfo, &vid);
{
size_t i;
tree vcall_offset;
+ tree derived_entry;
/* If there is already an entry for a function with the same
signature as FN, then we do not need a second vcall offset.
Check the list of functions already present in the derived
class vtable. */
- for (i = 0; i < VARRAY_ACTIVE_SIZE (vid->fns); ++i)
+ for (i = 0; VEC_iterate (tree, vid->fns, i, derived_entry); ++i)
{
- tree derived_entry;
-
- derived_entry = VARRAY_TREE (vid->fns, i);
if (same_signature_p (derived_entry, orig_fn)
/* We only use one vcall offset for virtual destructors,
even though there are two virtual table entries. */
ssize_int (TARGET_VTABLE_DATA_ENTRY_DISTANCE));
/* Keep track of this function. */
- VARRAY_PUSH_TREE (vid->fns, orig_fn);
+ VEC_safe_push (tree, gc, vid->fns, orig_fn);
if (vid->generate_vcall_entries)
{