fix $notrace (Ulrich Neumerkel #26)

This commit is contained in:
Vitor Santos Costa 2009-05-21 23:51:34 -05:00
parent 3736ba5793
commit e466bf2c5b
2 changed files with 13 additions and 5 deletions

View File

@ -376,7 +376,7 @@ true :- true.
% but YAP and SICStus does. % but YAP and SICStus does.
% %
'$process_directive'(G, _, M) :- '$process_directive'(G, _, M) :-
( '$do_yes_no'(G,M) -> true ; format(user_error,':- ~w:~w failed.~n',[M,G]) ). ( '$notrace'(M:G) -> true ; format(user_error,':- ~w:~w failed.~n',[M,G]) ).
'$continue_with_command'(reconsult,V,Pos,G,Source) :- '$continue_with_command'(reconsult,V,Pos,G,Source) :-
'$go_compile_clause'(G,V,Pos,5,Source), '$go_compile_clause'(G,V,Pos,5,Source),
@ -1177,7 +1177,7 @@ throw(Ball) :-
'$run_toplevel_hooks' :- '$run_toplevel_hooks' :-
nb_getval('$break',0), nb_getval('$break',0),
recorded('$toplevel_hooks',H,_), !, recorded('$toplevel_hooks',H,_), !,
( '$execute'(H) -> true ; true). ( '$oncenotrace'(H) -> true ; true).
'$run_toplevel_hooks'. '$run_toplevel_hooks'.
'$enter_system_mode' :- '$enter_system_mode' :-
@ -1214,7 +1214,15 @@ throw(Ball) :-
'$oncenotrace'(M:G) :- '$oncenotrace'(M:G) :-
'$execute_nonstop'(G, M), !. yap_hacks:disable_interrupts,
(
'$execute'(G),
!,
yap_hacks:enable_interrupts
;
yap_hacks:enable_interrupts,
fail
).
'$run_at_thread_start' :- '$run_at_thread_start' :-
recorded('$thread_initialization',M:D,_), recorded('$thread_initialization',M:D,_),

View File

@ -314,7 +314,7 @@ use_module(M,F,Is) :-
recorded('$system_initialisation',G,R), recorded('$system_initialisation',G,R),
erase(R), erase(R),
G \= '$', G \= '$',
call(G), '$notrace'(G),
fail. fail.
'$exec_initialisation_goals' :- '$exec_initialisation_goals' :-
'$show_consult_level'(Level1), '$show_consult_level'(Level1),
@ -327,7 +327,7 @@ use_module(M,F,Is) :-
( OldMode == on -> '$exit_system_mode' ; true ), ( OldMode == on -> '$exit_system_mode' ; true ),
% run initialization under user control (so allow debugging this stuff). % run initialization under user control (so allow debugging this stuff).
( (
'$system_catch'(once(M:G), M, Error, user:'$LoopError'(Error, top)), '$system_catch'('$oncenotrace'(M:G), M, Error, user:'$LoopError'(Error, top)),
fail fail
; ;
OldMode = on, OldMode = on,