diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-09-30 10:03:11 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-09-30 10:03:11 +0000 |
commit | 8c3b269309f3b3651362697d48a3ade54bbddb55 (patch) | |
tree | 78d68f969b236c6a6934656003c802393ecd85b7 /gcc/cppinit.c | |
parent | 218e1e912d74b89f0a6bd7c694bdc89c4515610b (diff) | |
download | gcc-8c3b269309f3b3651362697d48a3ade54bbddb55.zip gcc-8c3b269309f3b3651362697d48a3ade54bbddb55.tar.gz gcc-8c3b269309f3b3651362697d48a3ade54bbddb55.tar.bz2 |
cpphash.h (POOL_ALIGN, [...]): Remove.
* cpphash.h (POOL_ALIGN, POOL_FRONT, POOL_LIMIT, POOL_BASE,
POOL_SIZE, POOL_ROOM, POOL_COMMIT, struct cpp_chunk,
struct cpp_pool, _cpp_init_pool, _cpp_free_pool, _cpp_pool_reserve,
_cpp_pool_alloc, _cpp_next_chunk): Remove.
(_cpp_extend_buff, BUFF_ROOM): Update.
(_cpp_append_extend_buff): New.
(struct cpp_reader): Remove macro_pool, add a_buff.
* cppinit.c (cpp_create_reader): Initialize a_buff, instead of
macro_pool.
(cpp_destroy): Free a_buff instead of macro_pool.
* cpplex.c (new_chunk, chunk_suitable, _cpp_next_chunk,
new_chunk, _cpp_init_pool, _cpp_free_pool, _cpp_pool_reserve,
_cpp_pool_alloc, ): Remove.
(parse_number, parse_string): Update use of _cpp_extend_buff.
(_cpp_extend_buff): Update.
(_cpp_append_extend_buff, cpp_aligned_alloc): New.
* cpplib.c (glue_header_name, parse_answer):
Update use of _cpp_extend_buff.
(cpp_register_pragma, cpp_register_pragma_space): Use
_cpp_aligned_alloc.
(do_assert, do_unassert): Check for EOL, update.
* cppmacro.c (stringify_arg, collect_args): Update to use
_cpp_extend_buff and _cpp_append_extend_buff.
(save_parameter, parse_params, alloc_expansion_token,
_cpp_create_definition): Rework memory management.
* gcc.dg/cpp/redef2.c: Add test.
From-SVN: r45899
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 5150a0e..45d9b6a 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -527,12 +527,10 @@ cpp_create_reader (table, lang) pfile->base_context.macro = 0; pfile->base_context.prev = pfile->base_context.next = 0; - /* Unaligned storage. */ + /* Aligned and unaligned storage. */ + pfile->a_buff = _cpp_get_buff (pfile, 0); pfile->u_buff = _cpp_get_buff (pfile, 0); - /* Macro pool initially 8K. Aligned, permanent pool. */ - _cpp_init_pool (&pfile->macro_pool, 8 * 1024, 0, 0); - /* Initialise the buffer obstack. */ gcc_obstack_init (&pfile->buffer_ob); @@ -585,7 +583,7 @@ cpp_destroy (pfile) _cpp_destroy_hashtable (pfile); _cpp_cleanup_includes (pfile); - _cpp_free_pool (&pfile->macro_pool); + _cpp_free_buff (pfile->a_buff); _cpp_free_buff (pfile->u_buff); _cpp_free_buff (pfile->free_buffs); |