2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
/* This file, rhstruct.h, was generated automatically by "yap -L misc/buildheap"
|
|
|
|
please do not update, update misc/HEAPFIELDS instead */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if USE_DL_MALLOC
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
2011-05-04 19:34:22 +01:00
|
|
|
REINIT_LOCK(DLMallocLock);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
|
|
|
#ifndef HeapUsed
|
|
|
|
#define HeapUsed Yap_givemallinfo()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
2011-05-04 19:34:22 +01:00
|
|
|
REINIT_LOCK(FreeBlocksLock);
|
|
|
|
REINIT_LOCK(HeapUsedLock);
|
|
|
|
REINIT_LOCK(HeapTopLock);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2012-06-26 10:09:10 +01:00
|
|
|
|
|
|
|
|
2011-03-23 16:45:47 +00:00
|
|
|
#if USE_THREADED_CODE
|
2011-05-04 19:34:22 +01:00
|
|
|
OP_RTABLE = OpRTableAdjust(OP_RTABLE);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
EXECUTE_CPRED_OP_CODE = Yap_opcode(_execute_cpred);
|
|
|
|
EXPAND_OP_CODE = Yap_opcode(_expand_index);
|
|
|
|
FAIL_OPCODE = Yap_opcode(_op_fail);
|
|
|
|
INDEX_OPCODE = Yap_opcode(_index_pred);
|
|
|
|
LOCKPRED_OPCODE = Yap_opcode(_lock_pred);
|
|
|
|
ORLAST_OPCODE = Yap_opcode(_or_last);
|
|
|
|
UNDEF_OPCODE = Yap_opcode(_undef_p);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RestoreInvisibleAtoms();
|
|
|
|
RestoreWideAtoms();
|
|
|
|
RestoreAtoms();
|
|
|
|
|
|
|
|
#include "ratoms.h"
|
|
|
|
#ifdef EUROTRA
|
2011-05-04 19:34:22 +01:00
|
|
|
TermDollarU = AtomTermAdjust(TermDollarU);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif
|
2011-05-04 19:34:22 +01:00
|
|
|
TermProlog = AtomTermAdjust(TermProlog);
|
|
|
|
TermReFoundVar = AtomTermAdjust(TermReFoundVar);
|
|
|
|
USER_MODULE = AtomTermAdjust(USER_MODULE);
|
|
|
|
IDB_MODULE = AtomTermAdjust(IDB_MODULE);
|
|
|
|
ATTRIBUTES_MODULE = AtomTermAdjust(ATTRIBUTES_MODULE);
|
|
|
|
CHARSIO_MODULE = AtomTermAdjust(CHARSIO_MODULE);
|
|
|
|
TERMS_MODULE = AtomTermAdjust(TERMS_MODULE);
|
|
|
|
SYSTEM_MODULE = AtomTermAdjust(SYSTEM_MODULE);
|
|
|
|
OPERATING_SYSTEM_MODULE = AtomTermAdjust(OPERATING_SYSTEM_MODULE);
|
|
|
|
READUTIL_MODULE = AtomTermAdjust(READUTIL_MODULE);
|
|
|
|
HACKS_MODULE = AtomTermAdjust(HACKS_MODULE);
|
|
|
|
ARG_MODULE = AtomTermAdjust(ARG_MODULE);
|
|
|
|
GLOBALS_MODULE = AtomTermAdjust(GLOBALS_MODULE);
|
|
|
|
SWI_MODULE = AtomTermAdjust(SWI_MODULE);
|
|
|
|
DBLOAD_MODULE = AtomTermAdjust(DBLOAD_MODULE);
|
2012-10-23 14:55:44 +01:00
|
|
|
RANGE_MODULE = AtomTermAdjust(RANGE_MODULE);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
2012-10-20 10:48:42 +01:00
|
|
|
RestoreHiddenPredicates();
|
2012-10-19 18:10:48 +01:00
|
|
|
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
CurrentModules = ModEntryPtrAdjust(CurrentModules);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RestorePredHash();
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
CreepCode = PtoPredAdjust(CreepCode);
|
|
|
|
UndefCode = PtoPredAdjust(UndefCode);
|
|
|
|
SpyCode = PtoPredAdjust(SpyCode);
|
|
|
|
PredFail = PtoPredAdjust(PredFail);
|
|
|
|
PredTrue = PtoPredAdjust(PredTrue);
|
2011-03-23 16:45:47 +00:00
|
|
|
#ifdef COROUTINING
|
2011-05-04 19:34:22 +01:00
|
|
|
WakeUpCode = PtoPredAdjust(WakeUpCode);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif
|
2011-05-04 19:34:22 +01:00
|
|
|
PredGoalExpansion = PtoPredAdjust(PredGoalExpansion);
|
|
|
|
PredMetaCall = PtoPredAdjust(PredMetaCall);
|
|
|
|
PredDollarCatch = PtoPredAdjust(PredDollarCatch);
|
|
|
|
PredRecordedWithKey = PtoPredAdjust(PredRecordedWithKey);
|
|
|
|
PredLogUpdClause = PtoPredAdjust(PredLogUpdClause);
|
|
|
|
PredLogUpdClauseErase = PtoPredAdjust(PredLogUpdClauseErase);
|
|
|
|
PredLogUpdClause0 = PtoPredAdjust(PredLogUpdClause0);
|
|
|
|
PredStaticClause = PtoPredAdjust(PredStaticClause);
|
|
|
|
PredThrow = PtoPredAdjust(PredThrow);
|
|
|
|
PredHandleThrow = PtoPredAdjust(PredHandleThrow);
|
|
|
|
PredIs = PtoPredAdjust(PredIs);
|
|
|
|
PredSafeCallCleanup = PtoPredAdjust(PredSafeCallCleanup);
|
|
|
|
PredRestoreRegs = PtoPredAdjust(PredRestoreRegs);
|
2011-03-23 16:45:47 +00:00
|
|
|
#ifdef YAPOR
|
2011-05-04 19:34:22 +01:00
|
|
|
PredGetwork = PtoPredAdjust(PredGetwork);
|
|
|
|
PredGetworkSeq = PtoPredAdjust(PredGetworkSeq);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif /* YAPOR */
|
|
|
|
|
|
|
|
#ifdef LOW_LEVEL_TRACER
|
|
|
|
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
2011-05-04 19:34:22 +01:00
|
|
|
REINIT_LOCK(Yap_low_level_trace_lock);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
DUMMYCODE->opc = Yap_opcode(_op_fail);
|
|
|
|
FAILCODE->opc = Yap_opcode(_op_fail);
|
|
|
|
NOCODE->opc = Yap_opcode(_Nstop);
|
2011-03-23 16:45:47 +00:00
|
|
|
RestoreEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
|
|
|
|
|
|
|
|
RestoreEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
|
|
|
|
|
|
|
|
RestoreOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
|
|
|
|
#ifdef BEAM
|
2011-05-04 19:34:22 +01:00
|
|
|
BEAM_RETRY_CODE->opc = Yap_opcode(_beam_retry_code);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif /* BEAM */
|
|
|
|
#ifdef YAPOR
|
|
|
|
RestoreOtaplInst(GETWORK,_getwork,PredGetwork);
|
|
|
|
RestoreOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
|
2011-05-04 19:34:22 +01:00
|
|
|
GETWORK_FIRST_TIME->opc = Yap_opcode(_getwork_first_time);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif /* YAPOR */
|
|
|
|
#ifdef TABLING
|
|
|
|
RestoreOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
|
|
|
|
RestoreOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
|
|
|
|
RestoreOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
|
|
|
|
RestoreOtaplInst(COMPLETION,_table_completion,PredFail);
|
2011-12-22 16:50:20 +00:00
|
|
|
#ifdef THREADS_CONSUMER_SHARING
|
|
|
|
RestoreOtaplInst(ANSWER_RESOLUTION_COMPLETION,_table_answer_resolution_completion,PredFail);
|
|
|
|
#endif /* THREADS_CONSUMER_SHARING */
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif /* TABLING */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
P_before_spy = PtoOpAdjust(P_before_spy);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
RETRY_C_RECORDEDP_CODE = PtoOpAdjust(RETRY_C_RECORDEDP_CODE);
|
|
|
|
RETRY_C_RECORDED_K_CODE = PtoOpAdjust(RETRY_C_RECORDED_K_CODE);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
2011-05-04 19:34:22 +01:00
|
|
|
REINIT_LOCK(DBTermsListLock);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif
|
|
|
|
RestoreDBTermsList();
|
|
|
|
|
|
|
|
|
|
|
|
RestoreExpandList();
|
|
|
|
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
2011-05-04 19:34:22 +01:00
|
|
|
REINIT_LOCK(ExpandClausesListLock);
|
|
|
|
REINIT_LOCK(OpListLock);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
RestoreUdiControlBlocks();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RestoreIntKeys();
|
|
|
|
RestoreIntLUKeys();
|
|
|
|
RestoreIntBBKeys();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RestoreDBErasedMarker();
|
|
|
|
RestoreLogDBErasedMarker();
|
|
|
|
|
|
|
|
RestoreDeadStaticClauses();
|
|
|
|
RestoreDeadMegaClauses();
|
|
|
|
RestoreDeadStaticIndices();
|
|
|
|
RestoreDBErasedList();
|
|
|
|
RestoreDBErasedIList();
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
2011-05-04 19:34:22 +01:00
|
|
|
REINIT_LOCK(DeadStaticClausesLock);
|
|
|
|
REINIT_LOCK(DeadMegaClausesLock);
|
|
|
|
REINIT_LOCK(DeadStaticIndicesLock);
|
2011-03-23 16:45:47 +00:00
|
|
|
#endif
|
|
|
|
#ifdef COROUTINING
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
OpList = OpListAdjust(OpList);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
RestoreStreams();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RestoreAliases();
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
AtPrompt = AtomAdjust(AtPrompt);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
CharConversionTable = CodeCharPAdjust(CharConversionTable);
|
|
|
|
CharConversionTable2 = CodeCharPAdjust(CharConversionTable2);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
Yap_LibDir = CodeCharPAdjust(Yap_LibDir);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
2011-05-04 19:34:22 +01:00
|
|
|
LastWtimePtr = CodeVoidPAdjust(LastWtimePtr);
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
RestoreForeignCode();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RestoreYapRecords();
|
|
|
|
|
|
|
|
RestoreSWIAtoms();
|
|
|
|
|
|
|
|
|
2013-04-30 21:23:01 +01:00
|
|
|
RestoreEmptyWakeups();
|
|
|
|
|
2011-03-23 16:45:47 +00:00
|
|
|
|
|
|
|
RestoreSWIBlobTypes();
|
|
|
|
RestoreSWIBlobs();
|
2011-12-22 10:27:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
|
|
|
REINIT_LOCK(SWI_Blobs_Lock);
|
|
|
|
#endif
|