fix tabling. change Yap_timestamp to Yap_ma_timestamp. change Yap_time_stamp to Yap_timestamp.

This commit is contained in:
Joao
2011-04-07 16:00:26 +01:00
parent b4a00d1fef
commit 056ef59d4b
7 changed files with 11 additions and 58 deletions

View File

@@ -35,7 +35,7 @@ typedef struct {
extern ma_hash_entry Yap_ma_hash_table[MAVARS_HASH_SIZE];
extern UInt Yap_timestamp; /* an unsigned int */
extern UInt Yap_ma_timestamp; /* an unsigned int */
OPT_MAVAR_STATIC unsigned int Yap_MAVAR_HASH(CELL *);
OPT_MAVAR_STATIC struct ma_h_entry *Yap_ALLOC_NEW_MASPACE(void);
@@ -66,8 +66,8 @@ Yap_lookup_ma_var(CELL *addr) {
unsigned int i = Yap_MAVAR_HASH(addr);
struct ma_h_entry *nptr, *optr;
if (Yap_ma_hash_table[i].timestmp != Yap_timestamp) {
Yap_ma_hash_table[i].timestmp = Yap_timestamp;
if (Yap_ma_hash_table[i].timestmp != Yap_ma_timestamp) {
Yap_ma_hash_table[i].timestmp = Yap_ma_timestamp;
Yap_ma_hash_table[i].val.addr = addr;
Yap_ma_hash_table[i].val.next = NULL;
return FALSE;
@@ -91,13 +91,13 @@ Yap_lookup_ma_var(CELL *addr) {
OPT_MAVAR_STATIC UInt
Yap_NEW_MAHASH(ma_h_inner_struct *top) {
UInt time = ++Yap_timestamp;
UInt time = ++Yap_ma_timestamp;
if (time == 0) {
unsigned int i;
/* damn, we overflowed */
for (i = 0; i < MAVARS_HASH_SIZE; i++)
Yap_ma_hash_table[i].timestmp = 0;
time = ++Yap_timestamp;
time = ++Yap_ma_timestamp;
}
Yap_ma_h_top = top;
return time;