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:
		@@ -813,7 +813,7 @@ p_modules_with_atts(void) {
 | 
				
			|||||||
	  return Yap_unify(ARG2,TermNil);
 | 
						  return Yap_unify(ARG2,TermNil);
 | 
				
			||||||
      while (!IsVarTerm(tatt)) {
 | 
					      while (!IsVarTerm(tatt)) {
 | 
				
			||||||
	Functor f = FunctorOfTerm(tatt);
 | 
						Functor f = FunctorOfTerm(tatt);
 | 
				
			||||||
	if (H != H0)
 | 
						if (H != h0)
 | 
				
			||||||
	  H[-1] = AbsPair(H);
 | 
						  H[-1] = AbsPair(H);
 | 
				
			||||||
	if (ActiveAtt(tatt, ArityOfFunctor(f))) {
 | 
						if (ActiveAtt(tatt, ArityOfFunctor(f))) {
 | 
				
			||||||
	  *H = MkAtomTerm(NameOfFunctor(f));
 | 
						  *H = MkAtomTerm(NameOfFunctor(f));
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										15
									
								
								C/cdmgr.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								C/cdmgr.c
									
									
									
									
									
								
							@@ -11,8 +11,13 @@
 | 
				
			|||||||
* File:		cdmgr.c							 *
 | 
					* File:		cdmgr.c							 *
 | 
				
			||||||
* comments:	Code manager						 *
 | 
					* 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 $
 | 
					* $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
 | 
					* Revision 1.173  2005/12/17 03:25:39  vsc
 | 
				
			||||||
* major changes to support online event-based profiling
 | 
					* major changes to support online event-based profiling
 | 
				
			||||||
* improve error discovery and restart on scanner.
 | 
					* improve error discovery and restart on scanner.
 | 
				
			||||||
@@ -1047,9 +1052,9 @@ kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap)
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
      LOCK(parent->ClLock);
 | 
					      LOCK(parent->ClLock);
 | 
				
			||||||
      c->ParentIndex = parent->ParentIndex;
 | 
					      c->ParentIndex = parent->ParentIndex;
 | 
				
			||||||
      LOCK(parent->u.ParentIndex->ClLock);
 | 
					      LOCK(parent->ParentIndex->ClLock);
 | 
				
			||||||
      parent->ParentIndex->ClRefCount++;
 | 
					      parent->ParentIndex->ClRefCount++;
 | 
				
			||||||
      UNLOCK(parent->u.ParentIndex->ClLock);
 | 
					      UNLOCK(parent->ParentIndex->ClLock);
 | 
				
			||||||
      parent->ClRefCount--;
 | 
					      parent->ClRefCount--;
 | 
				
			||||||
      UNLOCK(parent->ClLock);
 | 
					      UNLOCK(parent->ClLock);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -1154,10 +1159,10 @@ Yap_ErLogUpdIndex(LogUpdIndex *clau, yamop *ipc)
 | 
				
			|||||||
    kill_first_log_iblock(clau, NULL, c->ClPred);
 | 
					    kill_first_log_iblock(clau, NULL, c->ClPred);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
#if defined(THREADS) || defined(YAPOR)
 | 
					#if defined(THREADS) || defined(YAPOR)
 | 
				
			||||||
    LOCK(clau->u.ParentIndex->ClLock);
 | 
					    LOCK(clau->ParentIndex->ClLock);
 | 
				
			||||||
    /* protect against attempts at erasing */
 | 
					    /* protect against attempts at erasing */
 | 
				
			||||||
    clau->ClRefCount++;
 | 
					    clau->ClRefCount++;
 | 
				
			||||||
    UNLOCK(clau->u.ParentIndex->ClLock);
 | 
					    UNLOCK(clau->ParentIndex->ClLock);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    kill_first_log_iblock(clau, clau->ParentIndex, clau->ClPred);
 | 
					    kill_first_log_iblock(clau, clau->ParentIndex, clau->ClPred);
 | 
				
			||||||
#if defined(THREADS) || defined(YAPOR)
 | 
					#if defined(THREADS) || defined(YAPOR)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -82,6 +82,7 @@ least(one(node(X,Xs)),one(node(Y,Ys)),T) :-
 | 
				
			|||||||
		T = one(node(Y,Ys))
 | 
							T = one(node(Y,Ys))
 | 
				
			||||||
	).		
 | 
						).		
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
remove_tree([],_,[]).
 | 
					remove_tree([],_,[]).
 | 
				
			||||||
remove_tree([T|Ts],I,[NT|NTs]) :-
 | 
					remove_tree([T|Ts],I,[NT|NTs]) :-
 | 
				
			||||||
	( T == zero ->
 | 
						( T == zero ->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -188,7 +188,8 @@ do_verify_attributes([_|Mods], AttVar, Binding, Goals) :-
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
do_hook_attributes([], _).
 | 
					do_hook_attributes([], _).
 | 
				
			||||||
do_hook_attributes(att(Mod,Att,Atts), Binding) :-
 | 
					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),
 | 
						Mod:attr_unify_hook(Att, Binding),
 | 
				
			||||||
	do_hook_attributes(Atts, Binding).
 | 
						do_hook_attributes(Atts, Binding).
 | 
				
			||||||
do_hook_attributes(att(_,_,Atts), Binding) :-
 | 
					do_hook_attributes(att(_,_,Atts), Binding) :-
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -749,12 +749,10 @@ not(G) :-    \+ '$execute'(G).
 | 
				
			|||||||
	S \= M, % can't try importing from the module itself.
 | 
						S \= M, % can't try importing from the module itself.
 | 
				
			||||||
	!,
 | 
						!,
 | 
				
			||||||
	'$exit_undefp'.
 | 
						'$exit_undefp'.
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
'$find_undefp_handler'(G,M,NG,M) :-
 | 
					'$find_undefp_handler'(G,M,NG,M) :-
 | 
				
			||||||
	'$is_expand_goal_or_meta_predicate'(G,M),
 | 
						'$is_expand_goal_or_meta_predicate'(G,M),
 | 
				
			||||||
	'$system_catch'(goal_expansion(G, M, NG), user, _, fail), !,
 | 
						'$system_catch'(goal_expansion(G, M, NG), user, _, fail), !,
 | 
				
			||||||
	'$exit_undefp'.
 | 
						'$exit_undefp'.
 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
'$find_undefp_handler'(G,M,NG,user) :-
 | 
					'$find_undefp_handler'(G,M,NG,user) :-
 | 
				
			||||||
	\+ '$undefined'(unknown_predicate_handler(_,_,_), user),
 | 
						\+ '$undefined'(unknown_predicate_handler(_,_,_), user),
 | 
				
			||||||
	'$system_catch'(unknown_predicate_handler(G,M,NG), user, Error, '$leave_undefp'(Error)), !,
 | 
						'$system_catch'(unknown_predicate_handler(G,M,NG), user, Error, '$leave_undefp'(Error)), !,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user