fixes for restore
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@967 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
fd7582b618
commit
1079391767
1
C/agc.c
1
C/agc.c
@ -29,6 +29,7 @@ static char SccsId[] = "@(#)agc.c 1.3 3/15/90";
|
||||
#endif
|
||||
|
||||
STATIC_PROTO(void RestoreEntries, (PropEntry *));
|
||||
STATIC_PROTO(void CleanCode, (PredEntry *));
|
||||
|
||||
static int agc_calls;
|
||||
|
||||
|
@ -3526,7 +3526,6 @@ Yap_InitCdMgr(void)
|
||||
Yap_InitCPred("$pred_exists", 2, p_pred_exists, TestPredFlag | SafePredFlag);
|
||||
Yap_InitCPred("$number_of_clauses", 3, p_number_of_clauses, SafePredFlag|SyncPredFlag);
|
||||
Yap_InitCPred("$undefined", 2, p_undefined, SafePredFlag|TestPredFlag);
|
||||
fprintf(stderr,"initialised\n");
|
||||
Yap_InitCPred("$optimizer_on", 0, p_optimizer_on, SafePredFlag|SyncPredFlag);
|
||||
Yap_InitCPred("$clean_up_dead_clauses", 0, p_clean_up_dead_clauses, SyncPredFlag);
|
||||
Yap_InitCPred("$optimizer_off", 0, p_optimizer_off, SafePredFlag|SyncPredFlag);
|
||||
|
25
H/rheap.h
25
H/rheap.h
@ -148,6 +148,26 @@ restore_codes(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (heap_regs->IntLUKeys != NULL) {
|
||||
heap_regs->IntLUKeys = (Prop *)AddrAdjust((ADDR)(heap_regs->IntLUKeys));
|
||||
{
|
||||
Int i;
|
||||
for (i = 0; i < INT_KEYS_SIZE; i++) {
|
||||
Prop p0 = INT_LU_KEYS[i];
|
||||
if (p0) {
|
||||
p0 = PropAdjust(p0);
|
||||
INT_LU_KEYS[i] = p0;
|
||||
while (p0) {
|
||||
PredEntry *pe = RepPredProp(p0);
|
||||
pe->NextOfPE =
|
||||
PropAdjust(pe->NextOfPE);
|
||||
CleanCode(pe);
|
||||
p0 = RepProp(pe->NextOfPE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (heap_regs->IntBBKeys != NULL) {
|
||||
heap_regs->IntBBKeys = (Prop *)AddrAdjust((ADDR)(heap_regs->IntBBKeys));
|
||||
{
|
||||
@ -1499,6 +1519,9 @@ CleanCode(PredEntry *pp)
|
||||
if (pp->src.OwnerFile && pp->ModuleOfPred != 2)
|
||||
pp->src.OwnerFile = AtomAdjust(pp->src.OwnerFile);
|
||||
}
|
||||
if (!(pp->PredFlags & NumberDBPredFlag)) {
|
||||
pp->src.OwnerFile = AtomAdjust(pp->src.OwnerFile);
|
||||
}
|
||||
pp->OpcodeOfPred = Yap_opcode(Yap_op_from_opcode(pp->OpcodeOfPred));
|
||||
if (pp->PredFlags & (AsmPredFlag|CPredFlag)) {
|
||||
/* assembly */
|
||||
@ -1522,7 +1545,7 @@ CleanCode(PredEntry *pp)
|
||||
FirstC = pp->cs.p_code.FirstClause;
|
||||
LastC = pp->cs.p_code.LastClause;
|
||||
/* We just have a fail here */
|
||||
if (FirstC == NIL && LastC == NIL) {
|
||||
if (FirstC == NULL && LastC == NULL) {
|
||||
return;
|
||||
}
|
||||
#ifdef DEBUG_RESTORE2
|
||||
|
Reference in New Issue
Block a user