fix P details when creating execution environment: we should save the old one
This commit is contained in:
@@ -2289,8 +2289,9 @@ YAP_EnterGoal(PredEntry *pe, Term *ptr, YAP_dogoalinfo *dgi)
|
||||
BACKUP_MACHINE_REGS();
|
||||
dgi->p = P;
|
||||
dgi->cp = CP;
|
||||
P = pe->CodeOfPred;
|
||||
// ensure our current ENV receives current P.
|
||||
Yap_PrepGoal(pe->ArityOfPE, ptr, B PASS_REGS);
|
||||
P = pe->CodeOfPred;
|
||||
dgi->b = LCL0-(CELL*)B;
|
||||
out = run_emulator(dgi PASS_REGS);
|
||||
RECOVER_MACHINE_REGS();
|
||||
|
||||
@@ -1556,7 +1556,7 @@ mark_environments(CELL_PTR gc_ENV, OPREG size, CELL *pvbmap USES_REGS)
|
||||
Int bmap = 0;
|
||||
int currv = 0;
|
||||
|
||||
// printf("MARK %p--%p\n", gc_ENV, gc_ENV-size);
|
||||
// printf("MARK %p--%p\n", gc_ENV, gc_ENV-size);
|
||||
#ifdef DEBUG
|
||||
if (size < 0 || size > 512)
|
||||
fprintf(GLOBAL_stderr,"OOPS in GC: env size for %p is " UInt_FORMAT "\n", gc_ENV, (CELL)size);
|
||||
|
||||
Reference in New Issue
Block a user