mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 19:01:17 +08:00
Make-lang.in (cp/pt.o): Depend on vecprim.h.
* Make-lang.in (cp/pt.o): Depend on vecprim.h. * pt.c: Include vecprim.h. (inline_parm_levels): Change the type to VEC(int,heap) *. (inline_parm_levels_used): Remove. (maybe_begin_member_template_processing, maybe_end_member_template_processing): Use VEC instead of VARRAY. From-SVN: r112969
This commit is contained in:
parent
a01de5ece5
commit
5382402614
@ -1,3 +1,13 @@
|
||||
2006-04-15 Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
* Make-lang.in (cp/pt.o): Depend on vecprim.h.
|
||||
* pt.c: Include vecprim.h.
|
||||
(inline_parm_levels): Change the type to VEC(int,heap) *.
|
||||
(inline_parm_levels_used): Remove.
|
||||
(maybe_begin_member_template_processing,
|
||||
maybe_end_member_template_processing): Use VEC instead of
|
||||
VARRAY.
|
||||
|
||||
2006-04-12 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* parser.c (cp_parser_init_declarator): Initialize local variables
|
||||
|
@ -270,7 +270,7 @@ cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) flags.h $(RTL_H) except.h \
|
||||
cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(RTL_H) flags.h $(EXPR_H) \
|
||||
toplev.h except.h $(TM_P_H)
|
||||
cp/pt.o: cp/pt.c $(CXX_TREE_H) $(TM_H) cp/decl.h cp/cp-objcp-common.h \
|
||||
toplev.h $(RTL_H) except.h tree-inline.h pointer-set.h gt-cp-pt.h
|
||||
toplev.h $(RTL_H) except.h tree-inline.h pointer-set.h gt-cp-pt.h vecprim.h
|
||||
cp/error.o: cp/error.c $(CXX_TREE_H) $(TM_H) toplev.h $(DIAGNOSTIC_H) \
|
||||
flags.h real.h $(LANGHOOKS_DEF_H) $(CXX_PRETTY_PRINT_H)
|
||||
cp/repo.o: cp/repo.c $(CXX_TREE_H) $(TM_H) toplev.h diagnostic.h \
|
||||
|
20
gcc/cp/pt.c
20
gcc/cp/pt.c
@ -45,6 +45,7 @@ Boston, MA 02110-1301, USA. */
|
||||
#include "rtl.h"
|
||||
#include "timevar.h"
|
||||
#include "tree-iterator.h"
|
||||
#include "vecprim.h"
|
||||
|
||||
/* The type of functions taking a tree, and some additional data, and
|
||||
returning an int. */
|
||||
@ -63,8 +64,7 @@ int processing_template_parmlist;
|
||||
static int template_header_count;
|
||||
|
||||
static GTY(()) tree saved_trees;
|
||||
static GTY(()) varray_type inline_parm_levels;
|
||||
static size_t inline_parm_levels_used;
|
||||
static VEC(int,heap) *inline_parm_levels;
|
||||
|
||||
static GTY(()) tree current_tinst_level;
|
||||
|
||||
@ -396,12 +396,7 @@ maybe_begin_member_template_processing (tree decl)
|
||||
|
||||
/* Remember how many levels of template parameters we pushed so that
|
||||
we can pop them later. */
|
||||
if (!inline_parm_levels)
|
||||
VARRAY_INT_INIT (inline_parm_levels, 4, "inline_parm_levels");
|
||||
if (inline_parm_levels_used == inline_parm_levels->num_elements)
|
||||
VARRAY_GROW (inline_parm_levels, 2 * inline_parm_levels_used);
|
||||
VARRAY_INT (inline_parm_levels, inline_parm_levels_used) = levels;
|
||||
++inline_parm_levels_used;
|
||||
VEC_safe_push (int, heap, inline_parm_levels, levels);
|
||||
}
|
||||
|
||||
/* Undo the effects of maybe_begin_member_template_processing. */
|
||||
@ -410,14 +405,13 @@ void
|
||||
maybe_end_member_template_processing (void)
|
||||
{
|
||||
int i;
|
||||
int last;
|
||||
|
||||
if (!inline_parm_levels_used)
|
||||
if (VEC_length (int, inline_parm_levels) == 0)
|
||||
return;
|
||||
|
||||
--inline_parm_levels_used;
|
||||
for (i = 0;
|
||||
i < VARRAY_INT (inline_parm_levels, inline_parm_levels_used);
|
||||
++i)
|
||||
last = VEC_pop (int, inline_parm_levels);
|
||||
for (i = 0; i < last; ++i)
|
||||
{
|
||||
--processing_template_decl;
|
||||
current_template_parms = TREE_CHAIN (current_template_parms);
|
||||
|
Loading…
x
Reference in New Issue
Block a user