summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2007-02-03 00:58:27 +0000
committerKeri Harris <keri@gentoo.org>2007-02-03 00:58:27 +0000
commit9d628bd2d3ce05cb94dc50530cd89c216f5f7eab (patch)
tree65ac6a87d161a95b9e0991bbb20fbbb10e320349 /dev-lang/xsb/files
parentRemoving old version. (diff)
downloadgentoo-2-9d628bd2d3ce05cb94dc50530cd89c216f5f7eab.tar.gz
gentoo-2-9d628bd2d3ce05cb94dc50530cd89c216f5f7eab.tar.bz2
gentoo-2-9d628bd2d3ce05cb94dc50530cd89c216f5f7eab.zip
Fix clause_reference hashing in debug mode.
(Portage version: 2.1.2-r6)
Diffstat (limited to 'dev-lang/xsb/files')
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-debug.patch123
1 files changed, 123 insertions, 0 deletions
diff --git a/dev-lang/xsb/files/xsb-3.0.1-debug.patch b/dev-lang/xsb/files/xsb-3.0.1-debug.patch
new file mode 100644
index 000000000000..c0c38ffc9a60
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-debug.patch
@@ -0,0 +1,123 @@
+--- XSB.orig/emu/biassert.c 2006-07-26 02:18:41.000000000 +1200
++++ XSB/emu/biassert.c 2007-02-03 13:42:01.000000000 +1300
+@@ -2783,16 +2783,16 @@
+ /* remove it from index chains */
+ for( i = NI; i >= 1; i-- ) {
+ IP = ClRefIndPtr(Clause, i);
+- if (cell_opcode(IP) == dynnoop) /* deleting last in bucket */
++ if (cell_opcode(IP) == dynnoop) { /* deleting last in bucket */
+ sob = (SOBRef)IndRefNext(IP); /* so get SOB addr */
++ xsb_dbgmsg((LOG_RETRACT,
++ "SOB(%d) - hash size %d - %d clauses",
++ i, ClRefHashSize(sob), ClRefNumNonemptyBuckets(sob) ));
++ xsb_dbgmsg((LOG_RETRACT,
++ "Addr %p : prev %p : next %p",
++ sob, ClRefNext(sob), ClRefPrev(sob) ));
++ }
+ else sob = NULL;
+-
+- xsb_dbgmsg((LOG_RETRACT,
+- "SOB(%d) - hash size %d - %d clauses",
+- i, ClRefHashSize(sob), ClRefNumNonemptyBuckets(sob) ));
+- xsb_dbgmsg((LOG_RETRACT,
+- "Addr %p : prev %p : next %p",
+- sob, ClRefNext(sob), ClRefPrev(sob) ));
+ delete_from_hashchain(Clause,i,NI) ;
+ if (sob && --ClRefNumNonemptyBuckets(sob) == 0)
+ { /* if emptied bucket, decrement count; if all empty, reclaim SOB */
+--- XSB.orig/emu/complete_local.h 2005-11-18 12:24:24.000000000 +1300
++++ XSB/emu/complete_local.h 2007-01-30 21:24:09.000000000 +1300
+@@ -144,7 +144,7 @@
+
+ if (tcp_ptcp(subg_cp_ptr(prof_compl_subg)) != NULL ) {
+ print_sdg_edge(sdg_check_num,2,
+- tcp_ptcp(subg_cp_ptr(prof_compl_subg)),
++ (VariantSF)tcp_ptcp(subg_cp_ptr(prof_compl_subg)),
+ prof_compl_subg);
+ } else {
+ }
+@@ -152,7 +152,7 @@
+ nsf = subg_asf_list_ptr(prof_compl_subg);
+ while (nsf != NULL) {
+
+- print_sdg_edge(sdg_check_num,1,nlcp_ptcp(nsf),prof_compl_subg);
++ print_sdg_edge(sdg_check_num,1,(VariantSF)nlcp_ptcp(nsf),prof_compl_subg);
+
+ nsf = nlcp_prevlookup(nsf);
+ }
+@@ -160,7 +160,7 @@
+ nsf = subg_compl_susp_ptr(prof_compl_subg);
+ while (nsf != NULL) {
+
+- print_sdg_edge(sdg_check_num,-1,csf_ptcp(nsf),prof_compl_subg);
++ print_sdg_edge(sdg_check_num,-1,(VariantSF)csf_ptcp(nsf),prof_compl_subg);
+
+ nsf = csf_prevcsf(nsf);
+ }
+--- XSB.orig/emu/debug_xsb.c 2006-07-15 04:49:36.000000000 +1200
++++ XSB/emu/debug_xsb.c 2007-01-30 21:20:41.000000000 +1300
+@@ -283,7 +283,7 @@
+ fprintf(where,"choicepoint(address(%p),unknown_psc).\n", cpf);
+ }
+
+-#endif CP_DEBUG
++#endif /* CP_DEBUG */
+
+ /*-------------------------------------------*/
+
+@@ -423,7 +423,7 @@
+ alt_printnum++ ;
+ where = fopen(buf,"w") ;
+ if (! where)
+- { xsb_dbgmsg((LOG_GC, "could not open CP%d", printnum));
++ { xsb_dbgmsg((LOG_GC, "could not open CP%d", alt_printnum));
+ return;
+ }
+
+@@ -741,6 +741,22 @@
+ }
+ }
+
++/*
++ * Tries to make the interface more robust by cleaning-up any extra user
++ * input supplied to a prompt. Place a call to this function after any
++ * input scan which doesn't take the whole input line (ie. which isn't a
++ * `scanf("%s", &array);').
++ */
++static void skip_to_nl(void)
++{
++ char c;
++
++ do {
++ c = getchar();
++ } while (c != '\n');
++}
++
++
+ void print_tables(void)
+ {
+ int i = 0;
+@@ -886,23 +902,6 @@
+ fprintf(stddbg, "\n");
+ }
+
+-/*--------------------------------------------------------------------------*/
+-
+-/*
+- * Tries to make the interface more robust by cleaning-up any extra user
+- * input supplied to a prompt. Place a call to this function after any
+- * input scan which doesn't take the whole input line (ie. which isn't a
+- * `scanf("%s", &array);').
+- */
+-static void skip_to_nl(void)
+-{
+- char c;
+-
+- do {
+- c = getchar();
+- } while (c != '\n');
+-}
+-
+ /*----- For table debugging --------------------------------------------*/
+
+ static char *compl_stk_frame_field[] = {