summaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-09-26 21:44:35 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-09-26 21:44:35 +0000
commit1e013d2ee59f0cd640dc56a973ef577465c4aa6b (patch)
tree03b83203b4e6f5bc73aa03834e13b0fb8efa1d57 /gcc/cpphash.h
parent0c055e3461e70139f7277fb146e080599a0ab6a2 (diff)
downloadgcc-1e013d2ee59f0cd640dc56a973ef577465c4aa6b.tar.gz
cpphash.h (struct cpp_pool): Remove locks and locked.
* 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. From-SVN: r45833
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h10
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 *));