fix previous patch for restoring PredHashTable.
This commit is contained in:
parent
066603c79b
commit
45473e939b
@ -712,9 +712,8 @@ Yap_NewPredPropByFunctor(FunctorEntry *fe, Term cur_mod)
|
||||
PredHash[hsh] = p;
|
||||
}
|
||||
WRITE_UNLOCK(PredHashRWLock);
|
||||
/* make sure that we have something here */
|
||||
p->NextOfPE = RepPredProp(fe->PropsOfFE)->NextOfPE;
|
||||
RepPredProp(fe->PropsOfFE)->NextOfPE = AbsPredProp(p);
|
||||
/* make sure that we have something here: note that this is not a valid pointer!! */
|
||||
RepPredProp(fe->PropsOfFE)->NextOfPE = fe->PropsOfFE;
|
||||
} else {
|
||||
fe->PropsOfFE = AbsPredProp(p);
|
||||
p->NextOfPE = NIL;
|
||||
|
23
C/agc.c
23
C/agc.c
@ -194,6 +194,29 @@ AtomAdjust(Atom a)
|
||||
|
||||
#include "rheap.h"
|
||||
|
||||
static void
|
||||
RestoreHashPreds(void)
|
||||
{
|
||||
UInt i;
|
||||
|
||||
for (i = 0; i < PredHashTableSize; i++) {
|
||||
PredEntry *p = PredHash[i];
|
||||
|
||||
if (p)
|
||||
p = PredEntryAdjust(p);
|
||||
while (p) {
|
||||
Prop nextp;
|
||||
|
||||
if (p->NextOfPE)
|
||||
p->NextOfPE = PropAdjust(p->NextOfPE);
|
||||
nextp = p->NextOfPE;
|
||||
CleanCode(p);
|
||||
p = RepPredProp(nextp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void init_reg_copies(void)
|
||||
{
|
||||
OldASP = ASP;
|
||||
|
1
C/save.c
1
C/save.c
@ -1321,7 +1321,6 @@ static void
|
||||
restore_heap(void)
|
||||
{
|
||||
restore_codes();
|
||||
RestoreHashPreds();
|
||||
RestoreIOStructures();
|
||||
}
|
||||
|
||||
|
@ -379,6 +379,7 @@ AdjustSwitchTable(op_numbers op, yamop *table, COUNT i)
|
||||
|
||||
STATIC_PROTO(void RestoreAtomList, (Atom));
|
||||
STATIC_PROTO(void RestoreAtom, (AtomEntry *));
|
||||
STATIC_PROTO(void RestoreHashPreds, (void));
|
||||
|
||||
static void
|
||||
RestoreAtoms(void)
|
||||
@ -658,7 +659,7 @@ RestorePredHash(void)
|
||||
Yap_Error(FATAL_ERROR,MkIntTerm(0),"restore should find predicate hash table");
|
||||
}
|
||||
REINIT_RWLOCK(PredHashRWLock);
|
||||
/* RestoreHashPreds() does most of the work */
|
||||
RestoreHashPreds(); /* does most of the work */
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user