This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Java bootstrap failure for libjava/java/io/FilePermission.java


Alexandre Petit-Bianco wrote:

> > Actually, I think its because the Java front end never calls
> > build_common_tree_nodes{_2}. I'm investigating whether we can have
> > it call these instead of duplicating much of the code in its
> > init_decl_processing().
>
> Yeah, it looks like things could be removed and set by
> build_common_tree_nodes. But the Java front-end still needs to create
> its own integer and fp types.

Well, I did that in my tree. It means we can get rid of a couple of dozen
lines in init_decl_processing, but I decided that this doesn't really
clean up the code at all - in most cases we're just overriding the type
information that it sets with the Java-mandated ones. Although that means
the Java front end needs to mirror changes made to
build_common_tree_nodes, it is probibly just as bad to rely on certain
behaviours from it.

Here's the simpler patch which I'm checking now. I'm going to check it in
under obvious fix.

regards

  [ bryce ]

2000-01-30  Bryce McKinlay  <bryce@albatross.co.nz>

	* java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
	* decl.c (init_decl_processing): Use integer_minus_one_node, not
	integer_negative_one_node.
	* expr.c (build_java_binop): Likewise.

Index: java-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/java-tree.h,v
retrieving revision 1.94
diff -u -r1.94 java-tree.h
--- java-tree.h	2001/01/25 22:25:21	1.94
+++ java-tree.h	2001/01/30 00:16:52
@@ -280,7 +280,6 @@
   JTI_LONG_ZERO_NODE,
   JTI_FLOAT_ZERO_NODE,
   JTI_DOUBLE_ZERO_NODE,
-  JTI_INTEGER_NEGATIVE_ONE_NODE,
   JTI_INTEGER_TWO_NODE,
   JTI_INTEGER_FOUR_NODE,
   JTI_EMPTY_STMT_NODE,
@@ -480,8 +479,6 @@
   java_global_trees[JTI_FLOAT_ZERO_NODE]
 #define double_zero_node \
   java_global_trees[JTI_DOUBLE_ZERO_NODE]
-#define integer_negative_one_node \
-  java_global_trees[JTI_INTEGER_NEGATIVE_ONE_NODE]
 #define integer_two_node \
   java_global_trees[JTI_INTEGER_TWO_NODE]
 #define integer_four_node \
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/decl.c,v
retrieving revision 1.85
diff -u -r1.85 decl.c
--- decl.c	2001/01/28 01:50:21	1.85
+++ decl.c	2001/01/30 00:16:53
@@ -473,7 +473,7 @@
   integer_one_node = build_int_2 (1, 0);
   integer_two_node = build_int_2 (2, 0);
   integer_four_node = build_int_2 (4, 0);
-  integer_negative_one_node = build_int_2 (-1, 0);
+  integer_minus_one_node = build_int_2 (-1, -1);
 
   size_zero_node = size_int (0);
   size_one_node = size_int (1);
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/expr.c,v
retrieving revision 1.99
diff -u -r1.99 expr.c
--- expr.c	2001/01/28 01:50:21	1.99
+++ expr.c	2001/01/30 00:16:54
@@ -1299,11 +1299,11 @@
 	tree second_compare = fold (build (COND_EXPR, int_type_node,
 					   ifexp2, integer_zero_node,
 					   op == COMPARE_L_EXPR
-					   ? integer_negative_one_node
+					   ? integer_minus_one_node
 					   : integer_one_node));
 	return fold (build (COND_EXPR, int_type_node, ifexp1,
 			    op == COMPARE_L_EXPR ? integer_one_node
-			    : integer_negative_one_node,
+			    : integer_minus_one_node,
 			    second_compare));
       }
     case COMPARE_EXPR:
@@ -1315,7 +1315,7 @@
 					    ifexp2, integer_one_node,
 					    integer_zero_node));
 	return fold (build (COND_EXPR, int_type_node,
-			    ifexp1, integer_negative_one_node, second_compare));
+			    ifexp1, integer_minus_one_node, second_compare));
       }      
     case TRUNC_DIV_EXPR:
     case TRUNC_MOD_EXPR:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]