diff options
author | Tom Tromey <tromey@redhat.com> | 2004-11-09 23:27:55 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2004-11-09 23:27:55 +0000 |
commit | 9c07f89fd30041b78649eb68208431e0dff05493 (patch) | |
tree | 1481cea515f71e5316191fd10576af77f908572b | |
parent | 6f5ca99263063da81d0938347886e6dc08a0cc25 (diff) |
* expr.c (build_java_arraystore_check): Still generate check if
element type is itself an array.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcj-abi-2-dev-branch@90372 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/expr.c | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 53698cfe5d0..f781f10c9c6 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2004-11-09 Tom Tromey <tromey@redhat.com> + + * expr.c (build_java_arraystore_check): Still generate check if + element type is itself an array. + 2004-11-08 Tom Tromey <tromey@redhat.com> * java-tree.h (soft_check_assignment_node): Removed. diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 50c740744e0..721b1efd2ed 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -969,14 +969,14 @@ build_java_arraystore_check (tree array, tree object) if (!flag_store_check) return build1 (NOP_EXPR, array_type_p, array); - /* No check is needed if the element type is final or is itself an array. - Also check that element_type matches object_type, since in the bytecode - compilation case element_type may be the actual element type of the array - rather than its declared type. However, if we're doing indirect - dispatch, we can't do the `final' optimization. */ + /* No check is needed if the element type is final. Also check that + element_type matches object_type, since in the bytecode + compilation case element_type may be the actual element type of + the array rather than its declared type. However, if we're doing + indirect dispatch, we can't do the `final' optimization. */ if (element_type == object_type - && (TYPE_ARRAY_P (TREE_TYPE (element_type)) - || (! flag_indirect_dispatch && CLASS_FINAL (element_type)))) + && ! flag_indirect_dispatch + && CLASS_FINAL (element_type)) return build1 (NOP_EXPR, array_type_p, array); /* OBJECT might be wrapped by a SAVE_EXPR. */ |