support for trie compact lists (version 2): this new version uses

different marks to distinguish the lists ending with the empty list
from the lists ending with a non-empty list term.
This commit is contained in:
Ricardo Rocha
2009-07-05 05:14:08 +01:00
parent 6f2d5679c6
commit 5e4d7078ab
11 changed files with 748 additions and 751 deletions

View File

@@ -118,11 +118,12 @@ STD_PROTO(static inline tg_sol_fr_ptr CUT_prune_tg_solution_frames, (tg_sol_fr_p
#define IsTableVarTerm(TERM) \
((CELL) TERM) >= GLOBAL_table_var_enumerator(0) && \
((CELL) TERM) <= GLOBAL_table_var_enumerator(MAX_TABLE_VARS - 1)
#ifdef TRIE_COMPACT_LISTS
#define PairTermMark NULL
#define PairTermInit ((Term *) 0)
#define PairTermLast ((Term *) (LowTagBits + 1))
#endif /* TRIE_COMPACT_LISTS */
#ifdef TRIE_COMPACT_PAIRS
#define PairTermMark NULL
#define CompactPairInit AbsPair((Term *) 0)
#define CompactPairEndTerm AbsPair((Term *) (LowTagBits + 1))
#define CompactPairEndList AbsPair((Term *) (2*(LowTagBits + 1)))
#endif /* TRIE_COMPACT_PAIRS */
#define HASH_TABLE_LOCK(NODE) ((((unsigned long int)NODE) >> 5) & (TABLE_LOCK_BUCKETS - 1))
#define LOCK_TABLE(NODE) LOCK(GLOBAL_table_lock(HASH_TABLE_LOCK(NODE)))