A few extra fixes for saved states.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1186 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
c083c838bb
commit
bd965693e4
@ -1673,11 +1673,16 @@ CreateDBStruct(Term Tm, DBProp p, int InFlag, int *pstat, UInt extra_size, struc
|
||||
#endif
|
||||
ppt->Entry = AdjustIDBPtr(tt,(CELL)ppt-(CELL)ppt0);
|
||||
#ifdef COROUTINING
|
||||
if (ppt->attachments)
|
||||
ppt->attachments = AdjustIDBPtr(ppt->attachments,(CELL)ppt-(CELL)ppt0);
|
||||
if (attachments)
|
||||
ppt->attachments = AdjustIDBPtr(attachments,(CELL)ppt-(CELL)ppt0);
|
||||
else
|
||||
ppt->attachments = 0L;
|
||||
#endif
|
||||
} else {
|
||||
ppt->Entry = tt;
|
||||
#ifdef COROUTINING
|
||||
ppt->attachments = attachments;
|
||||
#endif
|
||||
}
|
||||
if (flag & DBWithRefs) {
|
||||
DBRef *ptr = TmpRefBase, *rfnar = (DBRef *)nar;
|
||||
|
2
C/save.c
2
C/save.c
@ -1314,7 +1314,7 @@ RestoreHeap(OPCODE old_ops[])
|
||||
CurrentModule = PROLOG_MODULE;
|
||||
opcodes_moved = check_opcodes(old_ops);
|
||||
/* opcodes_moved has side-effects and should be tried first */
|
||||
if (heap_moved || opcodes_moved) {
|
||||
if (heap_moved || opcodes_moved || TRUE) {
|
||||
restore_heap();
|
||||
}
|
||||
/* This must be done after restore_heap */
|
||||
|
@ -603,7 +603,6 @@ Yap_scan_num(int (*Nxtch) (int))
|
||||
tsize = Yap_TrailTop-ScannerStack;
|
||||
if (tsize < 4096) {
|
||||
if(!Yap_growtrail (sizeof(CELL) * 16 * 1024L)) {
|
||||
printf("vsc: Hello\n");
|
||||
Yap_ErrorMessage = "Trail Overflow";
|
||||
return TermNil;
|
||||
}
|
||||
|
@ -605,7 +605,6 @@ InitReverseLookupOpcode(void)
|
||||
for (i = _std_top; i > _Ystop; i--) {
|
||||
OPCODE opc = Yap_opcode(i);
|
||||
int j = rtable_hash_op(opc,hash_size_mask);
|
||||
|
||||
while (opeptr[j].opc) {
|
||||
if (++j > hash_size_mask)
|
||||
j = 0;
|
||||
|
14
H/rheap.h
14
H/rheap.h
@ -11,8 +11,11 @@
|
||||
* File: rheap.h *
|
||||
* comments: walk through heap code *
|
||||
* *
|
||||
* Last rev: $Date: 2004-10-26 20:16:18 $,$Author: vsc $ *
|
||||
* Last rev: $Date: 2004-11-23 21:16:21 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.45 2004/10/26 20:16:18 vsc
|
||||
* More bug fixes for overflow handling
|
||||
*
|
||||
* Revision 1.44 2004/10/06 16:55:47 vsc
|
||||
* change configure to support big mem configs
|
||||
* get rid of extra globals
|
||||
@ -589,8 +592,11 @@ restore_opcodes(yamop *pc)
|
||||
fprintf(stderr, "%s ", op_names[op]);
|
||||
#endif
|
||||
switch (op) {
|
||||
case _Ystop:
|
||||
case _Nstop:
|
||||
Yap_Error(SYSTEM_ERROR, TermNil,
|
||||
"Invalid Opcode found while restoring %p", pc);
|
||||
return;
|
||||
case _Ystop:
|
||||
#ifdef DEBUG_RESTORE2
|
||||
fprintf(stderr, "OK\n");
|
||||
#endif
|
||||
@ -820,7 +826,11 @@ restore_opcodes(yamop *pc)
|
||||
pc->u.sla.sla_u.mod = AtomTermAdjust(pc->u.sla.sla_u.mod);
|
||||
}
|
||||
pc->u.sla.p0 = PtoPredAdjust(pc->u.sla.p0);
|
||||
if (pc->u.sla.bmap != NULL) {
|
||||
pc->u.sla.bmap = CellPtoHeapAdjust(pc->u.sla.bmap);
|
||||
}
|
||||
pc = NEXTOP(pc,sla);
|
||||
break;
|
||||
case _fcall:
|
||||
case _call:
|
||||
#ifdef YAPOR
|
||||
|
Reference in New Issue
Block a user