diff options
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index b1214d4..61c3c15 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -70,14 +70,16 @@ extern struct obstack permanent_obstack; before static field references. */ extern int always_initialize_class_p; +static tree parse_roots[3] = { NULL_TREE, NULL_TREE, NULL_TREE }; + /* The FIELD_DECL for the current field. */ -static tree current_field = NULL_TREE; +#define current_field parse_roots[0] /* The METHOD_DECL for the current method. */ -static tree current_method = NULL_TREE; +#define current_method parse_roots[1] /* A list of file names. */ -static tree current_file_list = NULL_TREE; +#define current_file_list parse_roots[2] /* The Java .class file that provides main_class; the main input file. */ static struct JCF main_jcf[1]; @@ -1119,9 +1121,7 @@ void init_jcf_parse () { /* Register roots with the garbage collector. */ - ggc_add_tree_root (¤t_field, 1); - ggc_add_tree_root (¤t_method, 1); - ggc_add_tree_root (¤t_file_list, 1); + ggc_add_tree_root (parse_roots, sizeof (parse_roots) / sizeof(tree)); ggc_add_root (¤t_jcf, 1, sizeof (JCF), ggc_mark_jcf); } |