fix partitioning in garbage collector

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@254 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-01-02 22:26:37 +00:00
parent 7064c42fc1
commit 3d496ae6be
1 changed files with 7 additions and 7 deletions

View File

@ -157,7 +157,7 @@ POPSWAP_POINTER(CELL_PTR *vp) {
*/
static inline void
exchange(CELL_PTR * b, UInt i, UInt j)
exchange(CELL_PTR * b, Int i, Int j)
{
CELL *t = b[j];
@ -166,7 +166,7 @@ exchange(CELL_PTR * b, UInt i, UInt j)
}
static UInt
partition(CELL *a[], UInt p, UInt r)
partition(CELL *a[], Int p, Int r)
{
CELL *x;
UInt i, j;
@ -175,7 +175,7 @@ partition(CELL *a[], UInt p, UInt r)
i = p+1;
j = r;
while (a[j] > x) {
while (a[j] > x && i < j) {
j--;
}
while (a[i] < x && i < j) {
@ -185,7 +185,7 @@ partition(CELL *a[], UInt p, UInt r)
exchange(a, i, j);
i++;
j--;
while (a[j] > x) {
while (a[j] > x && i < j) {
j--;
}
while (a[i] < x && i < j) {
@ -199,7 +199,7 @@ partition(CELL *a[], UInt p, UInt r)
}
static void
insort(CELL *a[], UInt p, UInt q)
insort(CELL *a[], Int p, Int q)
{
UInt j;
@ -220,7 +220,7 @@ insort(CELL *a[], UInt p, UInt q)
static void
quicksort(CELL *a[], UInt p, UInt r)
quicksort(CELL *a[], Int p, Int r)
{
UInt q;
if (p < r) {
@ -572,7 +572,7 @@ init_dbtable(tr_fr_ptr trail_ptr) {
#ifdef DEBUG
#define INSTRUMENT_GC 1
#define CHECK_CHOICEPOINTS 1
/* #define CHECK_CHOICEPOINTS 1 */
#ifdef INSTRUMENT_GC
typedef enum {