some extra bug fixes for trail overflows: some cannot be recovered that easily,

some can.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1219 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2004-12-28 22:20:37 +00:00
parent 7f6c6af7d5
commit ef6bbb1273
20 changed files with 167 additions and 85 deletions

View File

@@ -588,7 +588,7 @@ Yap_InitAsmPred(char *Name, unsigned long int Arity, int code, CPredicate def,
pe->ModuleOfPred = CurrentModule;
if (def != NULL) {
yamop *p_code = ((StaticClause *)NULL)->ClCode;
StaticClause *cl = (StaticClause *)Yap_AllocCodeSpace((CELL)NEXTOP(NEXTOP(((yamop *)p_code),sla),e));
StaticClause *cl = (StaticClause *)Yap_AllocCodeSpace((CELL)NEXTOP(NEXTOP(NEXTOP(((yamop *)p_code),sla),e),e));
cl->ClFlags = 0;
p_code = cl->ClCode;
@@ -599,6 +599,8 @@ Yap_InitAsmPred(char *Name, unsigned long int Arity, int code, CPredicate def,
p_code->u.sla.sla_u.p = pe;
p_code = NEXTOP(p_code,sla);
p_code->opc = Yap_opcode(_procceed);
p_code = NEXTOP(p_code,e);
p_code->opc = Yap_opcode(_Ystop);
} else {
pe->OpcodeOfPred = Yap_opcode(_undef_p);
pe->CodeOfPred = (yamop *)(&(pe->OpcodeOfPred));