diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2000-06-09 21:47:40 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-06-09 21:47:40 +0000 |
commit | f8a83ee3a90a5da4bbb83dd424e54028b033efb7 (patch) | |
tree | c3287938dc002562d04b768dfaa35a310e1a8fc3 /gcc/cp | |
parent | fe06b6968b5d88aa4785716043233a864774f374 (diff) | |
download | gcc-f8a83ee3a90a5da4bbb83dd424e54028b033efb7.zip gcc-f8a83ee3a90a5da4bbb83dd424e54028b033efb7.tar.gz gcc-f8a83ee3a90a5da4bbb83dd424e54028b033efb7.tar.bz2 |
ggc-none.c, [...] (ggc_alloc_obj): Rename it ggc_alloc, drop second argument, never clear returned memory.
toplevel:
* ggc-none.c, ggc-simple.c, ggc-page.c (ggc_alloc_obj): Rename
it ggc_alloc, drop second argument, never clear returned memory.
* ggc-common.c (ggc_alloc_string): Use ggc_alloc.
(ggc_alloc_cleared): New.
* ggc.h: Prototype ggc_alloc and ggc_alloc_cleared, not
ggc_alloc_obj. Remove ggc_alloc macro.
(ggc_alloc_rtx, ggc_alloc_rtvec, ggc_alloc_tree): Use ggc_alloc.
* rtl.c (rtvec_alloc): Clear the vector always.
(rtx_alloc): Clear the first word always. Remove dirty
obstack tricks (this routine is no longer a bottleneck).
* tree.c (make_node): Clear the new node always.
(make_tree_vec): Likewise.
(tree_cons): Clear the common structure always.
(build1): Likewise; also, clear TREE_COMPLEXITY.
* gengenrtl.c: Use puts wherever possible. Remove extra
newlines.
(gendef): Clear the first word of an RTX in the generator
function, irrespective of ggc_p. Initialize '0' slots to
NULL.
(genlegend): Don't generate obstack_alloc_rtx routine, just a
thin wrapper macro around obstack_alloc.
* stmt.c (expand_fixup): Use ggc_alloc.
* c-typeck.c (add_pending_init): Use ggc_alloc.
* emit-rtl.c (init_emit_once): Clear CONST_DOUBLE_CHAIN(tem).
* varasm.c (immed_double_const): Set CONST_DOUBLE_MEM(r) to
const0_rtx when it is created.
(immed_real_const_1): Set CONST_DOUBLE_CHAIN(r) to NULL_RTX if
we are not in a function.
* tree.c (tree_class_check_failed): Make second arg an int.
* tree.h: Update prototype.
cp:
* call.c (add_candidate): Use ggc_alloc_cleared.
* decl.c (lookup_label): Likewise.
* lex.c (retrofit_lang_decl): Likewise.
From-SVN: r34478
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 | ||||
-rw-r--r-- | gcc/cp/decl.c | 2 | ||||
-rw-r--r-- | gcc/cp/lex.c | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ed1fdab..1f570cc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2000-06-09 Zack Weinberg <zack@wolery.cumb.org> + + * call.c (add_candidate): Use ggc_alloc_cleared. + * decl.c (lookup_label): Likewise. + * lex.c (retrofit_lang_decl): Likewise. + 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com> * semantics.c (expand_body): Push to TV_EXPAND. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 5cabf13..dcbe6c7 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -1250,7 +1250,7 @@ add_candidate (candidates, fn, convs, viable) int viable; { struct z_candidate *cand - = (struct z_candidate *) ggc_alloc_obj (sizeof (struct z_candidate), 1); + = (struct z_candidate *) ggc_alloc_cleared (sizeof (struct z_candidate)); cand->fn = fn; cand->convs = convs; diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f9f52fa..ad53c09 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4832,7 +4832,7 @@ lookup_label (id) We do this before calling make_label_decl so that we get the IDENTIFIER_LABEL_VALUE before the new label is declared. */ ent = ((struct named_label_list *) - ggc_alloc_obj (sizeof (struct named_label_list), 1)); + ggc_alloc_cleared (sizeof (struct named_label_list))); ent->old_value = IDENTIFIER_LABEL_VALUE (id); ent->next = named_labels; named_labels = ent; diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 8fbbbc4..a4dc2cf 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -4776,7 +4776,7 @@ retrofit_lang_decl (t) else size = sizeof (struct lang_decl_flags); - ld = (struct lang_decl *) ggc_alloc_obj (size, 1); + ld = (struct lang_decl *) ggc_alloc_cleared (size); DECL_LANG_SPECIFIC (t) = ld; if (current_lang_name == lang_name_cplusplus) |