From: Keri Harris Date: Sat, 3 Feb 2007 00:58:27 +0000 (+0000) Subject: Fix clause_reference hashing in debug mode. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e35c1ea4a03f4a65c58678353dca0c6609e9b1b0;p=gentoo.git Fix clause_reference hashing in debug mode. Package-Manager: portage-2.1.2-r6 --- diff --git a/dev-lang/xsb/ChangeLog b/dev-lang/xsb/ChangeLog index f9c3f54c19ba..bd922566f02d 100644 --- a/dev-lang/xsb/ChangeLog +++ b/dev-lang/xsb/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-lang/xsb # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/ChangeLog,v 1.5 2007/02/02 21:27:25 keri Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/ChangeLog,v 1.6 2007/02/03 00:58:27 keri Exp $ + + 03 Feb 2007; keri +files/xsb-3.0.1-debug.patch, + xsb-3.0.1.ebuild: + Fix clause_reference hashing in debug mode. 02 Feb 2007; keri files/xsb-3.0.1-portage.patch: Parallelize compile of Prolog engine. diff --git a/dev-lang/xsb/Manifest b/dev-lang/xsb/Manifest index 95ea56706cde..597ef5dddf89 100644 --- a/dev-lang/xsb/Manifest +++ b/dev-lang/xsb/Manifest @@ -6,6 +6,10 @@ AUX xsb-3.0.1-configure.patch 7245 RMD160 64561500ff2341c7b999b9eb7e285f4c11e825 MD5 2871e41f7ca03ee322a78e1e14aa37bb files/xsb-3.0.1-configure.patch 7245 RMD160 64561500ff2341c7b999b9eb7e285f4c11e82549 files/xsb-3.0.1-configure.patch 7245 SHA256 b6a6a9b94b3bebabf3249a43305da0b4175120b611b8a4fac4a35444904ec89c files/xsb-3.0.1-configure.patch 7245 +AUX xsb-3.0.1-debug.patch 3812 RMD160 ee0b354b470cba2120d83fcf257fb76ae0f9e959 SHA1 0c6de43176aee0317e8f6237eba245d5280b11ce SHA256 ee0d6b6ebc803a7cf6fabf9f1d671056773224e194309c6a017005ec36b7e0f7 +MD5 b4aae1db10a7e4c018b1d15466dc9649 files/xsb-3.0.1-debug.patch 3812 +RMD160 ee0b354b470cba2120d83fcf257fb76ae0f9e959 files/xsb-3.0.1-debug.patch 3812 +SHA256 ee0d6b6ebc803a7cf6fabf9f1d671056773224e194309c6a017005ec36b7e0f7 files/xsb-3.0.1-debug.patch 3812 AUX xsb-3.0.1-gap.patch 260 RMD160 c400b6520751234c375d0b2f96d3aee7c1db1113 SHA1 8a97c36f940af3e617a0afa0503ecd1eeec41a85 SHA256 ac806517f5eb82f119426accce84b8d5371dcd39293cdec0c0398efd6f40c3e1 MD5 a62a122bc26d9ab164ce85a4f1ddcaf1 files/xsb-3.0.1-gap.patch 260 RMD160 c400b6520751234c375d0b2f96d3aee7c1db1113 files/xsb-3.0.1-gap.patch 260 @@ -63,14 +67,14 @@ MD5 da6c7acb1861b1783e58a49acc61142b files/xsb-3.0.1-xsb-script.patch 1544 RMD160 4edc54d803e07cfff9d6fc70270e12dcfbb67bb7 files/xsb-3.0.1-xsb-script.patch 1544 SHA256 47d3e6033491cca86f5585c5d1f4c3078b3321eab6f7e6c608b396c6f3851196 files/xsb-3.0.1-xsb-script.patch 1544 DIST xsb-3.0.1-src.tar.gz 4523327 RMD160 6f71401ad3cc9031ec0ced16df7d9dfd594b3fb2 SHA1 8cbef419913731617ec8811dd69799406119b9ff SHA256 05e2a76befe6303ff624c8a22543444604a75815eae276e065e462a1d21ae801 -EBUILD xsb-3.0.1.ebuild 4428 RMD160 768dc8f2409bda68624bed4c579476e4242221bc SHA1 8888fc81e756fad3676b23197f653a986a0e7209 SHA256 fbefdd593ed5507ae1301e19b4f54ab32a9b2df4861339b8e6e3b78656d8ea6c -MD5 7bcbc300594e2a181961da1d3dd7b80c xsb-3.0.1.ebuild 4428 -RMD160 768dc8f2409bda68624bed4c579476e4242221bc xsb-3.0.1.ebuild 4428 -SHA256 fbefdd593ed5507ae1301e19b4f54ab32a9b2df4861339b8e6e3b78656d8ea6c xsb-3.0.1.ebuild 4428 -MISC ChangeLog 1354 RMD160 e0b7a2dd4d9ce605b1d18bef5fa3eff04096e605 SHA1 5aea2a85f9bf9576d9c5ae419caaf403d5092671 SHA256 56746c545e4766723779df0f62c93678814e9207b567d8063572d28c42ef81a3 -MD5 4515869a738e82cddf771aefdefdba02 ChangeLog 1354 -RMD160 e0b7a2dd4d9ce605b1d18bef5fa3eff04096e605 ChangeLog 1354 -SHA256 56746c545e4766723779df0f62c93678814e9207b567d8063572d28c42ef81a3 ChangeLog 1354 +EBUILD xsb-3.0.1.ebuild 4567 RMD160 843aef64f81d827ba97c7341bd9b80c9d5ff9eea SHA1 ad063f550df1f36b8bd23069217925c014f8877a SHA256 ad8a81d24ccf079b2b30f16b5ec820bfd0c60674ab0f1afc9ec276997d32b50a +MD5 003e3c9118f9292a99aaceeab465d483 xsb-3.0.1.ebuild 4567 +RMD160 843aef64f81d827ba97c7341bd9b80c9d5ff9eea xsb-3.0.1.ebuild 4567 +SHA256 ad8a81d24ccf079b2b30f16b5ec820bfd0c60674ab0f1afc9ec276997d32b50a xsb-3.0.1.ebuild 4567 +MISC ChangeLog 1489 RMD160 81525aea10edd208e33ade2bbade5bad96904010 SHA1 296cc2b53e47e2f3b916ed1fd5e844e23299547e SHA256 47b0513d9013d9d19e9deedb356f94eccb87f065b45d5e6bcca9f749e90b61ca +MD5 94e94435e3eda62117b8cb008fab52d0 ChangeLog 1489 +RMD160 81525aea10edd208e33ade2bbade5bad96904010 ChangeLog 1489 +SHA256 47b0513d9013d9d19e9deedb356f94eccb87f065b45d5e6bcca9f749e90b61ca ChangeLog 1489 MISC metadata.xml 159 RMD160 38d27fd1c5faabedefa5507dfd83cb4c952fbc8c SHA1 52b92682cf41e53e71bf432537a16215bd9546b1 SHA256 851bf218a4283a1d8ea6ef98af0119a40eaa78bfaaec49c2f3440437f52889ba MD5 9187f53634e60ab7eb2ac7e98b0b19f7 metadata.xml 159 RMD160 38d27fd1c5faabedefa5507dfd83cb4c952fbc8c metadata.xml 159 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[] = { diff --git a/dev-lang/xsb/xsb-3.0.1.ebuild b/dev-lang/xsb/xsb-3.0.1.ebuild index 5bec325a9f13..de625a86659d 100644 --- a/dev-lang/xsb/xsb-3.0.1.ebuild +++ b/dev-lang/xsb/xsb-3.0.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/xsb-3.0.1.ebuild,v 1.2 2007/01/29 17:46:06 keri Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/xsb-3.0.1.ebuild,v 1.3 2007/02/03 00:58:27 keri Exp $ MY_PN="XSB" MY_P="${MY_PN}-${PV}" @@ -14,7 +14,7 @@ SRC_URI="mirror://sourceforge/xsb/xsb-3.0.1-src.tar.gz" LICENSE="GPL-2 LGPL-2" SLOT="0" KEYWORDS="~x86" -IUSE="iodbc java libwww mysql odbc perl threads xml" +IUSE="debug iodbc java libwww mysql odbc perl threads xml" DEPEND="iodbc? ( dev-db/libiodbc ) java? ( virtual/jdk ) @@ -45,6 +45,7 @@ src_unpack() { epatch "${FILESDIR}"/${P}-xpath.patch epatch "${FILESDIR}"/${P}-xsb-script.patch epatch "${FILESDIR}"/${P}-nostrip.patch + epatch "${FILESDIR}"/${P}-debug.patch } src_compile() { @@ -60,6 +61,9 @@ src_compile() { $(use_with odbc) \ $(use_with iodbc) \ $(use_enable java interprolog) \ + $(use_enable debug) \ + $(use_enable debug debug-verbose) \ + $(use_enable debug profile) \ || die "econf failed" emake -j1 || die "emake failed"