diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2005-05-28 15:43:14 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@cs.umass.edu> | 2005-05-28 15:43:14 +0000 |
commit | 76e29e2ac91fce224c042e43ee7855babcba04bf (patch) | |
tree | ebb35ff2e8b0d859e9e1bb7482d5f6d6116263b0 /gcc/tree-inline.c | |
parent | 351333c4911e130f3b24239b10bda5bff6c29ac9 (diff) |
* tree-inline.c (cfun_stack): Change the type to
VEC(function_p,heap).
(push_cfun, pop_cfun): Use VEC instead of VARRAY.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@100294 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3c6b98f66f9..224004e0ebd 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1813,28 +1813,25 @@ estimate_num_insns (tree expr) return num; } +typedef struct function *function_p; + +DEF_VEC_P(function_p); +DEF_VEC_ALLOC_P(function_p,heap); + /* Initialized with NOGC, making this poisonous to the garbage collector. */ -static varray_type cfun_stack; +static VEC(function_p,heap) *cfun_stack; void push_cfun (struct function *new_cfun) { - static bool initialized = false; - - if (!initialized) - { - VARRAY_GENERIC_PTR_NOGC_INIT (cfun_stack, 20, "cfun_stack"); - initialized = true; - } - VARRAY_PUSH_GENERIC_PTR (cfun_stack, cfun); + VEC_safe_push (function_p, heap, cfun_stack, cfun); cfun = new_cfun; } void pop_cfun (void) { - cfun = (struct function *)VARRAY_TOP_GENERIC_PTR (cfun_stack); - VARRAY_POP (cfun_stack); + cfun = VEC_pop (function_p, cfun_stack); } /* Install new lexical TREE_BLOCK underneath 'current_block'. */ |