change the sig_pending flag int a stack

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@294 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
stasinos
2002-01-15 15:44:57 +00:00
parent 4414acbdf9
commit 502e15be8e
2 changed files with 33 additions and 21 deletions

View File

@@ -720,17 +720,11 @@ debugging :-
),
'$execute'(M:Goal).
'$creep'(G) :-
format( 'creeping...~n', [] ),
'$get_value'('$sig_pending', Signal),
format( 'Signal == ~q~n', [Signal] ),
Signal \== [], !,
'$set_value'('$sig_pending', []),
( '$recorded'('$sig_handler', action(Signal,A),_) ->
'$execute'(A),
G=[M|Goal]
;
true
),
'$get_value'('$sig_pending', Signals),
Signals \== [], !,
'$set_value'('$sig_pending', [] ),
'$handle_signals'(Signals),
G=[M|Goal],
'$execute'(M:Goal).
'$creep'(_) :-
'$get_value'('$throw', true), !,
@@ -750,6 +744,13 @@ debugging :-
'$msg'(P,G,Mod,L,SL).
'$trace'(_,_,_,_).
'$handle_signals'([]).
'$handle_signals'([S|Rest]) :-
'$recorded'('$sig_handler', action(S,A),_),
'$execute'(A),
'$handle_signals'(Rest).
'$handle_signals'([_|Rest]).
'$msg'(P,G,Module,L,SL):-
flush_output(user_output),
flush_output(user_error),