diff --git a/C/tracer.c b/C/tracer.c index 54e333105..720839e11 100644 --- a/C/tracer.c +++ b/C/tracer.c @@ -113,7 +113,7 @@ check_trail_consistency(void) { } else { if (IsPairTerm(TrailTerm(ptr))) { CELL *p = RepPair(TrailTerm(ptr)); - if (p < H0) continue; + if IsAttVar(p) continue; } printf("Oops at call %ld, B->cp(%p) TR(%p) pt(%p)\n", vsc_count,B->cp_tr, TR, ptr); return(FALSE); diff --git a/H/amiops.h b/H/amiops.h index a4111c514..b2968f037 100644 --- a/H/amiops.h +++ b/H/amiops.h @@ -354,7 +354,7 @@ Binding Macros for Multiple Assignment Variables. #define BIND_GLOBALCELL(A,D) *(A) = (D); \ if ((A) >= HBREG) continue; \ - TRAIL_GLOBAL(A,D); if ((A) >= H0) continue; \ + TRAIL_GLOBAL(A,D); if (!IsAttVar(A)) continue; \ Yap_WakeUp((A)); continue #define BIND_GLOBALCELL_NONATT(A,D) *(A) = (D); \ @@ -502,7 +502,7 @@ Yap_unify_constant(register Term a, register Term cons) BIND(pt,cons,wake_for_cons); #ifdef COROUTINING DO_TRAIL(pt, cons); - if (pt < H0) Yap_WakeUp(pt); + if (IsAttVar(pt)) Yap_WakeUp(pt); wake_for_cons: #endif return(TRUE);