aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/gcj.texi
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2006-03-15 19:10:23 +0000
committerDavid Daney <daney@gcc.gnu.org>2006-03-15 19:10:23 +0000
commitdba370a8290f518f2274b1dd8da3459aa1844f65 (patch)
tree7dd173d7486d8928413e09b912a0357b143e2a68 /gcc/java/gcj.texi
parent492edb3ac5fbdee5d8383af723610f5dbc589214 (diff)
downloadgcc-dba370a8290f518f2274b1dd8da3459aa1844f65.zip
gcc-dba370a8290f518f2274b1dd8da3459aa1844f65.tar.gz
gcc-dba370a8290f518f2274b1dd8da3459aa1844f65.tar.bz2
lang.opt (-freduced-reflection): New option.
* lang.opt (-freduced-reflection): New option. * lang.c (java_post_options): Generate an error if -freduced-reflection used with -fjni or -findirect-dispatch. * java-tree.h (flag_reduced_reflection): Declare new variable. * boehm.c (get_boehm_type_descriptor): Indicate all pointers if bitmap overflows and flag_reduced_reflection set. * class.c (uses_jv_markobj_p): New function. (make_class_data): Moved generation of vtable to before reflection data, generate less reflection data if flag_reduced_reflection set. * gcj.texi: Document -freduced-reflection. From-SVN: r112095
Diffstat (limited to 'gcc/java/gcj.texi')
-rw-r--r--gcc/java/gcj.texi22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi
index 84659a54..ae7bcb7 100644
--- a/gcc/java/gcj.texi
+++ b/gcc/java/gcj.texi
@@ -546,6 +546,28 @@ This is convenient, as it means that things like
@code{Class.forName()} will search @samp{CLASSPATH} to find the
desired class.
+@item -freduced-reflection
+This option causes the code generated by @command{gcj} to contain a
+reduced amount of the class meta-data used to support runtime
+reflection. The cost of this savings is the loss of
+the ability to use certain reflection capabilities of the standard
+Java runtime environment. When set all meta-data except for that
+which is needed to obtain correct runtime semantics is eliminated.
+
+For code that does not use reflection (i.e. the methods in the
+@code{java.lang.reflect} package), @code{-freduced-reflection}
+will result in proper operation with a savings in executable code size.
+
+JNI (@code{-fjni}) and the binary compatibility ABI
+(@code{-findirect-dispatch}) do not work properly without full
+reflection meta-data. Because of this, it is an error to use these options
+with @code{-freduced-reflection}.
+
+@strong{Caution:} If there is no reflection meta-data, code that uses
+a @code{SecurityManager} may not work properly. Also calling
+@code{Class.forName()} may fail if the calling method has no
+reflection meta-data.
+
@end table