more debugger fixes!
- make sure donotrace and oncenotrace are known to the signal mechanism: they should disable creeping - avoid creep at deallocate: it is a very bad idea :(
This commit is contained in:
parent
ebbefd71ce
commit
e252ef0b2f
@ -2690,9 +2690,9 @@ Yap_absmi(int inp)
|
||||
/*
|
||||
don't do a creep here; also, if our instruction is followed by
|
||||
a execute_c, just wait a bit more */
|
||||
if (ActiveSignals & YAP_CREEP_SIGNAL &&
|
||||
PREG->opc != Yap_opcode(_procceed) &&
|
||||
PREG->opc != Yap_opcode(_cut_e)) {
|
||||
if (ActiveSignals & YAP_CREEP_SIGNAL ||
|
||||
(PREG->opc != Yap_opcode(_procceed) &&
|
||||
PREG->opc != Yap_opcode(_cut_e))) {
|
||||
GONext();
|
||||
}
|
||||
PP = PREG->u.p.p;
|
||||
|
@ -849,7 +849,7 @@ not(G) :- \+ '$execute'(G).
|
||||
'$call'(G, CP, G0, CurMod) :-
|
||||
( '$is_expand_goal_or_meta_predicate'(G,CurMod) ->
|
||||
(
|
||||
user:goal_expansion(G, CurMod, NG) ->
|
||||
'$oncenotrace'(user:goal_expansion(G, CurMod, NG)) ->
|
||||
'$call'(NG, CP, G0,CurMod)
|
||||
;
|
||||
% repeat other code.
|
||||
@ -1165,9 +1165,8 @@ throw(Ball) :-
|
||||
nb_setval('$system_mode',off),
|
||||
( nb_getval('$trace',on) -> '$creep' ; true).
|
||||
|
||||
'$donotrace'(G) :-
|
||||
'$disable_creep', !,
|
||||
'$execute'(G),
|
||||
'$creep'.
|
||||
'$donotrace'(G) :-
|
||||
'$execute'(G).
|
||||
|
||||
'$oncenotrace'(G) :-
|
||||
'$execute'(G), !.
|
||||
|
@ -97,6 +97,48 @@
|
||||
!,
|
||||
'$creep',
|
||||
'$execute_nonstop'('$call'(G, CP, G0, M),M0).
|
||||
% donotrace: means do not trace! So,
|
||||
% ignore and then put creep back for the continuation.
|
||||
'$start_creep'([M0|'$donotrace'(G)]) :-
|
||||
!,
|
||||
(
|
||||
CP0 is '$last_choice_pt',
|
||||
'$execute_nonstop'(G,M0),
|
||||
CP1 is '$last_choice_pt',
|
||||
% exit port: creep
|
||||
'$creep',
|
||||
(
|
||||
% if deterministic just creep all you want.
|
||||
CP0 = CP1 ->
|
||||
!
|
||||
;
|
||||
% extra disjunction protects reentry into usergoal
|
||||
(
|
||||
% cannot cut here
|
||||
true
|
||||
;
|
||||
% be sure to disable creep on redo port
|
||||
'$disable_creep',
|
||||
fail
|
||||
)
|
||||
)
|
||||
;
|
||||
% put it back again on fail
|
||||
'$creep',
|
||||
fail
|
||||
).
|
||||
'$start_creep'([M0|'$oncenotrace'(G)]) :-
|
||||
!,
|
||||
('$execute_nonstop'(G,M0),
|
||||
CP1 is '$last_choice_pt',
|
||||
% exit port: creep
|
||||
'$creep',
|
||||
!
|
||||
;
|
||||
% put it back again on fail
|
||||
'$creep',
|
||||
fail
|
||||
).
|
||||
% do not debug if we are not in debug mode.
|
||||
'$start_creep'([Mod|G]) :-
|
||||
'$debug_on'(DBON), DBON = false, !,
|
||||
|
Reference in New Issue
Block a user