From 09293baa7c08c71b465df90fabbdd4166817bbd0 Mon Sep 17 00:00:00 2001 From: vsc Date: Mon, 20 Sep 2004 04:16:33 +0000 Subject: [PATCH] fix saved state bug with comparison predicates git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1145 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/dbase.c | 5 +++++ C/init.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/C/dbase.c b/C/dbase.c index 9d4a34ba5..20ae95a61 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -673,6 +673,11 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, #endif CELL *CodeMaxBase = CodeMax; + {int i; + for (i = 0; i < 10; i++) + printf("vsc: Here I go again\n"); + } + loop: while (pt0 <= pt0_end) { diff --git a/C/init.c b/C/init.c index 1438f6591..49e4cfab7 100644 --- a/C/init.c +++ b/C/init.c @@ -504,7 +504,7 @@ Yap_InitCmpPred(char *Name, unsigned long int Arity, CmpPredicate cmp_code, int Atom atom = Yap_LookupAtom(Name); PredEntry *pe; yamop *p_code = ((StaticClause *)NULL)->ClCode; - StaticClause *cl = (StaticClause *)Yap_AllocCodeSpace((CELL)NEXTOP(NEXTOP(((yamop *)p_code),llxx),e)); + StaticClause *cl = (StaticClause *)Yap_AllocCodeSpace((CELL)NEXTOP(NEXTOP(NEXTOP(((yamop *)p_code),llxx),e),e)); cl->ClFlags = 0; p_code = cl->ClCode; @@ -524,6 +524,8 @@ Yap_InitCmpPred(char *Name, unsigned long int Arity, CmpPredicate cmp_code, int p_code->u.llxx.flags = Yap_compile_cmp_flags(pe); p_code = NEXTOP(p_code,llxx); p_code->opc = Yap_opcode(_procceed); + p_code = NEXTOP(p_code,e); + p_code->opc = Yap_opcode(_Ystop); } void