diff --git a/C/attvar.c b/C/attvar.c index 07e472634..bb0d8eb8d 100644 --- a/C/attvar.c +++ b/C/attvar.c @@ -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)); diff --git a/C/cdmgr.c b/C/cdmgr.c index 729ec51e3..9d5b43e20 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -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) diff --git a/LGPL/chr/binomialheap.pl b/LGPL/chr/binomialheap.pl index c14c7385d..c6f75a770 100644 --- a/LGPL/chr/binomialheap.pl +++ b/LGPL/chr/binomialheap.pl @@ -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 -> diff --git a/library/atts.yap b/library/atts.yap index 76927d421..7a4bfeb2c 100644 --- a/library/atts.yap +++ b/library/atts.yap @@ -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) :- diff --git a/pl/boot.yap b/pl/boot.yap index ddec5c606..ad4437bcf 100644 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -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)), !,