fix bad calls to consult/reconsult
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@983 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
f1063a27b2
commit
e0c42788c7
@ -115,10 +115,6 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
|
|||||||
/* extern int gc_calls; */
|
/* extern int gc_calls; */
|
||||||
|
|
||||||
vsc_count++;
|
vsc_count++;
|
||||||
if (vsc_count < 59966299LL)
|
|
||||||
return;
|
|
||||||
if (vsc_count == 59966301LL)
|
|
||||||
vsc_xstop=1;
|
|
||||||
#ifdef COMMENTED
|
#ifdef COMMENTED
|
||||||
if (port != enter_pred ||
|
if (port != enter_pred ||
|
||||||
!pred ||
|
!pred ||
|
||||||
|
@ -56,10 +56,7 @@ compile(P) :-
|
|||||||
|
|
||||||
% leave compile mode to 1 for native code.
|
% leave compile mode to 1 for native code.
|
||||||
'$compile'(M:A) :- !,
|
'$compile'(M:A) :- !,
|
||||||
'$current_module'(M0),
|
'$reconsult'(A, M).
|
||||||
'$change_module'(M),
|
|
||||||
'$compile'(A),
|
|
||||||
'$change_module'(M0).
|
|
||||||
'$compile'(A) :-
|
'$compile'(A) :-
|
||||||
'$compile_mode'(Old,0),
|
'$compile_mode'(Old,0),
|
||||||
'$current_module'(M0),
|
'$current_module'(M0),
|
||||||
@ -69,12 +66,23 @@ compile(P) :-
|
|||||||
consult(Fs) :-
|
consult(Fs) :-
|
||||||
'$has_yap_or',
|
'$has_yap_or',
|
||||||
'$do_error'(context_error(consult(Fs),clause),query).
|
'$do_error'(context_error(consult(Fs),clause),query).
|
||||||
|
consult(V) :-
|
||||||
|
var(V), !,
|
||||||
|
'$do_error'(instantiation_error,consult(V)).
|
||||||
|
consult(M0:Fs) :- !,
|
||||||
|
'$consult'(Fs, M0).
|
||||||
consult(Fs) :-
|
consult(Fs) :-
|
||||||
'$consult'(Fs).
|
'$current_module'(M0),
|
||||||
|
'$consult'(Fs, M0).
|
||||||
|
|
||||||
reconsult(Fs) :-
|
reconsult(Fs) :-
|
||||||
'$has_yap_or', fail,
|
'$has_yap_or', fail,
|
||||||
'$do_error'(context_error(reconsult(Fs),clause),query).
|
'$do_error'(context_error(reconsult(Fs),clause),query).
|
||||||
|
reconsult(V) :-
|
||||||
|
var(V), !,
|
||||||
|
'$do_error'(instantiation_error,reconsult(V)).
|
||||||
|
reconsult(M0:Fs) :- !,
|
||||||
|
'$reconsult'(Fs, M0).
|
||||||
reconsult(Fs) :-
|
reconsult(Fs) :-
|
||||||
'$current_module'(M0),
|
'$current_module'(M0),
|
||||||
'$reconsult'(Fs, M0).
|
'$reconsult'(Fs, M0).
|
||||||
|
Reference in New Issue
Block a user