valgrind it!
enable atom garbage collection. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2055 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
25
pl/utils.yap
25
pl/utils.yap
@@ -200,17 +200,24 @@ call_cleanup(Goal, Catcher, Cleanup) :-
|
||||
'$call_cleanup'(Goal, Cleanup, Result) :-
|
||||
'$freeze_goal'(Result, '$clean_call'(Cleanup)),
|
||||
yap_hacks:trail_suspension_marker(Result),
|
||||
yap_hacks:current_choice_point(CP0),
|
||||
( '$execute'(Goal),
|
||||
yap_hacks:current_choice_point(CPF),
|
||||
( CP0 =:= CPF ->
|
||||
Result = exit, !
|
||||
; true
|
||||
)
|
||||
; Result = fail,
|
||||
fail
|
||||
(
|
||||
yap_hacks:current_choice_point(CP0),
|
||||
'$execute'(Goal),
|
||||
yap_hacks:current_choice_point(CPF),
|
||||
(
|
||||
CP0 =:= CPF ->
|
||||
Result = exit,
|
||||
!
|
||||
;
|
||||
true
|
||||
)
|
||||
;
|
||||
Result = fail,
|
||||
fail
|
||||
).
|
||||
|
||||
'$holds_true'.
|
||||
|
||||
'$clean_call'(Cleanup) :-
|
||||
'$execute'(Cleanup), !.
|
||||
'$clean_call'(_).
|
||||
|
Reference in New Issue
Block a user