diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-26 21:44:35 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-26 21:44:35 +0000 |
commit | 084163dc0438b896339b4617663294854f30e371 (patch) | |
tree | 03b83203b4e6f5bc73aa03834e13b0fb8efa1d57 /gcc/cpphash.h | |
parent | 1ed656c9e758f6f207dd1e4faa96f0f994528001 (diff) | |
download | gcc-084163dc0438b896339b4617663294854f30e371.tar.gz |
* cpphash.h (struct cpp_pool): Remove locks and locked.
(struct cpp_context): Add member buff.
(struct cpp_reader): Remove member argument_pool.
(_cpp_lock_pool, _cpp_unlock_pool): Remove.
* cppinit.c (cpp_create_reader, cpp_destroy): Argument_pool is dead.
* cpplex.c (chunk_suitable): Remove pool argument.
(MIN_BUFF_SIZE, BUFF_SIZE_UPPER_BOUND, EXTENDED_BUFF_SIZE): New.
(new_buff, _cpp_extend_buff): Update.
(_cpp_get_buff): Fix silly pointer bug. Be more selective about
which buffer is returned.
(_cpp_next_chunk, _cpp_init_pool): Pool locking removed.
(_cpp_lock_pool, _cpp_unlock_pool): Remove.
* cppmacro.c (lock_pools, unlock_pools): Remove.
(push_ptoken_context): Take a _cpp_buff.
(enter_macro_context): Pool locking removed.
(replace_args): Use a _cpp_buff for the replacement list with
arguments replaced.
(push_token_context): Clear buff.
(expand_arg): Use _cpp_pop_context.
(_cpp_pop_context): Free a context's buffer, if any.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45833 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index ee5b03e624a..58ae27f0e5f 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -66,10 +66,9 @@ struct cpp_chunk typedef struct cpp_pool cpp_pool; struct cpp_pool { - struct cpp_chunk *cur, *locked, *first; + struct cpp_chunk *cur, *first; unsigned char *pos; /* Current position. */ unsigned int align; - unsigned int locks; }; /* A generic memory buffer. */ @@ -134,6 +133,10 @@ struct cpp_context union utoken first; union utoken last; + /* If non-NULL, a buffer used for storage related to this context. + When the context is popped, the buffer is freed. */ + _cpp_buff *buff; + /* For a macro context, these are the macro and its arguments. */ cpp_macro *macro; @@ -267,7 +270,6 @@ struct cpp_reader cpp_pool ident_pool; /* For all identifiers, and permanent numbers and strings. */ cpp_pool macro_pool; /* For macro definitions. Permanent. */ - cpp_pool argument_pool; /* For macro arguments. Temporary. */ /* Memory buffers. */ _cpp_buff *free_buffs; @@ -436,8 +438,6 @@ extern unsigned char *_cpp_pool_reserve PARAMS ((cpp_pool *, unsigned int)); extern unsigned char *_cpp_pool_alloc PARAMS ((cpp_pool *, unsigned int)); extern unsigned char *_cpp_next_chunk PARAMS ((cpp_pool *, unsigned int, unsigned char **)); -extern void _cpp_lock_pool PARAMS ((cpp_pool *)); -extern void _cpp_unlock_pool PARAMS ((cpp_pool *)); /* In cppinit.c. */ extern bool _cpp_push_next_buffer PARAMS ((cpp_reader *)); |