This is the mail archive of the java-patches@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]
Other format: [Raw text]

[gcjx] Patch: FYI: fix 'for' lowering


I'm checking this in on the gcjx branch.

This fixes a couple of bugs when lowering 'for' loops to trees.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* tree.cc (visit_for): Use 'result' when building BIND_EXPR.
	Fixed order of arguments.

Index: tree.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/tree.cc,v
retrieving revision 1.1.2.22
diff -u -r1.1.2.22 tree.cc
--- tree.cc 24 Mar 2005 17:44:20 -0000 1.1.2.22
+++ tree.cc 24 Mar 2005 19:53:00 -0000
@@ -568,8 +568,8 @@
 tree_generator::visit_for (model_for *fstmt,
 			   const ref_stmt &init,
 			   const ref_expression &cond,
-			   const ref_stmt &body,
-			   const ref_stmt &update)
+			   const ref_stmt &update,
+			   const ref_stmt &body)
 {
   tree update_tree = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
   DECL_CONTEXT (update_tree) = current_block;
@@ -620,9 +620,8 @@
   tsi_link_after (&result_out, build1 (LABEL_EXPR, void_type_node, done_tree),
 		  TSI_CONTINUE_LINKING);
 
-  current = build3 (BIND_EXPR, void_type_node,
-		    BLOCK_VARS (current_block),
-		    body_tree, current_block);
+  current = build3 (BIND_EXPR, void_type_node, BLOCK_VARS (current_block),
+		    result, current_block);
 }
 
 void


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