aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-08-20 12:48:59 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-08-20 12:48:59 +0000
commitac47786e993ddb3c50545230d13f57df891c0562 (patch)
tree7983da0de4d80a3a7b43caa30ccd5dc36d8bf25e /gcc/java
parent8f0fe813790d58066714c8f38f4916925c83517d (diff)
downloadgcc-ac47786e993ddb3c50545230d13f57df891c0562.zip
gcc-ac47786e993ddb3c50545230d13f57df891c0562.tar.gz
gcc-ac47786e993ddb3c50545230d13f57df891c0562.tar.bz2
vec.h (FOR_EACH_VEC_ELT): Define.
gcc/ * vec.h (FOR_EACH_VEC_ELT): Define. * c-decl.c: Use it. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/bfin/bfin.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * dominance.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * ggc-common.c: Likewise. * gimplify.c: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * ipa-prop.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * lambda-code.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-opts.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-symtab.c: Likewise. * matrix-reorg.c: Likewise. * opts.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-data-ref.c: Likewise. * tree-emutls.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Use FOR_EACH_VEC_ELT. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. gcc/c-family/ * c-common.c: Use FOR_EACH_VEC_ELT. * c-gimplify.c: Likewise. * c-pragma.c: Likewise. gcc/cp/ * call.c: Use FOR_EACH_VEC_ELT. * class.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * error.c: Likewise. * except.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * repo.c: Likewise. * semantics.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * trans-openmp.c: Use FOR_EACH_VEC_ELT. gcc/java/ * class.c: Use FOR_EACH_VEC_ELT. * expr.c: Likewise. * jcf-parse.c: Likewise. * resource.c: Likewise. gcc/lto/ * lto.c: Use FOR_EACH_VEC_ELT. From-SVN: r163401
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/class.c12
-rw-r--r--gcc/java/expr.c2
-rw-r--r--gcc/java/jcf-parse.c6
-rw-r--r--gcc/java/resource.c2
5 files changed, 17 insertions, 12 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index d0da14b..d45aa33 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
+
+ * class.c: Use FOR_EACH_VEC_ELT.
+ * expr.c: Likewise.
+ * jcf-parse.c: Likewise.
+ * resource.c: Likewise.
+
2010-08-16 Joseph Myers <joseph@codesourcery.com>
* lang.opt (MD_, MMD_, version): Mark RejectDriver.
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 6ce8b85..ece261b 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -1544,9 +1544,7 @@ make_method_value (tree mdecl)
e = VEC_index (constructor_elt, v, idx--);
e->value = null_pointer_node;
- for (ix = 0;
- VEC_iterate (tree, DECL_FUNCTION_THROWS (mdecl), ix, t);
- ix++)
+ FOR_EACH_VEC_ELT (tree, DECL_FUNCTION_THROWS (mdecl), ix, t)
{
tree sig = DECL_NAME (TYPE_NAME (t));
tree utf8
@@ -2762,7 +2760,7 @@ emit_indirect_register_classes (tree *list_p)
VAR_DECL, get_identifier ("_Jv_CLS"),
class_array_type);
tree reg_class_list;
- for (i = 0; VEC_iterate (tree, registered_class, i, klass); ++i)
+ FOR_EACH_VEC_ELT (tree, registered_class, i, klass)
{
t = fold_convert (ptr_type_node, build_static_class_ref (klass));
CONSTRUCTOR_APPEND_ELT (init, NULL_TREE, t);
@@ -2834,7 +2832,7 @@ emit_register_classes (tree *list_p)
#endif
assemble_align (POINTER_SIZE);
- for (i = 0; VEC_iterate (tree, registered_class, i, klass); ++i)
+ FOR_EACH_VEC_ELT (tree, registered_class, i, klass)
{
t = build_fold_addr_expr (klass);
output_constant (t, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE);
@@ -2852,7 +2850,7 @@ emit_register_classes (tree *list_p)
DECL_EXTERNAL (t) = 1;
register_class_fn = t;
- for (i = 0; VEC_iterate (tree, registered_class, i, klass); ++i)
+ FOR_EACH_VEC_ELT (tree, registered_class, i, klass)
{
t = build_fold_addr_expr (klass);
t = build_call_expr (register_class_fn, 1, t);
@@ -2928,7 +2926,7 @@ emit_symbol_table (tree name, tree the_table,
return the_table;
/* Build a list of _Jv_MethodSymbols for each entry in otable_methods. */
- for (index = 0; VEC_iterate (method_entry, decl_table, index, e); index++)
+ FOR_EACH_VEC_ELT (method_entry, decl_table, index, e)
CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
build_symbol_entry (e->method, e->special));
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 3c987c5..9f9667f 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2296,7 +2296,7 @@ get_symbol_table_index (tree t, tree special,
method_entry *e;
unsigned i;
- for (i = 0; VEC_iterate (method_entry, *symbol_table, i, e); i++)
+ FOR_EACH_VEC_ELT (method_entry, *symbol_table, i, e)
if (t == e->method && special == e->special)
goto done;
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index c27d4b5..cb486ae 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -1683,7 +1683,7 @@ predefined_filename_p (tree node)
unsigned ix;
tree f;
- for (ix = 0; VEC_iterate (tree, predefined_filenames, ix, f); ix++)
+ FOR_EACH_VEC_ELT (tree, predefined_filenames, ix, f)
if (f == node)
return 1;
@@ -1869,7 +1869,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
}
current_jcf = main_jcf;
- for (ix = 0; VEC_iterate (tree, current_file_list, ix, node); ix++)
+ FOR_EACH_VEC_ELT (tree, current_file_list, ix, node)
{
unsigned char magic_string[4];
char *real_path;
@@ -1956,7 +1956,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
}
}
- for (ix = 0; VEC_iterate (tree, current_file_list, ix, node); ix++)
+ FOR_EACH_VEC_ELT (tree, current_file_list, ix, node)
{
input_location = DECL_SOURCE_LOCATION (node);
if (CLASS_FILE_P (node))
diff --git a/gcc/java/resource.c b/gcc/java/resource.c
index d96d2d8..f954024 100644
--- a/gcc/java/resource.c
+++ b/gcc/java/resource.c
@@ -107,7 +107,7 @@ write_resource_constructor (tree *list_p)
register_resource_fn = t;
/* Write out entries in the same order in which they were defined. */
- for (ix = 0; VEC_iterate (tree, resources, ix, decl); ix++)
+ FOR_EACH_VEC_ELT (tree, resources, ix, decl)
{
t = build_fold_addr_expr (decl);
t = build_call_expr (register_resource_fn, 1, t);