From a4acb6a8063902761ff8e9563c31e06f47b65c0a Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Mon, 8 Oct 2012 18:25:42 +0100 Subject: [PATCH] try to make sure we always have slots --- C/absmi.c | 3 +++ C/c_interface.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/C/absmi.c b/C/absmi.c index 99e97dbe6..26a8b3f1e 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -856,7 +856,10 @@ Yap_absmi(int inp) BOp(Ystop, l); SET_ASP(YREG, E_CB*sizeof(CELL)); + /* make sure ASP is initialised */ + Yap_StartSlots(); saveregs(); + #if PUSH_REGS restore_absmi_regs(old_regs); #endif diff --git a/C/c_interface.c b/C/c_interface.c index a8dc3e278..daf4462f9 100644 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -2566,8 +2566,8 @@ YAP_RestartGoal(void) LOCAL_PrologMode = UserCCallMode; if (out == FALSE) { /* cleanup */ - Yap_CloseSlots( PASS_REGS1 ); Yap_trust_last(); + Yap_CloseSlots( PASS_REGS1 ); LOCAL_AllowRestart = FALSE; } } else {