fix small bug in attvar handling.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1498 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2006-01-08 03:12:02 +00:00
parent a4b85e2abd
commit b881f59a71
5 changed files with 15 additions and 10 deletions

View File

@ -813,7 +813,7 @@ p_modules_with_atts(void) {
return Yap_unify(ARG2,TermNil);
while (!IsVarTerm(tatt)) {
Functor f = FunctorOfTerm(tatt);
if (H != H0)
if (H != h0)
H[-1] = AbsPair(H);
if (ActiveAtt(tatt, ArityOfFunctor(f))) {
*H = MkAtomTerm(NameOfFunctor(f));

View File

@ -11,8 +11,13 @@
* File: cdmgr.c *
* comments: Code manager *
* *
* Last rev: $Date: 2005-12-23 00:20:13 $,$Author: vsc $ *
* Last rev: $Date: 2006-01-08 03:12:00 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.174 2005/12/23 00:20:13 vsc
* updates to gprof
* support for __POWER__
* Try to saveregs before longjmp.
*
* Revision 1.173 2005/12/17 03:25:39 vsc
* major changes to support online event-based profiling
* improve error discovery and restart on scanner.
@ -1047,9 +1052,9 @@ kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap)
LOCK(parent->ClLock);
c->ParentIndex = parent->ParentIndex;
LOCK(parent->u.ParentIndex->ClLock);
LOCK(parent->ParentIndex->ClLock);
parent->ParentIndex->ClRefCount++;
UNLOCK(parent->u.ParentIndex->ClLock);
UNLOCK(parent->ParentIndex->ClLock);
parent->ClRefCount--;
UNLOCK(parent->ClLock);
}
@ -1154,10 +1159,10 @@ Yap_ErLogUpdIndex(LogUpdIndex *clau, yamop *ipc)
kill_first_log_iblock(clau, NULL, c->ClPred);
} else {
#if defined(THREADS) || defined(YAPOR)
LOCK(clau->u.ParentIndex->ClLock);
LOCK(clau->ParentIndex->ClLock);
/* protect against attempts at erasing */
clau->ClRefCount++;
UNLOCK(clau->u.ParentIndex->ClLock);
UNLOCK(clau->ParentIndex->ClLock);
#endif
kill_first_log_iblock(clau, clau->ParentIndex, clau->ClPred);
#if defined(THREADS) || defined(YAPOR)

View File

@ -82,6 +82,7 @@ least(one(node(X,Xs)),one(node(Y,Ys)),T) :-
T = one(node(Y,Ys))
).
remove_tree([],_,[]).
remove_tree([T|Ts],I,[NT|NTs]) :-
( T == zero ->

View File

@ -188,7 +188,8 @@ do_verify_attributes([_|Mods], AttVar, Binding, Goals) :-
do_hook_attributes([], _).
do_hook_attributes(att(Mod,Att,Atts), Binding) :-
current_predicate(attr_unify_hook,Mod:attr_unify_hook(_,_)), !,
current_predicate(attr_unify_hook,Mod:attr_unify_hook(_,_)),
!,
Mod:attr_unify_hook(Att, Binding),
do_hook_attributes(Atts, Binding).
do_hook_attributes(att(_,_,Atts), Binding) :-

View File

@ -741,7 +741,7 @@ not(G) :- \+ '$execute'(G).
% for undefined_predicates.
'$enter_undefp',
'$find_undefp_handler'(G,M,Goal,NM), !,
'$execute0'(Goal,NM).
'$execute0'(Goal,NM).
'$find_undefp_handler'(G,M,G,S) :-
functor(G,F,N),
@ -749,12 +749,10 @@ not(G) :- \+ '$execute'(G).
S \= M, % can't try importing from the module itself.
!,
'$exit_undefp'.
/*
'$find_undefp_handler'(G,M,NG,M) :-
'$is_expand_goal_or_meta_predicate'(G,M),
'$system_catch'(goal_expansion(G, M, NG), user, _, fail), !,
'$exit_undefp'.
*/
'$find_undefp_handler'(G,M,NG,user) :-
\+ '$undefined'(unknown_predicate_handler(_,_,_), user),
'$system_catch'(unknown_predicate_handler(G,M,NG), user, Error, '$leave_undefp'(Error)), !,