boot from prolog
This commit is contained in:
parent
079ed60248
commit
abe5953da7
@ -100,17 +100,20 @@ static void exec_top_level(int BootMode, YAP_init_args *iap) {
|
|||||||
if (BootMode == YAP_BOOT_FROM_SAVED_STACKS) {
|
if (BootMode == YAP_BOOT_FROM_SAVED_STACKS) {
|
||||||
/* continue executing from the frozen stacks */
|
/* continue executing from the frozen stacks */
|
||||||
YAP_ContinueGoal();
|
YAP_ContinueGoal();
|
||||||
|
livegoal = YAP_FullLookupAtom("$live");
|
||||||
|
} else {
|
||||||
|
livegoal = YAP_FullLookupAtom("$bootstrap");
|
||||||
}
|
}
|
||||||
/* the top-level is now ready */
|
/* the top-level is now ready */
|
||||||
|
|
||||||
/* read it before case someone, that is, Ashwin, hides
|
/* read it before case someone, that is, Ashwin, hides
|
||||||
the atom false away ;-).
|
the atom false away ;-).
|
||||||
*/
|
*/
|
||||||
livegoal = YAP_FullLookupAtom("$live");
|
|
||||||
atomfalse = YAP_MkAtomTerm(YAP_FullLookupAtom("$false"));
|
atomfalse = YAP_MkAtomTerm(YAP_FullLookupAtom("$false"));
|
||||||
while (YAP_GetValue(livegoal) != atomfalse) {
|
while (YAP_GetValue(livegoal) != atomfalse) {
|
||||||
YAP_Reset(YAP_FULL_RESET);
|
YAP_Reset(YAP_FULL_RESET);
|
||||||
do_top_goal(YAP_MkAtomTerm(livegoal));
|
do_top_goal(YAP_MkAtomTerm(livegoal));
|
||||||
|
livegoal = YAP_FullLookupAtom("$live");
|
||||||
}
|
}
|
||||||
YAP_Exit(EXIT_SUCCESS);
|
YAP_Exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user