New C++ ABI: patches.

Alexandre Petit-Bianco apbianco@cygnus.com
Sat Jan 13 09:39:00 GMT 2001


Mark Mitchell writes:
> First, the ChangeLog is wrong (it's class.c) and second there are
> C++-style comments in the patch. :-)

Hehe, that's funny. 
> Constructors always wrote the vtable at the beginning of the
> constructor; that's what they're supposed to do.

This is the first time we use a C++ constructor to initialize a Java
object, I think.
./A
2001年01月12日 Alexandre Petit-Bianco <apbianco@cygnus.com>
	* cp/class.c: (dfs_accumulate_vtbl_inits): No accumulation for
	Java type. 
Index: class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.355
diff -u -p -r1.355 class.c
--- class.c	2001年01月10日 23:06:26	1.355
+++ class.c	2001年01月13日 17:33:57
@@ -7156,7 +7156,10 @@ dfs_accumulate_vtbl_inits (binfo, orig_b
 {
 tree inits = NULL_TREE;
 
- if (BINFO_NEW_VTABLE_MARKED (orig_binfo, t))
+ if (BINFO_NEW_VTABLE_MARKED (orig_binfo, t)
+ /* Don't accumulate for Java types. Java object ctors written in
+	 C++ shouldn't fix the vtbl. */
+ && !TYPE_FOR_JAVA (BINFO_TYPE (binfo)))
 {
 tree vtbl;
 tree index;


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /