diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-28 11:40:29 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-28 11:40:29 +0000 |
commit | c738784ca82d62c8e380057ba9ca0ed0fa4b2d77 (patch) | |
tree | 6daf1252f43021f81274da35d2f5f16541eaedb2 /gcc/java/gcj.texi | |
parent | 118089327d089e28604d4ea29b4af3b02d7d4675 (diff) | |
download | gcc-c738784ca82d62c8e380057ba9ca0ed0fa4b2d77.tar.gz |
* expr.c (java_array_data_offset): Removed function.
(JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
(build_java_array_length_access): Obtain "length" value using a
COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
(build_java_arrayaccess): Correct comment. Access "data" using a
COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
(build_java_arraystore_check): New function.
(expand_java_arraystore): Use build_java_arraystore_check.
* parse.y (patch_assignment): Simplify code to insert a store check
when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
* check-init.c (check_init): Update to reflect that an array length
access is now a COMPONENT_REF.
* gcj.texi (Code Generation): Improve documentation of
-fno-bounds-check. Add documentation for -fno-store-check.
* java-tree.h (flag_store_check): Declare.
(build_java_arraystore_check): Declare.
* lang.c (flag_store_check): Initialize to 1.
(lang_f_options): Add store-check option.
* jvspec.c: Don't pass store-check option to jvgenmain.
* lang-options.h: Add help string for -fno-store-check.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50129 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/gcj.texi')
-rw-r--r-- | gcc/java/gcj.texi | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi index e7b97d26df7..e88e8fb2cde 100644 --- a/gcc/java/gcj.texi +++ b/gcc/java/gcj.texi @@ -392,9 +392,20 @@ directory. @item -fno-bounds-check By default, @code{gcj} generates code which checks the bounds of all -array indexing operations. With this option, these checks are omitted. -Note that this can result in unpredictable behavior if the code in -question actually does violate array bounds constraints. +array indexing operations. With this option, these checks are omitted, which +can improve performance for code that uses arrays extensively. Note that this +can result in unpredictable behavior if the code in question actually does +violate array bounds constraints. It is safe to use this option if you are +sure that your code will never throw an @code{ArrayIndexOutOfBoundsException}. + +@item -fno-store-check +Don't generate array store checks. When storing objects into arrays, a runtime +check is normally generated in order to ensure that the object is assignment +compatible with the component type of the array (which may not be known +at compile-time). With this option, these checks are omitted. This can +improve performance for code which stores objects into arrays frequently. +It is safe to use this option if you are sure your code will never throw an +@code{ArrayStoreException}. @item -fjni With @code{gcj} there are two options for writing native methods: CNI |