diff options
author | Geoffrey Keating <geoffk@redhat.com> | 2002-08-04 22:45:31 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2002-08-04 22:45:31 +0000 |
commit | 6d9f628e059c1999f0469084e1e4e4774495f64f (patch) | |
tree | 1a2ee6015c9e6c4f08b35ecd8a67ece8bed0f090 /gcc/tree.c | |
parent | 86a0cbcb9f15690df0f44ba0b6045206d096b0c6 (diff) | |
download | gcc-6d9f628e059c1999f0469084e1e4e4774495f64f.zip gcc-6d9f628e059c1999f0469084e1e4e4774495f64f.tar.gz gcc-6d9f628e059c1999f0469084e1e4e4774495f64f.tar.bz2 |
Index: ChangeLog
2002-08-04 Geoffrey Keating <geoffk@redhat.com>
* Makefile.in (sdbout.o): Doesn't need $(OBSTACK_H).
* collect2.h (permanent_obstack): Delete declaration.
* collect2.c (permanent_obstack): Delete definition.
(main): Don't initialise permanent_obstack. Use xstrdup instead.
* expr.c: Don't include obstack.h.
(permanent_obstack): Delete declaration.
* function.c: Don't include obstack.h.
(permanent_obstack): Delete declaration.
* integrate.c: Don't include obstack.h.
(function_maybepermanent_obstack): Delete declaration.
* print-tree.c (debug_tree): Use x*alloc not permalloc.
* sdbout.c (gen_fake_label): Use x*alloc not permalloc.
* tlink.c (pfgets): Use xstrdup not permanent_obstack.
* toplev.c (lang_independent_init): Rename init_obstacks to init_ttree.
* tree.h: Rename init_obstacks to init_ttree. Remove declarations
of permalloc, expralloc, perm_calloc.
* tree.c (permanent_obstack): Delete definition.
(init_ttree): Rename from init_obstacks.
(permalloc): Delete.
(perm_calloc): Delete.
(dump_tree_statistics): Don't print information about
permanent_obstack.
* varasm.c (assemble_start_function): Use xstrdup instead of
permalloc/strcpy.
(assemble_variable): Likewise.
* config/alpha/alpha.c (unicosmk_need_dex): Use xmalloc instead of
permalloc.
(unicosmk_add_extern): Likewise.
* config/c4x/c4x.c (c4x_external_ref): Likewise.
(c4x_global_label): Likewise.
* config/frv/frv.c (frv_encode_section_info): Likewise.
* config/i386/winnt.c (i386_pe_record_external_function): Likewise.
(i386_pe_record_exported_symbol): Likewise.
* config/mips/mips.c (mips_output_external): Likewise.
(mips_output_external_libcall): Likewise.
* config/pa/pa.c: (permanent_obstack): Delete declaration.
(output_call): Use ggc_strdup instead of allocating on
permanent_obstack.
* config/romp/romp.c: Include ggc.h.
(get_symref): Don't declare permanent_obstack, use ggc_strdup
intead of permanent_obstack.
* config/rs6000/aix31.h (ASM_OUTPUT_EXTERNAL): Use concat
instead of permalloc.
* config/rs6000/rs6000.c (rs6000_gen_section_name): Use xmalloc
instead of permalloc
* config/rs6000/xcoff.h (ASM_OUTPUT_EXTERNAL): Use concat
instead of permalloc.
* config/vax/vax.c (vms_check_external): Use xmalloc instead of
permalloc.
Index: cp/ChangeLog
2002-08-04 Geoffrey Keating <geoffk@redhat.com>
* cvt.c (ocp_convert): Delete obsolete code.
* parse.y (permanent_obstack): Delete declaration.
* pt.c (permanent_obstack): Delete declaration.
* repo.c (permanent_obstack): Delete declaration.
(open_repo_file): Use xmalloc instead of permanent_obstack.
(init_repo): Use xstrdup instead of permanent_obstack.
Index: java/ChangeLog
2002-08-04 Geoffrey Keating <geoffk@redhat.com>
* class.c: (permanent_obstack): Delete declaration.
* constants.c: (permanent_obstack): Delete declaration.
* except.c: (permanent_obstack): Delete declaration.
* expr.c: (permanent_obstack): Delete declaration.
* jcf-parse.c: (permanent_obstack): Delete declaration.
(saveable_obstack): Delete declaration.
* parse.h: (permanent_obstack): Delete declaration.
* typeck.c: (permanent_obstack): Delete declaration.
From-SVN: r56035
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 41 |
1 files changed, 3 insertions, 38 deletions
@@ -27,11 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA nodes of that code. It is intended to be language-independent, but occasionally - calls language-dependent routines defined (for C) in typecheck.c. - - The low-level allocation routines oballoc and permalloc - are used also for allocating many other kinds of objects - by all passes of the compiler. */ + calls language-dependent routines defined (for C) in typecheck.c. */ #include "config.h" #include "system.h" @@ -51,10 +47,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* obstack.[ch] explicitly declined to prototype this. */ extern int _obstack_allocated_p PARAMS ((struct obstack *h, PTR obj)); -/* Objects allocated on this obstack last forever. */ - -struct obstack permanent_obstack; - #ifdef GATHER_STATISTICS /* Statistics-gathering stuff. */ typedef enum @@ -136,43 +128,17 @@ static int type_hash_marked_p PARAMS ((const void *)); tree global_trees[TI_MAX]; tree integer_types[itk_none]; -/* Init the principal obstacks. */ +/* Init tree.c. */ void -init_obstacks () +init_ttree () { - gcc_obstack_init (&permanent_obstack); - /* Initialize the hash table of types. */ type_hash_table = htab_create (TYPE_HASH_INITIAL_SIZE, type_hash_hash, type_hash_eq, 0); } -/* Allocate SIZE bytes in the permanent obstack - and return a pointer to them. */ - -char * -permalloc (size) - int size; -{ - return (char *) obstack_alloc (&permanent_obstack, size); -} - -/* Allocate NELEM items of SIZE bytes in the permanent obstack - and return a pointer to them. The storage is cleared before - returning the value. */ - -char * -perm_calloc (nelem, size) - int nelem; - long size; -{ - char *rval = (char *) obstack_alloc (&permanent_obstack, nelem * size); - memset (rval, 0, nelem * size); - return rval; -} - /* The name of the object as the assembler will see it (but before any translations made by ASM_OUTPUT_LABELREF). Often this is the same as DECL_NAME. It is an IDENTIFIER_NODE. */ @@ -4359,7 +4325,6 @@ dump_tree_statistics () #else fprintf (stderr, "(No per-node statistics)\n"); #endif - print_obstack_statistics ("permanent_obstack", &permanent_obstack); print_type_hash_statistics (); (*lang_hooks.print_statistics) (); } |