growtrail assumed SREG meant ASP?

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1961 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2007-10-17 09:18:27 +00:00
parent 93897e4ef4
commit d316ddeb2a
3 changed files with 14 additions and 4 deletions

View File

@ -10,8 +10,11 @@
* *
* File: absmi.c *
* comments: Portable abstract machine interpreter *
* Last rev: $Date: 2007-09-24 09:02:31 $,$Author: vsc $ *
* Last rev: $Date: 2007-10-17 09:18:26 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.224 2007/09/24 09:02:31 vsc
* minor bug fixes
*
* Revision 1.223 2007/06/04 12:28:01 vsc
* interface speedups
* bad error message in X is foo>>2.
@ -742,12 +745,12 @@ Yap_absmi(int inp)
/* if we are within indexing code, the system may have to
* update a S */
{
CELL cut_b = LCL0-(CELL *)(SREG[E_CB]);
CELL cut_b;
#if SHADOW_S
S = SREG;
#endif
/* YREG =was pointing to where we were going to build the
/* YREG was pointing to where we were going to build the
* next choice-point. The stack shifter will need to know this
* to move the local stack */
if (YREG > (CELL *) PROTECT_FROZEN_B(B)) {
@ -755,6 +758,7 @@ Yap_absmi(int inp)
} else {
ASP = YREG+E_CB;
}
cut_b = LCL0-(CELL *)(ASP[E_CB]);
saveregs();
if(!Yap_growtrail (0, FALSE)) {
Yap_Error(OUT_OF_TRAIL_ERROR,TermNil,"YAP failed to reserve %ld bytes in growtrail",sizeof(CELL) * 16 * 1024L);
@ -1473,7 +1477,7 @@ Yap_absmi(int inp)
/* enter logical pred */
BOp(alloc_for_logical_pred, EC);
check_trail(TR);
/* say that an environment is using this clause */
/* say that an environment is using this clause */
/* we have our own copy for the clause */
#if defined(YAPOR) || defined(THREADS)
{

View File

@ -662,11 +662,16 @@ Macros to check the limits of stacks
#define check_trail(x)
#define check_trail_in_indexing(x)
#else
#define check_trail(x) if (Unsigned(Yap_TrailTop) - Unsigned(x) < MinTrailGap) \
goto notrailleft
#define check_trail_in_indexing(x) if (Unsigned(Yap_TrailTop) - Unsigned(x) < MinTrailGap) \
goto notrailleft_from_index
#endif
#if (defined(SBA) && defined(YAPOR)) || defined(TABLING)

View File

@ -17,6 +17,7 @@
<h2>Yap-5.1.3:</h2>
<ul>
<li> FIXED: grow_trail assumed SREG points to stack top!</li>
<li> FIXED: latest SWI chr.</li>
<li> FIXED: allow abolishing imports.</li>
<li> FIXED: YAP_EnterGoal would set YENV[E_CB] before setting YENV