slots again: make sure they're bound after resetting the stack and when calling InitForeign
This commit is contained in:
parent
c6351abe25
commit
493b591b66
@ -3394,6 +3394,9 @@ YAP_Reset(void)
|
||||
/* the first real choice-point will also have AP=FAIL */
|
||||
/* always have an empty slots for people to use */
|
||||
P = CP = YESCODE;
|
||||
// ensure that we have slots where we need them
|
||||
LOCAL_CurSlot = 0;
|
||||
Yap_StartSlots( PASS_REGS1 );
|
||||
RECOVER_MACHINE_REGS();
|
||||
return res;
|
||||
}
|
||||
|
@ -83,7 +83,9 @@ p_load_foreign( USES_REGS1 )
|
||||
|
||||
/* call the OS specific function for dynamic loading */
|
||||
if(Yap_LoadForeign(ofiles,libs,InitProcName,&InitProc)==LOAD_SUCCEEDED) {
|
||||
Int CurSlot = Yap_StartSlots( PASS_REGS1 );
|
||||
(*InitProc)();
|
||||
LOCAL_CurSlot = CurSlot;
|
||||
returncode = TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user