aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@cygnus.com>2000-03-04 22:27:35 +0000
committerTom Tromey <tromey@gcc.gnu.org>2000-03-04 22:27:35 +0000
commit5830574a1674fe8a174ad4f1d21b152215b6e5ab (patch)
treed44828096a384e2296cf383320872e7308002f92 /gcc/java/class.c
parent0f9c645ea579c48499360de5b2bd4c8cd281c767 (diff)
downloadgcc-5830574a1674fe8a174ad4f1d21b152215b6e5ab.zip
gcc-5830574a1674fe8a174ad4f1d21b152215b6e5ab.tar.gz
gcc-5830574a1674fe8a174ad4f1d21b152215b6e5ab.tar.bz2
Makefile.in (JAVA_OBJS): Added boehm.o.
* Makefile.in (JAVA_OBJS): Added boehm.o. (boehm.o): New target. * Make-lang.in (JAVA_SRCS): Added boehm.c. * java-tree.h (flag_use_boehm_gc): Declare. (get_boehm_type_descriptor): Declare. * lang.c (lang_f_options): Added `use-boehm-gc'. (flag_use_boehm_gc): New global. * lang-options.h: Added -fuse-boehm-gc. * boehm.c: New file. * class.c (get_dispatch_table): If class uses a Boehm type descriptor, put it in the vtable. (make_class_data): Removed dead code. From-SVN: r32331
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index af56f74..f5cfd88 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -1172,8 +1172,11 @@ get_dispatch_table (type, this_class_addr)
build1 (ADDR_EXPR, nativecode_ptr_type_node, method),
list);
}
- /* Dummy entry for compatibility with G++ -fvtable-thunks. */
- list = tree_cons (integer_zero_node, null_pointer_node, list);
+ /* Dummy entry for compatibility with G++ -fvtable-thunks. When
+ using the Boehm GC we sometimes stash a GC type descriptor
+ there. */
+ list = tree_cons (integer_zero_node, get_boehm_type_descriptor (type),
+ list);
list = tree_cons (integer_zero_node, this_class_addr, list);
return build (CONSTRUCTOR, build_prim_array_type (nativecode_ptr_type_node,
nvirtuals + 2),
@@ -1343,12 +1346,8 @@ make_class_data (type)
constant_pool_constructor = build_constants_constructor ();
START_RECORD_CONSTRUCTOR (temp, object_type_node);
-#if 0
- PUSH_FIELD_VALUE (temp, "vtable", NULL_TREE);
-#else
PUSH_FIELD_VALUE (temp, "vtable",
build1 (ADDR_EXPR, dtable_ptr_type, class_dtable_decl));
-#endif
PUSH_FIELD_VALUE (temp, "sync_info", null_pointer_node);
FINISH_RECORD_CONSTRUCTOR (temp);
START_RECORD_CONSTRUCTOR (cons, class_type_node);