move more fields to HEAPFIELDS
This commit is contained in:
parent
838b14cb77
commit
7116d1385b
68
C/init.c
68
C/init.c
@ -1023,6 +1023,39 @@ InitOtaplInst(yamop start[1], OPCODE opc)
|
|||||||
#endif /* TABLING */
|
#endif /* TABLING */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
InitDBErasedMarker(void)
|
||||||
|
{
|
||||||
|
Yap_heap_regs->db_erased_marker =
|
||||||
|
(DBRef)Yap_AllocCodeSpace(sizeof(DBStruct));
|
||||||
|
Yap_LUClauseSpace += sizeof(DBStruct);
|
||||||
|
Yap_heap_regs->db_erased_marker->id = FunctorDBRef;
|
||||||
|
Yap_heap_regs->db_erased_marker->Flags = ErasedMask;
|
||||||
|
Yap_heap_regs->db_erased_marker->Code = NULL;
|
||||||
|
Yap_heap_regs->db_erased_marker->DBT.DBRefs = NULL;
|
||||||
|
Yap_heap_regs->db_erased_marker->Parent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
InitLogDBErasedMarker(void)
|
||||||
|
{
|
||||||
|
Yap_heap_regs->logdb_erased_marker =
|
||||||
|
(LogUpdClause *)Yap_AllocCodeSpace(sizeof(LogUpdClause)+(UInt)NEXTOP((yamop*)NULL,e));
|
||||||
|
Yap_LUClauseSpace += sizeof(LogUpdClause)+(UInt)NEXTOP((yamop*)NULL,e);
|
||||||
|
Yap_heap_regs->logdb_erased_marker->Id = FunctorDBRef;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClFlags = ErasedMask|LogUpdMask;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClSource = NULL;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClRefCount = 0;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClPred = PredLogUpdClause;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClExt = NULL;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClPrev = NULL;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClNext = NULL;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClSize = (UInt)NEXTOP(((LogUpdClause *)NULL)->ClCode,e);
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClCode->opc = Yap_opcode(_op_fail);
|
||||||
|
INIT_LOCK(Yap_heap_regs->logdb_erased_marker->ClLock);
|
||||||
|
INIT_CLREF_COUNT(Yap_heap_regs->logdb_erased_marker);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
InitCodes(void)
|
InitCodes(void)
|
||||||
{
|
{
|
||||||
@ -1124,22 +1157,13 @@ InitCodes(void)
|
|||||||
Yap_heap_regs->wl.consultlow + Yap_heap_regs->wl.consultcapacity;
|
Yap_heap_regs->wl.consultlow + Yap_heap_regs->wl.consultcapacity;
|
||||||
#endif /* YAPOR */
|
#endif /* YAPOR */
|
||||||
Yap_heap_regs->system_pred_goal_expansion_on = FALSE;
|
Yap_heap_regs->system_pred_goal_expansion_on = FALSE;
|
||||||
Yap_heap_regs->update_mode = UPDATE_MODE_LOGICAL;
|
|
||||||
Yap_heap_regs->maxdepth = 0;
|
Yap_heap_regs->maxdepth = 0;
|
||||||
Yap_heap_regs->maxlist = 0;
|
Yap_heap_regs->maxlist = 0;
|
||||||
Yap_heap_regs->maxwriteargs = 0;
|
Yap_heap_regs->maxwriteargs = 0;
|
||||||
|
|
||||||
Yap_heap_regs->atprompt = 0;
|
Yap_heap_regs->atprompt = 0;
|
||||||
/* system boots in compile mode */
|
|
||||||
Yap_heap_regs->static_predicates_marked = TRUE;
|
|
||||||
/* use Quintus compatible atom_chars and number_chars, not ISO compatible */
|
|
||||||
Yap_heap_regs->static_predicates_marked = FALSE;
|
|
||||||
|
|
||||||
Yap_heap_regs->int_keys_size = INT_KEYS_DEFAULT_SIZE;
|
/* use Quintus compatible atom_chars and number_chars, not ISO compatible */
|
||||||
Yap_heap_regs->int_keys_timestamp = 0;
|
|
||||||
Yap_heap_regs->IntKeys = NULL;
|
|
||||||
Yap_heap_regs->int_bb_keys_size = INT_KEYS_DEFAULT_SIZE;
|
|
||||||
Yap_heap_regs->IntBBKeys = NULL;
|
|
||||||
Yap_heap_regs->char_conversion_table = NULL;
|
Yap_heap_regs->char_conversion_table = NULL;
|
||||||
Yap_heap_regs->char_conversion_table2 = NULL;
|
Yap_heap_regs->char_conversion_table2 = NULL;
|
||||||
/*
|
/*
|
||||||
@ -1176,29 +1200,7 @@ InitCodes(void)
|
|||||||
Yap_heap_regs->getwork_code.u.Otapl.p = RepPredProp(PredPropByAtom(AtomGetwork, PROLOG_MODULE));
|
Yap_heap_regs->getwork_code.u.Otapl.p = RepPredProp(PredPropByAtom(AtomGetwork, PROLOG_MODULE));
|
||||||
Yap_heap_regs->getwork_seq_code.u.Otapl.p = RepPredProp(PredPropByAtom(AtomGetworkSeq, PROLOG_MODULE));
|
Yap_heap_regs->getwork_seq_code.u.Otapl.p = RepPredProp(PredPropByAtom(AtomGetworkSeq, PROLOG_MODULE));
|
||||||
#endif /* YAPOR */
|
#endif /* YAPOR */
|
||||||
Yap_heap_regs->db_erased_marker =
|
|
||||||
(DBRef)Yap_AllocCodeSpace(sizeof(DBStruct));
|
|
||||||
Yap_LUClauseSpace += sizeof(DBStruct);
|
|
||||||
Yap_heap_regs->db_erased_marker->id = FunctorDBRef;
|
|
||||||
Yap_heap_regs->db_erased_marker->Flags = ErasedMask;
|
|
||||||
Yap_heap_regs->db_erased_marker->Code = NULL;
|
|
||||||
Yap_heap_regs->db_erased_marker->DBT.DBRefs = NULL;
|
|
||||||
Yap_heap_regs->db_erased_marker->Parent = NULL;
|
|
||||||
Yap_heap_regs->logdb_erased_marker =
|
|
||||||
(LogUpdClause *)Yap_AllocCodeSpace(sizeof(LogUpdClause)+(UInt)NEXTOP((yamop*)NULL,e));
|
|
||||||
Yap_LUClauseSpace += sizeof(LogUpdClause)+(UInt)NEXTOP((yamop*)NULL,e);
|
|
||||||
Yap_heap_regs->logdb_erased_marker->Id = FunctorDBRef;
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClFlags = ErasedMask|LogUpdMask;
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClSource = NULL;
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClRefCount = 0;
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClPred = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomDoLogUpdClause,5),PROLOG_MODULE));
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClExt = NULL;
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClPrev = NULL;
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClNext = NULL;
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClSize = (UInt)NEXTOP(((LogUpdClause *)NULL)->ClCode,e);
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClCode->opc = Yap_opcode(_op_fail);
|
|
||||||
// INIT_LOCK(Yap_heap_regs->logdb_erased_marker->ClLock);
|
|
||||||
INIT_CLREF_COUNT(Yap_heap_regs->logdb_erased_marker);
|
|
||||||
Yap_heap_regs->yap_streams = NULL;
|
Yap_heap_regs->yap_streams = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
39
H/YapHeap.h
39
H/YapHeap.h
@ -265,36 +265,12 @@ typedef struct various_codes {
|
|||||||
AtomHashEntry invisiblechain;
|
AtomHashEntry invisiblechain;
|
||||||
AtomHashEntry *wide_hash_chain;
|
AtomHashEntry *wide_hash_chain;
|
||||||
AtomHashEntry *hash_chain;
|
AtomHashEntry *hash_chain;
|
||||||
|
|
||||||
#include "tatoms.h"
|
#include "tatoms.h"
|
||||||
|
|
||||||
/* Terms multiply used */
|
/* Terms multiply used */
|
||||||
#include "hstruct.h"
|
#include "hstruct.h"
|
||||||
|
|
||||||
/* UDI support */
|
|
||||||
struct udi_info *udi_control_blocks;
|
|
||||||
|
|
||||||
/* data-base statistics */
|
|
||||||
Int static_predicates_marked;
|
|
||||||
|
|
||||||
/* Internal Database */
|
|
||||||
Prop *IntKeys;
|
|
||||||
Prop *IntLUKeys;
|
|
||||||
Prop *IntBBKeys;
|
|
||||||
|
|
||||||
/* Internal Data-Base Control */
|
|
||||||
int update_mode;
|
|
||||||
|
|
||||||
/* Internal Database Statistics */
|
|
||||||
UInt int_keys_size;
|
|
||||||
UInt int_keys_timestamp;
|
|
||||||
UInt int_lu_keys_size;
|
|
||||||
UInt int_lu_keys_timestamp;
|
|
||||||
UInt int_bb_keys_size;
|
|
||||||
|
|
||||||
/* nasty IDB stuff */
|
|
||||||
struct DB_STRUCT *db_erased_marker;
|
|
||||||
struct logic_upd_clause *logdb_erased_marker;
|
|
||||||
|
|
||||||
/* Dead clauses and IDB entries */
|
/* Dead clauses and IDB entries */
|
||||||
struct static_clause *dead_static_clauses;
|
struct static_clause *dead_static_clauses;
|
||||||
struct static_mega_clause *dead_mega_clauses;
|
struct static_mega_clause *dead_mega_clauses;
|
||||||
@ -414,9 +390,6 @@ extern struct various_codes *Yap_heap_regs;
|
|||||||
#define max_write_args Yap_heap_regs->maxwriteargs
|
#define max_write_args Yap_heap_regs->maxwriteargs
|
||||||
#define AtPrompt (&(Yap_heap_regs->atprompt ))
|
#define AtPrompt (&(Yap_heap_regs->atprompt ))
|
||||||
#define Prompt Yap_heap_regs->prompt
|
#define Prompt Yap_heap_regs->prompt
|
||||||
#define UdiControlBlocks Yap_heap_regs->udi_control_blocks
|
|
||||||
#define UPDATE_MODE Yap_heap_regs->update_mode
|
|
||||||
#define STATIC_PREDICATES_MARKED Yap_heap_regs->static_predicates_marked
|
|
||||||
#define yap_flags Yap_heap_regs->yap_flags_field
|
#define yap_flags Yap_heap_regs->yap_flags_field
|
||||||
#ifdef THREADS
|
#ifdef THREADS
|
||||||
#define ThreadHandlesLock Yap_heap_regs->thread_handles_lock
|
#define ThreadHandlesLock Yap_heap_regs->thread_handles_lock
|
||||||
@ -428,22 +401,12 @@ extern struct various_codes *Yap_heap_regs;
|
|||||||
#define NOfWideAtoms Yap_heap_regs->n_of_wide_atoms
|
#define NOfWideAtoms Yap_heap_regs->n_of_wide_atoms
|
||||||
#define WideAtomHashTableSize Yap_heap_regs->wide_atom_hash_table_size
|
#define WideAtomHashTableSize Yap_heap_regs->wide_atom_hash_table_size
|
||||||
#define WideHashChain Yap_heap_regs->wide_hash_chain
|
#define WideHashChain Yap_heap_regs->wide_hash_chain
|
||||||
#define INT_KEYS_SIZE Yap_heap_regs->int_keys_size
|
|
||||||
#define INT_KEYS_TIMESTAMP Yap_heap_regs->int_keys_timestamp
|
|
||||||
#define INT_KEYS Yap_heap_regs->IntKeys
|
|
||||||
#define INT_LU_KEYS_SIZE Yap_heap_regs->int_lu_keys_size
|
|
||||||
#define INT_LU_KEYS_TIMESTAMP Yap_heap_regs->int_lu_keys_timestamp
|
|
||||||
#define INT_LU_KEYS Yap_heap_regs->IntLUKeys
|
|
||||||
#define INT_BB_KEYS_SIZE Yap_heap_regs->int_bb_keys_size
|
|
||||||
#define INT_BB_KEYS Yap_heap_regs->IntBBKeys
|
|
||||||
#define CharConversionTable Yap_heap_regs->char_conversion_table
|
#define CharConversionTable Yap_heap_regs->char_conversion_table
|
||||||
#define CharConversionTable2 Yap_heap_regs->char_conversion_table2
|
#define CharConversionTable2 Yap_heap_regs->char_conversion_table2
|
||||||
#define OpList Yap_heap_regs->op_list
|
#define OpList Yap_heap_regs->op_list
|
||||||
#define FloatFormat Yap_heap_regs->float_format
|
#define FloatFormat Yap_heap_regs->float_format
|
||||||
#define PROLOG_MODULE 0
|
#define PROLOG_MODULE 0
|
||||||
#include "dhstruct.h"
|
#include "dhstruct.h"
|
||||||
#define DBErasedMarker Yap_heap_regs->db_erased_marker
|
|
||||||
#define LogDBErasedMarker Yap_heap_regs->logdb_erased_marker
|
|
||||||
#define DBErasedList Yap_heap_regs->db_erased_list
|
#define DBErasedList Yap_heap_regs->db_erased_list
|
||||||
#define DBErasedIList Yap_heap_regs->db_erased_ilist
|
#define DBErasedIList Yap_heap_regs->db_erased_ilist
|
||||||
#define Stream Yap_heap_regs->yap_streams
|
#define Stream Yap_heap_regs->yap_streams
|
||||||
|
18
H/dhstruct.h
18
H/dhstruct.h
@ -172,3 +172,21 @@
|
|||||||
#define Yap_FreedCps Yap_heap_regs->freed_cps
|
#define Yap_FreedCps Yap_heap_regs->freed_cps
|
||||||
#define Yap_expand_clauses_sz Yap_heap_regs->expand_clauses_sz
|
#define Yap_expand_clauses_sz Yap_heap_regs->expand_clauses_sz
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define UdiControlBlocks Yap_heap_regs->udi_control_blocks
|
||||||
|
|
||||||
|
|
||||||
|
#define STATIC_PREDICATES_MARKED Yap_heap_regs->static_predicates_marked
|
||||||
|
|
||||||
|
#define INT_KEYS Yap_heap_regs->IntKeys
|
||||||
|
#define INT_LU_KEYS Yap_heap_regs->IntLUKeys
|
||||||
|
#define INT_BB_KEYS Yap_heap_regs->IntBBKeys
|
||||||
|
|
||||||
|
#define INT_KEYS_SIZE Yap_heap_regs->int_keys_size
|
||||||
|
#define INT_KEYS_TIMESTAMP Yap_heap_regs->int_keys_timestamp
|
||||||
|
#define INT_BB_KEYS_SIZE Yap_heap_regs->int_bb_keys_size
|
||||||
|
|
||||||
|
#define UPDATE_MODE Yap_heap_regs->update_mode
|
||||||
|
|
||||||
|
#define DBErasedMarker Yap_heap_regs->db_erased_marker
|
||||||
|
#define LogDBErasedMarker Yap_heap_regs->logdb_erased_marker
|
||||||
|
18
H/hstruct.h
18
H/hstruct.h
@ -172,3 +172,21 @@
|
|||||||
UInt freed_cps;
|
UInt freed_cps;
|
||||||
UInt expand_clauses_sz;
|
UInt expand_clauses_sz;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct udi_info *udi_control_blocks;
|
||||||
|
|
||||||
|
|
||||||
|
Int static_predicates_marked;
|
||||||
|
|
||||||
|
Prop *IntKeys;
|
||||||
|
Prop *IntLUKeys;
|
||||||
|
Prop *IntBBKeys;
|
||||||
|
|
||||||
|
UInt int_keys_size;
|
||||||
|
UInt int_keys_timestamp;
|
||||||
|
UInt int_bb_keys_size;
|
||||||
|
|
||||||
|
int update_mode;
|
||||||
|
|
||||||
|
struct DB_STRUCT *db_erased_marker;
|
||||||
|
struct logic_upd_clause *logdb_erased_marker;
|
||||||
|
18
H/ihstruct.h
18
H/ihstruct.h
@ -172,3 +172,21 @@
|
|||||||
Yap_heap_regs->freed_cps = 0L;
|
Yap_heap_regs->freed_cps = 0L;
|
||||||
Yap_heap_regs->expand_clauses_sz = 0L;
|
Yap_heap_regs->expand_clauses_sz = 0L;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Yap_heap_regs->udi_control_blocks = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
Yap_heap_regs->static_predicates_marked = FALSE;
|
||||||
|
|
||||||
|
Yap_heap_regs->IntKeys = NULL;
|
||||||
|
Yap_heap_regs->IntLUKeys = NULL;
|
||||||
|
Yap_heap_regs->IntBBKeys = NULL;
|
||||||
|
|
||||||
|
Yap_heap_regs->int_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||||
|
Yap_heap_regs->int_keys_timestamp = 0L;
|
||||||
|
Yap_heap_regs->int_bb_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||||
|
|
||||||
|
Yap_heap_regs->update_mode = UPDATE_MODE_LOGICAL;
|
||||||
|
|
||||||
|
InitDBErasedMarker();
|
||||||
|
InitLogDBErasedMarker();
|
||||||
|
151
H/rheap.h
151
H/rheap.h
@ -669,6 +669,105 @@ RestoreExpandList(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
RestoreUdiControlBlocks(void)
|
||||||
|
{
|
||||||
|
if (Yap_heap_regs->udi_control_blocks) {
|
||||||
|
Yap_Error(SYSTEM_ERROR, TermNil,
|
||||||
|
"YAP cannot restore UDI entries!!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
RestoreIntKeys(void)
|
||||||
|
{
|
||||||
|
if (Yap_heap_regs->IntKeys != NULL) {
|
||||||
|
Yap_heap_regs->IntKeys = (Prop *)AddrAdjust((ADDR)(Yap_heap_regs->IntKeys));
|
||||||
|
{
|
||||||
|
UInt i;
|
||||||
|
for (i = 0; i < Yap_heap_regs->int_keys_size; i++) {
|
||||||
|
if (Yap_heap_regs->IntKeys[i] != NIL) {
|
||||||
|
Prop p0 = Yap_heap_regs->IntKeys[i] = PropAdjust(Yap_heap_regs->IntKeys[i]);
|
||||||
|
RestoreEntries(RepProp(p0), TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
RestoreIntLUKeys(void)
|
||||||
|
{
|
||||||
|
if (Yap_heap_regs->IntLUKeys != NULL) {
|
||||||
|
Yap_heap_regs->IntLUKeys = (Prop *)AddrAdjust((ADDR)(Yap_heap_regs->IntLUKeys));
|
||||||
|
{
|
||||||
|
Int i;
|
||||||
|
for (i = 0; i < INT_KEYS_SIZE; i++) {
|
||||||
|
Prop p0 = INT_LU_KEYS[i];
|
||||||
|
if (p0) {
|
||||||
|
p0 = PropAdjust(p0);
|
||||||
|
INT_LU_KEYS[i] = p0;
|
||||||
|
while (p0) {
|
||||||
|
PredEntry *pe = RepPredProp(p0);
|
||||||
|
pe->NextOfPE =
|
||||||
|
PropAdjust(pe->NextOfPE);
|
||||||
|
CleanCode(pe);
|
||||||
|
p0 = RepProp(pe->NextOfPE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
RestoreIntBBKeys(void)
|
||||||
|
{
|
||||||
|
if (Yap_heap_regs->IntBBKeys != NULL) {
|
||||||
|
Yap_heap_regs->IntBBKeys = (Prop *)AddrAdjust((ADDR)(Yap_heap_regs->IntBBKeys));
|
||||||
|
{
|
||||||
|
UInt i;
|
||||||
|
for (i = 0; i < Yap_heap_regs->int_bb_keys_size; i++) {
|
||||||
|
if (Yap_heap_regs->IntBBKeys[i] != NIL) {
|
||||||
|
Prop p0 = Yap_heap_regs->IntBBKeys[i] = PropAdjust(Yap_heap_regs->IntBBKeys[i]);
|
||||||
|
RestoreEntries(RepProp(p0), TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
RestoreDBErasedMarker(void)
|
||||||
|
{
|
||||||
|
Yap_heap_regs->db_erased_marker =
|
||||||
|
DBRefAdjust(Yap_heap_regs->db_erased_marker);
|
||||||
|
Yap_heap_regs->db_erased_marker->id = FunctorDBRef;
|
||||||
|
Yap_heap_regs->db_erased_marker->Flags = ErasedMask;
|
||||||
|
Yap_heap_regs->db_erased_marker->Code = NULL;
|
||||||
|
Yap_heap_regs->db_erased_marker->DBT.DBRefs = NULL;
|
||||||
|
Yap_heap_regs->db_erased_marker->Parent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
RestoreLogDBErasedMarker(void)
|
||||||
|
{
|
||||||
|
Yap_heap_regs->logdb_erased_marker =
|
||||||
|
PtoLUCAdjust(Yap_heap_regs->logdb_erased_marker);
|
||||||
|
Yap_heap_regs->logdb_erased_marker->Id = FunctorDBRef;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClFlags = ErasedMask|LogUpdMask;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClSource = NULL;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClRefCount = 0;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClPred = PredLogUpdClause;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClExt = NULL;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClPrev = NULL;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClNext = NULL;
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClSize = (UInt)NEXTOP(((LogUpdClause *)NULL)->ClCode,e);
|
||||||
|
Yap_heap_regs->logdb_erased_marker->ClCode->opc = Yap_opcode(_op_fail);
|
||||||
|
REINIT_LOCK(Yap_heap_regs->logdb_erased_marker->ClLock);
|
||||||
|
INIT_CLREF_COUNT(Yap_heap_regs->logdb_erased_marker);
|
||||||
|
}
|
||||||
|
|
||||||
/* restore the failcodes */
|
/* restore the failcodes */
|
||||||
static void
|
static void
|
||||||
restore_codes(void)
|
restore_codes(void)
|
||||||
@ -734,50 +833,6 @@ restore_codes(void)
|
|||||||
si = si->SiblingIndex;
|
si = si->SiblingIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Yap_heap_regs->IntKeys != NULL) {
|
|
||||||
Yap_heap_regs->IntKeys = (Prop *)AddrAdjust((ADDR)(Yap_heap_regs->IntKeys));
|
|
||||||
{
|
|
||||||
UInt i;
|
|
||||||
for (i = 0; i < Yap_heap_regs->int_keys_size; i++) {
|
|
||||||
if (Yap_heap_regs->IntKeys[i] != NIL) {
|
|
||||||
Prop p0 = Yap_heap_regs->IntKeys[i] = PropAdjust(Yap_heap_regs->IntKeys[i]);
|
|
||||||
RestoreEntries(RepProp(p0), TRUE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Yap_heap_regs->IntLUKeys != NULL) {
|
|
||||||
Yap_heap_regs->IntLUKeys = (Prop *)AddrAdjust((ADDR)(Yap_heap_regs->IntLUKeys));
|
|
||||||
{
|
|
||||||
Int i;
|
|
||||||
for (i = 0; i < INT_KEYS_SIZE; i++) {
|
|
||||||
Prop p0 = INT_LU_KEYS[i];
|
|
||||||
if (p0) {
|
|
||||||
p0 = PropAdjust(p0);
|
|
||||||
INT_LU_KEYS[i] = p0;
|
|
||||||
while (p0) {
|
|
||||||
PredEntry *pe = RepPredProp(p0);
|
|
||||||
pe->NextOfPE =
|
|
||||||
PropAdjust(pe->NextOfPE);
|
|
||||||
CleanCode(pe);
|
|
||||||
p0 = RepProp(pe->NextOfPE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Yap_heap_regs->IntBBKeys != NULL) {
|
|
||||||
Yap_heap_regs->IntBBKeys = (Prop *)AddrAdjust((ADDR)(Yap_heap_regs->IntBBKeys));
|
|
||||||
{
|
|
||||||
UInt i;
|
|
||||||
for (i = 0; i < Yap_heap_regs->int_bb_keys_size; i++) {
|
|
||||||
if (Yap_heap_regs->IntBBKeys[i] != NIL) {
|
|
||||||
Prop p0 = Yap_heap_regs->IntBBKeys[i] = PropAdjust(Yap_heap_regs->IntBBKeys[i]);
|
|
||||||
RestoreEntries(RepProp(p0), TRUE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Yap_heap_regs->db_erased_list) {
|
if (Yap_heap_regs->db_erased_list) {
|
||||||
LogUpdClause *lcl = Yap_heap_regs->db_erased_list =
|
LogUpdClause *lcl = Yap_heap_regs->db_erased_list =
|
||||||
PtoLUCAdjust(Yap_heap_regs->db_erased_list);
|
PtoLUCAdjust(Yap_heap_regs->db_erased_list);
|
||||||
@ -868,14 +923,6 @@ restore_codes(void)
|
|||||||
#endif
|
#endif
|
||||||
if (Yap_heap_regs->last_wtime != NULL)
|
if (Yap_heap_regs->last_wtime != NULL)
|
||||||
Yap_heap_regs->last_wtime = (void *)PtoHeapCellAdjust((CELL *)(Yap_heap_regs->last_wtime));
|
Yap_heap_regs->last_wtime = (void *)PtoHeapCellAdjust((CELL *)(Yap_heap_regs->last_wtime));
|
||||||
Yap_heap_regs->db_erased_marker =
|
|
||||||
DBRefAdjust(Yap_heap_regs->db_erased_marker);
|
|
||||||
Yap_heap_regs->logdb_erased_marker =
|
|
||||||
PtoLUCAdjust(Yap_heap_regs->logdb_erased_marker);
|
|
||||||
Yap_heap_regs->logdb_erased_marker->Id = FunctorDBRef;
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClCode->opc = Yap_opcode(_op_fail);
|
|
||||||
Yap_heap_regs->logdb_erased_marker->ClPred =
|
|
||||||
PtoPredAdjust(Yap_heap_regs->logdb_erased_marker->ClPred);
|
|
||||||
Yap_heap_regs->hash_chain =
|
Yap_heap_regs->hash_chain =
|
||||||
PtoAtomHashEntryAdjust(Yap_heap_regs->hash_chain);
|
PtoAtomHashEntryAdjust(Yap_heap_regs->hash_chain);
|
||||||
Yap_heap_regs->wide_hash_chain =
|
Yap_heap_regs->wide_hash_chain =
|
||||||
|
18
H/rhstruct.h
18
H/rhstruct.h
@ -172,3 +172,21 @@
|
|||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RestoreUdiControlBlocks();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RestoreIntKeys();
|
||||||
|
RestoreIntLUKeys();
|
||||||
|
RestoreIntBBKeys();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RestoreDBErasedMarker();
|
||||||
|
RestoreLogDBErasedMarker();
|
||||||
|
@ -191,6 +191,28 @@ UInt freed_cps Yap_FreedCps =0L void
|
|||||||
UInt expand_clauses_sz Yap_expand_clauses_sz =0L void
|
UInt expand_clauses_sz Yap_expand_clauses_sz =0L void
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* UDI support */
|
||||||
|
struct udi_info *udi_control_blocks UdiControlBlocks =NULL RestoreUdiControlBlocks()
|
||||||
|
|
||||||
|
/* data-base statistics */
|
||||||
|
/* system boots in compile mode */
|
||||||
|
Int static_predicates_marked STATIC_PREDICATES_MARKED =FALSE void
|
||||||
|
|
||||||
|
|
||||||
|
/* Internal Database */
|
||||||
|
Prop *IntKeys INT_KEYS =NULL RestoreIntKeys()
|
||||||
|
Prop *IntLUKeys INT_LU_KEYS =NULL RestoreIntLUKeys()
|
||||||
|
Prop *IntBBKeys INT_BB_KEYS =NULL RestoreIntBBKeys()
|
||||||
|
|
||||||
|
/* Internal Database Statistics */
|
||||||
|
UInt int_keys_size INT_KEYS_SIZE =INT_KEYS_DEFAULT_SIZE void
|
||||||
|
UInt int_keys_timestamp INT_KEYS_TIMESTAMP =0L void
|
||||||
|
UInt int_bb_keys_size INT_BB_KEYS_SIZE =INT_KEYS_DEFAULT_SIZE void
|
||||||
|
|
||||||
|
/* Internal Data-Base Control */
|
||||||
|
int update_mode UPDATE_MODE =UPDATE_MODE_LOGICAL void
|
||||||
|
|
||||||
|
/* nasty IDB stuff */
|
||||||
|
struct DB_STRUCT *db_erased_marker DBErasedMarker InitDBErasedMarker() RestoreDBErasedMarker()
|
||||||
|
struct logic_upd_clause *logdb_erased_marker LogDBErasedMarker InitLogDBErasedMarker() RestoreLogDBErasedMarker()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user