fix abolish/1
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@182 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
c85d9ee978
commit
b2934a5aeb
@ -2134,7 +2134,7 @@ InitCdMgr(void)
|
||||
InitCPred("$optimizer_on", 0, p_optimizer_on, SafePredFlag|SyncPredFlag);
|
||||
InitCPred("$clean_up_dead_clauses", 0, p_clean_up_dead_clauses, SyncPredFlag);
|
||||
InitCPred("$optimizer_off", 0, p_optimizer_off, SafePredFlag|SyncPredFlag);
|
||||
InitCPred("$kill_dynamic", 1, p_kill_dynamic, SafePredFlag|SyncPredFlag);
|
||||
InitCPred("$kill_dynamic", 2, p_kill_dynamic, SafePredFlag|SyncPredFlag);
|
||||
InitCPred("$in_this_file_before", 3, p_in_this_f_before, SafePredFlag);
|
||||
InitCPred("$first_clause_in_file", 3, p_first_cl_in_f, SafePredFlag);
|
||||
InitCPred("$mk_cl_not_first", 2, p_mk_cl_not_first, SafePredFlag);
|
||||
|
@ -130,10 +130,10 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
|
||||
extern int gc_calls;
|
||||
|
||||
vsc_count++;
|
||||
/* if (vsc_count < 24) return; */
|
||||
/* if (vsc_count <178000) return; */
|
||||
/* if (vsc_count > 500000) exit(0); */
|
||||
/* if (gc_calls < 1) return;*/
|
||||
YP_fprintf(YP_stderr,"%lu (%d)", vsc_count, CurrentModule);
|
||||
YP_fprintf(YP_stderr,"%lu ", vsc_count);
|
||||
/* check_trail_consistency(); */
|
||||
if (pred == NULL) {
|
||||
return;
|
||||
|
@ -153,13 +153,20 @@
|
||||
GONext(); \
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEPTH_LIMIT
|
||||
#define allocate_environment(PTR) \
|
||||
PTR[E_CP] = (CELL) CPREG; \
|
||||
PTR[E_E] = (CELL) ENV; \
|
||||
PTR[E_DEPTH] = (CELL)DEPTH;\
|
||||
PTR[E_B] = (CELL) B; \
|
||||
ENV = PTR
|
||||
#else
|
||||
#define allocate_environment(PTR) \
|
||||
PTR[E_CP] = (CELL) CPREG; \
|
||||
PTR[E_E] = (CELL) ENV; \
|
||||
PTR[E_B] = (CELL) B; \
|
||||
ENV = PTR
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------ **
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
<h2>Yap-4.3.20:</h2>
|
||||
<ul>
|
||||
<li>FIXED: abolish/1.</li>
|
||||
<li>NEW: try to make module system really compatible.</li>
|
||||
<li>CLEANUP: don't use state of Pred.</li>
|
||||
<li>SPEEDUP: improve predicate access by linking predicates to
|
||||
functors.</li>
|
||||
|
@ -359,14 +359,15 @@ abolish(N,A) :-
|
||||
( '$recorded'('$predicate_defs','$predicate_defs'(N,A,_),R) -> erase(R) ),
|
||||
fail.
|
||||
'$abolish'(N,A,M) :- functor(T,N,A),
|
||||
( '$is_dynamic'(T) -> '$abolishd'(T,M) ;
|
||||
( '$is_dynamic'(T, M) -> '$abolishd'(T,M) ;
|
||||
/* else */ '$abolishs'(T,M) ).
|
||||
|
||||
abolish(X) :-
|
||||
'$access_yap_flags'(8, 2), !,
|
||||
'$current_module'(M),
|
||||
'$new_abolish'(X,M).
|
||||
abolish(X,M) :-
|
||||
abolish(X) :-
|
||||
'$current_module'(M),
|
||||
'$old_abolish'(X,M).
|
||||
|
||||
'$new_abolish'(V,M) :- var(V,N), !,
|
||||
|
Reference in New Issue
Block a user