jcf-parse.c (init_jcf_parse): Register current_file_list root.
* jcf-parse.c (init_jcf_parse): Register current_file_list root. Move current_file_list out of yyparse and make it static. * expr.c: Declare quick_stack and tree_list_free_list as static (init_expr_processing): Register quick_stack and tree_list_free_list roots. From-SVN: r37708
This commit is contained in:
parent
52a84e4270
commit
1510057a32
@ -1,3 +1,12 @@
|
|||||||
|
2000-11-23 Anthony Green <green@redhat.com>
|
||||||
|
|
||||||
|
* jcf-parse.c (init_jcf_parse): Register current_file_list root.
|
||||||
|
Move current_file_list out of yyparse and make it static.
|
||||||
|
|
||||||
|
* expr.c: Declare quick_stack and tree_list_free_list as static
|
||||||
|
(init_expr_processing): Register quick_stack and
|
||||||
|
tree_list_free_list roots.
|
||||||
|
|
||||||
2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||||
|
|
||||||
* parse.y (build_outer_field_access): New local `decl_ctx', use
|
* parse.y (build_outer_field_access): New local `decl_ctx', use
|
||||||
|
@ -93,19 +93,6 @@ tree dtable_ident = NULL_TREE;
|
|||||||
before static field references. */
|
before static field references. */
|
||||||
int always_initialize_class_p;
|
int always_initialize_class_p;
|
||||||
|
|
||||||
void
|
|
||||||
init_expr_processing()
|
|
||||||
{
|
|
||||||
operand_type[21] = operand_type[54] = int_type_node;
|
|
||||||
operand_type[22] = operand_type[55] = long_type_node;
|
|
||||||
operand_type[23] = operand_type[56] = float_type_node;
|
|
||||||
operand_type[24] = operand_type[57] = double_type_node;
|
|
||||||
operand_type[25] = operand_type[58] = ptr_type_node;
|
|
||||||
ggc_add_tree_root (operand_type, 59);
|
|
||||||
ggc_add_tree_root (&methods_ident, 1);
|
|
||||||
ggc_add_tree_root (&ncode_ident, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We store the stack state in two places:
|
/* We store the stack state in two places:
|
||||||
Within a basic block, we use the quick_stack, which is a
|
Within a basic block, we use the quick_stack, which is a
|
||||||
pushdown list (TREE_LISTs) of expression nodes.
|
pushdown list (TREE_LISTs) of expression nodes.
|
||||||
@ -133,10 +120,10 @@ init_expr_processing()
|
|||||||
So dup cannot just add an extra element to the quick_stack, but iadd can.
|
So dup cannot just add an extra element to the quick_stack, but iadd can.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
tree quick_stack = NULL_TREE;
|
static tree quick_stack = NULL_TREE;
|
||||||
|
|
||||||
/* A free-list of unused permamnet TREE_LIST nodes. */
|
/* A free-list of unused permamnet TREE_LIST nodes. */
|
||||||
tree tree_list_free_list = NULL_TREE;
|
static tree tree_list_free_list = NULL_TREE;
|
||||||
|
|
||||||
/* The stack pointer of the Java virtual machine.
|
/* The stack pointer of the Java virtual machine.
|
||||||
This does include the size of the quick_stack. */
|
This does include the size of the quick_stack. */
|
||||||
@ -146,6 +133,21 @@ int stack_pointer;
|
|||||||
const unsigned char *linenumber_table;
|
const unsigned char *linenumber_table;
|
||||||
int linenumber_count;
|
int linenumber_count;
|
||||||
|
|
||||||
|
void
|
||||||
|
init_expr_processing()
|
||||||
|
{
|
||||||
|
operand_type[21] = operand_type[54] = int_type_node;
|
||||||
|
operand_type[22] = operand_type[55] = long_type_node;
|
||||||
|
operand_type[23] = operand_type[56] = float_type_node;
|
||||||
|
operand_type[24] = operand_type[57] = double_type_node;
|
||||||
|
operand_type[25] = operand_type[58] = ptr_type_node;
|
||||||
|
ggc_add_tree_root (operand_type, 59);
|
||||||
|
ggc_add_tree_root (&methods_ident, 1);
|
||||||
|
ggc_add_tree_root (&ncode_ident, 1);
|
||||||
|
ggc_add_tree_root (&quick_stack, 1);
|
||||||
|
ggc_add_tree_root (&tree_list_free_list, 1);
|
||||||
|
}
|
||||||
|
|
||||||
tree
|
tree
|
||||||
truthvalue_conversion (expr)
|
truthvalue_conversion (expr)
|
||||||
tree expr;
|
tree expr;
|
||||||
|
@ -76,6 +76,9 @@ static tree current_field = NULL_TREE;
|
|||||||
/* The METHOD_DECL for the current method. */
|
/* The METHOD_DECL for the current method. */
|
||||||
static tree current_method = NULL_TREE;
|
static tree current_method = NULL_TREE;
|
||||||
|
|
||||||
|
/* A list of file names. */
|
||||||
|
static tree current_file_list = NULL_TREE;
|
||||||
|
|
||||||
/* The Java .class file that provides main_class; the main input file. */
|
/* The Java .class file that provides main_class; the main input file. */
|
||||||
static struct JCF main_jcf[1];
|
static struct JCF main_jcf[1];
|
||||||
|
|
||||||
@ -807,7 +810,7 @@ yyparse ()
|
|||||||
{
|
{
|
||||||
int several_files = 0;
|
int several_files = 0;
|
||||||
char *list = xstrdup (input_filename), *next;
|
char *list = xstrdup (input_filename), *next;
|
||||||
tree node, current_file_list = NULL_TREE;
|
tree node;
|
||||||
FILE *finput;
|
FILE *finput;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -1093,4 +1096,5 @@ init_jcf_parse ()
|
|||||||
/* Register roots with the garbage collector. */
|
/* Register roots with the garbage collector. */
|
||||||
ggc_add_tree_root (¤t_field, 1);
|
ggc_add_tree_root (¤t_field, 1);
|
||||||
ggc_add_tree_root (¤t_method, 1);
|
ggc_add_tree_root (¤t_method, 1);
|
||||||
|
ggc_add_tree_root (¤t_file_list, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user