fix TopLevelGoal to handle correctly undefined predicates. Make sure that
undefined predicated will not force the boot process to loop. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2310 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
		| @@ -7812,7 +7812,8 @@ Yap_absmi(int inp) | |||||||
| 	PredEntry *pe = PredFromDefCode(PREG); | 	PredEntry *pe = PredFromDefCode(PREG); | ||||||
| 	BEGD(d0); | 	BEGD(d0); | ||||||
| 	/* avoid trouble with undefined dynamic procedures */ | 	/* avoid trouble with undefined dynamic procedures */ | ||||||
| 	if (pe->PredFlags & (DynamicPredFlag|LogUpdatePredFlag|MultiFileFlag)) { | 	if ((pe->PredFlags & (DynamicPredFlag|LogUpdatePredFlag|MultiFileFlag)) || | ||||||
|  | 	    (UndefCode->OpcodeOfPred == UNDEF_OPCODE)) { | ||||||
| #if defined(YAPOR) || defined(THREADS) | #if defined(YAPOR) || defined(THREADS) | ||||||
| 	  PP = NULL; | 	  PP = NULL; | ||||||
| #endif | #endif | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								C/exec.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								C/exec.c
									
									
									
									
									
								
							| @@ -1685,7 +1685,7 @@ Yap_RunTopGoal(Term t) | |||||||
|     /* I cannot use the standard macro here because |     /* I cannot use the standard macro here because | ||||||
|        otherwise I would dereference the argument and |        otherwise I would dereference the argument and | ||||||
|        might skip a svar */ |        might skip a svar */ | ||||||
|     pe = Yap_GetPredPropByFunc(f, CurrentModule); |     pe = PredPropByFunc(f, CurrentModule); | ||||||
|     pt = RepAppl(t)+1; |     pt = RepAppl(t)+1; | ||||||
|     arity = ArityOfFunctor(f);  |     arity = ArityOfFunctor(f);  | ||||||
|   } else { |   } else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user