This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: clean up statement iterator use
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 03 Apr 2005 17:43:25 -0600
- Subject: [gcjx] Patch: FYI: clean up statement iterator use
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This fixes a use of statement iterators in the bytecode-lowering
code. I'm also slipping an indentation cleanup in here.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* lower.cc (visit_bytecode_block): Fix use of statement
iterators.
* classobj.cc (create_index_table): Indentation fix.
Index: lower.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/lower.cc,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 lower.cc
--- lower.cc 3 Apr 2005 23:41:56 -0000 1.1.2.10
+++ lower.cc 3 Apr 2005 23:44:10 -0000
@@ -1142,11 +1142,9 @@
int where = base_pc + get4 (bytes, pc);
tree case_label = build3 (CASE_LABEL_EXPR, NULL_TREE,
build_int (i), NULL_TREE, label);
- tsi_link_after (&body_statements, case_label,
- TSI_CONTINUE_LINKING);
- tsi_link_after (&body_statements,
- build1 (GOTO_EXPR, void_type_node,
- find_label (where)),
+ tsi_link_after (&out, case_label, TSI_CONTINUE_LINKING);
+ tsi_link_after (&out, build1 (GOTO_EXPR, void_type_node,
+ find_label (where)),
TSI_CONTINUE_LINKING);
}
@@ -1154,11 +1152,10 @@
DECL_CONTEXT (label) = current_block;
tree def_label = build3 (CASE_LABEL_EXPR, void_type_node,
NULL_TREE, NULL_TREE, label);
- tsi_link_after (&body_statements, def_label, TSI_CONTINUE_LINKING);
+ tsi_link_after (&out, def_label, TSI_CONTINUE_LINKING);
- tsi_link_after (&body_statements,
- build1 (GOTO_EXPR, void_type_node,
- find_label (base_pc + def)),
+ tsi_link_after (&out, build1 (GOTO_EXPR, void_type_node,
+ find_label (base_pc + def)),
TSI_CONTINUE_LINKING);
insn = build3 (SWITCH_EXPR, type_jint, expr, body_statements,
@@ -1191,11 +1188,9 @@
tree case_label = build3 (CASE_LABEL_EXPR, void_type_node,
build_int (match), NULL_TREE,
label);
- tsi_link_after (&body_statements, case_label,
- TSI_CONTINUE_LINKING);
- tsi_link_after (&body_statements,
- build1 (GOTO_EXPR, void_type_node,
- find_label (dest)),
+ tsi_link_after (&out, case_label, TSI_CONTINUE_LINKING);
+ tsi_link_after (&out, build1 (GOTO_EXPR, void_type_node,
+ find_label (dest)),
TSI_CONTINUE_LINKING);
}
@@ -1204,11 +1199,10 @@
tree def_label = build3 (CASE_LABEL_EXPR, void_type_node,
NULL_TREE, NULL_TREE, label);
- tsi_link_after (&body_statements, def_label, TSI_CONTINUE_LINKING);
+ tsi_link_after (&out, def_label, TSI_CONTINUE_LINKING);
- tsi_link_after (&body_statements,
- build1 (GOTO_EXPR, void_type_node,
- find_label (base_pc + def)),
+ tsi_link_after (&out, build1 (GOTO_EXPR, void_type_node,
+ find_label (base_pc + def)),
TSI_CONTINUE_LINKING);
insn = build3 (SWITCH_EXPR, type_jint, expr, body_statements,
Index: classobj.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/classobj.cc,v
retrieving revision 1.1.2.18
diff -u -r1.1.2.18 classobj.cc
--- classobj.cc 9 Mar 2005 01:52:13 -0000 1.1.2.18
+++ classobj.cc 3 Apr 2005 23:44:10 -0000
@@ -300,7 +300,8 @@
tree type
= build_array_type (type_method_symbol,
- build_index_type (build_int_cst (type_jint, table.size ())));
+ build_index_type (build_int_cst (type_jint,
+ table.size ())));
result_syms = make_decl (type, result);
tree symtype