diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-05-26 19:27:58 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-05-26 19:27:58 +0000 |
commit | 6484716cf617de9bf0fbca8d1003fbc30898acc0 (patch) | |
tree | 10c996e7a3c75332fea7e26d8c2da608d15ddad6 /gcc/java/class.c | |
parent | ab9b814d258a26fc74f370b8fdb2b9250088794c (diff) | |
download | gcc-6484716cf617de9bf0fbca8d1003fbc30898acc0.zip gcc-6484716cf617de9bf0fbca8d1003fbc30898acc0.tar.gz gcc-6484716cf617de9bf0fbca8d1003fbc30898acc0.tar.bz2 |
java-tree.h (struct lang_decl_func): Change type of throws_list field to a VEC.
* java-tree.h (struct lang_decl_func): Change type of throws_list
field to a VEC.
* jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
of DECL_FUNCTION_THROWS.
* class.c (make_method_value): Likewise.
From-SVN: r159899
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 5f91ddc..49299b8 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1519,18 +1519,19 @@ make_method_value (tree mdecl) { /* Compute the `throws' information for the method. */ tree table = null_pointer_node; - if (DECL_FUNCTION_THROWS (mdecl) != NULL_TREE) + if (DECL_FUNCTION_THROWS (mdecl) != NULL) { - int length = 1 + list_length (DECL_FUNCTION_THROWS (mdecl)); - tree iter, type, array; + int length = 1 + VEC_length (tree, DECL_FUNCTION_THROWS (mdecl)); + tree t, type, array; char buf[60]; + unsigned ix; table = tree_cons (NULL_TREE, table, NULL_TREE); - for (iter = DECL_FUNCTION_THROWS (mdecl); - iter != NULL_TREE; - iter = TREE_CHAIN (iter)) + for (ix = 0; + VEC_iterate (tree, DECL_FUNCTION_THROWS (mdecl), ix, t); + ix++) { - tree sig = DECL_NAME (TYPE_NAME (TREE_VALUE (iter))); + tree sig = DECL_NAME (TYPE_NAME (t)); tree utf8 = build_utf8_ref (unmangle_classname (IDENTIFIER_POINTER (sig), IDENTIFIER_LENGTH (sig))); |