aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/boehm.c
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/boehm.c
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/boehm.c')
-rw-r--r--gcc/java/boehm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/java/boehm.c b/gcc/java/boehm.c
index 1bfe9e5..6ea5944 100644
--- a/gcc/java/boehm.c
+++ b/gcc/java/boehm.c
@@ -1,5 +1,5 @@
/* Functions related to the Boehm garbage collector.
- Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GCC.
@@ -184,7 +184,7 @@ get_boehm_type_descriptor (tree type)
/* If the object is all pointers, or if the part with pointers fits
in our bitmap, then we are ok. Otherwise we have to allocate it
a different way. */
- if (all_bits_set != -1)
+ if (all_bits_set != -1 || (pointer_after_end && flag_reduced_reflection))
{
/* In this case the initial part of the object is all reference
fields, and the end of the object is all non-reference
@@ -193,7 +193,12 @@ get_boehm_type_descriptor (tree type)
this:
value = DS_LENGTH | WORDS_TO_BYTES (last_set_index + 1);
DS_LENGTH is 0.
- WORDS_TO_BYTES shifts by log2(bytes-per-pointer). */
+ WORDS_TO_BYTES shifts by log2(bytes-per-pointer).
+
+ In the case of flag_reduced_reflection and the bitmap would
+ overflow, we tell the gc that the object is all pointers so
+ that we don't have to emit reflection data for run time
+ marking. */
count = 0;
low = 0;
high = 0;