changes to support more tagging schemes from tabulation.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1303 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2005-05-30 06:07:35 +00:00
parent 95612f52e9
commit 50398abc6d
3 changed files with 25 additions and 11 deletions

View File

@ -690,9 +690,7 @@ Macros to check the limits of stacks
#if (defined(SBA) && defined(YAPOR)) || defined(TABLING) #if (defined(SBA) && defined(YAPOR)) || defined(TABLING)
#define check_stack(Label, GLOB) \ #define check_stack(Label, GLOB) \
if ( (Int)(Unsigned(E_YREG) - CFREG) < (Int)(GLOB) && \ if ( (Int)(Unsigned(YOUNGEST_CP((choiceptr)E_YREG,B_FZ)) - Unsigned(YOUNGEST_H(H_FZ,GLOB))) < CFREG ) goto Label
(choiceptr)E_YREG < B_FZ && E_YREG > H_FZ && \
(GLOB) > H_FZ && (GLOB) < (CELL *)B_FZ) goto Label
#else #else
#define check_stack(Label, GLOB) \ #define check_stack(Label, GLOB) \
if ( (Int)(Unsigned(E_YREG) - Unsigned(GLOB)) < CFREG ) goto Label if ( (Int)(Unsigned(E_YREG) - Unsigned(GLOB)) < CFREG ) goto Label

View File

@ -11,8 +11,11 @@
* File: amidefs.h * * File: amidefs.h *
* comments: Abstract machine peculiarities * * comments: Abstract machine peculiarities *
* * * *
* Last rev: $Date: 2005-04-10 04:01:13 $ * * Last rev: $Date: 2005-05-30 06:07:35 $ *
* $Log: not supported by cvs2svn $ * $Log: not supported by cvs2svn $
* Revision 1.27 2005/04/10 04:01:13 vsc
* bug fixes, I hope!
*
* Revision 1.26 2004/09/30 21:37:41 vsc * Revision 1.26 2004/09/30 21:37:41 vsc
* fixes for thread support * fixes for thread support
* *
@ -649,11 +652,24 @@ typedef struct choicept {
: \ : \
(SHARED_CP(CP2) ? TRUE : CP1 <= CP2) \ (SHARED_CP(CP2) ? TRUE : CP1 <= CP2) \
) )
#define YOUNGER_H(H1, H2) FIXMEE!!!!
#else /* ENV_COPY || ACOW */ #else /* ENV_COPY || ACOW */
#define YOUNGER_CP(CP1, CP2) ((CP1) < (CP2)) #define YOUNGER_CP(CP1, CP2) ((CP1) < (CP2))
#define EQUAL_OR_YOUNGER_CP(CP1, CP2) ((CP1) <= (CP2)) #define EQUAL_OR_YOUNGER_CP(CP1, CP2) ((CP1) <= (CP2))
#define YOUNGER_H(H1, H2) ((CELL *)(H1) > (CELL *)(H2))
#endif /* SBA */ #endif /* SBA */
#define YOUNGEST_CP(CP1, CP2) (YOUNGER_CP(CP1,CP2) ? (CP1) : (CP2))
#define YOUNGEST_H(H1, H2) (YOUNGER_H(H1,H2) ? (CELL *)(H1) : (CELL *)(H2))
/* /*
Environment Structure (CP, E, and CUT_B). Yap always saves the B Environment Structure (CP, E, and CUT_B). Yap always saves the B
where to cut to, even if not needed. where to cut to, even if not needed.

View File

@ -53,13 +53,13 @@ STD_PROTO(static inline tg_sol_fr_ptr CUT_prune_tg_solution_frames, (tg_sol_fr_p
#define TabPairTagBits MKTAG(0x5,3) #define TabPairTagBits MKTAG(0x5,3)
#define TabApplTagBits MKTAG(0x5,0) #define TabApplTagBits MKTAG(0x5,0)
#else #else
#define TabTagBits OOOOPPS!!! Inconsistent Tabling Tag Scheme #define TabTagBits MKTAG(0x0,LowTagBits)
#define TabNumberOfLowTagBits OOOOPPS!!! Inconsistent Tabling Tag Scheme #define TabNumberOfLowTagBits LowTagBits
#define TabVarTagBits OOOOPPS!!! Inconsistent Tabling Tag Scheme #define TabVarTagBits MKTAG(0x0,0)
#define TabAtomTagBits OOOOPPS!!! Inconsistent Tabling Tag Scheme #define TabAtomTagBits AtomTag
#define TabNumberTagBits OOOOPPS!!! Inconsistent Tabling Tag Scheme #define TabNumberTagBits NumberTag
#define TabPairTagBits OOOOPPS!!! Inconsistent Tabling Tag Scheme #define TabPairTagBits PairBits
#define TabApplTagBits OOOOPPS!!! Inconsistent Tabling Tag Scheme #define TabApplTagBits ApplBit
#endif /* TAGS_FAST_OPS */ #endif /* TAGS_FAST_OPS */