fix slots: have slots ready at init, even if we don't have a Prolog top-level;

don't get lost after pruning.
This commit is contained in:
ubu32
2011-07-11 22:12:32 -07:00
parent 2a51403518
commit 11a74236dc
3 changed files with 19 additions and 1 deletions

View File

@@ -997,7 +997,6 @@ exec_absmi(int top USES_REGS)
YENV = ASP;
YENV[E_CB] = Unsigned (B);
out = Yap_absmi(0);
Yap_StartSlots( PASS_REGS1 );
/* make sure we don't leave a FAIL signal hanging around */
LOCAL_ActiveSignals &= ~YAP_FAIL_SIGNAL;
if (!LOCAL_ActiveSignals)
@@ -1656,6 +1655,7 @@ Yap_InitYaamRegs(void)
/* the first real choice-point will also have AP=FAIL */
/* always have an empty slots for people to use */
CurSlot = 0;
Yap_StartSlots( PASS_REGS1 );
LOCAL_GlobalArena = TermNil;
h0var = MkVarTerm();
#if COROUTINING