fix threads so that they at least start
allow error handling to work with threads replace heap_base by Yap_heap_base, according to Yap's convention for globals. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1192 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
d6bbeaa734
commit
94af3000fe
@ -12,7 +12,7 @@
|
||||
* Last rev: *
|
||||
* mods: *
|
||||
* comments: allocating space *
|
||||
* version:$Id: alloc.c,v 1.66 2004-11-19 22:08:40 vsc Exp $ *
|
||||
* version:$Id: alloc.c,v 1.67 2004-12-02 06:06:45 vsc Exp $ *
|
||||
*************************************************************************/
|
||||
#ifdef SCCS
|
||||
static char SccsId[] = "%W% %G%";
|
||||
@ -139,12 +139,12 @@ Yap_ExpandPreAllocCodeSpace(UInt sz0)
|
||||
|
||||
#if USE_SYSTEM_MALLOC
|
||||
|
||||
struct various_codes *heap_regs;
|
||||
struct various_codes *Yap_heap_regs;
|
||||
|
||||
static void
|
||||
InitHeap(void)
|
||||
{
|
||||
heap_regs = (struct various_codes *)malloc(sizeof(struct various_codes));
|
||||
Yap_heap_regs = (struct various_codes *)malloc(sizeof(struct various_codes));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -357,7 +357,13 @@ Yap_Error(yap_error_number type, Term where, char *format,...)
|
||||
exit(1);
|
||||
}
|
||||
/* must do this here */
|
||||
if (type == FATAL_ERROR || Yap_HeapBase == NULL) {
|
||||
if (type == FATAL_ERROR
|
||||
#if USE_SYSTEM_MALLOC
|
||||
|| !Yap_heap_regs
|
||||
#else
|
||||
|| !Yap_HeapBase
|
||||
#endif
|
||||
) {
|
||||
if (format != NULL) {
|
||||
va_start (ap, format);
|
||||
/* now build the error string */
|
||||
|
476
C/init.c
476
C/init.c
@ -709,7 +709,7 @@ InitStdPreds(void)
|
||||
static void
|
||||
InitFlags(void)
|
||||
{
|
||||
/* note that heap_regs must be set first */
|
||||
/* note that Yap_heap_regs must be set first */
|
||||
|
||||
#if USE_GMP
|
||||
yap_flags[YAP_INT_BOUNDED_FLAG] = 0;
|
||||
@ -760,345 +760,345 @@ InitCodes(void)
|
||||
Functor
|
||||
FunctorThrow;
|
||||
|
||||
heap_regs->term_prolog = MkAtomTerm(Yap_LookupAtom("prolog"));
|
||||
heap_regs->user_module = MkAtomTerm(Yap_LookupAtom("user"));
|
||||
heap_regs->idb_module = MkAtomTerm(Yap_LookupAtom("idb"));
|
||||
heap_regs->attributes_module = MkAtomTerm(Yap_LookupAtom("attributes"));
|
||||
heap_regs->charsio_module = MkAtomTerm(Yap_LookupAtom("charsio"));
|
||||
heap_regs->terms_module = MkAtomTerm(Yap_LookupAtom("terms"));
|
||||
Yap_heap_regs->term_prolog = MkAtomTerm(Yap_LookupAtom("prolog"));
|
||||
Yap_heap_regs->user_module = MkAtomTerm(Yap_LookupAtom("user"));
|
||||
Yap_heap_regs->idb_module = MkAtomTerm(Yap_LookupAtom("idb"));
|
||||
Yap_heap_regs->attributes_module = MkAtomTerm(Yap_LookupAtom("attributes"));
|
||||
Yap_heap_regs->charsio_module = MkAtomTerm(Yap_LookupAtom("charsio"));
|
||||
Yap_heap_regs->terms_module = MkAtomTerm(Yap_LookupAtom("terms"));
|
||||
Yap_InitModules();
|
||||
#ifdef YAPOR
|
||||
heap_regs->seq_def = TRUE;
|
||||
heap_regs->getworkfirsttimecode.opc = Yap_opcode(_getwork_first_time);
|
||||
heap_regs->getworkcode.opc = Yap_opcode(_getwork);
|
||||
INIT_YAMOP_LTT(&(heap_regs->getworkcode), 0);
|
||||
heap_regs->getworkcode_seq.opc = Yap_opcode(_getwork_seq);
|
||||
INIT_YAMOP_LTT(&(heap_regs->getworkcode_seq), 0);
|
||||
Yap_heap_regs->seq_def = TRUE;
|
||||
Yap_heap_regs->getworkfirsttimecode.opc = Yap_opcode(_getwork_first_time);
|
||||
Yap_heap_regs->getworkcode.opc = Yap_opcode(_getwork);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->getworkcode), 0);
|
||||
Yap_heap_regs->getworkcode_seq.opc = Yap_opcode(_getwork_seq);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->getworkcode_seq), 0);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
heap_regs->tablecompletioncode.opc = Yap_opcode(_table_completion);
|
||||
heap_regs->tableanswerresolutioncode.opc = Yap_opcode(_table_answer_resolution);
|
||||
Yap_heap_regs->tablecompletioncode.opc = Yap_opcode(_table_completion);
|
||||
Yap_heap_regs->tableanswerresolutioncode.opc = Yap_opcode(_table_answer_resolution);
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(&(heap_regs->tablecompletioncode), 0);
|
||||
INIT_YAMOP_LTT(&(heap_regs->tableanswerresolutioncode), 0);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->tablecompletioncode), 0);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->tableanswerresolutioncode), 0);
|
||||
#endif /* YAPOR */
|
||||
#endif /* TABLING */
|
||||
heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||
heap_regs->expand_clauses_first = NULL;
|
||||
heap_regs->expand_clauses_last = NULL;
|
||||
heap_regs->failcode->opc = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_1 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_2 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_3 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_4 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_5 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_6 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||
Yap_heap_regs->expand_clauses_first = NULL;
|
||||
Yap_heap_regs->expand_clauses_last = NULL;
|
||||
Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_1 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_2 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_3 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_4 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_5 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_6 = Yap_opcode(_op_fail);
|
||||
|
||||
heap_regs->env_for_trustfail_code.op = Yap_opcode(_call);
|
||||
heap_regs->env_for_trustfail_code.s = -Signed(RealEnvSize);
|
||||
heap_regs->env_for_trustfail_code.l2 = NULL;
|
||||
heap_regs->trustfailcode->opc = Yap_opcode(_trust_fail);
|
||||
Yap_heap_regs->env_for_trustfail_code.op = Yap_opcode(_call);
|
||||
Yap_heap_regs->env_for_trustfail_code.s = -Signed(RealEnvSize);
|
||||
Yap_heap_regs->env_for_trustfail_code.l2 = NULL;
|
||||
Yap_heap_regs->trustfailcode->opc = Yap_opcode(_trust_fail);
|
||||
|
||||
heap_regs->env_for_yes_code.op = Yap_opcode(_call);
|
||||
heap_regs->env_for_yes_code.s = -Signed(RealEnvSize);
|
||||
heap_regs->env_for_yes_code.l2 = NULL;
|
||||
heap_regs->yescode->opc = Yap_opcode(_Ystop);
|
||||
heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||
heap_regs->index_op = Yap_opcode(_index_pred);
|
||||
heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->env_for_yes_code.op = Yap_opcode(_call);
|
||||
Yap_heap_regs->env_for_yes_code.s = -Signed(RealEnvSize);
|
||||
Yap_heap_regs->env_for_yes_code.l2 = NULL;
|
||||
Yap_heap_regs->yescode->opc = Yap_opcode(_Ystop);
|
||||
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
||||
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||
|
||||
heap_regs->nocode->opc = Yap_opcode(_Nstop);
|
||||
Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop);
|
||||
|
||||
((yamop *)(&heap_regs->rtrycode))->opc = Yap_opcode(_retry_and_mark);
|
||||
((yamop *)(&heap_regs->rtrycode))->u.ld.s = 0;
|
||||
((yamop *)(&heap_regs->rtrycode))->u.ld.d = NIL;
|
||||
((yamop *)(&Yap_heap_regs->rtrycode))->opc = Yap_opcode(_retry_and_mark);
|
||||
((yamop *)(&Yap_heap_regs->rtrycode))->u.ld.s = 0;
|
||||
((yamop *)(&Yap_heap_regs->rtrycode))->u.ld.d = NIL;
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(&(heap_regs->rtrycode), 1);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->rtrycode), 1);
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef THREADS
|
||||
INIT_LOCK(heap_regs->thread_handles_lock);
|
||||
INIT_LOCK(Yap_heap_regs->thread_handles_lock);
|
||||
{
|
||||
int i;
|
||||
for (i=0; i < MAX_WORKERS; i++) {
|
||||
heap_regs->thread_handle[i].in_use = FALSE;
|
||||
heap_regs->thread_handle[i].local_preds = NULL;
|
||||
Yap_heap_regs->thread_handle[i].in_use = FALSE;
|
||||
Yap_heap_regs->thread_handle[i].local_preds = NULL;
|
||||
}
|
||||
}
|
||||
heap_regs->thread_handle[0].id = 0;
|
||||
heap_regs->thread_handle[0].in_use = TRUE;
|
||||
heap_regs->thread_handle[0].default_yaam_regs =
|
||||
Yap_heap_regs->thread_handle[0].id = 0;
|
||||
Yap_heap_regs->thread_handle[0].in_use = TRUE;
|
||||
Yap_heap_regs->thread_handle[0].default_yaam_regs =
|
||||
&Yap_standard_regs;
|
||||
heap_regs->thread_handle[0].handle = pthread_self();
|
||||
heap_regs->thread_handle[0].handle = pthread_self();
|
||||
Yap_heap_regs->thread_handle[0].handle = pthread_self();
|
||||
Yap_heap_regs->thread_handle[0].handle = pthread_self();
|
||||
pthread_mutex_init(&ThreadHandle[0].tlock, NULL);
|
||||
heap_regs->n_of_threads = 1;
|
||||
heap_regs->n_of_threads_created = 1;
|
||||
heap_regs->threads_total_time = 0;
|
||||
Yap_heap_regs->n_of_threads = 1;
|
||||
Yap_heap_regs->n_of_threads_created = 1;
|
||||
Yap_heap_regs->threads_total_time = 0;
|
||||
#endif
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(heap_regs->bgl);
|
||||
INIT_LOCK(heap_regs->free_blocks_lock);
|
||||
INIT_LOCK(heap_regs->heap_used_lock);
|
||||
INIT_LOCK(heap_regs->heap_top_lock);
|
||||
INIT_LOCK(heap_regs->dead_clauses_lock);
|
||||
heap_regs->heap_top_owner = -1;
|
||||
INIT_LOCK(Yap_heap_regs->bgl);
|
||||
INIT_LOCK(Yap_heap_regs->free_blocks_lock);
|
||||
INIT_LOCK(Yap_heap_regs->heap_used_lock);
|
||||
INIT_LOCK(Yap_heap_regs->heap_top_lock);
|
||||
INIT_LOCK(Yap_heap_regs->dead_clauses_lock);
|
||||
Yap_heap_regs->heap_top_owner = -1;
|
||||
{
|
||||
int i;
|
||||
for (i=0; i < MAX_WORKERS; i++) {
|
||||
heap_regs->wl[i].scratchpad.ptr = NULL;
|
||||
heap_regs->wl[i].scratchpad.sz = SCRATCH_START_SIZE;
|
||||
heap_regs->wl[i].scratchpad.msz = SCRATCH_START_SIZE;
|
||||
Yap_heap_regs->wl[i].scratchpad.ptr = NULL;
|
||||
Yap_heap_regs->wl[i].scratchpad.sz = SCRATCH_START_SIZE;
|
||||
Yap_heap_regs->wl[i].scratchpad.msz = SCRATCH_START_SIZE;
|
||||
}
|
||||
}
|
||||
#endif /* YAPOR */
|
||||
heap_regs->clausecode->arity = 0;
|
||||
heap_regs->clausecode->clause = NULL;
|
||||
heap_regs->clausecode->func = NIL;
|
||||
Yap_heap_regs->clausecode->arity = 0;
|
||||
Yap_heap_regs->clausecode->clause = NULL;
|
||||
Yap_heap_regs->clausecode->func = NIL;
|
||||
|
||||
heap_regs->invisiblechain.Entry = NIL;
|
||||
INIT_RWLOCK(heap_regs->invisiblechain.AERWLock);
|
||||
Yap_heap_regs->invisiblechain.Entry = NIL;
|
||||
INIT_RWLOCK(Yap_heap_regs->invisiblechain.AERWLock);
|
||||
|
||||
heap_regs->consultlow = (consult_obj *)Yap_AllocCodeSpace(sizeof(consult_obj)*InitialConsultCapacity);
|
||||
if (heap_regs->consultlow == NULL) {
|
||||
Yap_heap_regs->consultlow = (consult_obj *)Yap_AllocCodeSpace(sizeof(consult_obj)*InitialConsultCapacity);
|
||||
if (Yap_heap_regs->consultlow == NULL) {
|
||||
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"No Heap Space in InitCodes");
|
||||
return;
|
||||
}
|
||||
heap_regs->consultcapacity = InitialConsultCapacity;
|
||||
Yap_heap_regs->consultcapacity = InitialConsultCapacity;
|
||||
{
|
||||
Atom at;
|
||||
PredEntry *pred;
|
||||
|
||||
at = Yap_FullLookupAtom("$creep");
|
||||
pred = RepPredProp(PredPropByFunc(Yap_MkFunctor(at, 1),PROLOG_MODULE));
|
||||
heap_regs->creep_code = pred;
|
||||
Yap_heap_regs->creep_code = pred;
|
||||
at = Yap_FullLookupAtom("$undefp");
|
||||
pred = RepPredProp(PredPropByFunc(Yap_MkFunctor(at, 1),PROLOG_MODULE));
|
||||
heap_regs->undef_code = pred;
|
||||
Yap_heap_regs->undef_code = pred;
|
||||
at = Yap_FullLookupAtom("$spy");
|
||||
pred = RepPredProp(PredPropByFunc(Yap_MkFunctor(at, 1),0));
|
||||
heap_regs->spy_code = pred;
|
||||
Yap_heap_regs->spy_code = pred;
|
||||
}
|
||||
heap_regs->system_profiling = FALSE;
|
||||
heap_regs->system_call_counting = FALSE;
|
||||
heap_regs->system_pred_goal_expansion_on = FALSE;
|
||||
heap_regs->update_mode = UPDATE_MODE_LOGICAL;
|
||||
heap_regs->consultbase = heap_regs->consultsp =
|
||||
heap_regs->consultlow + heap_regs->consultcapacity;
|
||||
heap_regs->compiler_compile_mode = 0; /* fast will be for native code */
|
||||
heap_regs->maxdepth = 0;
|
||||
heap_regs->maxlist = 0;
|
||||
Yap_heap_regs->system_profiling = FALSE;
|
||||
Yap_heap_regs->system_call_counting = FALSE;
|
||||
Yap_heap_regs->system_pred_goal_expansion_on = FALSE;
|
||||
Yap_heap_regs->update_mode = UPDATE_MODE_LOGICAL;
|
||||
Yap_heap_regs->consultbase = Yap_heap_regs->consultsp =
|
||||
Yap_heap_regs->consultlow + Yap_heap_regs->consultcapacity;
|
||||
Yap_heap_regs->compiler_compile_mode = 0; /* fast will be for native code */
|
||||
Yap_heap_regs->maxdepth = 0;
|
||||
Yap_heap_regs->maxlist = 0;
|
||||
|
||||
heap_regs->atprompt = 0;
|
||||
Yap_heap_regs->atprompt = 0;
|
||||
#ifdef COROUTINING
|
||||
heap_regs->num_of_atts = 1; /* initially only coroutining is supported */
|
||||
Yap_heap_regs->num_of_atts = 1; /* initially only coroutining is supported */
|
||||
#endif
|
||||
/* system boots in compile mode */
|
||||
heap_regs->static_predicates_marked = TRUE;
|
||||
Yap_heap_regs->static_predicates_marked = TRUE;
|
||||
/* use Quintus compatible atom_chars and number_chars, not ISO compatible */
|
||||
heap_regs->static_predicates_marked = FALSE;
|
||||
Yap_heap_regs->static_predicates_marked = FALSE;
|
||||
|
||||
heap_regs->int_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||
heap_regs->int_keys_timestamp = 0;
|
||||
heap_regs->IntKeys = NULL;
|
||||
heap_regs->int_bb_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||
heap_regs->IntBBKeys = NULL;
|
||||
heap_regs->char_conversion_table = NULL;
|
||||
heap_regs->char_conversion_table2 = NULL;
|
||||
Yap_heap_regs->int_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||
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_table2 = NULL;
|
||||
/*
|
||||
don't initialise this here, this is initialised by Yap_InitModules!!!!
|
||||
heap_regs->no_of_modules = 1;
|
||||
Yap_heap_regs->no_of_modules = 1;
|
||||
*/
|
||||
heap_regs->atom_abol = Yap_FullLookupAtom("$abol");
|
||||
Yap_heap_regs->atom_abol = Yap_FullLookupAtom("$abol");
|
||||
AtomAltNot = Yap_LookupAtom("not");
|
||||
heap_regs->atom_append = Yap_LookupAtom ("append");
|
||||
heap_regs->atom_array = Yap_FullLookupAtom("$array");
|
||||
Yap_heap_regs->atom_append = Yap_LookupAtom ("append");
|
||||
Yap_heap_regs->atom_array = Yap_FullLookupAtom("$array");
|
||||
#ifdef COROUTINING
|
||||
AtomArrayAccess = Yap_FullLookupAtom("$array_arg");
|
||||
#endif
|
||||
AtomArrow = Yap_LookupAtom("->");
|
||||
heap_regs->atom_assert = Yap_LookupAtom(":-");
|
||||
heap_regs->atom_alarm = Yap_FullLookupAtom("$alarm");
|
||||
Yap_heap_regs->atom_assert = Yap_LookupAtom(":-");
|
||||
Yap_heap_regs->atom_alarm = Yap_FullLookupAtom("$alarm");
|
||||
#if HAVE_SIGACTION
|
||||
heap_regs->atom_sig_pending = Yap_FullLookupAtom("$sig_pending");
|
||||
Yap_heap_regs->atom_sig_pending = Yap_FullLookupAtom("$sig_pending");
|
||||
#endif
|
||||
AtomBraces = Yap_LookupAtom("{}");
|
||||
heap_regs->atom_b = Yap_FullLookupAtom("$last_choice_pt");
|
||||
heap_regs->atom_break = Yap_FullLookupAtom("$break");
|
||||
heap_regs->atom_call = Yap_LookupAtom("call");
|
||||
heap_regs->atom_catch = Yap_FullLookupAtom("$catch");
|
||||
heap_regs->atom_comma = Yap_LookupAtom(",");
|
||||
heap_regs->atom_cpu_time = Yap_LookupAtom("cputime");
|
||||
heap_regs->atom_csult = Yap_FullLookupAtom("$csult");
|
||||
heap_regs->atom_cut = Yap_LookupAtom("!");
|
||||
heap_regs->atom_cut_by = Yap_FullLookupAtom("$cut_by");
|
||||
Yap_heap_regs->atom_b = Yap_FullLookupAtom("$last_choice_pt");
|
||||
Yap_heap_regs->atom_break = Yap_FullLookupAtom("$break");
|
||||
Yap_heap_regs->atom_call = Yap_LookupAtom("call");
|
||||
Yap_heap_regs->atom_catch = Yap_FullLookupAtom("$catch");
|
||||
Yap_heap_regs->atom_comma = Yap_LookupAtom(",");
|
||||
Yap_heap_regs->atom_cpu_time = Yap_LookupAtom("cputime");
|
||||
Yap_heap_regs->atom_csult = Yap_FullLookupAtom("$csult");
|
||||
Yap_heap_regs->atom_cut = Yap_LookupAtom("!");
|
||||
Yap_heap_regs->atom_cut_by = Yap_FullLookupAtom("$cut_by");
|
||||
#ifdef EUROTRA
|
||||
#ifdef SFUNC
|
||||
heap_regs->atom_dollar_undef = MkAtomTerm(Yap_FullLookupAtom("$undef"));
|
||||
Yap_heap_regs->atom_dollar_undef = MkAtomTerm(Yap_FullLookupAtom("$undef"));
|
||||
#endif
|
||||
#endif
|
||||
heap_regs->atom_dbref = Yap_FullLookupAtom ("$dbref");
|
||||
heap_regs->atom_e = Yap_LookupAtom("e");
|
||||
heap_regs->atom_e_q = Yap_LookupAtom("=");
|
||||
heap_regs->atom_eof = Yap_LookupAtom ("end_of_file");
|
||||
Yap_heap_regs->atom_dbref = Yap_FullLookupAtom ("$dbref");
|
||||
Yap_heap_regs->atom_e = Yap_LookupAtom("e");
|
||||
Yap_heap_regs->atom_e_q = Yap_LookupAtom("=");
|
||||
Yap_heap_regs->atom_eof = Yap_LookupAtom ("end_of_file");
|
||||
AtomEq = Yap_LookupAtom("=");
|
||||
#ifdef EUROTRA
|
||||
heap_regs->atom_f_b = Yap_LookupAtom("fb");
|
||||
Yap_heap_regs->atom_f_b = Yap_LookupAtom("fb");
|
||||
#endif
|
||||
heap_regs->atom_fail = Yap_LookupAtom("fail");
|
||||
heap_regs->atom_false = Yap_LookupAtom("false");
|
||||
heap_regs->atom_fast = Yap_FullLookupAtom("$fast");
|
||||
heap_regs->atom_g_t = Yap_LookupAtom(">");
|
||||
heap_regs->atom_gc = Yap_FullLookupAtom("$gc");
|
||||
heap_regs->atom_gc_margin = Yap_FullLookupAtom("$gc_margin");
|
||||
heap_regs->atom_gc_trace = Yap_FullLookupAtom("$gc_trace");
|
||||
heap_regs->atom_gc_verbose = Yap_FullLookupAtom("$gc_verbose");
|
||||
heap_regs->atom_gc_very_verbose = Yap_FullLookupAtom("$gc_very_verbose");
|
||||
Yap_heap_regs->atom_fail = Yap_LookupAtom("fail");
|
||||
Yap_heap_regs->atom_false = Yap_LookupAtom("false");
|
||||
Yap_heap_regs->atom_fast = Yap_FullLookupAtom("$fast");
|
||||
Yap_heap_regs->atom_g_t = Yap_LookupAtom(">");
|
||||
Yap_heap_regs->atom_gc = Yap_FullLookupAtom("$gc");
|
||||
Yap_heap_regs->atom_gc_margin = Yap_FullLookupAtom("$gc_margin");
|
||||
Yap_heap_regs->atom_gc_trace = Yap_FullLookupAtom("$gc_trace");
|
||||
Yap_heap_regs->atom_gc_verbose = Yap_FullLookupAtom("$gc_verbose");
|
||||
Yap_heap_regs->atom_gc_very_verbose = Yap_FullLookupAtom("$gc_very_verbose");
|
||||
AtomGVar = Yap_LookupAtom("var");
|
||||
heap_regs->atom_global = Yap_LookupAtom("global_sp");
|
||||
heap_regs->atom_heap_used = Yap_LookupAtom("heapused");
|
||||
heap_regs->atom_inf = Yap_LookupAtom("inf");
|
||||
heap_regs->atom_l_t = Yap_LookupAtom("<");
|
||||
heap_regs->atom_local = Yap_LookupAtom("local_sp");
|
||||
heap_regs->atom_meta_call = Yap_FullLookupAtom("$call");
|
||||
heap_regs->atom_minus = Yap_LookupAtom("-");
|
||||
heap_regs->atom_multi_file = Yap_FullLookupAtom("$mf");
|
||||
heap_regs->atom_nan = Yap_LookupAtom("nan");
|
||||
Yap_heap_regs->atom_global = Yap_LookupAtom("global_sp");
|
||||
Yap_heap_regs->atom_heap_used = Yap_LookupAtom("heapused");
|
||||
Yap_heap_regs->atom_inf = Yap_LookupAtom("inf");
|
||||
Yap_heap_regs->atom_l_t = Yap_LookupAtom("<");
|
||||
Yap_heap_regs->atom_local = Yap_LookupAtom("local_sp");
|
||||
Yap_heap_regs->atom_meta_call = Yap_FullLookupAtom("$call");
|
||||
Yap_heap_regs->atom_minus = Yap_LookupAtom("-");
|
||||
Yap_heap_regs->atom_multi_file = Yap_FullLookupAtom("$mf");
|
||||
Yap_heap_regs->atom_nan = Yap_LookupAtom("nan");
|
||||
AtomNot = Yap_LookupAtom("\\+");
|
||||
heap_regs->atom_otherwise = Yap_LookupAtom("otherwise");
|
||||
heap_regs->atom_pi = Yap_LookupAtom("pi");
|
||||
heap_regs->atom_plus = Yap_LookupAtom("+");
|
||||
heap_regs->atom_portray = Yap_FullLookupAtom("$portray");
|
||||
heap_regs->atom_profile = Yap_FullLookupAtom("$profile");
|
||||
Yap_heap_regs->atom_otherwise = Yap_LookupAtom("otherwise");
|
||||
Yap_heap_regs->atom_pi = Yap_LookupAtom("pi");
|
||||
Yap_heap_regs->atom_plus = Yap_LookupAtom("+");
|
||||
Yap_heap_regs->atom_portray = Yap_FullLookupAtom("$portray");
|
||||
Yap_heap_regs->atom_profile = Yap_FullLookupAtom("$profile");
|
||||
AtomQuery = Yap_LookupAtom("?-");
|
||||
heap_regs->atom_random = Yap_LookupAtom("random");
|
||||
heap_regs->atom_read = Yap_LookupAtom("read");
|
||||
heap_regs->atom_repeat = Yap_LookupAtom("repeat");
|
||||
heap_regs->atom_restore_regs = Yap_FullLookupAtom("$restore_regs");
|
||||
Yap_heap_regs->atom_random = Yap_LookupAtom("random");
|
||||
Yap_heap_regs->atom_read = Yap_LookupAtom("read");
|
||||
Yap_heap_regs->atom_repeat = Yap_LookupAtom("repeat");
|
||||
Yap_heap_regs->atom_restore_regs = Yap_FullLookupAtom("$restore_regs");
|
||||
AtomSemic = Yap_LookupAtom(";");
|
||||
heap_regs->atom_stack_free = Yap_LookupAtom("stackfree");
|
||||
Yap_heap_regs->atom_stack_free = Yap_LookupAtom("stackfree");
|
||||
AtomStream = Yap_FullLookupAtom("$stream");
|
||||
AtomStreamPos = Yap_FullLookupAtom("$stream_position");
|
||||
heap_regs->atom_true = Yap_LookupAtom("true");
|
||||
Yap_heap_regs->atom_true = Yap_LookupAtom("true");
|
||||
AtomCreep = Yap_LookupAtom("$creep");
|
||||
heap_regs->atom_user = Yap_LookupAtom ("user");
|
||||
heap_regs->atom_usr_err = Yap_LookupAtom ("user_error");
|
||||
heap_regs->atom_usr_in = Yap_LookupAtom ("user_input");
|
||||
heap_regs->atom_usr_out = Yap_LookupAtom ("user_output");
|
||||
Yap_heap_regs->atom_user = Yap_LookupAtom ("user");
|
||||
Yap_heap_regs->atom_usr_err = Yap_LookupAtom ("user_error");
|
||||
Yap_heap_regs->atom_usr_in = Yap_LookupAtom ("user_input");
|
||||
Yap_heap_regs->atom_usr_out = Yap_LookupAtom ("user_output");
|
||||
AtomVar = Yap_FullLookupAtom("$VAR");
|
||||
heap_regs->atom_version_number = Yap_FullLookupAtom("$version_name");
|
||||
heap_regs->atom_write = Yap_LookupAtom ("write");
|
||||
Yap_heap_regs->atom_version_number = Yap_FullLookupAtom("$version_name");
|
||||
Yap_heap_regs->atom_write = Yap_LookupAtom ("write");
|
||||
#ifdef USE_SOCKET
|
||||
heap_regs->functor_af_inet = Yap_MkFunctor(Yap_LookupAtom("AF_INET"),2);
|
||||
heap_regs->functor_af_local = Yap_MkFunctor(Yap_LookupAtom("AF_LOCAL"),1);
|
||||
heap_regs->functor_af_unix = Yap_MkFunctor(Yap_LookupAtom("AF_UNIX"),1);
|
||||
Yap_heap_regs->functor_af_inet = Yap_MkFunctor(Yap_LookupAtom("AF_INET"),2);
|
||||
Yap_heap_regs->functor_af_local = Yap_MkFunctor(Yap_LookupAtom("AF_LOCAL"),1);
|
||||
Yap_heap_regs->functor_af_unix = Yap_MkFunctor(Yap_LookupAtom("AF_UNIX"),1);
|
||||
#endif
|
||||
heap_regs->functor_alt_not = Yap_MkFunctor(AtomAltNot, 1);
|
||||
Yap_heap_regs->functor_alt_not = Yap_MkFunctor(AtomAltNot, 1);
|
||||
#ifdef COROUTINING
|
||||
heap_regs->functor_array_entry = Yap_MkFunctor(AtomArrayAccess, 3);
|
||||
Yap_heap_regs->functor_array_entry = Yap_MkFunctor(AtomArrayAccess, 3);
|
||||
#endif
|
||||
heap_regs->functor_arrow = Yap_MkFunctor(AtomArrow, 2);
|
||||
heap_regs->functor_assert = Yap_MkFunctor(AtomAssert, 2);
|
||||
Yap_heap_regs->functor_arrow = Yap_MkFunctor(AtomArrow, 2);
|
||||
Yap_heap_regs->functor_assert = Yap_MkFunctor(AtomAssert, 2);
|
||||
#ifdef COROUTINING
|
||||
heap_regs->functor_att_goal = Yap_MkFunctor(Yap_FullLookupAtom("$att_do"),2);
|
||||
Yap_heap_regs->functor_att_goal = Yap_MkFunctor(Yap_FullLookupAtom("$att_do"),2);
|
||||
#endif
|
||||
heap_regs->functor_braces = Yap_MkFunctor(AtomBraces, 1);
|
||||
heap_regs->functor_call = Yap_MkFunctor(AtomCall, 1);
|
||||
heap_regs->functor_cut_by = Yap_MkFunctor(AtomCutBy, 1);
|
||||
heap_regs->functor_clist = Yap_MkFunctor(Yap_FullLookupAtom("$when"), 4);
|
||||
heap_regs->functor_comma = Yap_MkFunctor(AtomComma, 2);
|
||||
heap_regs->functor_csult = Yap_MkFunctor(AtomCsult, 1);
|
||||
heap_regs->functor_eq = Yap_MkFunctor(AtomEq, 2);
|
||||
heap_regs->functor_execute_in_mod = Yap_MkFunctor(Yap_FullLookupAtom("$execute_in_mod"), 2);
|
||||
heap_regs->functor_execute_within = Yap_MkFunctor(Yap_FullLookupAtom("$execute_within"), 1);
|
||||
heap_regs->functor_g_atom = Yap_MkFunctor(Yap_LookupAtom("atom"), 1);
|
||||
heap_regs->functor_g_atomic = Yap_MkFunctor(Yap_LookupAtom("atomic"), 1);
|
||||
heap_regs->functor_g_compound = Yap_MkFunctor(Yap_LookupAtom("compound"), 1);
|
||||
heap_regs->functor_g_float = Yap_MkFunctor(Yap_LookupAtom("float"), 1);
|
||||
heap_regs->functor_g_integer = Yap_MkFunctor(Yap_LookupAtom("integer"), 1);
|
||||
heap_regs->functor_g_number = Yap_MkFunctor(Yap_LookupAtom("number"), 1);
|
||||
heap_regs->functor_g_primitive = Yap_MkFunctor(Yap_LookupAtom("primitive"), 1);
|
||||
heap_regs->functor_g_var = Yap_MkFunctor(AtomGVar, 1);
|
||||
heap_regs->functor_last_execute_within = Yap_MkFunctor(Yap_FullLookupAtom("$last_execute_within"), 1);
|
||||
heap_regs->functor_list = Yap_MkFunctor(Yap_LookupAtom("."), 2);
|
||||
heap_regs->functor_mega_clause = Yap_MkFunctor (Yap_FullLookupAtom("$mega_clause"), 2);
|
||||
heap_regs->functor_module = Yap_MkFunctor(Yap_LookupAtom(":"), 2);
|
||||
heap_regs->functor_multi_file_clause = Yap_MkFunctor(Yap_FullLookupAtom("$mf_clause"), 5);
|
||||
Yap_heap_regs->functor_braces = Yap_MkFunctor(AtomBraces, 1);
|
||||
Yap_heap_regs->functor_call = Yap_MkFunctor(AtomCall, 1);
|
||||
Yap_heap_regs->functor_cut_by = Yap_MkFunctor(AtomCutBy, 1);
|
||||
Yap_heap_regs->functor_clist = Yap_MkFunctor(Yap_FullLookupAtom("$when"), 4);
|
||||
Yap_heap_regs->functor_comma = Yap_MkFunctor(AtomComma, 2);
|
||||
Yap_heap_regs->functor_csult = Yap_MkFunctor(AtomCsult, 1);
|
||||
Yap_heap_regs->functor_eq = Yap_MkFunctor(AtomEq, 2);
|
||||
Yap_heap_regs->functor_execute_in_mod = Yap_MkFunctor(Yap_FullLookupAtom("$execute_in_mod"), 2);
|
||||
Yap_heap_regs->functor_execute_within = Yap_MkFunctor(Yap_FullLookupAtom("$execute_within"), 1);
|
||||
Yap_heap_regs->functor_g_atom = Yap_MkFunctor(Yap_LookupAtom("atom"), 1);
|
||||
Yap_heap_regs->functor_g_atomic = Yap_MkFunctor(Yap_LookupAtom("atomic"), 1);
|
||||
Yap_heap_regs->functor_g_compound = Yap_MkFunctor(Yap_LookupAtom("compound"), 1);
|
||||
Yap_heap_regs->functor_g_float = Yap_MkFunctor(Yap_LookupAtom("float"), 1);
|
||||
Yap_heap_regs->functor_g_integer = Yap_MkFunctor(Yap_LookupAtom("integer"), 1);
|
||||
Yap_heap_regs->functor_g_number = Yap_MkFunctor(Yap_LookupAtom("number"), 1);
|
||||
Yap_heap_regs->functor_g_primitive = Yap_MkFunctor(Yap_LookupAtom("primitive"), 1);
|
||||
Yap_heap_regs->functor_g_var = Yap_MkFunctor(AtomGVar, 1);
|
||||
Yap_heap_regs->functor_last_execute_within = Yap_MkFunctor(Yap_FullLookupAtom("$last_execute_within"), 1);
|
||||
Yap_heap_regs->functor_list = Yap_MkFunctor(Yap_LookupAtom("."), 2);
|
||||
Yap_heap_regs->functor_mega_clause = Yap_MkFunctor (Yap_FullLookupAtom("$mega_clause"), 2);
|
||||
Yap_heap_regs->functor_module = Yap_MkFunctor(Yap_LookupAtom(":"), 2);
|
||||
Yap_heap_regs->functor_multi_file_clause = Yap_MkFunctor(Yap_FullLookupAtom("$mf_clause"), 5);
|
||||
#ifdef MULTI_ASSIGNMENT_VARIABLES
|
||||
heap_regs->functor_mutable = Yap_MkFunctor(Yap_FullLookupAtom("$mutable_variable"),
|
||||
Yap_heap_regs->functor_mutable = Yap_MkFunctor(Yap_FullLookupAtom("$mutable_variable"),
|
||||
sizeof(timed_var)/sizeof(CELL));
|
||||
#endif
|
||||
heap_regs->functor_not = Yap_MkFunctor(AtomNot, 1);
|
||||
heap_regs->functor_or = Yap_MkFunctor(AtomSemic, 2);
|
||||
heap_regs->functor_portray = Yap_MkFunctor(AtomPortray, 1);
|
||||
heap_regs->functor_query = Yap_MkFunctor(AtomQuery, 1);
|
||||
heap_regs->functor_creep = Yap_MkFunctor(AtomCreep, 1);
|
||||
heap_regs->functor_static_clause = Yap_MkFunctor (Yap_FullLookupAtom("$startic_clause"), 1);
|
||||
heap_regs->functor_stream = Yap_MkFunctor (AtomStream, 1);
|
||||
heap_regs->functor_stream_pos = Yap_MkFunctor (AtomStreamPos, 3);
|
||||
heap_regs->functor_stream_eOS = Yap_MkFunctor (Yap_LookupAtom("end_of_stream"), 1);
|
||||
heap_regs->functor_thread_run = Yap_MkFunctor (Yap_FullLookupAtom("$top_thread_goal"), 2);
|
||||
heap_regs->functor_change_module = Yap_MkFunctor (Yap_FullLookupAtom("$change_module"), 1);
|
||||
heap_regs->functor_current_module = Yap_MkFunctor (Yap_FullLookupAtom("$current_module"), 1);
|
||||
Yap_heap_regs->functor_not = Yap_MkFunctor(AtomNot, 1);
|
||||
Yap_heap_regs->functor_or = Yap_MkFunctor(AtomSemic, 2);
|
||||
Yap_heap_regs->functor_portray = Yap_MkFunctor(AtomPortray, 1);
|
||||
Yap_heap_regs->functor_query = Yap_MkFunctor(AtomQuery, 1);
|
||||
Yap_heap_regs->functor_creep = Yap_MkFunctor(AtomCreep, 1);
|
||||
Yap_heap_regs->functor_static_clause = Yap_MkFunctor (Yap_FullLookupAtom("$startic_clause"), 1);
|
||||
Yap_heap_regs->functor_stream = Yap_MkFunctor (AtomStream, 1);
|
||||
Yap_heap_regs->functor_stream_pos = Yap_MkFunctor (AtomStreamPos, 3);
|
||||
Yap_heap_regs->functor_stream_eOS = Yap_MkFunctor (Yap_LookupAtom("end_of_stream"), 1);
|
||||
Yap_heap_regs->functor_thread_run = Yap_MkFunctor (Yap_FullLookupAtom("$top_thread_goal"), 2);
|
||||
Yap_heap_regs->functor_change_module = Yap_MkFunctor (Yap_FullLookupAtom("$change_module"), 1);
|
||||
Yap_heap_regs->functor_current_module = Yap_MkFunctor (Yap_FullLookupAtom("$current_module"), 1);
|
||||
FunctorThrow = Yap_MkFunctor( Yap_FullLookupAtom("throw"), 1);
|
||||
heap_regs->functor_u_minus = Yap_MkFunctor (heap_regs->atom_minus, 1);
|
||||
heap_regs->functor_u_plus = Yap_MkFunctor (heap_regs->atom_plus, 1);
|
||||
heap_regs->functor_v_bar = Yap_MkFunctor(Yap_LookupAtom("|"), 2);
|
||||
heap_regs->functor_var = Yap_MkFunctor(AtomVar, 1);
|
||||
Yap_heap_regs->functor_u_minus = Yap_MkFunctor (Yap_heap_regs->atom_minus, 1);
|
||||
Yap_heap_regs->functor_u_plus = Yap_MkFunctor (Yap_heap_regs->atom_plus, 1);
|
||||
Yap_heap_regs->functor_v_bar = Yap_MkFunctor(Yap_LookupAtom("|"), 2);
|
||||
Yap_heap_regs->functor_var = Yap_MkFunctor(AtomVar, 1);
|
||||
#ifdef EUROTRA
|
||||
heap_regs->term_dollar_u = MkAtomTerm(Yap_FullLookupAtom("$u"));
|
||||
Yap_heap_regs->term_dollar_u = MkAtomTerm(Yap_FullLookupAtom("$u"));
|
||||
#endif
|
||||
heap_regs->term_refound_var = MkAtomTerm(Yap_FullLookupAtom("$I_FOUND_THE_VARIABLE_AGAIN"));
|
||||
heap_regs->dyn_array_list = NULL;
|
||||
heap_regs->n_of_file_aliases = 0;
|
||||
heap_regs->file_aliases = NULL;
|
||||
heap_regs->foreign_code_loaded = NULL;
|
||||
heap_regs->yap_lib_dir = NULL;
|
||||
heap_regs->agc_hook = NULL;
|
||||
heap_regs->parser_error_style = EXCEPTION_ON_PARSER_ERROR;
|
||||
heap_regs->size_of_overflow = 0;
|
||||
Yap_heap_regs->term_refound_var = MkAtomTerm(Yap_FullLookupAtom("$I_FOUND_THE_VARIABLE_AGAIN"));
|
||||
Yap_heap_regs->dyn_array_list = NULL;
|
||||
Yap_heap_regs->n_of_file_aliases = 0;
|
||||
Yap_heap_regs->file_aliases = NULL;
|
||||
Yap_heap_regs->foreign_code_loaded = NULL;
|
||||
Yap_heap_regs->yap_lib_dir = NULL;
|
||||
Yap_heap_regs->agc_hook = NULL;
|
||||
Yap_heap_regs->parser_error_style = EXCEPTION_ON_PARSER_ERROR;
|
||||
Yap_heap_regs->size_of_overflow = 0;
|
||||
/* make sure no one else can use these two atoms */
|
||||
CurrentModule = 0;
|
||||
heap_regs->dead_clauses = NULL;
|
||||
Yap_ReleaseAtom(AtomOfTerm(heap_regs->term_refound_var));
|
||||
Yap_heap_regs->dead_clauses = NULL;
|
||||
Yap_ReleaseAtom(AtomOfTerm(Yap_heap_regs->term_refound_var));
|
||||
/* make sure we have undefp defined */
|
||||
/* predicates can only be defined after this point */
|
||||
heap_regs->env_for_yes_code.p =
|
||||
heap_regs->env_for_yes_code.p0 =
|
||||
RepPredProp(PredPropByAtom(heap_regs->atom_true,0));
|
||||
heap_regs->pred_meta_call = RepPredProp(PredPropByFunc(Yap_MkFunctor(heap_regs->atom_meta_call,4),PROLOG_MODULE));
|
||||
heap_regs->pred_dollar_catch = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$catch"),3),PROLOG_MODULE));
|
||||
heap_regs->pred_recorded_with_key = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$recorded_with_key"),3),PROLOG_MODULE));
|
||||
heap_regs->pred_log_upd_clause = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$do_log_upd_clause"),5),PROLOG_MODULE));
|
||||
heap_regs->pred_log_upd_clause0 = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$do_log_upd_clause"),4),PROLOG_MODULE));
|
||||
heap_regs->pred_static_clause = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$do_static_clause"),5),PROLOG_MODULE));
|
||||
heap_regs->pred_throw = RepPredProp(PredPropByFunc(FunctorThrow,PROLOG_MODULE));
|
||||
heap_regs->pred_handle_throw = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$handle_throw"),3),PROLOG_MODULE));
|
||||
heap_regs->pred_goal_expansion = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_LookupAtom("goal_expansion"),3),USER_MODULE));
|
||||
heap_regs->env_for_trustfail_code.p =
|
||||
heap_regs->env_for_trustfail_code.p0 =
|
||||
RepPredProp(PredPropByAtom(heap_regs->atom_false,PROLOG_MODULE));
|
||||
Yap_heap_regs->env_for_yes_code.p =
|
||||
Yap_heap_regs->env_for_yes_code.p0 =
|
||||
RepPredProp(PredPropByAtom(Yap_heap_regs->atom_true,0));
|
||||
Yap_heap_regs->pred_meta_call = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_heap_regs->atom_meta_call,4),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_dollar_catch = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$catch"),3),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_recorded_with_key = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$recorded_with_key"),3),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_log_upd_clause = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$do_log_upd_clause"),5),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_log_upd_clause0 = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$do_log_upd_clause"),4),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_static_clause = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$do_static_clause"),5),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_throw = RepPredProp(PredPropByFunc(FunctorThrow,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_handle_throw = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_FullLookupAtom("$handle_throw"),3),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_goal_expansion = RepPredProp(PredPropByFunc(Yap_MkFunctor(Yap_LookupAtom("goal_expansion"),3),USER_MODULE));
|
||||
Yap_heap_regs->env_for_trustfail_code.p =
|
||||
Yap_heap_regs->env_for_trustfail_code.p0 =
|
||||
RepPredProp(PredPropByAtom(Yap_heap_regs->atom_false,PROLOG_MODULE));
|
||||
{
|
||||
/* make sure we know about the module predicate */
|
||||
PredEntry *modp = RepPredProp(PredPropByFunc(heap_regs->functor_module,PROLOG_MODULE));
|
||||
PredEntry *modp = RepPredProp(PredPropByFunc(Yap_heap_regs->functor_module,PROLOG_MODULE));
|
||||
modp->PredFlags |= MetaPredFlag;
|
||||
}
|
||||
#ifdef YAPOR
|
||||
heap_regs->getworkcode.u.ld.p = RepPredProp(PredPropByAtom(Yap_FullLookupAtom("$getwork"), PROLOG_MODULE));
|
||||
heap_regs->getworkcode_seq.u.ld.p = RepPredProp(PredPropByAtom(Yap_FullLookupAtom("$getwork_seq"), PROLOG_MODULE));
|
||||
Yap_heap_regs->getworkcode.u.ld.p = RepPredProp(PredPropByAtom(Yap_FullLookupAtom("$getwork"), PROLOG_MODULE));
|
||||
Yap_heap_regs->getworkcode_seq.u.ld.p = RepPredProp(PredPropByAtom(Yap_FullLookupAtom("$getwork_seq"), PROLOG_MODULE));
|
||||
#endif
|
||||
heap_regs->db_erased_marker =
|
||||
Yap_heap_regs->db_erased_marker =
|
||||
(DBRef)Yap_AllocCodeSpace(sizeof(DBStruct));
|
||||
heap_regs->db_erased_marker->id = FunctorDBRef;
|
||||
heap_regs->db_erased_marker->Flags = ErasedMask;
|
||||
heap_regs->db_erased_marker->Code = NULL;
|
||||
heap_regs->db_erased_marker->DBT.DBRefs = NULL;
|
||||
heap_regs->db_erased_marker->Parent = NULL;
|
||||
INIT_LOCK(heap_regs->db_erased_marker->lock);
|
||||
INIT_DBREF_COUNT(heap_regs->db_erased_marker);
|
||||
heap_regs->yap_streams = NULL;
|
||||
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;
|
||||
INIT_LOCK(Yap_heap_regs->db_erased_marker->lock);
|
||||
INIT_DBREF_COUNT(Yap_heap_regs->db_erased_marker);
|
||||
Yap_heap_regs->yap_streams = NULL;
|
||||
#if DEBUG
|
||||
heap_regs->expand_clauses_sz = 0L;
|
||||
Yap_heap_regs->expand_clauses_sz = 0L;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -11,8 +11,11 @@
|
||||
* File: stdpreds.c *
|
||||
* comments: General-purpose C implemented system predicates *
|
||||
* *
|
||||
* Last rev: $Date: 2004-11-19 22:08:43 $,$Author: vsc $ *
|
||||
* Last rev: $Date: 2004-12-02 06:06:46 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.74 2004/11/19 22:08:43 vsc
|
||||
* replace SYSTEM_ERROR by out OUT_OF_WHATEVER_ERROR whenever appropriate.
|
||||
*
|
||||
* Revision 1.73 2004/11/19 17:14:14 vsc
|
||||
* a few fixes for 64 bit compiling.
|
||||
*
|
||||
@ -2690,9 +2693,9 @@ p_set_yap_flags(void)
|
||||
if (value < 0 || value > 2)
|
||||
return(FALSE);
|
||||
if (value == 1) {
|
||||
heap_regs->pred_meta_call = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomMetaCall,4),0));
|
||||
Yap_heap_regs->pred_meta_call = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomMetaCall,4),0));
|
||||
} else {
|
||||
heap_regs->pred_meta_call = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomMetaCall,4),0));
|
||||
Yap_heap_regs->pred_meta_call = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomMetaCall,4),0));
|
||||
}
|
||||
yap_flags[LANGUAGE_MODE_FLAG] = value;
|
||||
break;
|
||||
|
@ -2120,8 +2120,8 @@ void
|
||||
Yap_ReInitWallTime (void)
|
||||
{
|
||||
InitWTime();
|
||||
if (heap_regs->last_wtime != NULL)
|
||||
Yap_FreeCodeSpace(heap_regs->last_wtime);
|
||||
if (Yap_heap_regs->last_wtime != NULL)
|
||||
Yap_FreeCodeSpace(Yap_heap_regs->last_wtime);
|
||||
InitLastWtime();
|
||||
}
|
||||
|
||||
|
33
C/threads.c
33
C/threads.c
@ -47,6 +47,8 @@ allocate_new_tid(void)
|
||||
ThreadHandle[new_worker_id].in_use == TRUE)
|
||||
new_worker_id++;
|
||||
ThreadHandle[new_worker_id].in_use = TRUE;
|
||||
pthread_mutex_init(&ThreadHandle[new_worker_id].tlock, NULL);
|
||||
pthread_mutex_lock(&(ThreadHandle[new_worker_id].tlock));
|
||||
UNLOCK(ThreadHandlesLock);
|
||||
if (new_worker_id == MAX_WORKERS)
|
||||
return -1;
|
||||
@ -75,7 +77,8 @@ store_specs(int new_worker_id, UInt ssize, UInt tsize, Term tgoal, Term tdetach)
|
||||
static void
|
||||
kill_thread_engine (int wid)
|
||||
{
|
||||
Prop p0 = AbsPredProp(heap_regs->thread_handle[wid].local_preds);
|
||||
Prop p0 = AbsPredProp(Yap_heap_regs->thread_handle[wid].local_preds);
|
||||
|
||||
/* kill all thread local preds */
|
||||
while(p0) {
|
||||
PredEntry *ap = RepPredProp(p0);
|
||||
@ -84,8 +87,8 @@ kill_thread_engine (int wid)
|
||||
Yap_FreeCodeSpace((char *)ap);
|
||||
}
|
||||
Yap_KillStacks(wid);
|
||||
heap_regs->wl[wid].active_signals = 0L;
|
||||
free(heap_regs->wl[wid].scratchpad.ptr);
|
||||
Yap_heap_regs->wl[wid].active_signals = 0L;
|
||||
free(Yap_heap_regs->wl[wid].scratchpad.ptr);
|
||||
free(ThreadHandle[wid].default_yaam_regs);
|
||||
free(ThreadHandle[wid].start_of_timesp);
|
||||
free(ThreadHandle[wid].last_timep);
|
||||
@ -111,23 +114,21 @@ thread_die(int wid, int always_die)
|
||||
static void
|
||||
setup_engine(int myworker_id)
|
||||
{
|
||||
REGSTORE *standard_regs = (REGSTORE *)malloc(sizeof(REGSTORE));
|
||||
int oldworker_id = worker_id;
|
||||
REGSTORE *standard_regs;
|
||||
|
||||
standard_regs = (REGSTORE *)malloc(sizeof(REGSTORE));
|
||||
/* create the YAAM descriptor */
|
||||
ThreadHandle[myworker_id].default_yaam_regs = standard_regs;
|
||||
pthread_setspecific(Yap_yaamregs_key, (void *)standard_regs);
|
||||
worker_id = myworker_id;
|
||||
Yap_InitExStacks(ThreadHandle[myworker_id].ssize, ThreadHandle[myworker_id].tsize);
|
||||
CurrentModule = ThreadHandle[myworker_id].cmod;
|
||||
worker_id = myworker_id;
|
||||
Yap_InitTime();
|
||||
Yap_InitYaamRegs();
|
||||
worker_id = oldworker_id;
|
||||
{
|
||||
Yap_ReleasePreAllocCodeSpace(Yap_PreAllocCodeSpace());
|
||||
}
|
||||
Yap_ReleasePreAllocCodeSpace(Yap_PreAllocCodeSpace());
|
||||
/* I exist */
|
||||
NOfThreadsCreated++;
|
||||
pthread_mutex_unlock(&(ThreadHandle[myworker_id].tlock));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -164,7 +165,6 @@ static void
|
||||
init_thread_engine(int new_worker_id, UInt ssize, UInt tsize, Term tgoal, Term tdetach)
|
||||
{
|
||||
store_specs(new_worker_id, ssize, tsize, tgoal, tdetach);
|
||||
pthread_mutex_init(&ThreadHandle[new_worker_id].tlock, NULL);
|
||||
}
|
||||
|
||||
static Int
|
||||
@ -185,9 +185,11 @@ p_create_thread(void)
|
||||
ThreadHandle[new_worker_id].id = new_worker_id;
|
||||
ThreadHandle[new_worker_id].ref_count = 1;
|
||||
if ((ThreadHandle[new_worker_id].ret = pthread_create(&ThreadHandle[new_worker_id].handle, NULL, thread_run, (void *)(&(ThreadHandle[new_worker_id].id)))) == 0) {
|
||||
/* wait until the client is initialised */
|
||||
pthread_mutex_lock(&(ThreadHandle[new_worker_id].tlock));
|
||||
pthread_mutex_unlock(&(ThreadHandle[new_worker_id].tlock));
|
||||
return TRUE;
|
||||
}
|
||||
/* YAP ERROR */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -280,6 +282,7 @@ p_thread_join(void)
|
||||
return FALSE;
|
||||
}
|
||||
UNLOCK(ThreadHandlesLock);
|
||||
/* make sure this lock is accessible */
|
||||
if (pthread_join(ThreadHandle[tid].handle, NULL) < 0) {
|
||||
/* ERROR */
|
||||
return FALSE;
|
||||
@ -495,10 +498,10 @@ p_thread_signal(void)
|
||||
pthread_mutex_unlock(&(ThreadHandle[wid].tlock));
|
||||
return TRUE;
|
||||
}
|
||||
LOCK(heap_regs->wl[wid].signal_lock);
|
||||
LOCK(Yap_heap_regs->wl[wid].signal_lock);
|
||||
ThreadHandle[wid].current_yaam_regs->CreepFlag_ = Unsigned(LCL0);
|
||||
heap_regs->wl[wid].active_signals |= YAP_ITI_SIGNAL;
|
||||
UNLOCK(heap_regs->wl[wid].signal_lock);
|
||||
Yap_heap_regs->wl[wid].active_signals |= YAP_ITI_SIGNAL;
|
||||
UNLOCK(Yap_heap_regs->wl[wid].signal_lock);
|
||||
pthread_mutex_unlock(&(ThreadHandle[wid].tlock));
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
|
||||
// if (vsc_count == 218280)
|
||||
// vsc_xstop = 1;
|
||||
if (vsc_count < 1468068888) {
|
||||
UNLOCK(heap_regs->low_level_trace_lock);
|
||||
UNLOCK(Yap_heap_regs->low_level_trace_lock);
|
||||
return;
|
||||
}
|
||||
if (port != enter_pred ||
|
||||
@ -263,7 +263,7 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
|
||||
}
|
||||
break;
|
||||
}
|
||||
UNLOCK(heap_regs->low_level_trace_lock);
|
||||
UNLOCK(Yap_heap_regs->low_level_trace_lock);
|
||||
}
|
||||
|
||||
void
|
||||
|
562
H/Heap.h
562
H/Heap.h
@ -10,7 +10,7 @@
|
||||
* File: Heap.h *
|
||||
* mods: *
|
||||
* comments: Heap Init Structure *
|
||||
* version: $Id: Heap.h,v 1.72 2004-11-19 21:32:53 vsc Exp $ *
|
||||
* version: $Id: Heap.h,v 1.73 2004-12-02 06:06:47 vsc Exp $ *
|
||||
*************************************************************************/
|
||||
|
||||
/* information that can be stored in Code Space */
|
||||
@ -425,320 +425,320 @@ typedef struct various_codes {
|
||||
} all_heap_codes;
|
||||
|
||||
#ifdef USE_SYSTEM_MALLOC
|
||||
struct various_codes *heap_regs;
|
||||
struct various_codes *Yap_heap_regs;
|
||||
#else
|
||||
#define heap_regs ((all_heap_codes *)HEAP_INIT_BASE)
|
||||
#define Yap_heap_regs ((all_heap_codes *)HEAP_INIT_BASE)
|
||||
#endif
|
||||
|
||||
#define Yap_av heap_regs->av_
|
||||
#define Yap_hole_start heap_regs->hole_start
|
||||
#define Yap_hole_end heap_regs->hole_end
|
||||
#define HeapUsed heap_regs->heap_used
|
||||
#define HeapMax heap_regs->heap_max
|
||||
#define HeapTop heap_regs->heap_top
|
||||
#define HeapLim heap_regs->heap_lim
|
||||
#define ScannerStack heap_regs->scanner_stack
|
||||
#define Yap_av Yap_heap_regs->av_
|
||||
#define Yap_hole_start Yap_heap_regs->hole_start
|
||||
#define Yap_hole_end Yap_heap_regs->hole_end
|
||||
#define HeapUsed Yap_heap_regs->heap_used
|
||||
#define HeapMax Yap_heap_regs->heap_max
|
||||
#define HeapTop Yap_heap_regs->heap_top
|
||||
#define HeapLim Yap_heap_regs->heap_lim
|
||||
#define ScannerStack Yap_heap_regs->scanner_stack
|
||||
#ifdef YAPOR
|
||||
#define SEQUENTIAL_IS_DEFAULT heap_regs->seq_def
|
||||
#define GETWORK (&(heap_regs->getworkcode ))
|
||||
#define GETWORK_SEQ (&(heap_regs->getworkcode_seq ))
|
||||
#define GETWORK_FIRST_TIME (&(heap_regs->getworkfirsttimecode ))
|
||||
#define SEQUENTIAL_IS_DEFAULT Yap_heap_regs->seq_def
|
||||
#define GETWORK (&(Yap_heap_regs->getworkcode ))
|
||||
#define GETWORK_SEQ (&(Yap_heap_regs->getworkcode_seq ))
|
||||
#define GETWORK_FIRST_TIME (&(Yap_heap_regs->getworkfirsttimecode ))
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
#define COMPLETION ((yamop *)&(heap_regs->tablecompletioncode ))
|
||||
#define ANSWER_RESOLUTION ((yamop *)&(heap_regs->tableanswerresolutioncode ))
|
||||
#define COMPLETION ((yamop *)&(Yap_heap_regs->tablecompletioncode ))
|
||||
#define ANSWER_RESOLUTION ((yamop *)&(Yap_heap_regs->tableanswerresolutioncode ))
|
||||
#endif /* TABLING */
|
||||
#define EXPAND_OP_CODE heap_regs->expand_op_code
|
||||
#define ExpandClausesFirst heap_regs->expand_clauses_first
|
||||
#define ExpandClausesLast heap_regs->expand_clauses_last
|
||||
#define ExpandClausesListLock heap_regs->expand_clauses_list_lock
|
||||
#define COMMA_CODE heap_regs->comma_code
|
||||
#define FAILCODE heap_regs->failcode
|
||||
#define TRUSTFAILCODE heap_regs->trustfailcode
|
||||
#define YESCODE heap_regs->yescode
|
||||
#define NOCODE heap_regs->nocode
|
||||
#define RTRYCODE heap_regs->rtrycode
|
||||
#define DUMMYCODE heap_regs->dummycode
|
||||
#define CLAUSECODE heap_regs->clausecode
|
||||
#define INVISIBLECHAIN heap_regs->invisiblechain
|
||||
#define max_depth heap_regs->maxdepth
|
||||
#define max_list heap_regs->maxlist
|
||||
#define AtPrompt (&(heap_regs->atprompt ))
|
||||
#define Prompt heap_regs->prompt
|
||||
#define EXPAND_OP_CODE Yap_heap_regs->expand_op_code
|
||||
#define ExpandClausesFirst Yap_heap_regs->expand_clauses_first
|
||||
#define ExpandClausesLast Yap_heap_regs->expand_clauses_last
|
||||
#define ExpandClausesListLock Yap_heap_regs->expand_clauses_list_lock
|
||||
#define COMMA_CODE Yap_heap_regs->comma_code
|
||||
#define FAILCODE Yap_heap_regs->failcode
|
||||
#define TRUSTFAILCODE Yap_heap_regs->trustfailcode
|
||||
#define YESCODE Yap_heap_regs->yescode
|
||||
#define NOCODE Yap_heap_regs->nocode
|
||||
#define RTRYCODE Yap_heap_regs->rtrycode
|
||||
#define DUMMYCODE Yap_heap_regs->dummycode
|
||||
#define CLAUSECODE Yap_heap_regs->clausecode
|
||||
#define INVISIBLECHAIN Yap_heap_regs->invisiblechain
|
||||
#define max_depth Yap_heap_regs->maxdepth
|
||||
#define max_list Yap_heap_regs->maxlist
|
||||
#define AtPrompt (&(Yap_heap_regs->atprompt ))
|
||||
#define Prompt Yap_heap_regs->prompt
|
||||
#if USE_THREADED_CODE
|
||||
#define OP_RTABLE heap_regs->op_rtable
|
||||
#define OP_RTABLE Yap_heap_regs->op_rtable
|
||||
#endif
|
||||
#define PROFILING heap_regs->system_profiling
|
||||
#define CALL_COUNTING heap_regs->system_call_counting
|
||||
#define PRED_GOAL_EXPANSION_ON heap_regs->system_pred_goal_expansion_on
|
||||
#define UPDATE_MODE heap_regs->update_mode
|
||||
#define RETRY_C_RECORDED_CODE heap_regs->retry_recorded_code
|
||||
#define RETRY_C_RECORDED_K_CODE heap_regs->retry_recorded_k_code
|
||||
#define RETRY_C_RECORDEDP_CODE heap_regs->retry_c_recordedp_code
|
||||
#define STATIC_PREDICATES_MARKED heap_regs->static_predicates_marked
|
||||
#define yap_flags heap_regs->yap_flags_field
|
||||
#define UNDEF_OPCODE heap_regs->undef_op
|
||||
#define INDEX_OPCODE heap_regs->index_op
|
||||
#define FAIL_OPCODE heap_regs->fail_op
|
||||
#define PROFILING Yap_heap_regs->system_profiling
|
||||
#define CALL_COUNTING Yap_heap_regs->system_call_counting
|
||||
#define PRED_GOAL_EXPANSION_ON Yap_heap_regs->system_pred_goal_expansion_on
|
||||
#define UPDATE_MODE Yap_heap_regs->update_mode
|
||||
#define RETRY_C_RECORDED_CODE Yap_heap_regs->retry_recorded_code
|
||||
#define RETRY_C_RECORDED_K_CODE Yap_heap_regs->retry_recorded_k_code
|
||||
#define RETRY_C_RECORDEDP_CODE Yap_heap_regs->retry_c_recordedp_code
|
||||
#define STATIC_PREDICATES_MARKED Yap_heap_regs->static_predicates_marked
|
||||
#define yap_flags Yap_heap_regs->yap_flags_field
|
||||
#define UNDEF_OPCODE Yap_heap_regs->undef_op
|
||||
#define INDEX_OPCODE Yap_heap_regs->index_op
|
||||
#define FAIL_OPCODE Yap_heap_regs->fail_op
|
||||
#ifdef THREADS
|
||||
#define ThreadHandlesLock heap_regs->thread_handles_lock
|
||||
#define ThreadHandle heap_regs->thread_handle
|
||||
#define ThreadHandlesLock Yap_heap_regs->thread_handles_lock
|
||||
#define ThreadHandle Yap_heap_regs->thread_handle
|
||||
#endif
|
||||
#define NOfAtoms heap_regs->n_of_atoms
|
||||
#define AtomHashTableSize heap_regs->atom_hash_table_size
|
||||
#define HashChain heap_regs->hash_chain
|
||||
#define INT_KEYS_SIZE heap_regs->int_keys_size
|
||||
#define INT_KEYS_TIMESTAMP heap_regs->int_keys_timestamp
|
||||
#define INT_KEYS heap_regs->IntKeys
|
||||
#define INT_LU_KEYS_SIZE heap_regs->int_lu_keys_size
|
||||
#define INT_LU_KEYS_TIMESTAMP heap_regs->int_lu_keys_timestamp
|
||||
#define INT_LU_KEYS heap_regs->IntLUKeys
|
||||
#define INT_BB_KEYS_SIZE heap_regs->int_bb_keys_size
|
||||
#define INT_BB_KEYS heap_regs->IntBBKeys
|
||||
#define CharConversionTable heap_regs->char_conversion_table
|
||||
#define CharConversionTable2 heap_regs->char_conversion_table2
|
||||
#define ModuleName heap_regs->module_name
|
||||
#define ModulePred heap_regs->module_pred
|
||||
#define NoOfModules heap_regs->no_of_modules
|
||||
#define AtomAbol heap_regs->atom_abol
|
||||
#define AtomAlarm heap_regs->atom_alarm
|
||||
#define AtomAppend heap_regs->atom_append
|
||||
#define AtomArray heap_regs->atom_array
|
||||
#define AtomAssert heap_regs->atom_assert
|
||||
#define AtomB heap_regs->atom_b
|
||||
#define AtomBreak heap_regs->atom_break
|
||||
#define AtomCall heap_regs->atom_call
|
||||
#define AtomCatch heap_regs->atom_catch
|
||||
#define AtomComma heap_regs->atom_comma
|
||||
#define AtomCpuTime heap_regs->atom_cpu_time
|
||||
#define AtomCsult heap_regs->atom_csult
|
||||
#define AtomCut heap_regs->atom_cut
|
||||
#define AtomCutBy heap_regs->atom_cut_by
|
||||
#define NOfAtoms Yap_heap_regs->n_of_atoms
|
||||
#define AtomHashTableSize Yap_heap_regs->atom_hash_table_size
|
||||
#define HashChain Yap_heap_regs->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 CharConversionTable2 Yap_heap_regs->char_conversion_table2
|
||||
#define ModuleName Yap_heap_regs->module_name
|
||||
#define ModulePred Yap_heap_regs->module_pred
|
||||
#define NoOfModules Yap_heap_regs->no_of_modules
|
||||
#define AtomAbol Yap_heap_regs->atom_abol
|
||||
#define AtomAlarm Yap_heap_regs->atom_alarm
|
||||
#define AtomAppend Yap_heap_regs->atom_append
|
||||
#define AtomArray Yap_heap_regs->atom_array
|
||||
#define AtomAssert Yap_heap_regs->atom_assert
|
||||
#define AtomB Yap_heap_regs->atom_b
|
||||
#define AtomBreak Yap_heap_regs->atom_break
|
||||
#define AtomCall Yap_heap_regs->atom_call
|
||||
#define AtomCatch Yap_heap_regs->atom_catch
|
||||
#define AtomComma Yap_heap_regs->atom_comma
|
||||
#define AtomCpuTime Yap_heap_regs->atom_cpu_time
|
||||
#define AtomCsult Yap_heap_regs->atom_csult
|
||||
#define AtomCut Yap_heap_regs->atom_cut
|
||||
#define AtomCutBy Yap_heap_regs->atom_cut_by
|
||||
#if defined(EUROTRA) && defined(SFUNC)
|
||||
#define AtomDollarUndef heap_regs->atom_dollar_undef
|
||||
#define AtomDollarUndef Yap_heap_regs->atom_dollar_undef
|
||||
#endif
|
||||
#define AtomDBRef heap_regs->atom_dbref
|
||||
#define AtomE heap_regs->atom_e
|
||||
#define AtomEQ heap_regs->atom_e_q
|
||||
#define AtomEof heap_regs->atom_eof
|
||||
#define AtomDBRef Yap_heap_regs->atom_dbref
|
||||
#define AtomE Yap_heap_regs->atom_e
|
||||
#define AtomEQ Yap_heap_regs->atom_e_q
|
||||
#define AtomEof Yap_heap_regs->atom_eof
|
||||
#ifdef EUROTRA
|
||||
#define AtomFB heap_regs->atom_f_b
|
||||
#define AtomFB Yap_heap_regs->atom_f_b
|
||||
#endif
|
||||
#define AtomFail heap_regs->atom_fail
|
||||
#define AtomFalse heap_regs->atom_false
|
||||
#define AtomFast heap_regs->atom_fast
|
||||
#define AtomGT heap_regs->atom_g_t
|
||||
#define AtomGc heap_regs->atom_gc
|
||||
#define AtomGcMargin heap_regs->atom_gc_margin
|
||||
#define AtomGcTrace heap_regs->atom_gc_trace
|
||||
#define AtomGcVerbose heap_regs->atom_gc_verbose
|
||||
#define AtomGcVeryVerbose heap_regs->atom_gc_very_verbose
|
||||
#define AtomGlobal heap_regs->atom_global
|
||||
#define AtomHeapUsed heap_regs->atom_heap_used
|
||||
#define AtomInf heap_regs->atom_inf
|
||||
#define AtomLocal heap_regs->atom_local
|
||||
#define AtomLT heap_regs->atom_l_t
|
||||
#define AtomMetaCall heap_regs->atom_meta_call
|
||||
#define AtomMinus heap_regs->atom_minus
|
||||
#define AtomMultiFile heap_regs->atom_multi_file
|
||||
#define AtomNan heap_regs->atom_nan
|
||||
#define AtomOtherwise heap_regs->atom_otherwise
|
||||
#define AtomPi heap_regs->atom_pi
|
||||
#define AtomPlus heap_regs->atom_plus
|
||||
#define AtomPortray heap_regs->atom_portray
|
||||
#define AtomProfile heap_regs->atom_profile
|
||||
#define AtomRandom heap_regs->atom_random
|
||||
#define AtomRead heap_regs->atom_read
|
||||
#define AtomRepeat heap_regs->atom_repeat
|
||||
#define AtomRestoreRegs heap_regs->atom_restore_regs
|
||||
#define AtomFail Yap_heap_regs->atom_fail
|
||||
#define AtomFalse Yap_heap_regs->atom_false
|
||||
#define AtomFast Yap_heap_regs->atom_fast
|
||||
#define AtomGT Yap_heap_regs->atom_g_t
|
||||
#define AtomGc Yap_heap_regs->atom_gc
|
||||
#define AtomGcMargin Yap_heap_regs->atom_gc_margin
|
||||
#define AtomGcTrace Yap_heap_regs->atom_gc_trace
|
||||
#define AtomGcVerbose Yap_heap_regs->atom_gc_verbose
|
||||
#define AtomGcVeryVerbose Yap_heap_regs->atom_gc_very_verbose
|
||||
#define AtomGlobal Yap_heap_regs->atom_global
|
||||
#define AtomHeapUsed Yap_heap_regs->atom_heap_used
|
||||
#define AtomInf Yap_heap_regs->atom_inf
|
||||
#define AtomLocal Yap_heap_regs->atom_local
|
||||
#define AtomLT Yap_heap_regs->atom_l_t
|
||||
#define AtomMetaCall Yap_heap_regs->atom_meta_call
|
||||
#define AtomMinus Yap_heap_regs->atom_minus
|
||||
#define AtomMultiFile Yap_heap_regs->atom_multi_file
|
||||
#define AtomNan Yap_heap_regs->atom_nan
|
||||
#define AtomOtherwise Yap_heap_regs->atom_otherwise
|
||||
#define AtomPi Yap_heap_regs->atom_pi
|
||||
#define AtomPlus Yap_heap_regs->atom_plus
|
||||
#define AtomPortray Yap_heap_regs->atom_portray
|
||||
#define AtomProfile Yap_heap_regs->atom_profile
|
||||
#define AtomRandom Yap_heap_regs->atom_random
|
||||
#define AtomRead Yap_heap_regs->atom_read
|
||||
#define AtomRepeat Yap_heap_regs->atom_repeat
|
||||
#define AtomRestoreRegs Yap_heap_regs->atom_restore_regs
|
||||
#if HAVE_SIGACTION
|
||||
#define AtomSigPending heap_regs->atom_sig_pending
|
||||
#define AtomSigPending Yap_heap_regs->atom_sig_pending
|
||||
#endif
|
||||
#define AtomStackFree heap_regs->atom_stack_free
|
||||
#define AtomTrue heap_regs->atom_true
|
||||
#define AtomUser heap_regs->atom_user
|
||||
#define AtomUsrErr heap_regs->atom_usr_err
|
||||
#define AtomUsrIn heap_regs->atom_usr_in
|
||||
#define AtomUsrOut heap_regs->atom_usr_out
|
||||
#define AtomVersionNumber heap_regs->atom_version_number
|
||||
#define AtomWrite heap_regs->atom_write
|
||||
#define AtomStackFree Yap_heap_regs->atom_stack_free
|
||||
#define AtomTrue Yap_heap_regs->atom_true
|
||||
#define AtomUser Yap_heap_regs->atom_user
|
||||
#define AtomUsrErr Yap_heap_regs->atom_usr_err
|
||||
#define AtomUsrIn Yap_heap_regs->atom_usr_in
|
||||
#define AtomUsrOut Yap_heap_regs->atom_usr_out
|
||||
#define AtomVersionNumber Yap_heap_regs->atom_version_number
|
||||
#define AtomWrite Yap_heap_regs->atom_write
|
||||
#ifdef USE_SOCKET
|
||||
#define FunctorAfInet heap_regs->functor_af_inet
|
||||
#define FunctorAfLocal heap_regs->functor_af_local
|
||||
#define FunctorAfUnix heap_regs->functor_af_unix
|
||||
#define FunctorAfInet Yap_heap_regs->functor_af_inet
|
||||
#define FunctorAfLocal Yap_heap_regs->functor_af_local
|
||||
#define FunctorAfUnix Yap_heap_regs->functor_af_unix
|
||||
#endif
|
||||
#define FunctorAltNot heap_regs->functor_alt_not
|
||||
#define FunctorAltNot Yap_heap_regs->functor_alt_not
|
||||
#ifdef COROUTINING
|
||||
#define FunctorArrayEntry heap_regs->functor_array_entry
|
||||
#define FunctorArrayEntry Yap_heap_regs->functor_array_entry
|
||||
#endif
|
||||
#define FunctorArrow heap_regs->functor_arrow
|
||||
#define FunctorAssert heap_regs->functor_assert
|
||||
#define FunctorArrow Yap_heap_regs->functor_arrow
|
||||
#define FunctorAssert Yap_heap_regs->functor_assert
|
||||
#ifdef COROUTINING
|
||||
#define FunctorAttGoal heap_regs->functor_att_goal
|
||||
#define FunctorAttGoal Yap_heap_regs->functor_att_goal
|
||||
#endif
|
||||
#define FunctorBraces heap_regs->functor_braces
|
||||
#define FunctorCall heap_regs->functor_call
|
||||
#define FunctorClist heap_regs->functor_clist
|
||||
#define FunctorComma heap_regs->functor_comma
|
||||
#define FunctorCreep heap_regs->functor_creep
|
||||
#define FunctorCsult heap_regs->functor_csult
|
||||
#define FunctorCutBy heap_regs->functor_cut_by
|
||||
#define FunctorEq heap_regs->functor_eq
|
||||
#define FunctorExecuteInMod heap_regs->functor_execute_in_mod
|
||||
#define FunctorExecuteWithin heap_regs->functor_execute_within
|
||||
#define FunctorGAtom heap_regs->functor_g_atom
|
||||
#define FunctorGAtomic heap_regs->functor_g_atomic
|
||||
#define FunctorGCompound heap_regs->functor_g_compound
|
||||
#define FunctorGFloat heap_regs->functor_g_float
|
||||
#define FunctorGInteger heap_regs->functor_g_integer
|
||||
#define FunctorGNumber heap_regs->functor_g_number
|
||||
#define FunctorGPrimitive heap_regs->functor_g_primitive
|
||||
#define FunctorGVar heap_regs->functor_g_var
|
||||
#define FunctorLastExecuteWithin heap_regs->functor_last_execute_within
|
||||
#define FunctorList heap_regs->functor_list
|
||||
#define FunctorMegaClause heap_regs->functor_mega_clause
|
||||
#define FunctorModule heap_regs->functor_module
|
||||
#define FunctorMultiFileClause heap_regs->functor_multi_file_clause
|
||||
#define FunctorBraces Yap_heap_regs->functor_braces
|
||||
#define FunctorCall Yap_heap_regs->functor_call
|
||||
#define FunctorClist Yap_heap_regs->functor_clist
|
||||
#define FunctorComma Yap_heap_regs->functor_comma
|
||||
#define FunctorCreep Yap_heap_regs->functor_creep
|
||||
#define FunctorCsult Yap_heap_regs->functor_csult
|
||||
#define FunctorCutBy Yap_heap_regs->functor_cut_by
|
||||
#define FunctorEq Yap_heap_regs->functor_eq
|
||||
#define FunctorExecuteInMod Yap_heap_regs->functor_execute_in_mod
|
||||
#define FunctorExecuteWithin Yap_heap_regs->functor_execute_within
|
||||
#define FunctorGAtom Yap_heap_regs->functor_g_atom
|
||||
#define FunctorGAtomic Yap_heap_regs->functor_g_atomic
|
||||
#define FunctorGCompound Yap_heap_regs->functor_g_compound
|
||||
#define FunctorGFloat Yap_heap_regs->functor_g_float
|
||||
#define FunctorGInteger Yap_heap_regs->functor_g_integer
|
||||
#define FunctorGNumber Yap_heap_regs->functor_g_number
|
||||
#define FunctorGPrimitive Yap_heap_regs->functor_g_primitive
|
||||
#define FunctorGVar Yap_heap_regs->functor_g_var
|
||||
#define FunctorLastExecuteWithin Yap_heap_regs->functor_last_execute_within
|
||||
#define FunctorList Yap_heap_regs->functor_list
|
||||
#define FunctorMegaClause Yap_heap_regs->functor_mega_clause
|
||||
#define FunctorModule Yap_heap_regs->functor_module
|
||||
#define FunctorMultiFileClause Yap_heap_regs->functor_multi_file_clause
|
||||
#ifdef MULTI_ASSIGNMENT_VARIABLES
|
||||
#define FunctorMutable heap_regs->functor_mutable
|
||||
#define FunctorMutable Yap_heap_regs->functor_mutable
|
||||
#endif
|
||||
#define FunctorNot heap_regs->functor_not
|
||||
#define FunctorOr heap_regs->functor_or
|
||||
#define FunctorPortray heap_regs->functor_portray
|
||||
#define FunctorQuery heap_regs->functor_query
|
||||
#define FunctorStaticClause heap_regs->functor_static_clause
|
||||
#define FunctorStream heap_regs->functor_stream
|
||||
#define FunctorStreamPos heap_regs->functor_stream_pos
|
||||
#define FunctorStreamEOS heap_regs->functor_stream_eOS
|
||||
#define FunctorThreadRun heap_regs->functor_thread_run
|
||||
#define FunctorChangeModule heap_regs->functor_change_module
|
||||
#define FunctorCurrentModule heap_regs->functor_current_module
|
||||
#define FunctorModSwitch heap_regs->functor_mod_switch
|
||||
#define FunctorUMinus heap_regs->functor_u_minus
|
||||
#define FunctorUPlus heap_regs->functor_u_plus
|
||||
#define FunctorVBar heap_regs->functor_v_bar
|
||||
#define FunctorVar heap_regs->functor_var
|
||||
#define TermDollarU heap_regs->term_dollar_u
|
||||
#define TermProlog heap_regs->term_prolog
|
||||
#define TermReFoundVar heap_regs->term_refound_var
|
||||
#define FunctorNot Yap_heap_regs->functor_not
|
||||
#define FunctorOr Yap_heap_regs->functor_or
|
||||
#define FunctorPortray Yap_heap_regs->functor_portray
|
||||
#define FunctorQuery Yap_heap_regs->functor_query
|
||||
#define FunctorStaticClause Yap_heap_regs->functor_static_clause
|
||||
#define FunctorStream Yap_heap_regs->functor_stream
|
||||
#define FunctorStreamPos Yap_heap_regs->functor_stream_pos
|
||||
#define FunctorStreamEOS Yap_heap_regs->functor_stream_eOS
|
||||
#define FunctorThreadRun Yap_heap_regs->functor_thread_run
|
||||
#define FunctorChangeModule Yap_heap_regs->functor_change_module
|
||||
#define FunctorCurrentModule Yap_heap_regs->functor_current_module
|
||||
#define FunctorModSwitch Yap_heap_regs->functor_mod_switch
|
||||
#define FunctorUMinus Yap_heap_regs->functor_u_minus
|
||||
#define FunctorUPlus Yap_heap_regs->functor_u_plus
|
||||
#define FunctorVBar Yap_heap_regs->functor_v_bar
|
||||
#define FunctorVar Yap_heap_regs->functor_var
|
||||
#define TermDollarU Yap_heap_regs->term_dollar_u
|
||||
#define TermProlog Yap_heap_regs->term_prolog
|
||||
#define TermReFoundVar Yap_heap_regs->term_refound_var
|
||||
#define PROLOG_MODULE 0
|
||||
#define USER_MODULE heap_regs->user_module
|
||||
#define IDB_MODULE heap_regs->idb_module
|
||||
#define ATTRIBUTES_MODULE heap_regs->attributes_module
|
||||
#define CHARSIO_MODULE heap_regs->charsio_module
|
||||
#define TERMS_MODULE heap_regs->terms_module
|
||||
#define PredGoalExpansion heap_regs->pred_goal_expansion
|
||||
#define PredMetaCall heap_regs->pred_meta_call
|
||||
#define PredDollarCatch heap_regs->pred_dollar_catch
|
||||
#define PredRecordedWithKey heap_regs->pred_recorded_with_key
|
||||
#define PredLogUpdClause heap_regs->pred_log_upd_clause
|
||||
#define PredLogUpdClause0 heap_regs->pred_log_upd_clause0
|
||||
#define PredStaticClause heap_regs->pred_static_clause
|
||||
#define PredThrow heap_regs->pred_throw
|
||||
#define PredHandleThrow heap_regs->pred_handle_throw
|
||||
#define DynArrayList heap_regs->dyn_array_list
|
||||
#define DBErasedMarker heap_regs->db_erased_marker
|
||||
#define USER_MODULE Yap_heap_regs->user_module
|
||||
#define IDB_MODULE Yap_heap_regs->idb_module
|
||||
#define ATTRIBUTES_MODULE Yap_heap_regs->attributes_module
|
||||
#define CHARSIO_MODULE Yap_heap_regs->charsio_module
|
||||
#define TERMS_MODULE Yap_heap_regs->terms_module
|
||||
#define PredGoalExpansion Yap_heap_regs->pred_goal_expansion
|
||||
#define PredMetaCall Yap_heap_regs->pred_meta_call
|
||||
#define PredDollarCatch Yap_heap_regs->pred_dollar_catch
|
||||
#define PredRecordedWithKey Yap_heap_regs->pred_recorded_with_key
|
||||
#define PredLogUpdClause Yap_heap_regs->pred_log_upd_clause
|
||||
#define PredLogUpdClause0 Yap_heap_regs->pred_log_upd_clause0
|
||||
#define PredStaticClause Yap_heap_regs->pred_static_clause
|
||||
#define PredThrow Yap_heap_regs->pred_throw
|
||||
#define PredHandleThrow Yap_heap_regs->pred_handle_throw
|
||||
#define DynArrayList Yap_heap_regs->dyn_array_list
|
||||
#define DBErasedMarker Yap_heap_regs->db_erased_marker
|
||||
#ifdef DEBUG
|
||||
#define DBErasedList heap_regs->db_erased_list
|
||||
#define DBErasedIList heap_regs->db_erased_ilist
|
||||
#define Yap_expand_clauses_sz heap_regs->expand_clauses_sz
|
||||
#define DBErasedList Yap_heap_regs->db_erased_list
|
||||
#define DBErasedIList Yap_heap_regs->db_erased_ilist
|
||||
#define Yap_expand_clauses_sz Yap_heap_regs->expand_clauses_sz
|
||||
#endif /* DEBUG */
|
||||
#define Stream heap_regs->yap_streams
|
||||
#define output_msg heap_regs->debugger_output_msg
|
||||
#define NOfFileAliases heap_regs->n_of_file_aliases
|
||||
#define SzOfFileAliases heap_regs->sz_of_file_aliases
|
||||
#define FileAliases heap_regs->file_aliases
|
||||
#define Stream Yap_heap_regs->yap_streams
|
||||
#define output_msg Yap_heap_regs->debugger_output_msg
|
||||
#define NOfFileAliases Yap_heap_regs->n_of_file_aliases
|
||||
#define SzOfFileAliases Yap_heap_regs->sz_of_file_aliases
|
||||
#define FileAliases Yap_heap_regs->file_aliases
|
||||
#if LOW_PROF
|
||||
#define ProfilerOn heap_regs->profiler_on
|
||||
#define FProf ((FILE *)heap_regs->f_prof)
|
||||
#define FPreds ((FILE *)heap_regs->f_preds)
|
||||
#define ProfPreds heap_regs->prof_preds
|
||||
#define ProfilerOn Yap_heap_regs->profiler_on
|
||||
#define FProf ((FILE *)Yap_heap_regs->f_prof)
|
||||
#define FPreds ((FILE *)Yap_heap_regs->f_preds)
|
||||
#define ProfPreds Yap_heap_regs->prof_preds
|
||||
#endif /* LOW_PROF */
|
||||
#define ReductionsCounter heap_regs->call_counters.reductions
|
||||
#define PredEntriesCounter heap_regs->call_counters.reductions_retries
|
||||
#define RetriesCounter heap_regs->call_counters.retries
|
||||
#define ReductionsCounterOn heap_regs->call_counters.reductions_on
|
||||
#define PredEntriesCounterOn heap_regs->call_counters.reductions_retries_on
|
||||
#define RetriesCounterOn heap_regs->call_counters.retries_on
|
||||
#define Yap_LibDir heap_regs->yap_lib_dir
|
||||
#define AGCHook heap_regs->agc_hook
|
||||
#define ParserErrorStyle heap_regs->parser_error_style
|
||||
#define ReductionsCounter Yap_heap_regs->call_counters.reductions
|
||||
#define PredEntriesCounter Yap_heap_regs->call_counters.reductions_retries
|
||||
#define RetriesCounter Yap_heap_regs->call_counters.retries
|
||||
#define ReductionsCounterOn Yap_heap_regs->call_counters.reductions_on
|
||||
#define PredEntriesCounterOn Yap_heap_regs->call_counters.reductions_retries_on
|
||||
#define RetriesCounterOn Yap_heap_regs->call_counters.retries_on
|
||||
#define Yap_LibDir Yap_heap_regs->yap_lib_dir
|
||||
#define AGCHook Yap_heap_regs->agc_hook
|
||||
#define ParserErrorStyle Yap_heap_regs->parser_error_style
|
||||
#ifdef COROUTINING
|
||||
#define WakeUpCode heap_regs->wake_up_code
|
||||
#define WakeUpCode Yap_heap_regs->wake_up_code
|
||||
#endif
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define SignalLock heap_regs->wl[worker_id].signal_lock
|
||||
#define WPP heap_regs->wl[worker_id].wpp
|
||||
#define UncaughtThrow heap_regs->wl[worker_id].uncaught_throw
|
||||
#define ActiveSignals heap_regs->wl[worker_id].active_signals
|
||||
#define DelayedTrace heap_regs->wl[worker_id].delayed_trace
|
||||
#define IPredArity heap_regs->wl[worker_id].i_pred_arity
|
||||
#define ProfEnd heap_regs->wl[worker_id].prof_end
|
||||
#define StartLine heap_regs->wl[worker_id].start_line
|
||||
#define ScratchPad heap_regs->wl[worker_id].scratchpad
|
||||
#define SignalLock Yap_heap_regs->wl[worker_id].signal_lock
|
||||
#define WPP Yap_heap_regs->wl[worker_id].wpp
|
||||
#define UncaughtThrow Yap_heap_regs->wl[worker_id].uncaught_throw
|
||||
#define ActiveSignals Yap_heap_regs->wl[worker_id].active_signals
|
||||
#define DelayedTrace Yap_heap_regs->wl[worker_id].delayed_trace
|
||||
#define IPredArity Yap_heap_regs->wl[worker_id].i_pred_arity
|
||||
#define ProfEnd Yap_heap_regs->wl[worker_id].prof_end
|
||||
#define StartLine Yap_heap_regs->wl[worker_id].start_line
|
||||
#define ScratchPad Yap_heap_regs->wl[worker_id].scratchpad
|
||||
#ifdef COROUTINING
|
||||
#define WokenGoals heap_regs->wl[worker_id].woken_goals
|
||||
#define MutableList heap_regs->wl[worker_id].mutable_list
|
||||
#define AttsMutableList heap_regs->wl[worker_id].atts_mutable_list
|
||||
#define WokenGoals Yap_heap_regs->wl[worker_id].woken_goals
|
||||
#define MutableList Yap_heap_regs->wl[worker_id].mutable_list
|
||||
#define AttsMutableList Yap_heap_regs->wl[worker_id].atts_mutable_list
|
||||
#endif
|
||||
#define GcCalls heap_regs->wl[worker_id].gc_calls
|
||||
#define TotGcTime heap_regs->wl[worker_id].tot_gc_time
|
||||
#define TotGcRecovered heap_regs->wl[worker_id].tot_gc_recovered
|
||||
#define Yap_gc_restore heap_regs->wl[worker_id].gc_restore
|
||||
#define Yap_old_TR heap_regs->wl[worker_id].old_TR
|
||||
#define TrustLUCode heap_regs->wl[worker_id].trust_lu_code
|
||||
#define GcCalls Yap_heap_regs->wl[worker_id].gc_calls
|
||||
#define TotGcTime Yap_heap_regs->wl[worker_id].tot_gc_time
|
||||
#define TotGcRecovered Yap_heap_regs->wl[worker_id].tot_gc_recovered
|
||||
#define Yap_gc_restore Yap_heap_regs->wl[worker_id].gc_restore
|
||||
#define Yap_old_TR Yap_heap_regs->wl[worker_id].old_TR
|
||||
#define TrustLUCode Yap_heap_regs->wl[worker_id].trust_lu_code
|
||||
#else
|
||||
#define ActiveSignals heap_regs->wl.active_signals
|
||||
#define DelayedTrace heap_regs->wl.delayed_trace
|
||||
#define IPredArity heap_regs->wl.i_pred_arity
|
||||
#define ProfEnd heap_regs->wl.prof_end
|
||||
#define UncaughtThrow heap_regs->wl.uncaught_throw
|
||||
#define StartLine heap_regs->wl.start_line
|
||||
#define ScratchPad heap_regs->wl.scratchpad
|
||||
#define ActiveSignals Yap_heap_regs->wl.active_signals
|
||||
#define DelayedTrace Yap_heap_regs->wl.delayed_trace
|
||||
#define IPredArity Yap_heap_regs->wl.i_pred_arity
|
||||
#define ProfEnd Yap_heap_regs->wl.prof_end
|
||||
#define UncaughtThrow Yap_heap_regs->wl.uncaught_throw
|
||||
#define StartLine Yap_heap_regs->wl.start_line
|
||||
#define ScratchPad Yap_heap_regs->wl.scratchpad
|
||||
#ifdef COROUTINING
|
||||
#define WokenGoals heap_regs->wl.woken_goals
|
||||
#define MutableList heap_regs->wl.mutable_list
|
||||
#define AttsMutableList heap_regs->wl.atts_mutable_list
|
||||
#define WokenGoals Yap_heap_regs->wl.woken_goals
|
||||
#define MutableList Yap_heap_regs->wl.mutable_list
|
||||
#define AttsMutableList Yap_heap_regs->wl.atts_mutable_list
|
||||
#endif
|
||||
#define GcCalls heap_regs->wl.gc_calls
|
||||
#define TotGcTime heap_regs->wl.tot_gc_time
|
||||
#define TotGcRecovered heap_regs->wl.tot_gc_recovered
|
||||
#define Yap_gc_restore heap_regs->wl.gc_restore
|
||||
#define Yap_old_TR heap_regs->wl.old_TR
|
||||
#define TrustLUCode heap_regs->wl.trust_lu_code
|
||||
#define GcCalls Yap_heap_regs->wl.gc_calls
|
||||
#define TotGcTime Yap_heap_regs->wl.tot_gc_time
|
||||
#define TotGcRecovered Yap_heap_regs->wl.tot_gc_recovered
|
||||
#define Yap_gc_restore Yap_heap_regs->wl.gc_restore
|
||||
#define Yap_old_TR Yap_heap_regs->wl.old_TR
|
||||
#define TrustLUCode Yap_heap_regs->wl.trust_lu_code
|
||||
#endif
|
||||
#define profiling heap_regs->compiler_profiling
|
||||
#define call_counting heap_regs->compiler_call_counting
|
||||
#define compile_arrays heap_regs->compiler_compile_arrays
|
||||
#define optimizer_on heap_regs->compiler_optimizer_on
|
||||
#define compile_mode heap_regs->compiler_compile_mode
|
||||
#define P_before_spy heap_regs->debugger_p_before_spy
|
||||
#define ForeignCodeBase heap_regs->foreign_code_base;
|
||||
#define ForeignCodeTop heap_regs->foreign_code_top;
|
||||
#define ForeignCodeMax heap_regs->foreign_code_max;
|
||||
#define ForeignCodeLoaded heap_regs->foreign_code_loaded
|
||||
#define ParserErrorStyle heap_regs->parser_error_style
|
||||
#define DeadClauses heap_regs->dead_clauses
|
||||
#define SizeOfOverflow heap_regs->size_of_overflow
|
||||
#define LastWtimePtr heap_regs->last_wtime
|
||||
#define BGL heap_regs->bgl
|
||||
#define FreeBlocks heap_regs->free_blocks
|
||||
#define profiling Yap_heap_regs->compiler_profiling
|
||||
#define call_counting Yap_heap_regs->compiler_call_counting
|
||||
#define compile_arrays Yap_heap_regs->compiler_compile_arrays
|
||||
#define optimizer_on Yap_heap_regs->compiler_optimizer_on
|
||||
#define compile_mode Yap_heap_regs->compiler_compile_mode
|
||||
#define P_before_spy Yap_heap_regs->debugger_p_before_spy
|
||||
#define ForeignCodeBase Yap_heap_regs->foreign_code_base;
|
||||
#define ForeignCodeTop Yap_heap_regs->foreign_code_top;
|
||||
#define ForeignCodeMax Yap_heap_regs->foreign_code_max;
|
||||
#define ForeignCodeLoaded Yap_heap_regs->foreign_code_loaded
|
||||
#define ParserErrorStyle Yap_heap_regs->parser_error_style
|
||||
#define DeadClauses Yap_heap_regs->dead_clauses
|
||||
#define SizeOfOverflow Yap_heap_regs->size_of_overflow
|
||||
#define LastWtimePtr Yap_heap_regs->last_wtime
|
||||
#define BGL Yap_heap_regs->bgl
|
||||
#define FreeBlocks Yap_heap_regs->free_blocks
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define FreeBlocksLock heap_regs->free_blocks_lock
|
||||
#define HeapTopLock heap_regs->heap_top_lock
|
||||
#define HeapTopOwner heap_regs->heap_top_owner
|
||||
#define NOfThreads heap_regs->n_of_threads
|
||||
#define NOfThreadsCreated heap_regs->n_of_threads_created
|
||||
#define ThreadsTotalTime heap_regs->threads_total_time
|
||||
#define HeapUsedLock heap_regs->heap_used_lock
|
||||
#define DeadClausesLock heap_regs->dead_clauses_lock
|
||||
#define FreeBlocksLock Yap_heap_regs->free_blocks_lock
|
||||
#define HeapTopLock Yap_heap_regs->heap_top_lock
|
||||
#define HeapTopOwner Yap_heap_regs->heap_top_owner
|
||||
#define NOfThreads Yap_heap_regs->n_of_threads
|
||||
#define NOfThreadsCreated Yap_heap_regs->n_of_threads_created
|
||||
#define ThreadsTotalTime Yap_heap_regs->threads_total_time
|
||||
#define HeapUsedLock Yap_heap_regs->heap_used_lock
|
||||
#define DeadClausesLock Yap_heap_regs->dead_clauses_lock
|
||||
#endif
|
||||
#define CreepCode heap_regs->creep_code
|
||||
#define UndefCode heap_regs->undef_code
|
||||
#define SpyCode heap_regs->spy_code
|
||||
#define CreepCode Yap_heap_regs->creep_code
|
||||
#define UndefCode Yap_heap_regs->undef_code
|
||||
#define SpyCode Yap_heap_regs->spy_code
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
#define GLOBAL heap_regs->global
|
||||
#define REMOTE heap_regs->remote
|
||||
#define GLOBAL Yap_heap_regs->global
|
||||
#define REMOTE Yap_heap_regs->remote
|
||||
#endif /* YAPOR || TABLING */
|
||||
|
||||
#define UPDATE_MODE_IMMEDIATE 0
|
||||
@ -747,23 +747,23 @@ struct various_codes *heap_regs;
|
||||
|
||||
|
||||
#ifdef COROUTINING
|
||||
#define NUM_OF_ATTS heap_regs->num_of_atts
|
||||
#define NUM_OF_ATTS Yap_heap_regs->num_of_atts
|
||||
#endif
|
||||
|
||||
/* initially allow for files with up to 1024 predicates. This number
|
||||
is extended whenever needed */
|
||||
#define InitialConsultCapacity 1024
|
||||
/* current consult stack */
|
||||
#define ConsultSp (heap_regs->consultsp )
|
||||
#define ConsultSp (Yap_heap_regs->consultsp )
|
||||
/* top of consult stack */
|
||||
#define ConsultBase (heap_regs->consultbase )
|
||||
#define ConsultBase (Yap_heap_regs->consultbase )
|
||||
/* low-water mark for consult */
|
||||
#define ConsultLow (heap_regs->consultlow )
|
||||
#define ConsultLow (Yap_heap_regs->consultlow )
|
||||
/* current maximum number of cells in consult stack */
|
||||
#define ConsultCapacity (heap_regs->consultcapacity )
|
||||
#define ConsultCapacity (Yap_heap_regs->consultcapacity )
|
||||
#if HAVE_LIBREADLINE
|
||||
#define ReadlineBuf heap_regs->readline_buf
|
||||
#define ReadlinePos heap_regs->readline_pos
|
||||
#define ReadlineBuf Yap_heap_regs->readline_buf
|
||||
#define ReadlinePos Yap_heap_regs->readline_pos
|
||||
#endif
|
||||
|
||||
ADDR STD_PROTO(Yap_ExpandPreAllocCodeSpace, (UInt));
|
||||
@ -794,7 +794,7 @@ Yap_GetThreadPred(PredEntry *ap)
|
||||
{
|
||||
Functor f = ap->FunctorOfPred;
|
||||
Term mod = ap->ModuleOfPred;
|
||||
Prop p0 = AbsPredProp(heap_regs->thread_handle[worker_id].local_preds);
|
||||
Prop p0 = AbsPredProp(Yap_heap_regs->thread_handle[worker_id].local_preds);
|
||||
|
||||
while(p0) {
|
||||
PredEntry *ap = RepPredProp(p0);
|
||||
|
@ -246,6 +246,8 @@ Yap_op_from_opcode(OPCODE opc)
|
||||
#endif /* USE_THREADED_CODE */
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
static int same_lu_block(yamop **, yamop *);
|
||||
|
||||
static int
|
||||
same_lu_block(yamop **paddr, yamop *p)
|
||||
{
|
||||
|
493
H/rheap.h
493
H/rheap.h
@ -11,8 +11,11 @@
|
||||
* File: rheap.h *
|
||||
* comments: walk through heap code *
|
||||
* *
|
||||
* Last rev: $Date: 2004-11-23 21:16:21 $,$Author: vsc $ *
|
||||
* Last rev: $Date: 2004-12-02 06:06:47 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.46 2004/11/23 21:16:21 vsc
|
||||
* A few extra fixes for saved states.
|
||||
*
|
||||
* Revision 1.45 2004/10/26 20:16:18 vsc
|
||||
* More bug fixes for overflow handling
|
||||
*
|
||||
@ -91,130 +94,130 @@ do_clean_susp_clauses(yamop *ipc) {
|
||||
static void
|
||||
restore_codes(void)
|
||||
{
|
||||
heap_regs->heap_top = AddrAdjust(OldHeapTop);
|
||||
Yap_heap_regs->heap_top = AddrAdjust(OldHeapTop);
|
||||
#ifdef YAPOR
|
||||
heap_regs->getworkfirsttimecode.opc = Yap_opcode(_getwork_first_time);
|
||||
heap_regs->getworkcode.opc = Yap_opcode(_getwork);
|
||||
INIT_YAMOP_LTT(&(heap_regs->getworkcode), 0);
|
||||
heap_regs->getworkcode_seq.opc = Yap_opcode(_getwork_seq);
|
||||
INIT_YAMOP_LTT(&(heap_regs->getworkcode_seq), 0);
|
||||
Yap_heap_regs->getworkfirsttimecode.opc = Yap_opcode(_getwork_first_time);
|
||||
Yap_heap_regs->getworkcode.opc = Yap_opcode(_getwork);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->getworkcode), 0);
|
||||
Yap_heap_regs->getworkcode_seq.opc = Yap_opcode(_getwork_seq);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->getworkcode_seq), 0);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
heap_regs->tablecompletioncode.opc = Yap_opcode(_table_completion);
|
||||
heap_regs->tableanswerresolutioncode.opc = Yap_opcode(_table_answer_resolution);
|
||||
Yap_heap_regs->tablecompletioncode.opc = Yap_opcode(_table_completion);
|
||||
Yap_heap_regs->tableanswerresolutioncode.opc = Yap_opcode(_table_answer_resolution);
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(&(heap_regs->tablecompletioncode), 0);
|
||||
INIT_YAMOP_LTT(&(heap_regs->tableanswerresolutioncode), 0);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->tablecompletioncode), 0);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->tableanswerresolutioncode), 0);
|
||||
#endif /* YAPOR */
|
||||
#endif /* TABLING */
|
||||
heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||
if (heap_regs->expand_clauses_first)
|
||||
heap_regs->expand_clauses_first = PtoOpAdjust(heap_regs->expand_clauses_first);
|
||||
if (heap_regs->expand_clauses_last)
|
||||
heap_regs->expand_clauses_last = PtoOpAdjust(heap_regs->expand_clauses_last);
|
||||
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||
if (Yap_heap_regs->expand_clauses_first)
|
||||
Yap_heap_regs->expand_clauses_first = PtoOpAdjust(Yap_heap_regs->expand_clauses_first);
|
||||
if (Yap_heap_regs->expand_clauses_last)
|
||||
Yap_heap_regs->expand_clauses_last = PtoOpAdjust(Yap_heap_regs->expand_clauses_last);
|
||||
{
|
||||
yamop *ptr = heap_regs->expand_clauses_first;
|
||||
yamop *ptr = Yap_heap_regs->expand_clauses_first;
|
||||
while (ptr) {
|
||||
do_clean_susp_clauses(ptr);
|
||||
ptr = ptr->u.sp.snext;
|
||||
}
|
||||
}
|
||||
heap_regs->failcode->opc = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_1 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_2 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_3 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_4 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_5 = Yap_opcode(_op_fail);
|
||||
heap_regs->failcode_6 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_1 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_2 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_3 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_4 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_5 = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode_6 = Yap_opcode(_op_fail);
|
||||
|
||||
heap_regs->env_for_trustfail_code.op = Yap_opcode(_call);
|
||||
heap_regs->trustfailcode->opc = Yap_opcode(_trust_fail);
|
||||
Yap_heap_regs->env_for_trustfail_code.op = Yap_opcode(_call);
|
||||
Yap_heap_regs->trustfailcode->opc = Yap_opcode(_trust_fail);
|
||||
|
||||
heap_regs->env_for_yes_code.op = Yap_opcode(_call);
|
||||
heap_regs->yescode->opc = Yap_opcode(_Ystop);
|
||||
heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||
heap_regs->index_op = Yap_opcode(_index_pred);
|
||||
heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||
heap_regs->nocode->opc = Yap_opcode(_Nstop);
|
||||
Yap_heap_regs->env_for_yes_code.op = Yap_opcode(_call);
|
||||
Yap_heap_regs->yescode->opc = Yap_opcode(_Ystop);
|
||||
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
||||
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop);
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(&(heap_regs->nocode), 1);
|
||||
INIT_YAMOP_LTT(&(heap_regs->rtrycode), 1);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->nocode), 1);
|
||||
INIT_YAMOP_LTT(&(Yap_heap_regs->rtrycode), 1);
|
||||
#endif /* YAPOR */
|
||||
((yamop *)(&heap_regs->rtrycode))->opc = Yap_opcode(_retry_and_mark);
|
||||
if (((yamop *)(&heap_regs->rtrycode))->u.ld.d != NIL)
|
||||
((yamop *)(&heap_regs->rtrycode))->u.ld.d =
|
||||
PtoOpAdjust(((yamop *)(&heap_regs->rtrycode))->u.ld.d);
|
||||
((yamop *)(&Yap_heap_regs->rtrycode))->opc = Yap_opcode(_retry_and_mark);
|
||||
if (((yamop *)(&Yap_heap_regs->rtrycode))->u.ld.d != NIL)
|
||||
((yamop *)(&Yap_heap_regs->rtrycode))->u.ld.d =
|
||||
PtoOpAdjust(((yamop *)(&Yap_heap_regs->rtrycode))->u.ld.d);
|
||||
{
|
||||
int arity;
|
||||
arity = heap_regs->clausecode->arity;
|
||||
if (heap_regs->clausecode->clause != NIL)
|
||||
heap_regs->clausecode->clause =
|
||||
PtoOpAdjust(heap_regs->clausecode->clause);
|
||||
arity = Yap_heap_regs->clausecode->arity;
|
||||
if (Yap_heap_regs->clausecode->clause != NIL)
|
||||
Yap_heap_regs->clausecode->clause =
|
||||
PtoOpAdjust(Yap_heap_regs->clausecode->clause);
|
||||
if (arity) {
|
||||
heap_regs->clausecode->func =
|
||||
FuncAdjust(heap_regs->clausecode->func);
|
||||
Yap_heap_regs->clausecode->func =
|
||||
FuncAdjust(Yap_heap_regs->clausecode->func);
|
||||
} else {
|
||||
/* an atom */
|
||||
heap_regs->clausecode->func =
|
||||
(Functor)AtomAdjust((Atom)(heap_regs->clausecode->func));
|
||||
Yap_heap_regs->clausecode->func =
|
||||
(Functor)AtomAdjust((Atom)(Yap_heap_regs->clausecode->func));
|
||||
}
|
||||
}
|
||||
/* restore consult stack. It consists of heap pointers, so it
|
||||
is easy to fix.
|
||||
*/
|
||||
heap_regs->consultlow =
|
||||
ConsultObjAdjust(heap_regs->consultlow);
|
||||
heap_regs->consultbase =
|
||||
ConsultObjAdjust(heap_regs->consultbase);
|
||||
heap_regs->consultsp =
|
||||
ConsultObjAdjust(heap_regs->consultsp);
|
||||
Yap_heap_regs->consultlow =
|
||||
ConsultObjAdjust(Yap_heap_regs->consultlow);
|
||||
Yap_heap_regs->consultbase =
|
||||
ConsultObjAdjust(Yap_heap_regs->consultbase);
|
||||
Yap_heap_regs->consultsp =
|
||||
ConsultObjAdjust(Yap_heap_regs->consultsp);
|
||||
{
|
||||
/* we assume all pointers have the same size */
|
||||
register consult_obj *pt = heap_regs->consultsp;
|
||||
register consult_obj *pt = Yap_heap_regs->consultsp;
|
||||
while (pt <
|
||||
heap_regs->consultlow+heap_regs->consultcapacity) {
|
||||
Yap_heap_regs->consultlow+Yap_heap_regs->consultcapacity) {
|
||||
pt->p = PropAdjust(pt->p);
|
||||
pt ++;
|
||||
}
|
||||
}
|
||||
#if USE_THREADED_CODE
|
||||
heap_regs->op_rtable = (opentry *)
|
||||
CodeAddrAdjust((CODEADDR)(heap_regs->op_rtable));
|
||||
Yap_heap_regs->op_rtable = (opentry *)
|
||||
CodeAddrAdjust((CODEADDR)(Yap_heap_regs->op_rtable));
|
||||
#endif
|
||||
if (heap_regs->atprompt != NIL) {
|
||||
heap_regs->atprompt =
|
||||
AtomAdjust(heap_regs->atprompt);
|
||||
if (Yap_heap_regs->atprompt != NIL) {
|
||||
Yap_heap_regs->atprompt =
|
||||
AtomAdjust(Yap_heap_regs->atprompt);
|
||||
}
|
||||
if (heap_regs->char_conversion_table != NULL) {
|
||||
heap_regs->char_conversion_table = (char *)
|
||||
AddrAdjust((ADDR)heap_regs->char_conversion_table);
|
||||
if (Yap_heap_regs->char_conversion_table != NULL) {
|
||||
Yap_heap_regs->char_conversion_table = (char *)
|
||||
AddrAdjust((ADDR)Yap_heap_regs->char_conversion_table);
|
||||
}
|
||||
if (heap_regs->char_conversion_table2 != NULL) {
|
||||
heap_regs->char_conversion_table2 = (char *)
|
||||
AddrAdjust((ADDR)heap_regs->char_conversion_table2);
|
||||
if (Yap_heap_regs->char_conversion_table2 != NULL) {
|
||||
Yap_heap_regs->char_conversion_table2 = (char *)
|
||||
AddrAdjust((ADDR)Yap_heap_regs->char_conversion_table2);
|
||||
}
|
||||
if (heap_regs->dead_clauses != NULL) {
|
||||
heap_regs->dead_clauses = (DeadClause *)
|
||||
AddrAdjust((ADDR)(heap_regs->dead_clauses));
|
||||
if (Yap_heap_regs->dead_clauses != NULL) {
|
||||
Yap_heap_regs->dead_clauses = (DeadClause *)
|
||||
AddrAdjust((ADDR)(Yap_heap_regs->dead_clauses));
|
||||
}
|
||||
heap_regs->retry_recorded_k_code =
|
||||
PtoOpAdjust(heap_regs->retry_recorded_k_code);
|
||||
heap_regs->retry_c_recordedp_code =
|
||||
PtoOpAdjust(heap_regs->retry_c_recordedp_code);
|
||||
if (heap_regs->IntKeys != NULL) {
|
||||
heap_regs->IntKeys = (Prop *)AddrAdjust((ADDR)(heap_regs->IntKeys));
|
||||
Yap_heap_regs->retry_recorded_k_code =
|
||||
PtoOpAdjust(Yap_heap_regs->retry_recorded_k_code);
|
||||
Yap_heap_regs->retry_c_recordedp_code =
|
||||
PtoOpAdjust(Yap_heap_regs->retry_c_recordedp_code);
|
||||
if (Yap_heap_regs->IntKeys != NULL) {
|
||||
Yap_heap_regs->IntKeys = (Prop *)AddrAdjust((ADDR)(Yap_heap_regs->IntKeys));
|
||||
{
|
||||
UInt i;
|
||||
for (i = 0; i < heap_regs->int_keys_size; i++) {
|
||||
if (heap_regs->IntKeys[i] != NIL) {
|
||||
Prop p0 = heap_regs->IntKeys[i] = PropAdjust(heap_regs->IntKeys[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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (heap_regs->IntLUKeys != NULL) {
|
||||
heap_regs->IntLUKeys = (Prop *)AddrAdjust((ADDR)(heap_regs->IntLUKeys));
|
||||
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++) {
|
||||
@ -233,13 +236,13 @@ restore_codes(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (heap_regs->IntBBKeys != NULL) {
|
||||
heap_regs->IntBBKeys = (Prop *)AddrAdjust((ADDR)(heap_regs->IntBBKeys));
|
||||
if (Yap_heap_regs->IntBBKeys != NULL) {
|
||||
Yap_heap_regs->IntBBKeys = (Prop *)AddrAdjust((ADDR)(Yap_heap_regs->IntBBKeys));
|
||||
{
|
||||
UInt i;
|
||||
for (i = 0; i < heap_regs->int_bb_keys_size; i++) {
|
||||
if (heap_regs->IntBBKeys[i] != NIL) {
|
||||
Prop p0 = heap_regs->IntBBKeys[i] = PropAdjust(heap_regs->IntBBKeys[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));
|
||||
}
|
||||
}
|
||||
@ -249,193 +252,193 @@ restore_codes(void)
|
||||
/* adjust atoms in atom table */
|
||||
unsigned int i = 0;
|
||||
|
||||
for (i = 0; i < heap_regs->no_of_modules; i++) {
|
||||
heap_regs->module_name[i] = AtomTermAdjust(heap_regs->module_name[i]);
|
||||
if (heap_regs->module_pred[i]) {
|
||||
heap_regs->module_pred[i] = PtoPredAdjust(heap_regs->module_pred[i]);
|
||||
for (i = 0; i < Yap_heap_regs->no_of_modules; i++) {
|
||||
Yap_heap_regs->module_name[i] = AtomTermAdjust(Yap_heap_regs->module_name[i]);
|
||||
if (Yap_heap_regs->module_pred[i]) {
|
||||
Yap_heap_regs->module_pred[i] = PtoPredAdjust(Yap_heap_regs->module_pred[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
heap_regs->atom_abol = AtomAdjust(heap_regs->atom_abol);
|
||||
heap_regs->atom_append = AtomAdjust(heap_regs->atom_append);
|
||||
heap_regs->atom_array = AtomAdjust(heap_regs->atom_array);
|
||||
heap_regs->atom_assert = AtomAdjust(heap_regs->atom_assert);
|
||||
heap_regs->atom_alarm = AtomAdjust(heap_regs->atom_alarm);
|
||||
heap_regs->atom_b = AtomAdjust(heap_regs->atom_b);
|
||||
heap_regs->atom_break = AtomAdjust(heap_regs->atom_break);
|
||||
heap_regs->atom_call = AtomAdjust(heap_regs->atom_call);
|
||||
heap_regs->atom_catch = AtomAdjust(heap_regs->atom_catch);
|
||||
heap_regs->atom_comma = AtomAdjust(heap_regs->atom_comma);
|
||||
heap_regs->atom_cpu_time = AtomAdjust(heap_regs->atom_cpu_time);
|
||||
heap_regs->atom_csult = AtomAdjust(heap_regs->atom_csult);
|
||||
heap_regs->atom_cut = AtomAdjust(heap_regs->atom_cut);
|
||||
heap_regs->atom_cut_by = AtomAdjust(heap_regs->atom_cut_by);
|
||||
Yap_heap_regs->atom_abol = AtomAdjust(Yap_heap_regs->atom_abol);
|
||||
Yap_heap_regs->atom_append = AtomAdjust(Yap_heap_regs->atom_append);
|
||||
Yap_heap_regs->atom_array = AtomAdjust(Yap_heap_regs->atom_array);
|
||||
Yap_heap_regs->atom_assert = AtomAdjust(Yap_heap_regs->atom_assert);
|
||||
Yap_heap_regs->atom_alarm = AtomAdjust(Yap_heap_regs->atom_alarm);
|
||||
Yap_heap_regs->atom_b = AtomAdjust(Yap_heap_regs->atom_b);
|
||||
Yap_heap_regs->atom_break = AtomAdjust(Yap_heap_regs->atom_break);
|
||||
Yap_heap_regs->atom_call = AtomAdjust(Yap_heap_regs->atom_call);
|
||||
Yap_heap_regs->atom_catch = AtomAdjust(Yap_heap_regs->atom_catch);
|
||||
Yap_heap_regs->atom_comma = AtomAdjust(Yap_heap_regs->atom_comma);
|
||||
Yap_heap_regs->atom_cpu_time = AtomAdjust(Yap_heap_regs->atom_cpu_time);
|
||||
Yap_heap_regs->atom_csult = AtomAdjust(Yap_heap_regs->atom_csult);
|
||||
Yap_heap_regs->atom_cut = AtomAdjust(Yap_heap_regs->atom_cut);
|
||||
Yap_heap_regs->atom_cut_by = AtomAdjust(Yap_heap_regs->atom_cut_by);
|
||||
#ifdef EUROTRA
|
||||
#ifdef SFUNC
|
||||
heap_regs->atom_dollar_undef = AtomAdjust(heap_regs->atom_dollar_undef);
|
||||
Yap_heap_regs->atom_dollar_undef = AtomAdjust(Yap_heap_regs->atom_dollar_undef);
|
||||
#endif
|
||||
#endif
|
||||
heap_regs->atom_dbref = AtomAdjust(heap_regs->atom_dbref);
|
||||
heap_regs->atom_e = AtomAdjust(heap_regs->atom_e);
|
||||
heap_regs->atom_e_q = AtomAdjust(heap_regs->atom_e_q);
|
||||
heap_regs->atom_eof = AtomAdjust(heap_regs->atom_eof);
|
||||
Yap_heap_regs->atom_dbref = AtomAdjust(Yap_heap_regs->atom_dbref);
|
||||
Yap_heap_regs->atom_e = AtomAdjust(Yap_heap_regs->atom_e);
|
||||
Yap_heap_regs->atom_e_q = AtomAdjust(Yap_heap_regs->atom_e_q);
|
||||
Yap_heap_regs->atom_eof = AtomAdjust(Yap_heap_regs->atom_eof);
|
||||
#ifdef EUROTRA
|
||||
heap_regs->atom_f_b = AtomAdjust(heap_regs->atom_f_b);
|
||||
Yap_heap_regs->atom_f_b = AtomAdjust(Yap_heap_regs->atom_f_b);
|
||||
#endif
|
||||
heap_regs->atom_fail = AtomAdjust(heap_regs->atom_fail);
|
||||
heap_regs->atom_false = AtomAdjust(heap_regs->atom_false);
|
||||
heap_regs->atom_fast = AtomAdjust(heap_regs->atom_fast);
|
||||
heap_regs->atom_g_t = AtomAdjust(heap_regs->atom_g_t);
|
||||
heap_regs->atom_gc = AtomAdjust(heap_regs->atom_gc);
|
||||
heap_regs->atom_gc_margin = AtomAdjust(heap_regs->atom_gc_margin);
|
||||
heap_regs->atom_gc_trace = AtomAdjust(heap_regs->atom_gc_trace);
|
||||
heap_regs->atom_gc_verbose = AtomAdjust(heap_regs->atom_gc_verbose);
|
||||
heap_regs->atom_gc_very_verbose = AtomAdjust(heap_regs->atom_gc_very_verbose);
|
||||
heap_regs->atom_global = AtomAdjust(heap_regs->atom_global);
|
||||
heap_regs->atom_heap_used = AtomAdjust(heap_regs->atom_heap_used);
|
||||
heap_regs->atom_inf = AtomAdjust(heap_regs->atom_inf);
|
||||
heap_regs->atom_l_t = AtomAdjust(heap_regs->atom_l_t);
|
||||
heap_regs->atom_local = AtomAdjust(heap_regs->atom_local);
|
||||
heap_regs->atom_meta_call = AtomAdjust(heap_regs->atom_meta_call);
|
||||
heap_regs->atom_minus = AtomAdjust(heap_regs->atom_minus);
|
||||
heap_regs->atom_multi_file = AtomAdjust(heap_regs->atom_multi_file);
|
||||
heap_regs->atom_nan = AtomAdjust(heap_regs->atom_nan);
|
||||
heap_regs->atom_otherwise = AtomAdjust(heap_regs->atom_otherwise);
|
||||
heap_regs->atom_pi = AtomAdjust(heap_regs->atom_pi);
|
||||
heap_regs->atom_plus = AtomAdjust(heap_regs->atom_plus);
|
||||
heap_regs->atom_portray = AtomAdjust(heap_regs->atom_portray);
|
||||
heap_regs->atom_profile = AtomAdjust(heap_regs->atom_profile);
|
||||
heap_regs->atom_random = AtomAdjust(heap_regs->atom_random);
|
||||
heap_regs->atom_read = AtomAdjust(heap_regs->atom_read);
|
||||
heap_regs->atom_repeat = AtomAdjust(heap_regs->atom_repeat);
|
||||
heap_regs->atom_restore_regs = AtomAdjust(heap_regs->atom_restore_regs);
|
||||
Yap_heap_regs->atom_fail = AtomAdjust(Yap_heap_regs->atom_fail);
|
||||
Yap_heap_regs->atom_false = AtomAdjust(Yap_heap_regs->atom_false);
|
||||
Yap_heap_regs->atom_fast = AtomAdjust(Yap_heap_regs->atom_fast);
|
||||
Yap_heap_regs->atom_g_t = AtomAdjust(Yap_heap_regs->atom_g_t);
|
||||
Yap_heap_regs->atom_gc = AtomAdjust(Yap_heap_regs->atom_gc);
|
||||
Yap_heap_regs->atom_gc_margin = AtomAdjust(Yap_heap_regs->atom_gc_margin);
|
||||
Yap_heap_regs->atom_gc_trace = AtomAdjust(Yap_heap_regs->atom_gc_trace);
|
||||
Yap_heap_regs->atom_gc_verbose = AtomAdjust(Yap_heap_regs->atom_gc_verbose);
|
||||
Yap_heap_regs->atom_gc_very_verbose = AtomAdjust(Yap_heap_regs->atom_gc_very_verbose);
|
||||
Yap_heap_regs->atom_global = AtomAdjust(Yap_heap_regs->atom_global);
|
||||
Yap_heap_regs->atom_heap_used = AtomAdjust(Yap_heap_regs->atom_heap_used);
|
||||
Yap_heap_regs->atom_inf = AtomAdjust(Yap_heap_regs->atom_inf);
|
||||
Yap_heap_regs->atom_l_t = AtomAdjust(Yap_heap_regs->atom_l_t);
|
||||
Yap_heap_regs->atom_local = AtomAdjust(Yap_heap_regs->atom_local);
|
||||
Yap_heap_regs->atom_meta_call = AtomAdjust(Yap_heap_regs->atom_meta_call);
|
||||
Yap_heap_regs->atom_minus = AtomAdjust(Yap_heap_regs->atom_minus);
|
||||
Yap_heap_regs->atom_multi_file = AtomAdjust(Yap_heap_regs->atom_multi_file);
|
||||
Yap_heap_regs->atom_nan = AtomAdjust(Yap_heap_regs->atom_nan);
|
||||
Yap_heap_regs->atom_otherwise = AtomAdjust(Yap_heap_regs->atom_otherwise);
|
||||
Yap_heap_regs->atom_pi = AtomAdjust(Yap_heap_regs->atom_pi);
|
||||
Yap_heap_regs->atom_plus = AtomAdjust(Yap_heap_regs->atom_plus);
|
||||
Yap_heap_regs->atom_portray = AtomAdjust(Yap_heap_regs->atom_portray);
|
||||
Yap_heap_regs->atom_profile = AtomAdjust(Yap_heap_regs->atom_profile);
|
||||
Yap_heap_regs->atom_random = AtomAdjust(Yap_heap_regs->atom_random);
|
||||
Yap_heap_regs->atom_read = AtomAdjust(Yap_heap_regs->atom_read);
|
||||
Yap_heap_regs->atom_repeat = AtomAdjust(Yap_heap_regs->atom_repeat);
|
||||
Yap_heap_regs->atom_restore_regs = AtomAdjust(Yap_heap_regs->atom_restore_regs);
|
||||
#if HAVE_SIGACTION
|
||||
heap_regs->atom_sig_pending = AtomAdjust(heap_regs->atom_sig_pending);
|
||||
Yap_heap_regs->atom_sig_pending = AtomAdjust(Yap_heap_regs->atom_sig_pending);
|
||||
#endif
|
||||
heap_regs->atom_stack_free = AtomAdjust(heap_regs->atom_stack_free);
|
||||
heap_regs->atom_true = AtomAdjust(heap_regs->atom_true);
|
||||
heap_regs->atom_user = AtomAdjust(heap_regs->atom_user);
|
||||
heap_regs->atom_usr_err = AtomAdjust(heap_regs->atom_usr_err);
|
||||
heap_regs->atom_usr_in = AtomAdjust(heap_regs->atom_usr_in);
|
||||
heap_regs->atom_usr_out = AtomAdjust(heap_regs->atom_usr_out);
|
||||
heap_regs->atom_version_number = AtomAdjust(heap_regs->atom_version_number);
|
||||
heap_regs->atom_write = AtomAdjust(heap_regs->atom_write);
|
||||
Yap_heap_regs->atom_stack_free = AtomAdjust(Yap_heap_regs->atom_stack_free);
|
||||
Yap_heap_regs->atom_true = AtomAdjust(Yap_heap_regs->atom_true);
|
||||
Yap_heap_regs->atom_user = AtomAdjust(Yap_heap_regs->atom_user);
|
||||
Yap_heap_regs->atom_usr_err = AtomAdjust(Yap_heap_regs->atom_usr_err);
|
||||
Yap_heap_regs->atom_usr_in = AtomAdjust(Yap_heap_regs->atom_usr_in);
|
||||
Yap_heap_regs->atom_usr_out = AtomAdjust(Yap_heap_regs->atom_usr_out);
|
||||
Yap_heap_regs->atom_version_number = AtomAdjust(Yap_heap_regs->atom_version_number);
|
||||
Yap_heap_regs->atom_write = AtomAdjust(Yap_heap_regs->atom_write);
|
||||
#ifdef USE_SOCKET
|
||||
heap_regs->functor_af_inet = FuncAdjust(heap_regs->functor_af_inet);
|
||||
heap_regs->functor_af_local = FuncAdjust(heap_regs->functor_af_local);
|
||||
heap_regs->functor_af_unix = FuncAdjust(heap_regs->functor_af_unix);
|
||||
Yap_heap_regs->functor_af_inet = FuncAdjust(Yap_heap_regs->functor_af_inet);
|
||||
Yap_heap_regs->functor_af_local = FuncAdjust(Yap_heap_regs->functor_af_local);
|
||||
Yap_heap_regs->functor_af_unix = FuncAdjust(Yap_heap_regs->functor_af_unix);
|
||||
#endif
|
||||
heap_regs->functor_alt_not = FuncAdjust(heap_regs->functor_alt_not);
|
||||
heap_regs->functor_arrow = FuncAdjust(heap_regs->functor_arrow);
|
||||
heap_regs->functor_assert = FuncAdjust(heap_regs->functor_assert);
|
||||
Yap_heap_regs->functor_alt_not = FuncAdjust(Yap_heap_regs->functor_alt_not);
|
||||
Yap_heap_regs->functor_arrow = FuncAdjust(Yap_heap_regs->functor_arrow);
|
||||
Yap_heap_regs->functor_assert = FuncAdjust(Yap_heap_regs->functor_assert);
|
||||
#ifdef COROUTINING
|
||||
heap_regs->functor_att_goal = FuncAdjust(heap_regs->functor_att_goal);
|
||||
Yap_heap_regs->functor_att_goal = FuncAdjust(Yap_heap_regs->functor_att_goal);
|
||||
#endif
|
||||
heap_regs->functor_braces = FuncAdjust(heap_regs->functor_braces);
|
||||
heap_regs->functor_call = FuncAdjust(heap_regs->functor_call);
|
||||
heap_regs->functor_cut_by = FuncAdjust(heap_regs->functor_cut_by);
|
||||
heap_regs->functor_comma = FuncAdjust(heap_regs->functor_comma);
|
||||
heap_regs->functor_creep = FuncAdjust(heap_regs->functor_creep);
|
||||
heap_regs->functor_csult = FuncAdjust(heap_regs->functor_csult);
|
||||
heap_regs->functor_eq = FuncAdjust(heap_regs->functor_eq);
|
||||
heap_regs->functor_execute_in_mod = FuncAdjust(heap_regs->functor_execute_in_mod);
|
||||
heap_regs->functor_execute_within = FuncAdjust(heap_regs->functor_execute_within);
|
||||
heap_regs->functor_g_atom = FuncAdjust(heap_regs->functor_g_atom);
|
||||
heap_regs->functor_g_atomic = FuncAdjust(heap_regs->functor_g_atomic);
|
||||
heap_regs->functor_g_compound = FuncAdjust(heap_regs->functor_g_compound);
|
||||
heap_regs->functor_g_float = FuncAdjust(heap_regs->functor_g_float);
|
||||
heap_regs->functor_g_integer = FuncAdjust(heap_regs->functor_g_integer);
|
||||
heap_regs->functor_g_number = FuncAdjust(heap_regs->functor_g_number);
|
||||
heap_regs->functor_g_primitive = FuncAdjust(heap_regs->functor_g_primitive);
|
||||
heap_regs->functor_g_var = FuncAdjust(heap_regs->functor_g_var);
|
||||
heap_regs->functor_last_execute_within = FuncAdjust(heap_regs->functor_last_execute_within);
|
||||
heap_regs->functor_list = FuncAdjust(heap_regs->functor_list);
|
||||
heap_regs->functor_mega_clause = FuncAdjust(heap_regs->functor_mega_clause);
|
||||
heap_regs->functor_module = FuncAdjust(heap_regs->functor_module);
|
||||
heap_regs->functor_multi_file_clause = FuncAdjust(heap_regs->functor_multi_file_clause);
|
||||
Yap_heap_regs->functor_braces = FuncAdjust(Yap_heap_regs->functor_braces);
|
||||
Yap_heap_regs->functor_call = FuncAdjust(Yap_heap_regs->functor_call);
|
||||
Yap_heap_regs->functor_cut_by = FuncAdjust(Yap_heap_regs->functor_cut_by);
|
||||
Yap_heap_regs->functor_comma = FuncAdjust(Yap_heap_regs->functor_comma);
|
||||
Yap_heap_regs->functor_creep = FuncAdjust(Yap_heap_regs->functor_creep);
|
||||
Yap_heap_regs->functor_csult = FuncAdjust(Yap_heap_regs->functor_csult);
|
||||
Yap_heap_regs->functor_eq = FuncAdjust(Yap_heap_regs->functor_eq);
|
||||
Yap_heap_regs->functor_execute_in_mod = FuncAdjust(Yap_heap_regs->functor_execute_in_mod);
|
||||
Yap_heap_regs->functor_execute_within = FuncAdjust(Yap_heap_regs->functor_execute_within);
|
||||
Yap_heap_regs->functor_g_atom = FuncAdjust(Yap_heap_regs->functor_g_atom);
|
||||
Yap_heap_regs->functor_g_atomic = FuncAdjust(Yap_heap_regs->functor_g_atomic);
|
||||
Yap_heap_regs->functor_g_compound = FuncAdjust(Yap_heap_regs->functor_g_compound);
|
||||
Yap_heap_regs->functor_g_float = FuncAdjust(Yap_heap_regs->functor_g_float);
|
||||
Yap_heap_regs->functor_g_integer = FuncAdjust(Yap_heap_regs->functor_g_integer);
|
||||
Yap_heap_regs->functor_g_number = FuncAdjust(Yap_heap_regs->functor_g_number);
|
||||
Yap_heap_regs->functor_g_primitive = FuncAdjust(Yap_heap_regs->functor_g_primitive);
|
||||
Yap_heap_regs->functor_g_var = FuncAdjust(Yap_heap_regs->functor_g_var);
|
||||
Yap_heap_regs->functor_last_execute_within = FuncAdjust(Yap_heap_regs->functor_last_execute_within);
|
||||
Yap_heap_regs->functor_list = FuncAdjust(Yap_heap_regs->functor_list);
|
||||
Yap_heap_regs->functor_mega_clause = FuncAdjust(Yap_heap_regs->functor_mega_clause);
|
||||
Yap_heap_regs->functor_module = FuncAdjust(Yap_heap_regs->functor_module);
|
||||
Yap_heap_regs->functor_multi_file_clause = FuncAdjust(Yap_heap_regs->functor_multi_file_clause);
|
||||
#ifdef MULTI_ASSIGNMENT_VARIABLES
|
||||
heap_regs->functor_mutable = FuncAdjust(heap_regs->functor_mutable);
|
||||
Yap_heap_regs->functor_mutable = FuncAdjust(Yap_heap_regs->functor_mutable);
|
||||
#endif
|
||||
heap_regs->functor_not = FuncAdjust(heap_regs->functor_not);
|
||||
heap_regs->functor_or = FuncAdjust(heap_regs->functor_or);
|
||||
heap_regs->functor_portray = FuncAdjust(heap_regs->functor_portray);
|
||||
heap_regs->functor_query = FuncAdjust(heap_regs->functor_query);
|
||||
heap_regs->functor_static_clause = FuncAdjust(heap_regs->functor_static_clause);
|
||||
heap_regs->functor_stream = FuncAdjust(heap_regs->functor_stream);
|
||||
heap_regs->functor_stream_pos = FuncAdjust(heap_regs->functor_stream_pos);
|
||||
heap_regs->functor_stream_eOS = FuncAdjust(heap_regs->functor_stream_eOS);
|
||||
heap_regs->functor_change_module = FuncAdjust(heap_regs->functor_change_module);
|
||||
heap_regs->functor_current_module = FuncAdjust(heap_regs->functor_current_module);
|
||||
heap_regs->functor_u_minus = FuncAdjust(heap_regs->functor_u_minus);
|
||||
heap_regs->functor_u_plus = FuncAdjust(heap_regs->functor_u_plus);
|
||||
heap_regs->functor_v_bar = FuncAdjust(heap_regs->functor_v_bar);
|
||||
heap_regs->functor_var = FuncAdjust(heap_regs->functor_var);
|
||||
Yap_heap_regs->functor_not = FuncAdjust(Yap_heap_regs->functor_not);
|
||||
Yap_heap_regs->functor_or = FuncAdjust(Yap_heap_regs->functor_or);
|
||||
Yap_heap_regs->functor_portray = FuncAdjust(Yap_heap_regs->functor_portray);
|
||||
Yap_heap_regs->functor_query = FuncAdjust(Yap_heap_regs->functor_query);
|
||||
Yap_heap_regs->functor_static_clause = FuncAdjust(Yap_heap_regs->functor_static_clause);
|
||||
Yap_heap_regs->functor_stream = FuncAdjust(Yap_heap_regs->functor_stream);
|
||||
Yap_heap_regs->functor_stream_pos = FuncAdjust(Yap_heap_regs->functor_stream_pos);
|
||||
Yap_heap_regs->functor_stream_eOS = FuncAdjust(Yap_heap_regs->functor_stream_eOS);
|
||||
Yap_heap_regs->functor_change_module = FuncAdjust(Yap_heap_regs->functor_change_module);
|
||||
Yap_heap_regs->functor_current_module = FuncAdjust(Yap_heap_regs->functor_current_module);
|
||||
Yap_heap_regs->functor_u_minus = FuncAdjust(Yap_heap_regs->functor_u_minus);
|
||||
Yap_heap_regs->functor_u_plus = FuncAdjust(Yap_heap_regs->functor_u_plus);
|
||||
Yap_heap_regs->functor_v_bar = FuncAdjust(Yap_heap_regs->functor_v_bar);
|
||||
Yap_heap_regs->functor_var = FuncAdjust(Yap_heap_regs->functor_var);
|
||||
#ifdef EUROTRA
|
||||
heap_regs->term_dollar_u = AtomTermAdjust(heap_regs->term_dollar_u);
|
||||
Yap_heap_regs->term_dollar_u = AtomTermAdjust(Yap_heap_regs->term_dollar_u);
|
||||
#endif
|
||||
heap_regs->term_prolog = AtomTermAdjust(heap_regs->term_prolog);
|
||||
heap_regs->term_refound_var = AtomTermAdjust(heap_regs->term_refound_var);
|
||||
heap_regs->user_module = AtomTermAdjust(heap_regs->user_module);
|
||||
heap_regs->idb_module = AtomTermAdjust(heap_regs->idb_module);
|
||||
heap_regs->attributes_module = AtomTermAdjust(heap_regs->attributes_module);
|
||||
heap_regs->charsio_module = AtomTermAdjust(heap_regs->charsio_module);
|
||||
heap_regs->terms_module = AtomTermAdjust(heap_regs->terms_module);
|
||||
if (heap_regs->dyn_array_list != NULL) {
|
||||
heap_regs->dyn_array_list =
|
||||
(struct array_entry *)AddrAdjust((ADDR)heap_regs->dyn_array_list);
|
||||
Yap_heap_regs->term_prolog = AtomTermAdjust(Yap_heap_regs->term_prolog);
|
||||
Yap_heap_regs->term_refound_var = AtomTermAdjust(Yap_heap_regs->term_refound_var);
|
||||
Yap_heap_regs->user_module = AtomTermAdjust(Yap_heap_regs->user_module);
|
||||
Yap_heap_regs->idb_module = AtomTermAdjust(Yap_heap_regs->idb_module);
|
||||
Yap_heap_regs->attributes_module = AtomTermAdjust(Yap_heap_regs->attributes_module);
|
||||
Yap_heap_regs->charsio_module = AtomTermAdjust(Yap_heap_regs->charsio_module);
|
||||
Yap_heap_regs->terms_module = AtomTermAdjust(Yap_heap_regs->terms_module);
|
||||
if (Yap_heap_regs->dyn_array_list != NULL) {
|
||||
Yap_heap_regs->dyn_array_list =
|
||||
(struct array_entry *)AddrAdjust((ADDR)Yap_heap_regs->dyn_array_list);
|
||||
}
|
||||
if (heap_regs->file_aliases != NULL) {
|
||||
heap_regs->yap_streams =
|
||||
(struct stream_desc *)AddrAdjust((ADDR)heap_regs->yap_streams);
|
||||
if (Yap_heap_regs->file_aliases != NULL) {
|
||||
Yap_heap_regs->yap_streams =
|
||||
(struct stream_desc *)AddrAdjust((ADDR)Yap_heap_regs->yap_streams);
|
||||
}
|
||||
if (heap_regs->file_aliases != NULL) {
|
||||
heap_regs->file_aliases =
|
||||
(struct AliasDescS *)AddrAdjust((ADDR)heap_regs->file_aliases);
|
||||
if (Yap_heap_regs->file_aliases != NULL) {
|
||||
Yap_heap_regs->file_aliases =
|
||||
(struct AliasDescS *)AddrAdjust((ADDR)Yap_heap_regs->file_aliases);
|
||||
}
|
||||
heap_regs->yap_lib_dir =
|
||||
(char *)AddrAdjust((ADDR)heap_regs->yap_lib_dir);
|
||||
heap_regs->pred_goal_expansion =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_goal_expansion);
|
||||
heap_regs->pred_meta_call =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_meta_call);
|
||||
heap_regs->pred_dollar_catch =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_dollar_catch);
|
||||
heap_regs->pred_recorded_with_key =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_recorded_with_key);
|
||||
heap_regs->pred_log_upd_clause =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_log_upd_clause);
|
||||
heap_regs->pred_log_upd_clause0 =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_log_upd_clause0);
|
||||
heap_regs->pred_static_clause =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_static_clause);
|
||||
heap_regs->pred_throw =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_throw);
|
||||
heap_regs->pred_handle_throw =
|
||||
(PredEntry *)AddrAdjust((ADDR)heap_regs->pred_handle_throw);
|
||||
if (heap_regs->dyn_array_list != NULL)
|
||||
heap_regs->dyn_array_list = PtoArrayEAdjust(heap_regs->dyn_array_list);
|
||||
if (heap_regs->undef_code != NULL)
|
||||
heap_regs->undef_code = (PredEntry *)PtoHeapCellAdjust((CELL *)(heap_regs->undef_code));
|
||||
if (heap_regs->creep_code != NULL)
|
||||
heap_regs->creep_code = (PredEntry *)PtoHeapCellAdjust((CELL *)(heap_regs->creep_code));
|
||||
if (heap_regs->spy_code != NULL)
|
||||
heap_regs->spy_code = (PredEntry *)PtoHeapCellAdjust((CELL *)(heap_regs->spy_code));
|
||||
Yap_heap_regs->yap_lib_dir =
|
||||
(char *)AddrAdjust((ADDR)Yap_heap_regs->yap_lib_dir);
|
||||
Yap_heap_regs->pred_goal_expansion =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_goal_expansion);
|
||||
Yap_heap_regs->pred_meta_call =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_meta_call);
|
||||
Yap_heap_regs->pred_dollar_catch =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_dollar_catch);
|
||||
Yap_heap_regs->pred_recorded_with_key =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_recorded_with_key);
|
||||
Yap_heap_regs->pred_log_upd_clause =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_log_upd_clause);
|
||||
Yap_heap_regs->pred_log_upd_clause0 =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_log_upd_clause0);
|
||||
Yap_heap_regs->pred_static_clause =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_static_clause);
|
||||
Yap_heap_regs->pred_throw =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_throw);
|
||||
Yap_heap_regs->pred_handle_throw =
|
||||
(PredEntry *)AddrAdjust((ADDR)Yap_heap_regs->pred_handle_throw);
|
||||
if (Yap_heap_regs->dyn_array_list != NULL)
|
||||
Yap_heap_regs->dyn_array_list = PtoArrayEAdjust(Yap_heap_regs->dyn_array_list);
|
||||
if (Yap_heap_regs->undef_code != NULL)
|
||||
Yap_heap_regs->undef_code = (PredEntry *)PtoHeapCellAdjust((CELL *)(Yap_heap_regs->undef_code));
|
||||
if (Yap_heap_regs->creep_code != NULL)
|
||||
Yap_heap_regs->creep_code = (PredEntry *)PtoHeapCellAdjust((CELL *)(Yap_heap_regs->creep_code));
|
||||
if (Yap_heap_regs->spy_code != NULL)
|
||||
Yap_heap_regs->spy_code = (PredEntry *)PtoHeapCellAdjust((CELL *)(Yap_heap_regs->spy_code));
|
||||
#ifdef COROUTINING
|
||||
if (heap_regs->wake_up_code != NULL)
|
||||
heap_regs->wake_up_code = (PredEntry *)PtoHeapCellAdjust((CELL *)(heap_regs->wake_up_code));
|
||||
if (Yap_heap_regs->wake_up_code != NULL)
|
||||
Yap_heap_regs->wake_up_code = (PredEntry *)PtoHeapCellAdjust((CELL *)(Yap_heap_regs->wake_up_code));
|
||||
#if !defined(THREADS)
|
||||
heap_regs->wl.mutable_list =
|
||||
AbsAppl(PtoGloAdjust(RepAppl(heap_regs->wl.mutable_list)));
|
||||
heap_regs->wl.atts_mutable_list =
|
||||
AbsAppl(PtoGloAdjust(RepAppl(heap_regs->wl.atts_mutable_list)));
|
||||
Yap_heap_regs->wl.mutable_list =
|
||||
AbsAppl(PtoGloAdjust(RepAppl(Yap_heap_regs->wl.mutable_list)));
|
||||
Yap_heap_regs->wl.atts_mutable_list =
|
||||
AbsAppl(PtoGloAdjust(RepAppl(Yap_heap_regs->wl.atts_mutable_list)));
|
||||
#endif
|
||||
#endif
|
||||
if (heap_regs->last_wtime != NULL)
|
||||
heap_regs->last_wtime = (void *)PtoHeapCellAdjust((CELL *)(heap_regs->last_wtime));
|
||||
heap_regs->db_erased_marker =
|
||||
DBRefAdjust(heap_regs->db_erased_marker);
|
||||
heap_regs->hash_chain =
|
||||
(AtomHashEntry *)PtoHeapCellAdjust((CELL *)(heap_regs->hash_chain));
|
||||
if (Yap_heap_regs->last_wtime != NULL)
|
||||
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->hash_chain =
|
||||
(AtomHashEntry *)PtoHeapCellAdjust((CELL *)(Yap_heap_regs->hash_chain));
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,11 +10,11 @@
|
||||
* File: TermExt.h *
|
||||
* mods: *
|
||||
* comments: Extensions to standard terms for YAP *
|
||||
* version: $Id: TermExt.h.m4,v 1.16 2004-10-04 18:56:20 vsc Exp $ *
|
||||
* version: $Id: TermExt.h.m4,v 1.17 2004-12-02 06:06:47 vsc Exp $ *
|
||||
*************************************************************************/
|
||||
|
||||
#ifdef USE_SYSTEM_MALLOC
|
||||
#define SF_STORE (&(heap_regs->funcs))
|
||||
#define SF_STORE (&(Yap_heap_regs->funcs))
|
||||
#else
|
||||
#define SF_STORE ((special_functors *)HEAP_INIT_BASE)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user