aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-07-15 14:31:28 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-07-15 14:31:28 +0000
commit910ad8dee56faaae9c25a6d026a39574937f6329 (patch)
tree44ed3312376cfb15e4d1e4daef8778e326affa24 /gcc/java
parentb05027be0c8c7ff62ae4372487161b3c6ce46947 (diff)
downloadgcc-910ad8dee56faaae9c25a6d026a39574937f6329.zip
gcc-910ad8dee56faaae9c25a6d026a39574937f6329.tar.gz
gcc-910ad8dee56faaae9c25a6d026a39574937f6329.tar.bz2
tree.h (DECL_CHAIN): Define.
gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. From-SVN: r162223
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog11
-rw-r--r--gcc/java/boehm.c4
-rw-r--r--gcc/java/class.c28
-rw-r--r--gcc/java/decl.c36
-rw-r--r--gcc/java/expr.c12
-rw-r--r--gcc/java/java-tree.h6
-rw-r--r--gcc/java/jcf-parse.c2
-rw-r--r--gcc/java/typeck.c8
-rw-r--r--gcc/java/verify-glue.c2
9 files changed, 60 insertions, 49 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index aeee56a5..372739f 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,14 @@
+2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
+
+ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
+ * boehm.c: Likewise.
+ * class.c: Likewise.
+ * decl.c: Likewise.
+ * expr.c: Likewise.
+ * jcf-parse.c: Likewise.
+ * typeck.c: Likewise.
+ * verify-glue.c: Likewise.
+
2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
* boehm.c: Include diagnostic-core.h in every file that includes
diff --git a/gcc/java/boehm.c b/gcc/java/boehm.c
index f775308..2a0690c 100644
--- a/gcc/java/boehm.c
+++ b/gcc/java/boehm.c
@@ -63,10 +63,10 @@ mark_reference_fields (tree field,
mask, ubit,
pointer_after_end, all_bits_set,
last_set_index, last_view_index);
- field = TREE_CHAIN (field);
+ field = DECL_CHAIN (field);
}
- for (; field != NULL_TREE; field = TREE_CHAIN (field))
+ for (; field != NULL_TREE; field = DECL_CHAIN (field))
{
HOST_WIDE_INT offset;
HOST_WIDE_INT size_bytes;
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 7734c59..78f77ab 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -782,7 +782,7 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type)
DECL_FUNCTION_INITIALIZED_CLASS_TABLE (fndecl) =
htab_create_ggc (50, htab_hash_pointer, htab_eq_pointer, NULL);
- TREE_CHAIN (fndecl) = TYPE_METHODS (this_class);
+ DECL_CHAIN (fndecl) = TYPE_METHODS (this_class);
TYPE_METHODS (this_class) = fndecl;
/* If pointers to member functions use the least significant bit to
@@ -853,7 +853,7 @@ add_field (tree klass, tree name, tree field_type, int flags)
tree field;
field = build_decl (input_location,
is_static ? VAR_DECL : FIELD_DECL, name, field_type);
- TREE_CHAIN (field) = TYPE_FIELDS (klass);
+ DECL_CHAIN (field) = TYPE_FIELDS (klass);
TYPE_FIELDS (klass) = field;
DECL_CONTEXT (field) = klass;
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (field);
@@ -1460,7 +1460,7 @@ make_field_value (tree fdecl)
field_address = build_address_of (fdecl);
index = (FIELD_STATIC (fdecl)
- ? TREE_CHAIN (TYPE_FIELDS (field_info_union_node))
+ ? DECL_CHAIN (TYPE_FIELDS (field_info_union_node))
: TYPE_FIELDS (field_info_union_node));
value = (FIELD_STATIC (fdecl)
? field_address
@@ -1599,7 +1599,7 @@ get_dispatch_vector (tree type)
}
for (method = TYPE_METHODS (type); method != NULL_TREE;
- method = TREE_CHAIN (method))
+ method = DECL_CHAIN (method))
{
tree method_index = get_method_index (method);
if (method_index != NULL_TREE
@@ -1842,13 +1842,13 @@ make_class_data (tree type)
/* Build Field array. */
field = TYPE_FIELDS (type);
while (field && DECL_ARTIFICIAL (field))
- field = TREE_CHAIN (field); /* Skip dummy fields. */
+ field = DECL_CHAIN (field); /* Skip dummy fields. */
if (field && DECL_NAME (field) == NULL_TREE)
- field = TREE_CHAIN (field); /* Skip dummy field for inherited data. */
+ field = DECL_CHAIN (field); /* Skip dummy field for inherited data. */
first_real_field = field;
/* First count static and instance fields. */
- for ( ; field != NULL_TREE; field = TREE_CHAIN (field))
+ for ( ; field != NULL_TREE; field = DECL_CHAIN (field))
{
if (! DECL_ARTIFICIAL (field))
{
@@ -1877,7 +1877,7 @@ make_class_data (tree type)
for (i = 0, field = first_real_field;
field != NULL_TREE;
- field = TREE_CHAIN (field), i++)
+ field = DECL_CHAIN (field), i++)
{
if (! DECL_ARTIFICIAL (field))
{
@@ -1894,7 +1894,7 @@ make_class_data (tree type)
}
for (field = first_real_field; field != NULL_TREE;
- field = TREE_CHAIN (field))
+ field = DECL_CHAIN (field))
{
if (! DECL_ARTIFICIAL (field))
{
@@ -1945,7 +1945,7 @@ make_class_data (tree type)
/* Build Method array. */
for (method = TYPE_METHODS (type);
- method != NULL_TREE; method = TREE_CHAIN (method))
+ method != NULL_TREE; method = DECL_CHAIN (method))
{
tree init;
if (METHOD_PRIVATE (method)
@@ -2390,7 +2390,7 @@ push_super_field (tree this_class, tree super_class)
base_decl = build_decl (input_location,
FIELD_DECL, NULL_TREE, super_class);
DECL_IGNORED_P (base_decl) = 1;
- TREE_CHAIN (base_decl) = TYPE_FIELDS (this_class);
+ DECL_CHAIN (base_decl) = TYPE_FIELDS (this_class);
TYPE_FIELDS (this_class) = base_decl;
DECL_SIZE (base_decl) = TYPE_SIZE (super_class);
DECL_SIZE_UNIT (base_decl) = TYPE_SIZE_UNIT (super_class);
@@ -2550,7 +2550,7 @@ add_miranda_methods (tree base_class, tree search_class)
will be correct. This code must match similar layout code in the
runtime. */
for (method_decl = TYPE_METHODS (elt);
- method_decl; method_decl = TREE_CHAIN (method_decl))
+ method_decl; method_decl = DECL_CHAIN (method_decl))
{
tree sig, override;
@@ -2614,7 +2614,7 @@ layout_class_methods (tree this_class)
TYPE_METHODS (this_class) = nreverse (TYPE_METHODS (this_class));
for (method_decl = TYPE_METHODS (this_class);
- method_decl; method_decl = TREE_CHAIN (method_decl))
+ method_decl; method_decl = DECL_CHAIN (method_decl))
dtable_count = layout_class_method (this_class, super_class,
method_decl, dtable_count);
@@ -2629,7 +2629,7 @@ get_interface_method_index (tree method, tree interface)
tree meth;
int i = 1;
- for (meth = TYPE_METHODS (interface); ; meth = TREE_CHAIN (meth))
+ for (meth = TYPE_METHODS (interface); ; meth = DECL_CHAIN (meth))
{
if (meth == method)
return i;
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 5c112c3..36a2c29 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -825,7 +825,7 @@ java_init_decl_processing (void)
if (! flag_hash_synchronization)
PUSH_FIELD (input_location, object_type_node, field, "sync_info",
build_pointer_type (object_type_node));
- for (t = TYPE_FIELDS (object_type_node); t != NULL_TREE; t = TREE_CHAIN (t))
+ for (t = TYPE_FIELDS (object_type_node); t != NULL_TREE; t = DECL_CHAIN (t))
FIELD_PRIVATE (t) = 1;
FINISH_RECORD (object_type_node);
@@ -907,7 +907,7 @@ java_init_decl_processing (void)
PUSH_FIELD (input_location, class_type_node, field, "engine", ptr_type_node);
PUSH_FIELD (input_location,
class_type_node, field, "reflection_data", ptr_type_node);
- for (t = TYPE_FIELDS (class_type_node); t != NULL_TREE; t = TREE_CHAIN (t))
+ for (t = TYPE_FIELDS (class_type_node); t != NULL_TREE; t = DECL_CHAIN (t))
FIELD_PRIVATE (t) = 1;
push_super_field (class_type_node, object_type_node);
@@ -1215,7 +1215,7 @@ lookup_name_current_level (tree name)
if (IDENTIFIER_LOCAL_VALUE (name) == 0)
return 0;
- for (t = current_binding_level->names; t; t = TREE_CHAIN (t))
+ for (t = current_binding_level->names; t; t = DECL_CHAIN (t))
if (DECL_NAME (t) == name)
break;
@@ -1284,7 +1284,7 @@ pushdecl (tree x)
/* Put decls on list in reverse order.
We will reverse them later if necessary. */
- TREE_CHAIN (x) = b->names;
+ DECL_CHAIN (x) = b->names;
b->names = x;
return x;
@@ -1435,7 +1435,7 @@ poplevel (int keep, int reverse, int functionbody)
else
decls = current_binding_level->names;
- for (decl = decls; decl; decl = TREE_CHAIN (decl))
+ for (decl = decls; decl; decl = DECL_CHAIN (decl))
if (TREE_CODE (decl) == VAR_DECL
&& DECL_LANG_SPECIFIC (decl) != NULL
&& DECL_LOCAL_SLOT_NUMBER (decl))
@@ -1468,11 +1468,11 @@ poplevel (int keep, int reverse, int functionbody)
/* Copy decls from names list, ignoring labels. */
while (decl)
{
- tree next = TREE_CHAIN (decl);
+ tree next = DECL_CHAIN (decl);
if (TREE_CODE (decl) != LABEL_DECL)
{
*var = decl;
- var = &TREE_CHAIN (decl);
+ var = &DECL_CHAIN (decl);
}
decl = next;
}
@@ -1508,7 +1508,7 @@ poplevel (int keep, int reverse, int functionbody)
/* Clear out the meanings of the local variables of this level. */
- for (link = decls; link; link = TREE_CHAIN (link))
+ for (link = decls; link; link = DECL_CHAIN (link))
{
tree name = DECL_NAME (link);
if (name != 0 && IDENTIFIER_LOCAL_VALUE (name) == link)
@@ -1604,7 +1604,7 @@ maybe_pushlevels (int pc)
while (*ptr != NULL_TREE
&& DECL_LOCAL_START_PC (*ptr) <= pc
&& DECL_LOCAL_END_PC (*ptr) == end_pc)
- ptr = &TREE_CHAIN (*ptr);
+ ptr = &DECL_CHAIN (*ptr);
pending_local_decls = *ptr;
*ptr = NULL_TREE;
@@ -1614,7 +1614,7 @@ maybe_pushlevels (int pc)
{
tree t;
end_pc = current_binding_level->end_pc;
- for (t = decl; t != NULL_TREE; t = TREE_CHAIN (t))
+ for (t = decl; t != NULL_TREE; t = DECL_CHAIN (t))
DECL_LOCAL_END_PC (t) = end_pc;
}
@@ -1629,7 +1629,7 @@ maybe_pushlevels (int pc)
{
int index = DECL_LOCAL_SLOT_NUMBER (decl);
tree base_decl;
- next = TREE_CHAIN (decl);
+ next = DECL_CHAIN (decl);
push_jvm_slot (index, decl);
pushdecl (decl);
base_decl
@@ -1757,8 +1757,8 @@ give_name_to_locals (JCF *jcf)
&& (DECL_LOCAL_START_PC (*ptr) > start_pc
|| (DECL_LOCAL_START_PC (*ptr) == start_pc
&& DECL_LOCAL_END_PC (*ptr) < end_pc)))
- ptr = &TREE_CHAIN (*ptr);
- TREE_CHAIN (decl) = *ptr;
+ ptr = &DECL_CHAIN (*ptr);
+ DECL_CHAIN (decl) = *ptr;
*ptr = decl;
}
}
@@ -1767,7 +1767,7 @@ give_name_to_locals (JCF *jcf)
/* Fill in default names for the parameters. */
for (parm = DECL_ARGUMENTS (current_function_decl), i = 0;
- parm != NULL_TREE; parm = TREE_CHAIN (parm), i++)
+ parm != NULL_TREE; parm = DECL_CHAIN (parm), i++)
{
if (DECL_NAME (parm) == NULL_TREE)
{
@@ -1840,7 +1840,7 @@ start_java_method (tree fndecl)
DECL_ARG_TYPE (parm_decl) = parm_type;
*ptr = parm_decl;
- ptr = &TREE_CHAIN (parm_decl);
+ ptr = &DECL_CHAIN (parm_decl);
/* Add parm_decl to the decl_map. */
push_jvm_slot (i, parm_decl);
@@ -1993,7 +1993,7 @@ java_mark_class_local (tree klass)
{
tree t;
- for (t = TYPE_FIELDS (klass); t ; t = TREE_CHAIN (t))
+ for (t = TYPE_FIELDS (klass); t ; t = DECL_CHAIN (t))
if (FIELD_STATIC (t))
{
if (DECL_EXTERNAL (t))
@@ -2001,7 +2001,7 @@ java_mark_class_local (tree klass)
java_mark_decl_local (t);
}
- for (t = TYPE_METHODS (klass); t ; t = TREE_CHAIN (t))
+ for (t = TYPE_METHODS (klass); t ; t = DECL_CHAIN (t))
if (!METHOD_ABSTRACT (t))
{
if (METHOD_NATIVE (t) && !flag_jni)
@@ -2089,7 +2089,7 @@ java_add_local_var (tree decl)
{
tree *vars = &current_binding_level->names;
tree next = *vars;
- TREE_CHAIN (decl) = next;
+ DECL_CHAIN (decl) = next;
*vars = decl;
DECL_CONTEXT (decl) = current_function_decl;
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl);
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 3f51719..3c987c5 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1634,7 +1634,7 @@ lookup_field (tree *typep, tree name)
tree save_field;
int i;
- for (field = TYPE_FIELDS (*typep); field; field = TREE_CHAIN (field))
+ for (field = TYPE_FIELDS (*typep); field; field = DECL_CHAIN (field))
if (DECL_NAME (field) == name)
return field;
@@ -1952,7 +1952,7 @@ attach_init_test_initialization_flags (void **entry, void *ptr)
if (TREE_CODE (block) == BIND_EXPR)
{
tree body = BIND_EXPR_BODY (block);
- TREE_CHAIN (ite->value) = BIND_EXPR_VARS (block);
+ DECL_CHAIN (ite->value) = BIND_EXPR_VARS (block);
BIND_EXPR_VARS (block) = ite->value;
body = build2 (COMPOUND_EXPR, void_type_node,
build1 (DECL_EXPR, void_type_node, ite->value), body);
@@ -2239,7 +2239,7 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED,
lookup_field (&class_type_node, methods_ident),
NULL_TREE);
for (meth = TYPE_METHODS (self_type);
- ; meth = TREE_CHAIN (meth))
+ ; meth = DECL_CHAIN (meth))
{
if (method == meth)
break;
@@ -2643,7 +2643,7 @@ build_jni_stub (tree method)
res_var = build_decl (input_location, VAR_DECL, get_identifier ("res"),
TREE_TYPE (TREE_TYPE (method)));
DECL_CONTEXT (res_var) = method;
- TREE_CHAIN (env_var) = res_var;
+ DECL_CHAIN (env_var) = res_var;
}
method_args = DECL_ARGUMENTS (method);
@@ -2673,7 +2673,7 @@ build_jni_stub (tree method)
/* All the arguments to this method become arguments to the
underlying JNI function. If we had to wrap object arguments in a
special way, we would do that here. */
- for (tem = method_args; tem != NULL_TREE; tem = TREE_CHAIN (tem))
+ for (tem = method_args; tem != NULL_TREE; tem = DECL_CHAIN (tem))
{
int arg_bits = TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (tem)));
#ifdef PARM_BOUNDARY
@@ -3779,7 +3779,7 @@ promote_arguments (void)
int i;
tree arg;
for (arg = DECL_ARGUMENTS (current_function_decl), i = 0;
- arg != NULL_TREE; arg = TREE_CHAIN (arg), i++)
+ arg != NULL_TREE; arg = DECL_CHAIN (arg), i++)
{
tree arg_type = TREE_TYPE (arg);
if (INTEGRAL_TYPE_P (arg_type)
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index ccaa0e3..110eb83 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -1461,7 +1461,7 @@ extern tree *type_map;
if (TYPE_FIELDS (RTYPE) == NULL_TREE) \
TYPE_FIELDS (RTYPE) = _field; \
else \
- TREE_CHAIN(FIELD) = _field; \
+ DECL_CHAIN(FIELD) = _field; \
DECL_CONTEXT (_field) = (RTYPE); \
DECL_ARTIFICIAL (_field) = 1; \
FIELD = _field; }
@@ -1485,7 +1485,7 @@ extern tree *type_map;
do \
{ \
constructor_elt *_elt___ = VEC_last (constructor_elt, V); \
- tree _next___ = TREE_CHAIN (_elt___->index); \
+ tree _next___ = DECL_CHAIN (_elt___->index); \
gcc_assert (!DECL_NAME (_elt___->index)); \
_elt___->value = VALUE; \
CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \
@@ -1499,7 +1499,7 @@ extern tree *type_map;
do \
{ \
constructor_elt *_elt___ = VEC_last (constructor_elt, V); \
- tree _next___ = TREE_CHAIN (_elt___->index); \
+ tree _next___ = DECL_CHAIN (_elt___->index); \
gcc_assert (strcmp (IDENTIFIER_POINTER (DECL_NAME (_elt___->index)), \
NAME) == 0); \
_elt___->value = VALUE; \
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index 10d1c80..c27d4b5 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -1571,7 +1571,7 @@ parse_class_file (void)
gen_indirect_dispatch_tables (current_class);
for (method = TYPE_METHODS (current_class);
- method != NULL_TREE; method = TREE_CHAIN (method))
+ method != NULL_TREE; method = DECL_CHAIN (method))
{
JCF *jcf = current_jcf;
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 91d7188..dca14ab 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -211,7 +211,7 @@ java_array_type_length (tree array_type)
tree arfld;
if (TREE_CODE (array_type) == POINTER_TYPE)
array_type = TREE_TYPE (array_type);
- arfld = TREE_CHAIN (TREE_CHAIN (TYPE_FIELDS (array_type)));
+ arfld = DECL_CHAIN (DECL_CHAIN (TYPE_FIELDS (array_type)));
if (arfld != NULL_TREE)
{
tree index_type = TYPE_DOMAIN (TREE_TYPE (arfld));
@@ -306,7 +306,7 @@ build_java_array_type (tree element_type, HOST_WIDE_INT length)
arfld = build_decl (input_location,
FIELD_DECL, get_identifier ("data"), atype);
DECL_CONTEXT (arfld) = t;
- TREE_CHAIN (fld) = arfld;
+ DECL_CHAIN (fld) = arfld;
DECL_ALIGN (arfld) = TYPE_ALIGN (element_type);
/* We could layout_class, but that loads java.lang.Object prematurely.
@@ -644,7 +644,7 @@ shallow_find_method (tree searched_class, int flags, tree method_name,
{
tree method;
for (method = TYPE_METHODS (searched_class);
- method != NULL_TREE; method = TREE_CHAIN (method))
+ method != NULL_TREE; method = DECL_CHAIN (method))
{
tree method_sig = (*signature_builder) (TREE_TYPE (method));
if (DECL_NAME (method) == method_name && method_sig == signature)
@@ -779,7 +779,7 @@ tree
lookup_java_constructor (tree clas, tree method_signature)
{
tree method = TYPE_METHODS (clas);
- for ( ; method != NULL_TREE; method = TREE_CHAIN (method))
+ for ( ; method != NULL_TREE; method = DECL_CHAIN (method))
{
tree method_sig = build_java_signature (TREE_TYPE (method));
if (DECL_CONSTRUCTOR_P (method) && method_sig == method_signature)
diff --git a/gcc/java/verify-glue.c b/gcc/java/verify-glue.c
index 02267b4..78d3549 100644
--- a/gcc/java/verify-glue.c
+++ b/gcc/java/verify-glue.c
@@ -365,7 +365,7 @@ vfy_class_has_field (vfy_jclass klass, vfy_string name,
if (DECL_NAME (field) == name
&& build_java_signature (TREE_TYPE (field)) == signature)
return true;
- field = TREE_CHAIN (field);
+ field = DECL_CHAIN (field);
}
return false;
}