ooo-build r11378 - trunk/patches/test
- From: michael svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11378 - trunk/patches/test
- Date: Wed, 23 Jan 2008 15:51:47 +0000 (GMT)
Author: michael
Date: Wed Jan 23 15:51:47 2008
New Revision: 11378
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11378&view=rev
Log:
calm debug down ...
Modified:
trunk/patches/test/gcc-vt-copy-4.diff
Modified: trunk/patches/test/gcc-vt-copy-4.diff
==============================================================================
--- trunk/patches/test/gcc-vt-copy-4.diff (original)
+++ trunk/patches/test/gcc-vt-copy-4.diff Wed Jan 23 15:51:47 2008
@@ -12,7 +12,7 @@
diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/cp/class.c gcc-4.2.1-simple/gcc/cp/class.c
--- pristine-gcc-4.2.1-simple/gcc/cp/class.c 2007-07-05 10:02:39.000000000 +0100
-+++ gcc-4.2.1-simple/gcc/cp/class.c 2008-01-22 12:23:56.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/class.c 2008-01-23 15:48:56.000000000 +0000
@@ -181,8 +181,7 @@
static tree end_of_class (tree, int);
static bool layout_empty_base (tree, tree, splay_tree);
@@ -123,12 +123,12 @@
+ if (!dest_binfo || !bitmap)
+ return chain;
+
-+ fprintf (stderr, "Copy %s + %d => ",
++ /* fprintf (stderr, "Copy %s + %d => ",
+ type_as_string (src_binfo, TFF_PLAIN_IDENTIFIER),
+ src_offset);
-+ fprintf (stderr, " %s + %d mask 0x%x\n",
++ fprintf (stderr, " %s + %d mask 0x%x\n",
+ type_as_string (dest_binfo, TFF_PLAIN_IDENTIFIER),
-+ dest_offset, bitmap);
++ dest_offset, bitmap); */
+
+ elem = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, bitmap), elem);
+
@@ -154,7 +154,7 @@
{
tree list;
tree vbase;
-@@ -6662,8 +6761,397 @@
+@@ -6662,8 +6761,407 @@
accumulate_vtbl_inits (vbase, vbase, TYPE_BINFO (t), t, list);
}
@@ -181,8 +181,6 @@
+ if (list_only)
+ return NULL;
+
-+ fprintf (stderr, "vtinit list: type %s not found\n",
-+ type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER));
+ k = get_vtbl_decl_for_binfo (binfo);
+ if (k)
+ return CONSTRUCTOR_ELTS (DECL_INITIAL (k));
@@ -193,9 +191,6 @@
+static void
+set_vtinit_for_binfo (tree binfo, VEC(constructor_elt,gc) *vtinits)
+{
-+ /* FIXME: should we search for it first ? */
-+ fprintf (stderr, "vtinit list: add type %s\n",
-+ type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER));
+ vtable_copy_types = tree_cons (binfo, build_constructor (NULL_TREE, vtinits),
+ vtable_copy_types);
+}
@@ -207,6 +202,9 @@
+ unsigned HOST_WIDE_INT ix;
+ VEC(constructor_elt,gc) *vtable;
+
++ if (!getenv ("MOREDEBUG"))
++ return;
++
+ fprintf (stderr, "VTable for '%s'\n",
+ type_as_string (t, TFF_PLAIN_IDENTIFIER));
+
@@ -308,13 +306,18 @@
+ rec->dest = dest;
+ rec->bitmap = bitmap;
+ rec->offset = offset;
-+ fprintf (stderr, "Push frag 0x%x %d\n", bitmap, offset);
++ if (getenv ("MOREDEBUG"))
++ fprintf (stderr, "Push frag 0x%x %d\n", bitmap, offset);
+}
+
+static void
+debug_vt_copies (VEC(vt_copy_record,heap) *vt_copies)
+{
+ unsigned int i;
++
++ if (!getenv ("MOREDEBUG"))
++ return;
++
+ fprintf (stderr, "vtcopies: %d records\n", VEC_length(vt_copy_record, vt_copies));
+ for (i = 0; i < VEC_length(vt_copy_record, vt_copies); i++)
+ {
@@ -339,6 +342,7 @@
+ unsigned int i;
+ tree cgraph_clobber = NULL_TREE;
+ VEC(vt_copy_record,heap) *vt_copies;
++ int verbose_debug = getenv ("MOREDEBUG") != NULL;
+
+ vt_copies = VEC_alloc(vt_copy_record, heap, VEC_length(vt_fragment, dest_frags));
+
@@ -372,17 +376,19 @@
+ src_fn = TREE_OPERAND (src_fn, 0);
+ dest_fn = TREE_OPERAND (dest_fn, 0);
+
-+ if (src_fn == dest_fn)
++ if (src_fn == dest_fn && src_fn != abort_fndecl)
+ {
+ bitmap |= (1 << bits_set);
+ elide_leading_zeros = 0;
+ }
-+
-+ fprintf (stderr, "compare: %s %s %s (0x%x)\n",
-+ expr_as_string (src_fn, TFF_PLAIN_IDENTIFIER),
-+ src_fn == dest_fn ? "==" : "!=",
-+ expr_as_string (dest_fn, TFF_PLAIN_IDENTIFIER),
-+ bitmap);
++
++ if (verbose_debug)
++ fprintf (stderr, "compare: %s %s %s (0x%x) [%s]\n",
++ expr_as_string (src_fn, TFF_PLAIN_IDENTIFIER),
++ src_fn == dest_fn ? "==" : "!=",
++ expr_as_string (dest_fn, TFF_PLAIN_IDENTIFIER),
++ bitmap,
++ src_fn == abort_fndecl ? "pure-virt" : "non-pure virt");
+
+ if (!elide_leading_zeros)
+ bits_set++;
@@ -415,7 +421,8 @@
+ /* FIXME: copy & backup the original data before we mangle it
+ for future reference [!] */
+
-+ fprintf (stderr, "re-writing vtable:\n");
++ if (verbose_debug)
++ fprintf (stderr, "re-writing vtable:\n");
+ for (i = 0; i < VEC_length(vt_copy_record, vt_copies); i++)
+ {
+ unsigned int j, bitmap;
@@ -423,16 +430,18 @@
+
+ /* re-write the existing vtable intializer */
+ bitmap = vtc->bitmap;
-+ fprintf (stderr, "\tclobber from off %d + %d, bitmap 0x%x\n",
-+ vtc->dest->offset, vtc->offset, bitmap);
++ if (verbose_debug)
++ fprintf (stderr, "\tclobber from off %d + %d, bitmap 0x%x\n",
++ vtc->dest->offset, vtc->offset, bitmap);
+ for (j = vtc->dest->offset + vtc->offset; bitmap; j++, (bitmap>>=1))
+ {
+ if (bitmap & 1)
+ {
+ constructor_elt *elt = VEC_index (constructor_elt, vtable, j);
-+ fprintf (stderr, "\tclobber '%s' (0x%x)\n",
-+ expr_as_string (elt->value, TFF_PLAIN_IDENTIFIER),
-+ bitmap);
++ if (verbose_debug)
++ fprintf (stderr, "\tclobber '%s' (0x%x)\n",
++ expr_as_string (elt->value, TFF_PLAIN_IDENTIFIER),
++ bitmap);
+
+ { /* Lengthy Assertion */
+ constructor_elt *src_elt = VEC_index (constructor_elt, vtc->src->vec,
@@ -512,11 +521,12 @@
+ if (!get_vtinit_for_binfo (TYPE_BINFO (t), 1))
+ set_vtinit_for_binfo (TYPE_BINFO (t), vinits);
+ else
-+ fprintf (stderr, "already set!\n");
++ fprintf (stderr, "Error: already set!\n");
+
+ debug_vtable (t, TYPE_BINFO (t));
+
-+ fprintf (stderr, "Inherited from:\n");
++ if (getenv ("MOREDEBUG"))
++ fprintf (stderr, "Inherited from:\n");
+ for (i = 0; BINFO_BASE_ITERATE (TYPE_BINFO (t), i, base_binfo); i++)
+ {
+ tree btype = BINFO_TYPE (base_binfo);
@@ -529,18 +539,18 @@
+ for (i = 0; BINFO_BASE_ITERATE (TYPE_BINFO (t), i, base_binfo); i++)
+ vtdecompose_frags (TYPE_BINFO (BINFO_TYPE (base_binfo)), &src_frags);
+
-+ fprintf (stderr, "dest:\n");
-+ debug_fragments (dest_frags);
-+ fprintf (stderr, "src:\n");
-+ debug_fragments (src_frags);
++ if (getenv ("MOREDEBUG"))
++ {
++ fprintf (stderr, "dest:\n");
++ debug_fragments (dest_frags);
++ fprintf (stderr, "src:\n");
++ debug_fragments (src_frags);
++ }
+
+ if (inits) {
+ tree new_inits = compare_build_vtrelocs (t, vinits, dest_frags, src_frags);
+ if (new_inits)
-+ {
-+ fprintf (stderr, "Use new inits !\n");
-+ inits = new_inits;
-+ }
++ inits = new_inits;
+ }
+
+ vec_heap_free (dest_frags);
@@ -555,7 +565,7 @@
/* Initialize the vtable for BINFO with the INITS. */
diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/cp/cp-tree.h gcc-4.2.1-simple/gcc/cp/cp-tree.h
--- pristine-gcc-4.2.1-simple/gcc/cp/cp-tree.h 2007-07-24 09:14:47.000000000 +0100
-+++ gcc-4.2.1-simple/gcc/cp/cp-tree.h 2008-01-22 10:41:00.000000000 +0000
++++ gcc-4.2.1-simple/gcc/cp/cp-tree.h 2008-01-22 14:27:55.000000000 +0000
@@ -498,6 +498,7 @@
CPTI_UNKNOWN_TYPE,
CPTI_VTBL_TYPE,
@@ -595,10 +605,11 @@
extern void debug_class (tree);
extern void debug_thunks (tree);
extern tree cp_fold_obj_type_ref (tree, tree);
-@@ -4533,6 +4544,8 @@
+@@ -4533,6 +4544,9 @@
extern tree mangle_typeinfo_for_type (tree);
extern tree mangle_typeinfo_string_for_type (tree);
extern tree mangle_vtbl_for_type (tree);
++extern tree mangle_vtbl_for_type_local (tree);
+extern tree mangle_vtreloc_for_type (tree);
+extern tree mangle_vtreloc_section_for_type (tree);
extern tree mangle_vtt_for_type (tree);
@@ -654,8 +665,8 @@
pop_namespace ();
diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/cp/decl2.c gcc-4.2.1-simple/gcc/cp/decl2.c
--- pristine-gcc-4.2.1-simple/gcc/cp/decl2.c 2007-06-28 14:16:12.000000000 +0100
-+++ gcc-4.2.1-simple/gcc/cp/decl2.c 2008-01-21 19:50:44.000000000 +0000
-@@ -2910,6 +2910,40 @@
++++ gcc-4.2.1-simple/gcc/cp/decl2.c 2008-01-23 15:48:29.000000000 +0000
+@@ -2910,6 +2910,38 @@
finish_objects (function_key, priority, body);
}
@@ -667,8 +678,6 @@
+ if (!getenv ("VT_SHRINK"))
+ return;
+
-+ fprintf (stderr, "Generate_vtable_copy_slots\n");
-+
+ for (k = vtable_copy_slots; k; k = TREE_CHAIN(k))
+ {
+ tree t = TREE_PURPOSE(k);
@@ -696,7 +705,7 @@
/* Generate constructor and destructor functions for the priority
indicated by N. */
-@@ -3312,6 +3346,9 @@
+@@ -3312,6 +3344,9 @@
}
}
@@ -708,11 +717,32 @@
diff -u -r -x '*~' -x testsuite -x libjava -x cc-nptl -x build-dir -x '*.orig' -x obj-i586-suse-linux -x texis -x Makeconfig -x version.h -x '*.o' -x '*.1' -x 'Makefile*' -x 'config*' -x libtool -x '*.info' -x '*.tex' pristine-gcc-4.2.1-simple/gcc/cp/mangle.c gcc-4.2.1-simple/gcc/cp/mangle.c
--- pristine-gcc-4.2.1-simple/gcc/cp/mangle.c 2006-12-11 12:16:19.000000000 +0000
-+++ gcc-4.2.1-simple/gcc/cp/mangle.c 2008-01-22 10:56:33.000000000 +0000
-@@ -2670,6 +2670,79 @@
++++ gcc-4.2.1-simple/gcc/cp/mangle.c 2008-01-23 15:10:38.000000000 +0000
+@@ -2670,6 +2670,99 @@
return mangle_special_for_type (type, "TV");
}
++tree
++mangle_vtbl_for_type_local (const tree type)
++{
++ const char *result;
++
++ /* We don't have an actual decl here for the special component, so
++ we can't just process the <encoded-name>. Instead, fake it. */
++ start_mangling (type, /*ident_p=*/true);
++
++ /* Start the mangling. */
++ write_string ("_Z");
++ write_string ("VT");
++
++ /* Add the type. */
++ write_type (type);
++ write_string ("_local");
++ result = finish_mangling (/*warn=*/false);
++
++ return get_identifier_nocopy (result);
++}
++
+/* FIXME: as should be obvious I have no idea what I'm doing here */
+static int calc_max_depth (const tree binfo)
+{
@@ -738,14 +768,13 @@
+
+ max_depth = calc_max_depth (binfo);
+
-+#if 0
++ /* FIXME: virtual bases ?
+ {
+ tree vbase;
-+ /* FIXME: virtual bases ? */
+ for (vbase = binfo; vbase; vbase = TREE_CHAIN (vbase))
+ virts++;
+ }
-+#endif
++ */
+ virts = 0;
+
+ sprintf (buffer, "_%.8i_", max_depth + virts);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]