diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-30 10:03:11 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-30 10:03:11 +0000 |
commit | e6a5f9632bb5ad435790327fbd36f452093d728c (patch) | |
tree | 78d68f969b236c6a6934656003c802393ecd85b7 /gcc/cppinit.c | |
parent | b4ac09cddb5a433147b996570258e8732a706a18 (diff) | |
download | gcc-e6a5f9632bb5ad435790327fbd36f452093d728c.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45899 138bc75d-0d04-0410-961f-82ee72b054a4
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 5150a0e2c46..45d9b6aebd5 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); |