* parser-defs.h (type_stack, type_stack_size, type_stack_depth):

Remove.
	(struct type_stack): New.
	* parse.c (type_stack, type_stack_size, type_stack_depth):
	Remove.
	(type_stack): New global.
	(parse_exp_in_context, check_type_stack_depth)
	(insert_into_type_stack, insert_type, push_type, push_type_int)
	(insert_type_address_space, pop_type, pop_type_int)
	(_initialize_parse): Update.
This commit is contained in:
Tom Tromey
2012-07-06 14:42:09 +00:00
parent 16d0138401
commit 1a7d0ce4eb
3 changed files with 49 additions and 26 deletions

View File

@@ -127,8 +127,18 @@ union type_stack_elt
enum type_pieces piece;
int int_val;
};
extern union type_stack_elt *type_stack;
extern int type_stack_depth, type_stack_size;
/* The type stack is an instance of this structure. */
struct type_stack
{
/* Elements on the stack. */
union type_stack_elt *elements;
/* Current stack depth. */
int depth;
/* Allocated size of stack. */
int size;
};
/* Helper function to initialize the expout, expout_size, expout_ptr
trio before it is used to store expression elements created during