WIN32 patches
This commit is contained in:
parent
417bbd6d46
commit
7670ce631b
@ -862,7 +862,7 @@ ExtendWorkSpace(Int s, int fixed_allocation)
|
||||
}
|
||||
brk = (LPVOID) ((Int) b + s);
|
||||
#if DEBUG_WIN32_ALLOC
|
||||
fprintf(stderr,"OK: %p--%p %lx\n",b, brk, s);
|
||||
fprintf(stderr,"OK: %p--%p " Int_FORMAT "\n",b, brk, s);
|
||||
#endif
|
||||
Yap_PrologMode = OldPrologMode;
|
||||
return TRUE;
|
||||
|
6
C/init.c
6
C/init.c
@ -1200,8 +1200,8 @@ Yap_InitThread(int new_id)
|
||||
static void
|
||||
InitFirstWorkerThreadHandle(void)
|
||||
{
|
||||
CACHE_REGS
|
||||
#ifdef THREADS
|
||||
CACHE_REGS
|
||||
ThreadHandle.id = 0;
|
||||
ThreadHandle.in_use = TRUE;
|
||||
ThreadHandle.default_yaam_regs =
|
||||
@ -1256,8 +1256,8 @@ static void
|
||||
InitCodes(void)
|
||||
{
|
||||
CACHE_REGS
|
||||
int wid;
|
||||
#if THREADS
|
||||
int wid;
|
||||
for (wid = 1; wid < MAX_INITS; wid++) {
|
||||
Yap_WLocal[wid] = NULL;
|
||||
}
|
||||
@ -1268,9 +1268,7 @@ InitCodes(void)
|
||||
#endif
|
||||
InitGlobal();
|
||||
InitWorker(0);
|
||||
#if THREADS
|
||||
InitFirstWorkerThreadHandle();
|
||||
#endif
|
||||
/* make sure no one else can use these two atoms */
|
||||
CurrentModule = 0;
|
||||
Yap_ReleaseAtom(AtomOfTerm(TermReFoundVar));
|
||||
|
5
H/TermExt.h
Normal file → Executable file
5
H/TermExt.h
Normal file → Executable file
@ -515,7 +515,7 @@ IsAttachedTerm (Term t)
|
||||
return (Int) ((IsVarTerm (t) && IsAttVar(VarOfTerm(t))));
|
||||
}
|
||||
|
||||
inline EXTERN Int IsAttachedTerm (Term);
|
||||
inline EXTERN Int GlobalIsAttachedTerm (Term);
|
||||
|
||||
inline EXTERN Int
|
||||
GlobalIsAttachedTerm (Term t)
|
||||
@ -523,9 +523,6 @@ GlobalIsAttachedTerm (Term t)
|
||||
return (Int) ((IsVarTerm (t) && GlobalIsAttVar(VarOfTerm(t))));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
inline EXTERN Int SafeIsAttachedTerm (Term);
|
||||
|
||||
inline EXTERN Int
|
||||
|
422
H/dglobals.h
422
H/dglobals.h
@ -1,211 +1,211 @@
|
||||
|
||||
/* This file, dglobals.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define Yap_c_input_stream WL->c_input_stream
|
||||
#define Yap_c_output_stream WL->c_output_stream
|
||||
#define Yap_c_error_stream WL->c_error_stream
|
||||
|
||||
#define OldASP WL->rinfo.old_ASP
|
||||
#define OldLCL0 WL->rinfo.old_LCL0
|
||||
#define OldTR WL->rinfo.old_TR
|
||||
#define OldGlobalBase WL->rinfo.old_GlobalBase
|
||||
#define OldH WL->rinfo.old_H
|
||||
#define OldH0 WL->rinfo.old_H0
|
||||
#define OldTrailBase WL->rinfo.old_TrailBase
|
||||
#define OldTrailTop WL->rinfo.old_TrailTop
|
||||
#define OldHeapBase WL->rinfo.old_HeapBase
|
||||
#define OldHeapTop WL->rinfo.old_HeapTop
|
||||
#define ClDiff WL->rinfo.cl_diff
|
||||
#define GDiff WL->rinfo.g_diff
|
||||
#define HDiff WL->rinfo.h_diff
|
||||
#define GDiff0 WL->rinfo.g_diff0
|
||||
#define GSplit WL->rinfo.g_split
|
||||
#define LDiff WL->rinfo.l_diff
|
||||
#define TrDiff WL->rinfo.tr_diff
|
||||
#define XDiff WL->rinfo.x_diff
|
||||
#define DelayDiff WL->rinfo.delay_diff
|
||||
#define BaseDiff WL->rinfo.base_diff
|
||||
#define ReductionsCounter WL->call_counters.reductions
|
||||
#define PredEntriesCounter WL->call_counters.reductions_retries
|
||||
#define RetriesCounter WL->call_counters.retries
|
||||
#define ReductionsCounterOn WL->call_counters.reductions_on
|
||||
#define PredEntriesCounterOn WL->call_counters.reductions_retries_on
|
||||
#define RetriesCounterOn WL->call_counters.retries_on
|
||||
#define Yap_InterruptsDisabled WL->interrupts_disabled
|
||||
|
||||
|
||||
#define ConsultSp WL->consultsp
|
||||
|
||||
#define ConsultCapacity WL->consultcapacity
|
||||
|
||||
#define ConsultBase WL->consultbase
|
||||
|
||||
#define ConsultLow WL->consultlow
|
||||
|
||||
#define GlobalArena WL->global_arena
|
||||
#define GlobalArenaOverflows WL->global_arena_overflows
|
||||
#define DelayArenaOverflows WL->delay_arena_overflows
|
||||
#define ArenaOverflows WL->arena_overflows
|
||||
#define DepthArenas WL->depth_arenas
|
||||
#define ArithError WL->arith_error
|
||||
#define LastAssertedPred WL->last_asserted_pred
|
||||
#define DebugOn WL->debug_on
|
||||
#define FormatInfo WL->f_info
|
||||
#define ScannerStack WL->scanner_stack
|
||||
#define ScannerExtraBlocks WL->scanner_extra_blocks
|
||||
#define BallTerm WL->ball_term
|
||||
#define ActiveSignals WL->active_signals
|
||||
#define IPredArity WL->i_pred_arity
|
||||
#define ProfEnd WL->prof_end
|
||||
#define UncaughtThrow WL->uncaught_throw
|
||||
#define DoingUndefp WL->doing_undefp
|
||||
#define StartLine WL->start_line
|
||||
#define ScratchPad WL->scratchpad
|
||||
#ifdef COROUTINING
|
||||
#define WokenGoals WL->woken_goals
|
||||
#define AttsMutableList WL->atts_mutable_list
|
||||
#endif
|
||||
|
||||
#define GcGeneration WL->gc_generation
|
||||
#define GcPhase WL->gc_phase
|
||||
#define GcCurrentPhase WL->gc_current_phase
|
||||
#define GcCalls WL->gc_calls
|
||||
#define TotGcTime WL->tot_gc_time
|
||||
#define TotGcRecovered WL->tot_gc_recovered
|
||||
#define LastGcTime WL->last_gc_time
|
||||
#define LastSSTime WL->last_ss_time
|
||||
#if LOW_LEVEL_TRACER
|
||||
#define Yap_total_choicepoints WL->total_cps
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define SignalLock WL->signal_lock
|
||||
#define WPP WL->wpp
|
||||
|
||||
#define total_marked WL->tot_marked
|
||||
#define total_oldies WL->tot_oldies
|
||||
#if DEBUG && COROUTINING
|
||||
#define total_smarked WL->tot_smarked
|
||||
#endif
|
||||
#define current_B WL->wl_current_B
|
||||
#define prev_HB WL->wl_prev_HB
|
||||
#define HGEN WL->hgen
|
||||
#define iptop WL->ip_top
|
||||
#if GC_NO_TAGS
|
||||
#define Yap_bp WL->b_p
|
||||
#endif
|
||||
#if defined(TABLING) || defined(SBA)
|
||||
#define sTR WL->wl_sTR
|
||||
#define sTR0 WL->wl_sTR0
|
||||
#define new_TR WL->new_tr
|
||||
#else
|
||||
#define sTR WL->wl_sTR
|
||||
#define sTR0 WL->wl_sTR0
|
||||
#define new_TR WL->new_tr
|
||||
#endif
|
||||
#define cont_top0 WL->conttop0
|
||||
#define cont_top WL->conttop
|
||||
#define discard_trail_entries WL->disc_trail_entries
|
||||
#define gc_ma_hash_table WL->Gc_ma_hash_table
|
||||
#define gc_ma_h_top WL->Gc_ma_h_top
|
||||
#define gc_ma_h_list WL->Gc_ma_h_list
|
||||
#define gc_timestamp WL->Gc_timestamp
|
||||
#define db_vec WL->DB_vec
|
||||
#define db_vec0 WL->DB_vec0
|
||||
#define db_root WL->DB_root
|
||||
#define db_nil WL->DB_nil
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
#define Yap_gc_restore WL->gc_restore
|
||||
#define DynamicArrays WL->dynamic_arrays
|
||||
#define StaticArrays WL->static_arrays
|
||||
#define GlobalVariables WL->global_variables
|
||||
#define Yap_AllowRestart WL->allow_restart
|
||||
|
||||
#define Yap_CMemFirstBlock WL->cmem_first_block
|
||||
#define Yap_CMemFirstBlockSz WL->cmem_first_block_sz
|
||||
|
||||
#define Yap_LabelFirstArray WL->label_first_array
|
||||
#define Yap_LabelFirstArraySz WL->label_first_array_sz
|
||||
|
||||
#define PL_local_data_p WL->Yap_ld_
|
||||
#define execution WL->_execution
|
||||
|
||||
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||
#define WORKER WL->worker
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
#define ThreadHandle WL->thread_handle
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if THREADS
|
||||
|
||||
#define NOfThreads Yap_global->n_of_threads
|
||||
|
||||
#define NOfThreadsCreated Yap_global->n_of_threads_created
|
||||
|
||||
#define ThreadsTotalTime Yap_global->threads_total_time
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
#define BGL Yap_global->bgl
|
||||
#endif
|
||||
|
||||
#define Yap_AllowLocalExpansion Yap_global->allow_local_expansion
|
||||
#define Yap_AllowGlobalExpansion Yap_global->allow_global_expansion
|
||||
#define Yap_AllowTrailExpansion Yap_global->allow_trail_expansion
|
||||
#define SizeOfOverflow Yap_global->size_of_overflow
|
||||
|
||||
#define AGcLastCall Yap_global->agc_last_call
|
||||
|
||||
#define AGcThreshold Yap_global->agc_threshold
|
||||
#define AGCHook Yap_global->agc_hook
|
||||
|
||||
#if HAVE_LIBREADLINE
|
||||
#define ReadlineBuf Yap_global->readline_buf
|
||||
#define ReadlinePos Yap_global->readline_pos
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
#define ThreadHandlesLock Yap_global->thread_handles_lock
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
#define GLOBAL Yap_global->global
|
||||
#define REMOTE Yap_global->remote
|
||||
#endif
|
||||
|
||||
#define Yap_Initialised Yap_global->initialised
|
||||
#define Yap_InitialisedFromPL Yap_global->initialised_from_pl
|
||||
#define Yap_PL_Argc Yap_global->pl_argc
|
||||
#define Yap_PL_Argv Yap_global->pl_argv
|
||||
|
||||
#define Yap_HaltHooks Yap_global->yap_halt_hook
|
||||
|
||||
|
||||
/* This file, dglobals.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define Yap_c_input_stream WL->c_input_stream
|
||||
#define Yap_c_output_stream WL->c_output_stream
|
||||
#define Yap_c_error_stream WL->c_error_stream
|
||||
|
||||
#define OldASP WL->rinfo.old_ASP
|
||||
#define OldLCL0 WL->rinfo.old_LCL0
|
||||
#define OldTR WL->rinfo.old_TR
|
||||
#define OldGlobalBase WL->rinfo.old_GlobalBase
|
||||
#define OldH WL->rinfo.old_H
|
||||
#define OldH0 WL->rinfo.old_H0
|
||||
#define OldTrailBase WL->rinfo.old_TrailBase
|
||||
#define OldTrailTop WL->rinfo.old_TrailTop
|
||||
#define OldHeapBase WL->rinfo.old_HeapBase
|
||||
#define OldHeapTop WL->rinfo.old_HeapTop
|
||||
#define ClDiff WL->rinfo.cl_diff
|
||||
#define GDiff WL->rinfo.g_diff
|
||||
#define HDiff WL->rinfo.h_diff
|
||||
#define GDiff0 WL->rinfo.g_diff0
|
||||
#define GSplit WL->rinfo.g_split
|
||||
#define LDiff WL->rinfo.l_diff
|
||||
#define TrDiff WL->rinfo.tr_diff
|
||||
#define XDiff WL->rinfo.x_diff
|
||||
#define DelayDiff WL->rinfo.delay_diff
|
||||
#define BaseDiff WL->rinfo.base_diff
|
||||
#define ReductionsCounter WL->call_counters.reductions
|
||||
#define PredEntriesCounter WL->call_counters.reductions_retries
|
||||
#define RetriesCounter WL->call_counters.retries
|
||||
#define ReductionsCounterOn WL->call_counters.reductions_on
|
||||
#define PredEntriesCounterOn WL->call_counters.reductions_retries_on
|
||||
#define RetriesCounterOn WL->call_counters.retries_on
|
||||
#define Yap_InterruptsDisabled WL->interrupts_disabled
|
||||
|
||||
|
||||
#define ConsultSp WL->consultsp
|
||||
|
||||
#define ConsultCapacity WL->consultcapacity
|
||||
|
||||
#define ConsultBase WL->consultbase
|
||||
|
||||
#define ConsultLow WL->consultlow
|
||||
|
||||
#define GlobalArena WL->global_arena
|
||||
#define GlobalArenaOverflows WL->global_arena_overflows
|
||||
#define DelayArenaOverflows WL->delay_arena_overflows
|
||||
#define ArenaOverflows WL->arena_overflows
|
||||
#define DepthArenas WL->depth_arenas
|
||||
#define ArithError WL->arith_error
|
||||
#define LastAssertedPred WL->last_asserted_pred
|
||||
#define DebugOn WL->debug_on
|
||||
#define FormatInfo WL->f_info
|
||||
#define ScannerStack WL->scanner_stack
|
||||
#define ScannerExtraBlocks WL->scanner_extra_blocks
|
||||
#define BallTerm WL->ball_term
|
||||
#define ActiveSignals WL->active_signals
|
||||
#define IPredArity WL->i_pred_arity
|
||||
#define ProfEnd WL->prof_end
|
||||
#define UncaughtThrow WL->uncaught_throw
|
||||
#define DoingUndefp WL->doing_undefp
|
||||
#define StartLine WL->start_line
|
||||
#define ScratchPad WL->scratchpad
|
||||
#ifdef COROUTINING
|
||||
#define WokenGoals WL->woken_goals
|
||||
#define AttsMutableList WL->atts_mutable_list
|
||||
#endif
|
||||
|
||||
#define GcGeneration WL->gc_generation
|
||||
#define GcPhase WL->gc_phase
|
||||
#define GcCurrentPhase WL->gc_current_phase
|
||||
#define GcCalls WL->gc_calls
|
||||
#define TotGcTime WL->tot_gc_time
|
||||
#define TotGcRecovered WL->tot_gc_recovered
|
||||
#define LastGcTime WL->last_gc_time
|
||||
#define LastSSTime WL->last_ss_time
|
||||
#if LOW_LEVEL_TRACER
|
||||
#define Yap_total_choicepoints WL->total_cps
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define SignalLock WL->signal_lock
|
||||
#define WPP WL->wpp
|
||||
|
||||
#define total_marked WL->tot_marked
|
||||
#define total_oldies WL->tot_oldies
|
||||
#if DEBUG && COROUTINING
|
||||
#define total_smarked WL->tot_smarked
|
||||
#endif
|
||||
#define current_B WL->wl_current_B
|
||||
#define prev_HB WL->wl_prev_HB
|
||||
#define HGEN WL->hgen
|
||||
#define iptop WL->ip_top
|
||||
#if GC_NO_TAGS
|
||||
#define Yap_bp WL->b_p
|
||||
#endif
|
||||
#if defined(TABLING) || defined(SBA)
|
||||
#define sTR WL->wl_sTR
|
||||
#define sTR0 WL->wl_sTR0
|
||||
#define new_TR WL->new_tr
|
||||
#else
|
||||
#define sTR WL->wl_sTR
|
||||
#define sTR0 WL->wl_sTR0
|
||||
#define new_TR WL->new_tr
|
||||
#endif
|
||||
#define cont_top0 WL->conttop0
|
||||
#define cont_top WL->conttop
|
||||
#define discard_trail_entries WL->disc_trail_entries
|
||||
#define gc_ma_hash_table WL->Gc_ma_hash_table
|
||||
#define gc_ma_h_top WL->Gc_ma_h_top
|
||||
#define gc_ma_h_list WL->Gc_ma_h_list
|
||||
#define gc_timestamp WL->Gc_timestamp
|
||||
#define db_vec WL->DB_vec
|
||||
#define db_vec0 WL->DB_vec0
|
||||
#define db_root WL->DB_root
|
||||
#define db_nil WL->DB_nil
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
#define Yap_gc_restore WL->gc_restore
|
||||
#define DynamicArrays WL->dynamic_arrays
|
||||
#define StaticArrays WL->static_arrays
|
||||
#define GlobalVariables WL->global_variables
|
||||
#define Yap_AllowRestart WL->allow_restart
|
||||
|
||||
#define Yap_CMemFirstBlock WL->cmem_first_block
|
||||
#define Yap_CMemFirstBlockSz WL->cmem_first_block_sz
|
||||
|
||||
#define Yap_LabelFirstArray WL->label_first_array
|
||||
#define Yap_LabelFirstArraySz WL->label_first_array_sz
|
||||
|
||||
#define PL_local_data_p WL->Yap_ld_
|
||||
#define execution WL->_execution
|
||||
|
||||
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||
#define WORKER WL->worker
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
#define ThreadHandle WL->thread_handle
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if THREADS
|
||||
|
||||
#define NOfThreads Yap_global->n_of_threads
|
||||
|
||||
#define NOfThreadsCreated Yap_global->n_of_threads_created
|
||||
|
||||
#define ThreadsTotalTime Yap_global->threads_total_time
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
#define BGL Yap_global->bgl
|
||||
#endif
|
||||
|
||||
#define Yap_AllowLocalExpansion Yap_global->allow_local_expansion
|
||||
#define Yap_AllowGlobalExpansion Yap_global->allow_global_expansion
|
||||
#define Yap_AllowTrailExpansion Yap_global->allow_trail_expansion
|
||||
#define SizeOfOverflow Yap_global->size_of_overflow
|
||||
|
||||
#define AGcLastCall Yap_global->agc_last_call
|
||||
|
||||
#define AGcThreshold Yap_global->agc_threshold
|
||||
#define AGCHook Yap_global->agc_hook
|
||||
|
||||
#if HAVE_LIBREADLINE
|
||||
#define ReadlineBuf Yap_global->readline_buf
|
||||
#define ReadlinePos Yap_global->readline_pos
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
#define ThreadHandlesLock Yap_global->thread_handles_lock
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
#define GLOBAL Yap_global->global
|
||||
#define REMOTE Yap_global->remote
|
||||
#endif
|
||||
|
||||
#define Yap_Initialised Yap_global->initialised
|
||||
#define Yap_InitialisedFromPL Yap_global->initialised_from_pl
|
||||
#define Yap_PL_Argc Yap_global->pl_argc
|
||||
#define Yap_PL_Argv Yap_global->pl_argv
|
||||
|
||||
#define Yap_HaltHooks Yap_global->yap_halt_hook
|
||||
|
||||
|
608
H/dhstruct.h
608
H/dhstruct.h
@ -1,304 +1,304 @@
|
||||
|
||||
/* This file, dhstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define Yap_HoleSize Yap_heap_regs->hole_size
|
||||
#define Yap_av Yap_heap_regs->av_
|
||||
#if USE_DL_MALLOC
|
||||
#define Yap_MemoryHoles Yap_heap_regs->memory_holes
|
||||
#define Yap_NOfMemoryHoles Yap_heap_regs->nof_memory_holes
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define DLMallocLock Yap_heap_regs->dlmalloc_lock
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
#define NotHeapUsed Yap_heap_regs->heap_used
|
||||
#else
|
||||
#define HeapUsed Yap_heap_regs->heap_used
|
||||
#endif
|
||||
#define HeapMax Yap_heap_regs->heap_max
|
||||
#define HeapTop Yap_heap_regs->heap_top
|
||||
#define HeapLim Yap_heap_regs->heap_lim
|
||||
#define FreeBlocks Yap_heap_regs->free_blocks
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define FreeBlocksLock Yap_heap_regs->free_blocks_lock
|
||||
#define HeapUsedLock Yap_heap_regs->heap_used_lock
|
||||
#define HeapTopLock Yap_heap_regs->heap_top_lock
|
||||
#define HeapTopOwner Yap_heap_regs->heap_top_owner
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
#define OP_RTABLE Yap_heap_regs->op_rtable
|
||||
#endif
|
||||
|
||||
#define EXECUTE_CPRED_OP_CODE Yap_heap_regs->execute_cpred_op_code
|
||||
#define EXPAND_OP_CODE Yap_heap_regs->expand_op_code
|
||||
#define FAIL_OPCODE Yap_heap_regs->fail_op
|
||||
#define INDEX_OPCODE Yap_heap_regs->index_op
|
||||
#define LOCKPRED_OPCODE Yap_heap_regs->lockpred_op
|
||||
#define ORLAST_OPCODE Yap_heap_regs->orlast_op
|
||||
#define UNDEF_OPCODE Yap_heap_regs->undef_op
|
||||
|
||||
#define NOfAtoms Yap_heap_regs->n_of_atoms
|
||||
#define AtomHashTableSize Yap_heap_regs->atom_hash_table_size
|
||||
#define WideAtomHashTableSize Yap_heap_regs->wide_atom_hash_table_size
|
||||
#define NOfWideAtoms Yap_heap_regs->n_of_wide_atoms
|
||||
#define INVISIBLECHAIN Yap_heap_regs->invisiblechain
|
||||
#define WideHashChain Yap_heap_regs->wide_hash_chain
|
||||
#define HashChain Yap_heap_regs->hash_chain
|
||||
|
||||
|
||||
#ifdef EUROTRA
|
||||
#define TermDollarU Yap_heap_regs->term_dollar_u
|
||||
#endif
|
||||
#define TermProlog Yap_heap_regs->term_prolog
|
||||
#define TermReFoundVar Yap_heap_regs->term_refound_var
|
||||
#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 SYSTEM_MODULE Yap_heap_regs->system_module
|
||||
#define OPERATING_SYSTEM_MODULE Yap_heap_regs->operating_system_module
|
||||
#define READUTIL_MODULE Yap_heap_regs->readutil_module
|
||||
#define HACKS_MODULE Yap_heap_regs->hacks_module
|
||||
#define ARG_MODULE Yap_heap_regs->arg_module
|
||||
#define GLOBALS_MODULE Yap_heap_regs->globals_module
|
||||
#define SWI_MODULE Yap_heap_regs->swi_module
|
||||
|
||||
|
||||
|
||||
#define CurrentModules Yap_heap_regs->current_modules
|
||||
|
||||
|
||||
|
||||
|
||||
#define Yap_ExecutionMode Yap_heap_regs->execution_mode
|
||||
|
||||
#define PredHash Yap_heap_regs->pred_hash
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define PredHashRWLock Yap_heap_regs->pred_hash_rw_lock
|
||||
#endif
|
||||
#define PredsInHashTable Yap_heap_regs->preds_in_hash_table
|
||||
#define PredHashTableSize Yap_heap_regs->pred_hash_table_size
|
||||
|
||||
#define CreepCode Yap_heap_regs->creep_code
|
||||
#define UndefCode Yap_heap_regs->undef_code
|
||||
#define SpyCode Yap_heap_regs->spy_code
|
||||
#define PredFail Yap_heap_regs->pred_fail
|
||||
#define PredTrue Yap_heap_regs->pred_true
|
||||
#ifdef COROUTINING
|
||||
#define WakeUpCode Yap_heap_regs->wake_up_code
|
||||
#endif
|
||||
#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 PredLogUpdClauseErase Yap_heap_regs->pred_log_upd_clause_erase
|
||||
#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 PredIs Yap_heap_regs->pred_is
|
||||
#define PredSafeCallCleanup Yap_heap_regs->pred_safe_call_cleanup
|
||||
#define PredRestoreRegs Yap_heap_regs->pred_restore_regs
|
||||
#ifdef YAPOR
|
||||
#define PredGetwork Yap_heap_regs->pred_getwork
|
||||
#define PredGetworkSeq Yap_heap_regs->pred_getwork_seq
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
#define Yap_do_low_level_trace Yap_heap_regs->yap_do_low_level_trace
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define Yap_low_level_trace_lock Yap_heap_regs->low_level_trace_lock
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define Yap_ClauseSpace Yap_heap_regs->clause_space
|
||||
#define Yap_IndexSpace_Tree Yap_heap_regs->index_space_Tree
|
||||
#define Yap_IndexSpace_EXT Yap_heap_regs->index_space_EXT
|
||||
#define Yap_IndexSpace_SW Yap_heap_regs->index_space_SW
|
||||
#define Yap_LUClauseSpace Yap_heap_regs->lu_clause_space
|
||||
#define Yap_LUIndexSpace_Tree Yap_heap_regs->lu_index_space_Tree
|
||||
#define Yap_LUIndexSpace_CP Yap_heap_regs->lu_index_space_CP
|
||||
#define Yap_LUIndexSpace_EXT Yap_heap_regs->lu_index_space_EXT
|
||||
#define Yap_LUIndexSpace_SW Yap_heap_regs->lu_index_space_SW
|
||||
|
||||
#define COMMA_CODE Yap_heap_regs->comma_code
|
||||
#define DUMMYCODE Yap_heap_regs->dummycode
|
||||
#define FAILCODE Yap_heap_regs->failcode
|
||||
#define NOCODE Yap_heap_regs->nocode
|
||||
#define ENV_FOR_TRUSTFAIL Yap_heap_regs->env_for_trustfail
|
||||
#define TRUSTFAILCODE Yap_heap_regs->trustfailcode
|
||||
#define ENV_FOR_YESCODE Yap_heap_regs->env_for_yescode
|
||||
#define YESCODE Yap_heap_regs->yescode
|
||||
#define RTRYCODE Yap_heap_regs->rtrycode
|
||||
#ifdef BEAM
|
||||
#define BEAM_RETRY_CODE Yap_heap_regs->beam_retry_code
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
#define SEQUENTIAL_IS_DEFAULT Yap_heap_regs->seq_def
|
||||
#define GETWORK Yap_heap_regs->getwork_code
|
||||
#define GETWORK_SEQ Yap_heap_regs->getwork_seq_code
|
||||
#define GETWORK_FIRST_TIME Yap_heap_regs->getwork_first_time
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
#define LOAD_ANSWER Yap_heap_regs->table_load_answer_code
|
||||
#define TRY_ANSWER Yap_heap_regs->table_try_answer_code
|
||||
#define ANSWER_RESOLUTION Yap_heap_regs->table_answer_resolution_code
|
||||
#define COMPLETION Yap_heap_regs->table_completion_code
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
#define P_before_spy Yap_heap_regs->debugger_p_before_spy
|
||||
|
||||
#define RETRY_C_RECORDEDP_CODE Yap_heap_regs->retry_recordedp_code
|
||||
#define RETRY_C_RECORDED_K_CODE Yap_heap_regs->retry_recorded_k_code
|
||||
|
||||
#define PROFILING Yap_heap_regs->system_profiling
|
||||
#define CALL_COUNTING Yap_heap_regs->system_call_counting
|
||||
#define PRED_GOAL_EXPANSION_ALL Yap_heap_regs->system_pred_goal_expansion_all
|
||||
#define PRED_GOAL_EXPANSION_FUNC Yap_heap_regs->system_pred_goal_expansion_func
|
||||
#define PRED_GOAL_EXPANSION_ON Yap_heap_regs->system_pred_goal_expansion_on
|
||||
#define optimizer_on Yap_heap_regs->compiler_optimizer_on
|
||||
#define compile_mode Yap_heap_regs->compiler_compile_mode
|
||||
#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
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define DBTermsListLock Yap_heap_regs->dbterms_list_lock
|
||||
#endif
|
||||
#define DBTermsList Yap_heap_regs->dbterms_list
|
||||
|
||||
#define ExpandClausesFirst Yap_heap_regs->expand_clauses_first
|
||||
#define ExpandClausesLast Yap_heap_regs->expand_clauses_last
|
||||
#define Yap_ExpandClauses Yap_heap_regs->expand_clauses
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define ExpandClausesListLock Yap_heap_regs->expand_clauses_list_lock
|
||||
#define OpListLock Yap_heap_regs->op_list_lock
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#define Yap_NewCps Yap_heap_regs->new_cps
|
||||
#define Yap_LiveCps Yap_heap_regs->live_cps
|
||||
#define Yap_DirtyCps Yap_heap_regs->dirty_cps
|
||||
#define Yap_FreedCps Yap_heap_regs->freed_cps
|
||||
#endif
|
||||
#define Yap_expand_clauses_sz Yap_heap_regs->expand_clauses_sz
|
||||
|
||||
#define UdiControlBlocks Yap_heap_regs->udi_control_blocks
|
||||
|
||||
|
||||
#define STATIC_PREDICATES_MARKED Yap_heap_regs->static_predicates_marked
|
||||
|
||||
#define INT_KEYS Yap_heap_regs->IntKeys
|
||||
#define INT_LU_KEYS Yap_heap_regs->IntLUKeys
|
||||
#define INT_BB_KEYS Yap_heap_regs->IntBBKeys
|
||||
|
||||
#define INT_KEYS_SIZE Yap_heap_regs->int_keys_size
|
||||
#define INT_KEYS_TIMESTAMP Yap_heap_regs->int_keys_timestamp
|
||||
#define INT_BB_KEYS_SIZE Yap_heap_regs->int_bb_keys_size
|
||||
|
||||
#define UPDATE_MODE Yap_heap_regs->update_mode
|
||||
|
||||
#define DBErasedMarker Yap_heap_regs->db_erased_marker
|
||||
#define LogDBErasedMarker Yap_heap_regs->logdb_erased_marker
|
||||
|
||||
#define DeadStaticClauses Yap_heap_regs->dead_static_clauses
|
||||
#define DeadMegaClauses Yap_heap_regs->dead_mega_clauses
|
||||
#define DeadStaticIndices Yap_heap_regs->dead_static_indices
|
||||
#define DBErasedList Yap_heap_regs->db_erased_list
|
||||
#define DBErasedIList Yap_heap_regs->db_erased_ilist
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define DeadStaticClausesLock Yap_heap_regs->dead_static_clauses_lock
|
||||
#define DeadMegaClausesLock Yap_heap_regs->dead_mega_clauses_lock
|
||||
#define DeadStaticIndicesLock Yap_heap_regs->dead_static_indices_lock
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
#define NUM_OF_ATTS Yap_heap_regs->num_of_atts
|
||||
|
||||
#define Yap_AttsSize Yap_heap_regs->atts_size
|
||||
#endif
|
||||
|
||||
#define yap_flags Yap_heap_regs->yap_flags_field
|
||||
|
||||
#define OpList Yap_heap_regs->op_list
|
||||
|
||||
|
||||
#define Stream Yap_heap_regs->yap_streams
|
||||
|
||||
#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
|
||||
|
||||
#define AtPrompt Yap_heap_regs->atprompt
|
||||
#define Prompt Yap_heap_regs->prompt
|
||||
|
||||
#define CharConversionTable Yap_heap_regs->char_conversion_table
|
||||
#define CharConversionTable2 Yap_heap_regs->char_conversion_table2
|
||||
|
||||
#define ParserErrorStyle Yap_heap_regs->parser_error_style
|
||||
|
||||
#define Yap_LibDir Yap_heap_regs->yap_lib_dir
|
||||
|
||||
#define LastWtimePtr Yap_heap_regs->last_wtime
|
||||
|
||||
#define output_msg Yap_heap_regs->debugger_output_msg
|
||||
#if LOW_PROF
|
||||
#define ProfilerOn Yap_heap_regs->profiler_on
|
||||
#define Yap_OffLineProfiler Yap_heap_regs->offline_profiler
|
||||
#define FProf Yap_heap_regs->f_prof
|
||||
#define FPreds Yap_heap_regs->f_preds
|
||||
#define ProfPreds Yap_heap_regs->prof_preds
|
||||
#endif /* LOW_PROF */
|
||||
|
||||
#define ForeignCodeLoaded Yap_heap_regs->foreign_code_loaded
|
||||
#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 Yap_Records Yap_heap_regs->yap_records
|
||||
|
||||
#define SWI_Atoms Yap_heap_regs->swi_atoms
|
||||
#define SWI_Functors Yap_heap_regs->swi_functors
|
||||
#define SWI_ReverseHash Yap_heap_regs->swi_reverse_hash
|
||||
|
||||
#define SWI_BlobTypes Yap_heap_regs->swi_blob_types
|
||||
#define SWI_Blobs Yap_heap_regs->swi_blobs
|
||||
|
||||
/* This file, dhstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define Yap_HoleSize Yap_heap_regs->hole_size
|
||||
#define Yap_av Yap_heap_regs->av_
|
||||
#if USE_DL_MALLOC
|
||||
#define Yap_MemoryHoles Yap_heap_regs->memory_holes
|
||||
#define Yap_NOfMemoryHoles Yap_heap_regs->nof_memory_holes
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define DLMallocLock Yap_heap_regs->dlmalloc_lock
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
#define NotHeapUsed Yap_heap_regs->heap_used
|
||||
#else
|
||||
#define HeapUsed Yap_heap_regs->heap_used
|
||||
#endif
|
||||
#define HeapMax Yap_heap_regs->heap_max
|
||||
#define HeapTop Yap_heap_regs->heap_top
|
||||
#define HeapLim Yap_heap_regs->heap_lim
|
||||
#define FreeBlocks Yap_heap_regs->free_blocks
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define FreeBlocksLock Yap_heap_regs->free_blocks_lock
|
||||
#define HeapUsedLock Yap_heap_regs->heap_used_lock
|
||||
#define HeapTopLock Yap_heap_regs->heap_top_lock
|
||||
#define HeapTopOwner Yap_heap_regs->heap_top_owner
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
#define OP_RTABLE Yap_heap_regs->op_rtable
|
||||
#endif
|
||||
|
||||
#define EXECUTE_CPRED_OP_CODE Yap_heap_regs->execute_cpred_op_code
|
||||
#define EXPAND_OP_CODE Yap_heap_regs->expand_op_code
|
||||
#define FAIL_OPCODE Yap_heap_regs->fail_op
|
||||
#define INDEX_OPCODE Yap_heap_regs->index_op
|
||||
#define LOCKPRED_OPCODE Yap_heap_regs->lockpred_op
|
||||
#define ORLAST_OPCODE Yap_heap_regs->orlast_op
|
||||
#define UNDEF_OPCODE Yap_heap_regs->undef_op
|
||||
|
||||
#define NOfAtoms Yap_heap_regs->n_of_atoms
|
||||
#define AtomHashTableSize Yap_heap_regs->atom_hash_table_size
|
||||
#define WideAtomHashTableSize Yap_heap_regs->wide_atom_hash_table_size
|
||||
#define NOfWideAtoms Yap_heap_regs->n_of_wide_atoms
|
||||
#define INVISIBLECHAIN Yap_heap_regs->invisiblechain
|
||||
#define WideHashChain Yap_heap_regs->wide_hash_chain
|
||||
#define HashChain Yap_heap_regs->hash_chain
|
||||
|
||||
|
||||
#ifdef EUROTRA
|
||||
#define TermDollarU Yap_heap_regs->term_dollar_u
|
||||
#endif
|
||||
#define TermProlog Yap_heap_regs->term_prolog
|
||||
#define TermReFoundVar Yap_heap_regs->term_refound_var
|
||||
#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 SYSTEM_MODULE Yap_heap_regs->system_module
|
||||
#define OPERATING_SYSTEM_MODULE Yap_heap_regs->operating_system_module
|
||||
#define READUTIL_MODULE Yap_heap_regs->readutil_module
|
||||
#define HACKS_MODULE Yap_heap_regs->hacks_module
|
||||
#define ARG_MODULE Yap_heap_regs->arg_module
|
||||
#define GLOBALS_MODULE Yap_heap_regs->globals_module
|
||||
#define SWI_MODULE Yap_heap_regs->swi_module
|
||||
|
||||
|
||||
|
||||
#define CurrentModules Yap_heap_regs->current_modules
|
||||
|
||||
|
||||
|
||||
|
||||
#define Yap_ExecutionMode Yap_heap_regs->execution_mode
|
||||
|
||||
#define PredHash Yap_heap_regs->pred_hash
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define PredHashRWLock Yap_heap_regs->pred_hash_rw_lock
|
||||
#endif
|
||||
#define PredsInHashTable Yap_heap_regs->preds_in_hash_table
|
||||
#define PredHashTableSize Yap_heap_regs->pred_hash_table_size
|
||||
|
||||
#define CreepCode Yap_heap_regs->creep_code
|
||||
#define UndefCode Yap_heap_regs->undef_code
|
||||
#define SpyCode Yap_heap_regs->spy_code
|
||||
#define PredFail Yap_heap_regs->pred_fail
|
||||
#define PredTrue Yap_heap_regs->pred_true
|
||||
#ifdef COROUTINING
|
||||
#define WakeUpCode Yap_heap_regs->wake_up_code
|
||||
#endif
|
||||
#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 PredLogUpdClauseErase Yap_heap_regs->pred_log_upd_clause_erase
|
||||
#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 PredIs Yap_heap_regs->pred_is
|
||||
#define PredSafeCallCleanup Yap_heap_regs->pred_safe_call_cleanup
|
||||
#define PredRestoreRegs Yap_heap_regs->pred_restore_regs
|
||||
#ifdef YAPOR
|
||||
#define PredGetwork Yap_heap_regs->pred_getwork
|
||||
#define PredGetworkSeq Yap_heap_regs->pred_getwork_seq
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
#define Yap_do_low_level_trace Yap_heap_regs->yap_do_low_level_trace
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define Yap_low_level_trace_lock Yap_heap_regs->low_level_trace_lock
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define Yap_ClauseSpace Yap_heap_regs->clause_space
|
||||
#define Yap_IndexSpace_Tree Yap_heap_regs->index_space_Tree
|
||||
#define Yap_IndexSpace_EXT Yap_heap_regs->index_space_EXT
|
||||
#define Yap_IndexSpace_SW Yap_heap_regs->index_space_SW
|
||||
#define Yap_LUClauseSpace Yap_heap_regs->lu_clause_space
|
||||
#define Yap_LUIndexSpace_Tree Yap_heap_regs->lu_index_space_Tree
|
||||
#define Yap_LUIndexSpace_CP Yap_heap_regs->lu_index_space_CP
|
||||
#define Yap_LUIndexSpace_EXT Yap_heap_regs->lu_index_space_EXT
|
||||
#define Yap_LUIndexSpace_SW Yap_heap_regs->lu_index_space_SW
|
||||
|
||||
#define COMMA_CODE Yap_heap_regs->comma_code
|
||||
#define DUMMYCODE Yap_heap_regs->dummycode
|
||||
#define FAILCODE Yap_heap_regs->failcode
|
||||
#define NOCODE Yap_heap_regs->nocode
|
||||
#define ENV_FOR_TRUSTFAIL Yap_heap_regs->env_for_trustfail
|
||||
#define TRUSTFAILCODE Yap_heap_regs->trustfailcode
|
||||
#define ENV_FOR_YESCODE Yap_heap_regs->env_for_yescode
|
||||
#define YESCODE Yap_heap_regs->yescode
|
||||
#define RTRYCODE Yap_heap_regs->rtrycode
|
||||
#ifdef BEAM
|
||||
#define BEAM_RETRY_CODE Yap_heap_regs->beam_retry_code
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
#define SEQUENTIAL_IS_DEFAULT Yap_heap_regs->seq_def
|
||||
#define GETWORK Yap_heap_regs->getwork_code
|
||||
#define GETWORK_SEQ Yap_heap_regs->getwork_seq_code
|
||||
#define GETWORK_FIRST_TIME Yap_heap_regs->getwork_first_time
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
#define LOAD_ANSWER Yap_heap_regs->table_load_answer_code
|
||||
#define TRY_ANSWER Yap_heap_regs->table_try_answer_code
|
||||
#define ANSWER_RESOLUTION Yap_heap_regs->table_answer_resolution_code
|
||||
#define COMPLETION Yap_heap_regs->table_completion_code
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
#define P_before_spy Yap_heap_regs->debugger_p_before_spy
|
||||
|
||||
#define RETRY_C_RECORDEDP_CODE Yap_heap_regs->retry_recordedp_code
|
||||
#define RETRY_C_RECORDED_K_CODE Yap_heap_regs->retry_recorded_k_code
|
||||
|
||||
#define PROFILING Yap_heap_regs->system_profiling
|
||||
#define CALL_COUNTING Yap_heap_regs->system_call_counting
|
||||
#define PRED_GOAL_EXPANSION_ALL Yap_heap_regs->system_pred_goal_expansion_all
|
||||
#define PRED_GOAL_EXPANSION_FUNC Yap_heap_regs->system_pred_goal_expansion_func
|
||||
#define PRED_GOAL_EXPANSION_ON Yap_heap_regs->system_pred_goal_expansion_on
|
||||
#define optimizer_on Yap_heap_regs->compiler_optimizer_on
|
||||
#define compile_mode Yap_heap_regs->compiler_compile_mode
|
||||
#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
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define DBTermsListLock Yap_heap_regs->dbterms_list_lock
|
||||
#endif
|
||||
#define DBTermsList Yap_heap_regs->dbterms_list
|
||||
|
||||
#define ExpandClausesFirst Yap_heap_regs->expand_clauses_first
|
||||
#define ExpandClausesLast Yap_heap_regs->expand_clauses_last
|
||||
#define Yap_ExpandClauses Yap_heap_regs->expand_clauses
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define ExpandClausesListLock Yap_heap_regs->expand_clauses_list_lock
|
||||
#define OpListLock Yap_heap_regs->op_list_lock
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#define Yap_NewCps Yap_heap_regs->new_cps
|
||||
#define Yap_LiveCps Yap_heap_regs->live_cps
|
||||
#define Yap_DirtyCps Yap_heap_regs->dirty_cps
|
||||
#define Yap_FreedCps Yap_heap_regs->freed_cps
|
||||
#endif
|
||||
#define Yap_expand_clauses_sz Yap_heap_regs->expand_clauses_sz
|
||||
|
||||
#define UdiControlBlocks Yap_heap_regs->udi_control_blocks
|
||||
|
||||
|
||||
#define STATIC_PREDICATES_MARKED Yap_heap_regs->static_predicates_marked
|
||||
|
||||
#define INT_KEYS Yap_heap_regs->IntKeys
|
||||
#define INT_LU_KEYS Yap_heap_regs->IntLUKeys
|
||||
#define INT_BB_KEYS Yap_heap_regs->IntBBKeys
|
||||
|
||||
#define INT_KEYS_SIZE Yap_heap_regs->int_keys_size
|
||||
#define INT_KEYS_TIMESTAMP Yap_heap_regs->int_keys_timestamp
|
||||
#define INT_BB_KEYS_SIZE Yap_heap_regs->int_bb_keys_size
|
||||
|
||||
#define UPDATE_MODE Yap_heap_regs->update_mode
|
||||
|
||||
#define DBErasedMarker Yap_heap_regs->db_erased_marker
|
||||
#define LogDBErasedMarker Yap_heap_regs->logdb_erased_marker
|
||||
|
||||
#define DeadStaticClauses Yap_heap_regs->dead_static_clauses
|
||||
#define DeadMegaClauses Yap_heap_regs->dead_mega_clauses
|
||||
#define DeadStaticIndices Yap_heap_regs->dead_static_indices
|
||||
#define DBErasedList Yap_heap_regs->db_erased_list
|
||||
#define DBErasedIList Yap_heap_regs->db_erased_ilist
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define DeadStaticClausesLock Yap_heap_regs->dead_static_clauses_lock
|
||||
#define DeadMegaClausesLock Yap_heap_regs->dead_mega_clauses_lock
|
||||
#define DeadStaticIndicesLock Yap_heap_regs->dead_static_indices_lock
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
#define NUM_OF_ATTS Yap_heap_regs->num_of_atts
|
||||
|
||||
#define Yap_AttsSize Yap_heap_regs->atts_size
|
||||
#endif
|
||||
|
||||
#define yap_flags Yap_heap_regs->yap_flags_field
|
||||
|
||||
#define OpList Yap_heap_regs->op_list
|
||||
|
||||
|
||||
#define Stream Yap_heap_regs->yap_streams
|
||||
|
||||
#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
|
||||
|
||||
#define AtPrompt Yap_heap_regs->atprompt
|
||||
#define YapPrompt Yap_heap_regs->_prompt
|
||||
|
||||
#define CharConversionTable Yap_heap_regs->char_conversion_table
|
||||
#define CharConversionTable2 Yap_heap_regs->char_conversion_table2
|
||||
|
||||
#define ParserErrorStyle Yap_heap_regs->parser_error_style
|
||||
|
||||
#define Yap_LibDir Yap_heap_regs->yap_lib_dir
|
||||
|
||||
#define LastWtimePtr Yap_heap_regs->last_wtime
|
||||
|
||||
#define output_msg Yap_heap_regs->debugger_output_msg
|
||||
#if LOW_PROF
|
||||
#define ProfilerOn Yap_heap_regs->profiler_on
|
||||
#define Yap_OffLineProfiler Yap_heap_regs->offline_profiler
|
||||
#define FProf Yap_heap_regs->f_prof
|
||||
#define FPreds Yap_heap_regs->f_preds
|
||||
#define ProfPreds Yap_heap_regs->prof_preds
|
||||
#endif /* LOW_PROF */
|
||||
|
||||
#define ForeignCodeLoaded Yap_heap_regs->foreign_code_loaded
|
||||
#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 Yap_Records Yap_heap_regs->yap_records
|
||||
|
||||
#define SWI_Atoms Yap_heap_regs->swi_atoms
|
||||
#define SWI_Functors Yap_heap_regs->swi_functors
|
||||
#define SWI_ReverseHash Yap_heap_regs->swi_reverse_hash
|
||||
|
||||
#define SWI_BlobTypes Yap_heap_regs->swi_blob_types
|
||||
#define SWI_Blobs Yap_heap_regs->swi_blobs
|
||||
|
426
H/hglobals.h
426
H/hglobals.h
@ -1,213 +1,213 @@
|
||||
|
||||
/* This file, hglobals.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct worker_local {
|
||||
|
||||
int c_input_stream;
|
||||
int c_output_stream;
|
||||
int c_error_stream;
|
||||
|
||||
restoreinfo rinfo;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct reduction_counters call_counters;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int interrupts_disabled;
|
||||
|
||||
|
||||
union CONSULT_OBJ* consultsp;
|
||||
|
||||
UInt consultcapacity;
|
||||
|
||||
union CONSULT_OBJ* consultbase;
|
||||
|
||||
union CONSULT_OBJ* consultlow;
|
||||
|
||||
Term global_arena;
|
||||
UInt global_arena_overflows;
|
||||
Int delay_arena_overflows;
|
||||
Int arena_overflows;
|
||||
Int depth_arenas;
|
||||
int arith_error;
|
||||
struct pred_entry* last_asserted_pred;
|
||||
int debug_on;
|
||||
struct format_status* f_info;
|
||||
char* scanner_stack;
|
||||
struct scanner_extra_alloc* scanner_extra_blocks;
|
||||
struct DB_TERM *ball_term;
|
||||
UInt active_signals;
|
||||
UInt i_pred_arity;
|
||||
yamop* prof_end;
|
||||
int uncaught_throw;
|
||||
int doing_undefp;
|
||||
Int start_line;
|
||||
scratch_block scratchpad;
|
||||
#ifdef COROUTINING
|
||||
Term woken_goals;
|
||||
Term atts_mutable_list;
|
||||
#endif
|
||||
|
||||
Term gc_generation;
|
||||
Term gc_phase;
|
||||
UInt gc_current_phase;
|
||||
UInt gc_calls;
|
||||
Int tot_gc_time;
|
||||
YAP_ULONG_LONG tot_gc_recovered;
|
||||
Int last_gc_time;
|
||||
Int last_ss_time;
|
||||
#if LOW_LEVEL_TRACER
|
||||
Int total_cps;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar signal_lock;
|
||||
struct pred_entry* wpp;
|
||||
|
||||
Int tot_marked;
|
||||
Int tot_oldies;
|
||||
#if DEBUG && COROUTINING
|
||||
UInt tot_smarked;
|
||||
#endif
|
||||
struct choicept *wl_current_B;
|
||||
CELL* wl_prev_HB;
|
||||
CELL* hgen;
|
||||
CELL** ip_top;
|
||||
#if GC_NO_TAGS
|
||||
char* b_p;
|
||||
#endif
|
||||
#if defined(TABLING) || defined(SBA)
|
||||
struct trail_frame* wl_sTR;
|
||||
struct trail_frame* wl_sTR0;
|
||||
struct trail_frame* new_tr;
|
||||
#else
|
||||
Term *wl_sTR;
|
||||
Term *wl_sTR0;
|
||||
Term *new_tr;
|
||||
#endif
|
||||
struct gc_mark_continuation* conttop0;
|
||||
struct gc_mark_continuation* conttop;
|
||||
int disc_trail_entries;
|
||||
gc_ma_hash_entry Gc_ma_hash_table[GC_MAVARS_HASH_SIZE];
|
||||
gc_ma_hash_entry* Gc_ma_h_top;
|
||||
gc_ma_hash_entry* Gc_ma_h_list;
|
||||
UInt Gc_timestamp;
|
||||
ADDR DB_vec;
|
||||
ADDR DB_vec0;
|
||||
struct RB_red_blk_node* DB_root;
|
||||
struct RB_red_blk_node* DB_nil;
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
sigjmp_buf gc_restore;
|
||||
struct array_entry* dynamic_arrays;
|
||||
struct static_array_entry* static_arrays;
|
||||
struct global_entry* global_variables;
|
||||
int allow_restart;
|
||||
|
||||
struct mem_blk* cmem_first_block;
|
||||
UInt cmem_first_block_sz;
|
||||
|
||||
Int* label_first_array;
|
||||
UInt label_first_array_sz;
|
||||
|
||||
struct PL_local_data *Yap_ld_;
|
||||
struct open_query_struct* _execution;
|
||||
|
||||
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||
struct worker worker;
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
struct thandle thread_handle;
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
|
||||
#endif
|
||||
|
||||
} w_local;
|
||||
|
||||
typedef struct worker_shared {
|
||||
|
||||
#if THREADS
|
||||
|
||||
UInt n_of_threads;
|
||||
|
||||
UInt n_of_threads_created;
|
||||
|
||||
UInt threads_total_time;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
lockvar bgl;
|
||||
#endif
|
||||
|
||||
int allow_local_expansion;
|
||||
int allow_global_expansion;
|
||||
int allow_trail_expansion;
|
||||
UInt size_of_overflow;
|
||||
|
||||
UInt agc_last_call;
|
||||
|
||||
UInt agc_threshold;
|
||||
Agc_hook agc_hook;
|
||||
|
||||
#if HAVE_LIBREADLINE
|
||||
char *readline_buf;
|
||||
char *readline_pos;
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
lockvar thread_handles_lock;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
struct global_data global;
|
||||
struct local_data remote[MAX_WORKERS];
|
||||
#endif
|
||||
|
||||
int initialised;
|
||||
int initialised_from_pl;
|
||||
int pl_argc;
|
||||
char **pl_argv;
|
||||
|
||||
struct halt_hook *yap_halt_hook;
|
||||
} w_shared;
|
||||
|
||||
/* This file, hglobals.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct worker_local {
|
||||
|
||||
int c_input_stream;
|
||||
int c_output_stream;
|
||||
int c_error_stream;
|
||||
|
||||
restoreinfo rinfo;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct reduction_counters call_counters;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int interrupts_disabled;
|
||||
|
||||
|
||||
union CONSULT_OBJ* consultsp;
|
||||
|
||||
UInt consultcapacity;
|
||||
|
||||
union CONSULT_OBJ* consultbase;
|
||||
|
||||
union CONSULT_OBJ* consultlow;
|
||||
|
||||
Term global_arena;
|
||||
UInt global_arena_overflows;
|
||||
Int delay_arena_overflows;
|
||||
Int arena_overflows;
|
||||
Int depth_arenas;
|
||||
int arith_error;
|
||||
struct pred_entry* last_asserted_pred;
|
||||
int debug_on;
|
||||
struct format_status* f_info;
|
||||
char* scanner_stack;
|
||||
struct scanner_extra_alloc* scanner_extra_blocks;
|
||||
struct DB_TERM *ball_term;
|
||||
UInt active_signals;
|
||||
UInt i_pred_arity;
|
||||
yamop* prof_end;
|
||||
int uncaught_throw;
|
||||
int doing_undefp;
|
||||
Int start_line;
|
||||
scratch_block scratchpad;
|
||||
#ifdef COROUTINING
|
||||
Term woken_goals;
|
||||
Term atts_mutable_list;
|
||||
#endif
|
||||
|
||||
Term gc_generation;
|
||||
Term gc_phase;
|
||||
UInt gc_current_phase;
|
||||
UInt gc_calls;
|
||||
Int tot_gc_time;
|
||||
YAP_ULONG_LONG tot_gc_recovered;
|
||||
Int last_gc_time;
|
||||
Int last_ss_time;
|
||||
#if LOW_LEVEL_TRACER
|
||||
Int total_cps;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar signal_lock;
|
||||
struct pred_entry* wpp;
|
||||
|
||||
Int tot_marked;
|
||||
Int tot_oldies;
|
||||
#if DEBUG && COROUTINING
|
||||
UInt tot_smarked;
|
||||
#endif
|
||||
struct choicept *wl_current_B;
|
||||
CELL* wl_prev_HB;
|
||||
CELL* hgen;
|
||||
CELL** ip_top;
|
||||
#if GC_NO_TAGS
|
||||
char* b_p;
|
||||
#endif
|
||||
#if defined(TABLING) || defined(SBA)
|
||||
struct trail_frame* wl_sTR;
|
||||
struct trail_frame* wl_sTR0;
|
||||
struct trail_frame* new_tr;
|
||||
#else
|
||||
Term *wl_sTR;
|
||||
Term *wl_sTR0;
|
||||
Term *new_tr;
|
||||
#endif
|
||||
struct gc_mark_continuation* conttop0;
|
||||
struct gc_mark_continuation* conttop;
|
||||
int disc_trail_entries;
|
||||
gc_ma_hash_entry Gc_ma_hash_table[GC_MAVARS_HASH_SIZE];
|
||||
gc_ma_hash_entry* Gc_ma_h_top;
|
||||
gc_ma_hash_entry* Gc_ma_h_list;
|
||||
UInt Gc_timestamp;
|
||||
ADDR DB_vec;
|
||||
ADDR DB_vec0;
|
||||
struct RB_red_blk_node* DB_root;
|
||||
struct RB_red_blk_node* DB_nil;
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
sigjmp_buf gc_restore;
|
||||
struct array_entry* dynamic_arrays;
|
||||
struct static_array_entry* static_arrays;
|
||||
struct global_entry* global_variables;
|
||||
int allow_restart;
|
||||
|
||||
struct mem_blk* cmem_first_block;
|
||||
UInt cmem_first_block_sz;
|
||||
|
||||
Int* label_first_array;
|
||||
UInt label_first_array_sz;
|
||||
|
||||
struct PL_local_data *Yap_ld_;
|
||||
struct open_query_struct* _execution;
|
||||
|
||||
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||
struct worker worker;
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
struct thandle thread_handle;
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
|
||||
#endif
|
||||
|
||||
} w_local;
|
||||
|
||||
typedef struct worker_shared {
|
||||
|
||||
#if THREADS
|
||||
|
||||
UInt n_of_threads;
|
||||
|
||||
UInt n_of_threads_created;
|
||||
|
||||
UInt threads_total_time;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
lockvar bgl;
|
||||
#endif
|
||||
|
||||
int allow_local_expansion;
|
||||
int allow_global_expansion;
|
||||
int allow_trail_expansion;
|
||||
UInt size_of_overflow;
|
||||
|
||||
UInt agc_last_call;
|
||||
|
||||
UInt agc_threshold;
|
||||
Agc_hook agc_hook;
|
||||
|
||||
#if HAVE_LIBREADLINE
|
||||
char *readline_buf;
|
||||
char *readline_pos;
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
lockvar thread_handles_lock;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
struct global_data global;
|
||||
struct local_data remote[MAX_WORKERS];
|
||||
#endif
|
||||
|
||||
int initialised;
|
||||
int initialised_from_pl;
|
||||
int pl_argc;
|
||||
char **pl_argv;
|
||||
|
||||
struct halt_hook *yap_halt_hook;
|
||||
} w_shared;
|
||||
|
608
H/hstruct.h
608
H/hstruct.h
@ -1,304 +1,304 @@
|
||||
|
||||
/* This file, hstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UInt hole_size;
|
||||
struct malloc_state *av_;
|
||||
#if USE_DL_MALLOC
|
||||
struct memory_hole memory_holes[MAX_DLMALLOC_HOLES];
|
||||
UInt nof_memory_holes;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar dlmalloc_lock;
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
Int heap_used;
|
||||
#else
|
||||
Int heap_used;
|
||||
#endif
|
||||
Int heap_max;
|
||||
ADDR heap_top;
|
||||
ADDR heap_lim;
|
||||
struct FREEB *free_blocks;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar free_blocks_lock;
|
||||
lockvar heap_used_lock;
|
||||
lockvar heap_top_lock;
|
||||
int heap_top_owner;
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
opentry *op_rtable;
|
||||
#endif
|
||||
|
||||
OPCODE execute_cpred_op_code;
|
||||
OPCODE expand_op_code;
|
||||
OPCODE fail_op;
|
||||
OPCODE index_op;
|
||||
OPCODE lockpred_op;
|
||||
OPCODE orlast_op;
|
||||
OPCODE undef_op;
|
||||
|
||||
UInt n_of_atoms;
|
||||
UInt atom_hash_table_size;
|
||||
UInt wide_atom_hash_table_size;
|
||||
UInt n_of_wide_atoms;
|
||||
AtomHashEntry invisiblechain;
|
||||
AtomHashEntry *wide_hash_chain;
|
||||
AtomHashEntry *hash_chain;
|
||||
|
||||
#include "tatoms.h"
|
||||
#ifdef EUROTRA
|
||||
Term term_dollar_u;
|
||||
#endif
|
||||
Term term_prolog;
|
||||
Term term_refound_var;
|
||||
Term user_module;
|
||||
Term idb_module;
|
||||
Term attributes_module;
|
||||
Term charsio_module;
|
||||
Term terms_module;
|
||||
Term system_module;
|
||||
Term operating_system_module;
|
||||
Term readutil_module;
|
||||
Term hacks_module;
|
||||
Term arg_module;
|
||||
Term globals_module;
|
||||
Term swi_module;
|
||||
|
||||
|
||||
|
||||
struct mod_entry *current_modules;
|
||||
|
||||
|
||||
|
||||
|
||||
yap_exec_mode execution_mode;
|
||||
|
||||
struct pred_entry **pred_hash;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
rwlock_t pred_hash_rw_lock;
|
||||
#endif
|
||||
UInt preds_in_hash_table;
|
||||
UInt pred_hash_table_size;
|
||||
|
||||
struct pred_entry *creep_code;
|
||||
struct pred_entry *undef_code;
|
||||
struct pred_entry *spy_code;
|
||||
struct pred_entry *pred_fail;
|
||||
struct pred_entry *pred_true;
|
||||
#ifdef COROUTINING
|
||||
struct pred_entry *wake_up_code;
|
||||
#endif
|
||||
struct pred_entry *pred_goal_expansion;
|
||||
struct pred_entry *pred_meta_call;
|
||||
struct pred_entry *pred_dollar_catch;
|
||||
struct pred_entry *pred_recorded_with_key;
|
||||
struct pred_entry *pred_log_upd_clause;
|
||||
struct pred_entry *pred_log_upd_clause_erase;
|
||||
struct pred_entry *pred_log_upd_clause0;
|
||||
struct pred_entry *pred_static_clause;
|
||||
struct pred_entry *pred_throw;
|
||||
struct pred_entry *pred_handle_throw;
|
||||
struct pred_entry *pred_is;
|
||||
struct pred_entry *pred_safe_call_cleanup;
|
||||
struct pred_entry *pred_restore_regs;
|
||||
#ifdef YAPOR
|
||||
struct pred_entry *pred_getwork;
|
||||
struct pred_entry *pred_getwork_seq;
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
int yap_do_low_level_trace;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar low_level_trace_lock;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
UInt clause_space;
|
||||
UInt index_space_Tree;
|
||||
UInt index_space_EXT;
|
||||
UInt index_space_SW;
|
||||
UInt lu_clause_space;
|
||||
UInt lu_index_space_Tree;
|
||||
UInt lu_index_space_CP;
|
||||
UInt lu_index_space_EXT;
|
||||
UInt lu_index_space_SW;
|
||||
|
||||
yamop comma_code[5];
|
||||
yamop dummycode[1];
|
||||
yamop failcode[1];
|
||||
yamop nocode[1];
|
||||
yamop env_for_trustfail[2];
|
||||
yamop *trustfailcode;
|
||||
yamop env_for_yescode[2];
|
||||
yamop *yescode;
|
||||
yamop rtrycode[1];
|
||||
#ifdef BEAM
|
||||
yamop beam_retry_code[1];
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
int seq_def;
|
||||
yamop getwork_code[1];
|
||||
yamop getwork_seq_code[1];
|
||||
yamop getwork_first_time[1];
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
yamop table_load_answer_code[1];
|
||||
yamop table_try_answer_code[1];
|
||||
yamop table_answer_resolution_code[1];
|
||||
yamop table_completion_code[1];
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
yamop *debugger_p_before_spy;
|
||||
|
||||
yamop *retry_recordedp_code;
|
||||
yamop *retry_recorded_k_code;
|
||||
|
||||
int system_profiling;
|
||||
int system_call_counting;
|
||||
int system_pred_goal_expansion_all;
|
||||
int system_pred_goal_expansion_func;
|
||||
int system_pred_goal_expansion_on;
|
||||
int compiler_optimizer_on;
|
||||
int compiler_compile_mode;
|
||||
int compiler_profiling;
|
||||
int compiler_call_counting;
|
||||
|
||||
int compiler_compile_arrays;
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar dbterms_list_lock;
|
||||
#endif
|
||||
struct dbterm_list *dbterms_list;
|
||||
|
||||
yamop *expand_clauses_first;
|
||||
yamop *expand_clauses_last;
|
||||
UInt expand_clauses;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar expand_clauses_list_lock;
|
||||
lockvar op_list_lock;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
UInt new_cps;
|
||||
UInt live_cps;
|
||||
UInt dirty_cps;
|
||||
UInt freed_cps;
|
||||
#endif
|
||||
UInt expand_clauses_sz;
|
||||
|
||||
struct udi_info *udi_control_blocks;
|
||||
|
||||
|
||||
Int static_predicates_marked;
|
||||
|
||||
Prop *IntKeys;
|
||||
Prop *IntLUKeys;
|
||||
Prop *IntBBKeys;
|
||||
|
||||
UInt int_keys_size;
|
||||
UInt int_keys_timestamp;
|
||||
UInt int_bb_keys_size;
|
||||
|
||||
int update_mode;
|
||||
|
||||
struct DB_STRUCT *db_erased_marker;
|
||||
struct logic_upd_clause *logdb_erased_marker;
|
||||
|
||||
struct static_clause *dead_static_clauses;
|
||||
struct static_mega_clause *dead_mega_clauses;
|
||||
struct static_index *dead_static_indices;
|
||||
struct logic_upd_clause *db_erased_list;
|
||||
struct logic_upd_index *db_erased_ilist;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar dead_static_clauses_lock;
|
||||
lockvar dead_mega_clauses_lock;
|
||||
lockvar dead_static_indices_lock;
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
int num_of_atts;
|
||||
|
||||
UInt atts_size;
|
||||
#endif
|
||||
|
||||
Int yap_flags_field[NUMBER_OF_YAP_FLAGS];
|
||||
|
||||
struct operator_entry *op_list;
|
||||
|
||||
|
||||
struct stream_desc *yap_streams;
|
||||
|
||||
UInt n_of_file_aliases;
|
||||
UInt sz_of_file_aliases;
|
||||
struct AliasDescS *file_aliases;
|
||||
|
||||
Atom atprompt;
|
||||
char prompt[MAX_PROMPT];
|
||||
|
||||
char *char_conversion_table;
|
||||
char *char_conversion_table2;
|
||||
|
||||
int parser_error_style;
|
||||
|
||||
char *yap_lib_dir;
|
||||
|
||||
void *last_wtime;
|
||||
|
||||
int debugger_output_msg;
|
||||
#if LOW_PROF
|
||||
int profiler_on;
|
||||
int offline_profiler;
|
||||
FILE *f_prof;
|
||||
FILE *f_preds;
|
||||
UInt prof_preds;
|
||||
#endif /* LOW_PROF */
|
||||
|
||||
struct ForeignLoadItem *foreign_code_loaded;
|
||||
ADDR foreign_code_base;
|
||||
ADDR foreign_code_top;
|
||||
ADDR foreign_code_max;
|
||||
|
||||
struct record_list *yap_records;
|
||||
|
||||
Atom swi_atoms[N_SWI_ATOMS];
|
||||
Functor swi_functors[N_SWI_FUNCTORS];
|
||||
struct swi_reverse_hash swi_reverse_hash[N_SWI_HASH];
|
||||
|
||||
struct PL_blob_t *swi_blob_types;
|
||||
struct AtomEntryStruct *swi_blobs;
|
||||
|
||||
/* This file, hstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UInt hole_size;
|
||||
struct malloc_state *av_;
|
||||
#if USE_DL_MALLOC
|
||||
struct memory_hole memory_holes[MAX_DLMALLOC_HOLES];
|
||||
UInt nof_memory_holes;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar dlmalloc_lock;
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
Int heap_used;
|
||||
#else
|
||||
Int heap_used;
|
||||
#endif
|
||||
Int heap_max;
|
||||
ADDR heap_top;
|
||||
ADDR heap_lim;
|
||||
struct FREEB *free_blocks;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar free_blocks_lock;
|
||||
lockvar heap_used_lock;
|
||||
lockvar heap_top_lock;
|
||||
int heap_top_owner;
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
opentry *op_rtable;
|
||||
#endif
|
||||
|
||||
OPCODE execute_cpred_op_code;
|
||||
OPCODE expand_op_code;
|
||||
OPCODE fail_op;
|
||||
OPCODE index_op;
|
||||
OPCODE lockpred_op;
|
||||
OPCODE orlast_op;
|
||||
OPCODE undef_op;
|
||||
|
||||
UInt n_of_atoms;
|
||||
UInt atom_hash_table_size;
|
||||
UInt wide_atom_hash_table_size;
|
||||
UInt n_of_wide_atoms;
|
||||
AtomHashEntry invisiblechain;
|
||||
AtomHashEntry *wide_hash_chain;
|
||||
AtomHashEntry *hash_chain;
|
||||
|
||||
#include "tatoms.h"
|
||||
#ifdef EUROTRA
|
||||
Term term_dollar_u;
|
||||
#endif
|
||||
Term term_prolog;
|
||||
Term term_refound_var;
|
||||
Term user_module;
|
||||
Term idb_module;
|
||||
Term attributes_module;
|
||||
Term charsio_module;
|
||||
Term terms_module;
|
||||
Term system_module;
|
||||
Term operating_system_module;
|
||||
Term readutil_module;
|
||||
Term hacks_module;
|
||||
Term arg_module;
|
||||
Term globals_module;
|
||||
Term swi_module;
|
||||
|
||||
|
||||
|
||||
struct mod_entry *current_modules;
|
||||
|
||||
|
||||
|
||||
|
||||
yap_exec_mode execution_mode;
|
||||
|
||||
struct pred_entry **pred_hash;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
rwlock_t pred_hash_rw_lock;
|
||||
#endif
|
||||
UInt preds_in_hash_table;
|
||||
UInt pred_hash_table_size;
|
||||
|
||||
struct pred_entry *creep_code;
|
||||
struct pred_entry *undef_code;
|
||||
struct pred_entry *spy_code;
|
||||
struct pred_entry *pred_fail;
|
||||
struct pred_entry *pred_true;
|
||||
#ifdef COROUTINING
|
||||
struct pred_entry *wake_up_code;
|
||||
#endif
|
||||
struct pred_entry *pred_goal_expansion;
|
||||
struct pred_entry *pred_meta_call;
|
||||
struct pred_entry *pred_dollar_catch;
|
||||
struct pred_entry *pred_recorded_with_key;
|
||||
struct pred_entry *pred_log_upd_clause;
|
||||
struct pred_entry *pred_log_upd_clause_erase;
|
||||
struct pred_entry *pred_log_upd_clause0;
|
||||
struct pred_entry *pred_static_clause;
|
||||
struct pred_entry *pred_throw;
|
||||
struct pred_entry *pred_handle_throw;
|
||||
struct pred_entry *pred_is;
|
||||
struct pred_entry *pred_safe_call_cleanup;
|
||||
struct pred_entry *pred_restore_regs;
|
||||
#ifdef YAPOR
|
||||
struct pred_entry *pred_getwork;
|
||||
struct pred_entry *pred_getwork_seq;
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
int yap_do_low_level_trace;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar low_level_trace_lock;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
UInt clause_space;
|
||||
UInt index_space_Tree;
|
||||
UInt index_space_EXT;
|
||||
UInt index_space_SW;
|
||||
UInt lu_clause_space;
|
||||
UInt lu_index_space_Tree;
|
||||
UInt lu_index_space_CP;
|
||||
UInt lu_index_space_EXT;
|
||||
UInt lu_index_space_SW;
|
||||
|
||||
yamop comma_code[5];
|
||||
yamop dummycode[1];
|
||||
yamop failcode[1];
|
||||
yamop nocode[1];
|
||||
yamop env_for_trustfail[2];
|
||||
yamop *trustfailcode;
|
||||
yamop env_for_yescode[2];
|
||||
yamop *yescode;
|
||||
yamop rtrycode[1];
|
||||
#ifdef BEAM
|
||||
yamop beam_retry_code[1];
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
int seq_def;
|
||||
yamop getwork_code[1];
|
||||
yamop getwork_seq_code[1];
|
||||
yamop getwork_first_time[1];
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
yamop table_load_answer_code[1];
|
||||
yamop table_try_answer_code[1];
|
||||
yamop table_answer_resolution_code[1];
|
||||
yamop table_completion_code[1];
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
yamop *debugger_p_before_spy;
|
||||
|
||||
yamop *retry_recordedp_code;
|
||||
yamop *retry_recorded_k_code;
|
||||
|
||||
int system_profiling;
|
||||
int system_call_counting;
|
||||
int system_pred_goal_expansion_all;
|
||||
int system_pred_goal_expansion_func;
|
||||
int system_pred_goal_expansion_on;
|
||||
int compiler_optimizer_on;
|
||||
int compiler_compile_mode;
|
||||
int compiler_profiling;
|
||||
int compiler_call_counting;
|
||||
|
||||
int compiler_compile_arrays;
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar dbterms_list_lock;
|
||||
#endif
|
||||
struct dbterm_list *dbterms_list;
|
||||
|
||||
yamop *expand_clauses_first;
|
||||
yamop *expand_clauses_last;
|
||||
UInt expand_clauses;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar expand_clauses_list_lock;
|
||||
lockvar op_list_lock;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
UInt new_cps;
|
||||
UInt live_cps;
|
||||
UInt dirty_cps;
|
||||
UInt freed_cps;
|
||||
#endif
|
||||
UInt expand_clauses_sz;
|
||||
|
||||
struct udi_info *udi_control_blocks;
|
||||
|
||||
|
||||
Int static_predicates_marked;
|
||||
|
||||
Prop *IntKeys;
|
||||
Prop *IntLUKeys;
|
||||
Prop *IntBBKeys;
|
||||
|
||||
UInt int_keys_size;
|
||||
UInt int_keys_timestamp;
|
||||
UInt int_bb_keys_size;
|
||||
|
||||
int update_mode;
|
||||
|
||||
struct DB_STRUCT *db_erased_marker;
|
||||
struct logic_upd_clause *logdb_erased_marker;
|
||||
|
||||
struct static_clause *dead_static_clauses;
|
||||
struct static_mega_clause *dead_mega_clauses;
|
||||
struct static_index *dead_static_indices;
|
||||
struct logic_upd_clause *db_erased_list;
|
||||
struct logic_upd_index *db_erased_ilist;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar dead_static_clauses_lock;
|
||||
lockvar dead_mega_clauses_lock;
|
||||
lockvar dead_static_indices_lock;
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
int num_of_atts;
|
||||
|
||||
UInt atts_size;
|
||||
#endif
|
||||
|
||||
Int yap_flags_field[NUMBER_OF_YAP_FLAGS];
|
||||
|
||||
struct operator_entry *op_list;
|
||||
|
||||
|
||||
struct stream_desc *yap_streams;
|
||||
|
||||
UInt n_of_file_aliases;
|
||||
UInt sz_of_file_aliases;
|
||||
struct AliasDescS *file_aliases;
|
||||
|
||||
Atom atprompt;
|
||||
char _prompt[MAX_PROMPT];
|
||||
|
||||
char *char_conversion_table;
|
||||
char *char_conversion_table2;
|
||||
|
||||
int parser_error_style;
|
||||
|
||||
char *yap_lib_dir;
|
||||
|
||||
void *last_wtime;
|
||||
|
||||
int debugger_output_msg;
|
||||
#if LOW_PROF
|
||||
int profiler_on;
|
||||
int offline_profiler;
|
||||
FILE *f_prof;
|
||||
FILE *f_preds;
|
||||
UInt prof_preds;
|
||||
#endif /* LOW_PROF */
|
||||
|
||||
struct ForeignLoadItem *foreign_code_loaded;
|
||||
ADDR foreign_code_base;
|
||||
ADDR foreign_code_top;
|
||||
ADDR foreign_code_max;
|
||||
|
||||
struct record_list *yap_records;
|
||||
|
||||
Atom swi_atoms[N_SWI_ATOMS];
|
||||
Functor swi_functors[N_SWI_FUNCTORS];
|
||||
struct swi_reverse_hash swi_reverse_hash[N_SWI_HASH];
|
||||
|
||||
struct PL_blob_t *swi_blob_types;
|
||||
struct AtomEntryStruct *swi_blobs;
|
||||
|
422
H/iglobals.h
422
H/iglobals.h
@ -1,211 +1,211 @@
|
||||
|
||||
/* This file, iglobals.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void InitWorker(int wid) {
|
||||
|
||||
FOREIGN_WL(wid)->c_input_stream = 0;
|
||||
FOREIGN_WL(wid)->c_output_stream = 1;
|
||||
FOREIGN_WL(wid)->c_error_stream = 2;
|
||||
|
||||
FOREIGN_WL(wid)->rinfo.old_ASP = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_LCL0 = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_TR = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_GlobalBase = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_H = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_H0 = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_TrailBase = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_TrailTop = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_HeapBase = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_HeapTop = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.cl_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.g_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.h_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.g_diff0 = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.g_split = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.l_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.tr_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.x_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.delay_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.base_diff = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.reductions = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.reductions_retries = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.retries = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.reductions_on = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.reductions_retries_on = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.retries_on = 0L;
|
||||
FOREIGN_WL(wid)->interrupts_disabled = FALSE;
|
||||
|
||||
|
||||
FOREIGN_WL(wid)->consultsp = NULL;
|
||||
|
||||
|
||||
|
||||
FOREIGN_WL(wid)->consultbase = NULL;
|
||||
|
||||
FOREIGN_WL(wid)->consultlow = NULL;
|
||||
|
||||
FOREIGN_WL(wid)->global_arena = 0L;
|
||||
FOREIGN_WL(wid)->global_arena_overflows = 0L;
|
||||
FOREIGN_WL(wid)->delay_arena_overflows = 0L;
|
||||
FOREIGN_WL(wid)->arena_overflows = 0L;
|
||||
FOREIGN_WL(wid)->depth_arenas = 0;
|
||||
FOREIGN_WL(wid)->arith_error = FALSE;
|
||||
FOREIGN_WL(wid)->last_asserted_pred = NULL;
|
||||
FOREIGN_WL(wid)->debug_on = FALSE;
|
||||
FOREIGN_WL(wid)->f_info = NULL;
|
||||
FOREIGN_WL(wid)->scanner_stack = NULL;
|
||||
FOREIGN_WL(wid)->scanner_extra_blocks = NULL;
|
||||
FOREIGN_WL(wid)->ball_term = NULL;
|
||||
FOREIGN_WL(wid)->active_signals = 0L;
|
||||
FOREIGN_WL(wid)->i_pred_arity = 0L;
|
||||
FOREIGN_WL(wid)->prof_end = NULL;
|
||||
FOREIGN_WL(wid)->uncaught_throw = FALSE;
|
||||
FOREIGN_WL(wid)->doing_undefp = FALSE;
|
||||
FOREIGN_WL(wid)->start_line = 0L;
|
||||
InitScratchPad(wid);
|
||||
#ifdef COROUTINING
|
||||
FOREIGN_WL(wid)->woken_goals = 0L;
|
||||
FOREIGN_WL(wid)->atts_mutable_list = 0L;
|
||||
#endif
|
||||
|
||||
FOREIGN_WL(wid)->gc_generation = 0L;
|
||||
FOREIGN_WL(wid)->gc_phase = 0L;
|
||||
FOREIGN_WL(wid)->gc_current_phase = 0L;
|
||||
FOREIGN_WL(wid)->gc_calls = 0L;
|
||||
FOREIGN_WL(wid)->tot_gc_time = 0L;
|
||||
FOREIGN_WL(wid)->tot_gc_recovered = 0L;
|
||||
FOREIGN_WL(wid)->last_gc_time = 0L;
|
||||
FOREIGN_WL(wid)->last_ss_time = 0L;
|
||||
#if LOW_LEVEL_TRACER
|
||||
FOREIGN_WL(wid)->total_cps = 0;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(FOREIGN_WL(wid)->signal_lock);
|
||||
FOREIGN_WL(wid)->wpp = NULL;
|
||||
|
||||
FOREIGN_WL(wid)->tot_marked = 0L;
|
||||
FOREIGN_WL(wid)->tot_oldies = 0L;
|
||||
#if DEBUG && COROUTINING
|
||||
FOREIGN_WL(wid)->tot_smarked = 0L;
|
||||
#endif
|
||||
FOREIGN_WL(wid)->wl_current_B = NULL;
|
||||
FOREIGN_WL(wid)->wl_prev_HB = NULL;
|
||||
FOREIGN_WL(wid)->hgen = NULL;
|
||||
FOREIGN_WL(wid)->ip_top = NULL;
|
||||
#if GC_NO_TAGS
|
||||
FOREIGN_WL(wid)->b_p = NULL;
|
||||
#endif
|
||||
#if defined(TABLING) || defined(SBA)
|
||||
FOREIGN_WL(wid)->wl_sTR = NULL;
|
||||
FOREIGN_WL(wid)->wl_sTR0 = NULL;
|
||||
FOREIGN_WL(wid)->new_tr = NULL;
|
||||
#else
|
||||
FOREIGN_WL(wid)->wl_sTR = NULL;
|
||||
FOREIGN_WL(wid)->wl_sTR0 = NULL;
|
||||
FOREIGN_WL(wid)->new_tr = NULL;
|
||||
#endif
|
||||
FOREIGN_WL(wid)->conttop0 = NULL;
|
||||
FOREIGN_WL(wid)->conttop = NULL;
|
||||
FOREIGN_WL(wid)->disc_trail_entries = 0;
|
||||
|
||||
FOREIGN_WL(wid)->Gc_ma_h_top = NULL;
|
||||
FOREIGN_WL(wid)->Gc_ma_h_list = NULL;
|
||||
FOREIGN_WL(wid)->Gc_timestamp = 0L;
|
||||
FOREIGN_WL(wid)->DB_vec = NULL;
|
||||
FOREIGN_WL(wid)->DB_vec0 = NULL;
|
||||
FOREIGN_WL(wid)->DB_root = NULL;
|
||||
FOREIGN_WL(wid)->DB_nil = NULL;
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
|
||||
FOREIGN_WL(wid)->dynamic_arrays = NULL;
|
||||
FOREIGN_WL(wid)->static_arrays = NULL;
|
||||
FOREIGN_WL(wid)->global_variables = NULL;
|
||||
FOREIGN_WL(wid)->allow_restart = FALSE;
|
||||
|
||||
FOREIGN_WL(wid)->cmem_first_block = NULL;
|
||||
FOREIGN_WL(wid)->cmem_first_block_sz = 0L;
|
||||
|
||||
FOREIGN_WL(wid)->label_first_array = NULL;
|
||||
FOREIGN_WL(wid)->label_first_array_sz = 0L;
|
||||
|
||||
FOREIGN_WL(wid)->Yap_ld_ = Yap_InitThreadIO(wid);
|
||||
FOREIGN_WL(wid)->_execution = NULL;
|
||||
|
||||
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
InitThreadHandle(wid);
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void InitGlobal(void) {
|
||||
|
||||
#if THREADS
|
||||
|
||||
Yap_global->n_of_threads = 1;
|
||||
|
||||
Yap_global->n_of_threads_created = 1;
|
||||
|
||||
Yap_global->threads_total_time = 0L;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
INIT_LOCK(Yap_global->bgl);
|
||||
#endif
|
||||
|
||||
Yap_global->allow_local_expansion = TRUE;
|
||||
Yap_global->allow_global_expansion = TRUE;
|
||||
Yap_global->allow_trail_expansion = TRUE;
|
||||
Yap_global->size_of_overflow = 0;
|
||||
|
||||
Yap_global->agc_last_call = 0;
|
||||
|
||||
Yap_global->agc_threshold = 10000;
|
||||
Yap_global->agc_hook = NULL;
|
||||
|
||||
#if HAVE_LIBREADLINE
|
||||
Yap_global->readline_buf = NULL;
|
||||
Yap_global->readline_pos = 0L;
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
INIT_LOCK(Yap_global->thread_handles_lock);
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Yap_global->initialised = FALSE;
|
||||
Yap_global->initialised_from_pl = FALSE;
|
||||
Yap_global->pl_argc = 0;
|
||||
Yap_global->pl_argv = NULL;
|
||||
|
||||
Yap_global->yap_halt_hook = NULL;
|
||||
}
|
||||
|
||||
/* This file, iglobals.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void InitWorker(int wid) {
|
||||
|
||||
FOREIGN_WL(wid)->c_input_stream = 0;
|
||||
FOREIGN_WL(wid)->c_output_stream = 1;
|
||||
FOREIGN_WL(wid)->c_error_stream = 2;
|
||||
|
||||
FOREIGN_WL(wid)->rinfo.old_ASP = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_LCL0 = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_TR = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_GlobalBase = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_H = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_H0 = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_TrailBase = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_TrailTop = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_HeapBase = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_HeapTop = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.cl_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.g_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.h_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.g_diff0 = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.g_split = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.l_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.tr_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.x_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.delay_diff = 0L;
|
||||
FOREIGN_WL(wid)->rinfo.base_diff = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.reductions = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.reductions_retries = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.retries = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.reductions_on = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.reductions_retries_on = 0L;
|
||||
FOREIGN_WL(wid)->call_counters.retries_on = 0L;
|
||||
FOREIGN_WL(wid)->interrupts_disabled = FALSE;
|
||||
|
||||
|
||||
FOREIGN_WL(wid)->consultsp = NULL;
|
||||
|
||||
|
||||
|
||||
FOREIGN_WL(wid)->consultbase = NULL;
|
||||
|
||||
FOREIGN_WL(wid)->consultlow = NULL;
|
||||
|
||||
FOREIGN_WL(wid)->global_arena = 0L;
|
||||
FOREIGN_WL(wid)->global_arena_overflows = 0L;
|
||||
FOREIGN_WL(wid)->delay_arena_overflows = 0L;
|
||||
FOREIGN_WL(wid)->arena_overflows = 0L;
|
||||
FOREIGN_WL(wid)->depth_arenas = 0;
|
||||
FOREIGN_WL(wid)->arith_error = FALSE;
|
||||
FOREIGN_WL(wid)->last_asserted_pred = NULL;
|
||||
FOREIGN_WL(wid)->debug_on = FALSE;
|
||||
FOREIGN_WL(wid)->f_info = NULL;
|
||||
FOREIGN_WL(wid)->scanner_stack = NULL;
|
||||
FOREIGN_WL(wid)->scanner_extra_blocks = NULL;
|
||||
FOREIGN_WL(wid)->ball_term = NULL;
|
||||
FOREIGN_WL(wid)->active_signals = 0L;
|
||||
FOREIGN_WL(wid)->i_pred_arity = 0L;
|
||||
FOREIGN_WL(wid)->prof_end = NULL;
|
||||
FOREIGN_WL(wid)->uncaught_throw = FALSE;
|
||||
FOREIGN_WL(wid)->doing_undefp = FALSE;
|
||||
FOREIGN_WL(wid)->start_line = 0L;
|
||||
InitScratchPad(wid);
|
||||
#ifdef COROUTINING
|
||||
FOREIGN_WL(wid)->woken_goals = 0L;
|
||||
FOREIGN_WL(wid)->atts_mutable_list = 0L;
|
||||
#endif
|
||||
|
||||
FOREIGN_WL(wid)->gc_generation = 0L;
|
||||
FOREIGN_WL(wid)->gc_phase = 0L;
|
||||
FOREIGN_WL(wid)->gc_current_phase = 0L;
|
||||
FOREIGN_WL(wid)->gc_calls = 0L;
|
||||
FOREIGN_WL(wid)->tot_gc_time = 0L;
|
||||
FOREIGN_WL(wid)->tot_gc_recovered = 0L;
|
||||
FOREIGN_WL(wid)->last_gc_time = 0L;
|
||||
FOREIGN_WL(wid)->last_ss_time = 0L;
|
||||
#if LOW_LEVEL_TRACER
|
||||
FOREIGN_WL(wid)->total_cps = 0;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(FOREIGN_WL(wid)->signal_lock);
|
||||
FOREIGN_WL(wid)->wpp = NULL;
|
||||
|
||||
FOREIGN_WL(wid)->tot_marked = 0L;
|
||||
FOREIGN_WL(wid)->tot_oldies = 0L;
|
||||
#if DEBUG && COROUTINING
|
||||
FOREIGN_WL(wid)->tot_smarked = 0L;
|
||||
#endif
|
||||
FOREIGN_WL(wid)->wl_current_B = NULL;
|
||||
FOREIGN_WL(wid)->wl_prev_HB = NULL;
|
||||
FOREIGN_WL(wid)->hgen = NULL;
|
||||
FOREIGN_WL(wid)->ip_top = NULL;
|
||||
#if GC_NO_TAGS
|
||||
FOREIGN_WL(wid)->b_p = NULL;
|
||||
#endif
|
||||
#if defined(TABLING) || defined(SBA)
|
||||
FOREIGN_WL(wid)->wl_sTR = NULL;
|
||||
FOREIGN_WL(wid)->wl_sTR0 = NULL;
|
||||
FOREIGN_WL(wid)->new_tr = NULL;
|
||||
#else
|
||||
FOREIGN_WL(wid)->wl_sTR = NULL;
|
||||
FOREIGN_WL(wid)->wl_sTR0 = NULL;
|
||||
FOREIGN_WL(wid)->new_tr = NULL;
|
||||
#endif
|
||||
FOREIGN_WL(wid)->conttop0 = NULL;
|
||||
FOREIGN_WL(wid)->conttop = NULL;
|
||||
FOREIGN_WL(wid)->disc_trail_entries = 0;
|
||||
|
||||
FOREIGN_WL(wid)->Gc_ma_h_top = NULL;
|
||||
FOREIGN_WL(wid)->Gc_ma_h_list = NULL;
|
||||
FOREIGN_WL(wid)->Gc_timestamp = 0L;
|
||||
FOREIGN_WL(wid)->DB_vec = NULL;
|
||||
FOREIGN_WL(wid)->DB_vec0 = NULL;
|
||||
FOREIGN_WL(wid)->DB_root = NULL;
|
||||
FOREIGN_WL(wid)->DB_nil = NULL;
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
|
||||
FOREIGN_WL(wid)->dynamic_arrays = NULL;
|
||||
FOREIGN_WL(wid)->static_arrays = NULL;
|
||||
FOREIGN_WL(wid)->global_variables = NULL;
|
||||
FOREIGN_WL(wid)->allow_restart = FALSE;
|
||||
|
||||
FOREIGN_WL(wid)->cmem_first_block = NULL;
|
||||
FOREIGN_WL(wid)->cmem_first_block_sz = 0L;
|
||||
|
||||
FOREIGN_WL(wid)->label_first_array = NULL;
|
||||
FOREIGN_WL(wid)->label_first_array_sz = 0L;
|
||||
|
||||
FOREIGN_WL(wid)->Yap_ld_ = Yap_InitThreadIO(wid);
|
||||
FOREIGN_WL(wid)->_execution = NULL;
|
||||
|
||||
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
InitThreadHandle(wid);
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void InitGlobal(void) {
|
||||
|
||||
#if THREADS
|
||||
|
||||
Yap_global->n_of_threads = 1;
|
||||
|
||||
Yap_global->n_of_threads_created = 1;
|
||||
|
||||
Yap_global->threads_total_time = 0L;
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
INIT_LOCK(Yap_global->bgl);
|
||||
#endif
|
||||
|
||||
Yap_global->allow_local_expansion = TRUE;
|
||||
Yap_global->allow_global_expansion = TRUE;
|
||||
Yap_global->allow_trail_expansion = TRUE;
|
||||
Yap_global->size_of_overflow = 0;
|
||||
|
||||
Yap_global->agc_last_call = 0;
|
||||
|
||||
Yap_global->agc_threshold = 10000;
|
||||
Yap_global->agc_hook = NULL;
|
||||
|
||||
#if HAVE_LIBREADLINE
|
||||
Yap_global->readline_buf = NULL;
|
||||
Yap_global->readline_pos = 0L;
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
INIT_LOCK(Yap_global->thread_handles_lock);
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Yap_global->initialised = FALSE;
|
||||
Yap_global->initialised_from_pl = FALSE;
|
||||
Yap_global->pl_argc = 0;
|
||||
Yap_global->pl_argv = NULL;
|
||||
|
||||
Yap_global->yap_halt_hook = NULL;
|
||||
}
|
||||
|
608
H/ihstruct.h
608
H/ihstruct.h
@ -1,304 +1,304 @@
|
||||
|
||||
/* This file, ihstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_DL_MALLOC
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->dlmalloc_lock);
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->free_blocks_lock);
|
||||
INIT_LOCK(Yap_heap_regs->heap_used_lock);
|
||||
INIT_LOCK(Yap_heap_regs->heap_top_lock);
|
||||
Yap_heap_regs->heap_top_owner = -1;
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
|
||||
#endif
|
||||
|
||||
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
|
||||
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
||||
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
|
||||
Yap_heap_regs->orlast_op = Yap_opcode(_or_last);
|
||||
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
InitInvisibleAtoms();
|
||||
InitWideAtoms();
|
||||
InitAtoms();
|
||||
|
||||
#include "iatoms.h"
|
||||
#ifdef EUROTRA
|
||||
Yap_heap_regs->term_dollar_u = MkAtomTerm(AtomDollarU);
|
||||
#endif
|
||||
Yap_heap_regs->term_prolog = MkAtomTerm(AtomProlog);
|
||||
Yap_heap_regs->term_refound_var = MkAtomTerm(AtomRefoundVar);
|
||||
Yap_heap_regs->user_module = MkAtomTerm(AtomUser);
|
||||
Yap_heap_regs->idb_module = MkAtomTerm(AtomIDB);
|
||||
Yap_heap_regs->attributes_module = MkAtomTerm(AtomAttributes);
|
||||
Yap_heap_regs->charsio_module = MkAtomTerm(AtomCharsio);
|
||||
Yap_heap_regs->terms_module = MkAtomTerm(AtomTerms);
|
||||
Yap_heap_regs->system_module = MkAtomTerm(AtomSystem);
|
||||
Yap_heap_regs->operating_system_module = MkAtomTerm(AtomOperatingSystemSupport);
|
||||
Yap_heap_regs->readutil_module = MkAtomTerm(AtomReadutil);
|
||||
Yap_heap_regs->hacks_module = MkAtomTerm(AtomYapHacks);
|
||||
Yap_heap_regs->arg_module = MkAtomTerm(AtomArg);
|
||||
Yap_heap_regs->globals_module = MkAtomTerm(AtomNb);
|
||||
Yap_heap_regs->swi_module = MkAtomTerm(AtomSwi);
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->current_modules = NULL;
|
||||
|
||||
|
||||
Yap_InitModules();
|
||||
|
||||
Yap_heap_regs->execution_mode = INTERPRETED;
|
||||
|
||||
InitPredHash();
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
#endif
|
||||
Yap_heap_regs->preds_in_hash_table = 0;
|
||||
|
||||
|
||||
Yap_heap_regs->creep_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomCreep,1),PROLOG_MODULE));
|
||||
Yap_heap_regs->undef_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomUndefp,1),PROLOG_MODULE));
|
||||
Yap_heap_regs->spy_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomSpy,1),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_fail = RepPredProp(PredPropByAtom(AtomFail,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_true = RepPredProp(PredPropByAtom(AtomTrue,PROLOG_MODULE));
|
||||
#ifdef COROUTINING
|
||||
Yap_heap_regs->wake_up_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomWakeUpGoal,2),PROLOG_MODULE));
|
||||
#endif
|
||||
Yap_heap_regs->pred_goal_expansion = RepPredProp(PredPropByFunc(FunctorGoalExpansion,USER_MODULE));
|
||||
Yap_heap_regs->pred_meta_call = RepPredProp(PredPropByFunc(FunctorMetaCall,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_dollar_catch = RepPredProp(PredPropByFunc(FunctorCatch,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_recorded_with_key = RepPredProp(PredPropByFunc(FunctorRecordedWithKey,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_log_upd_clause = RepPredProp(PredPropByFunc(FunctorDoLogUpdClause,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_log_upd_clause_erase = RepPredProp(PredPropByFunc(FunctorDoLogUpdClauseErase,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_log_upd_clause0 = RepPredProp(PredPropByFunc(FunctorDoLogUpdClause,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_static_clause = RepPredProp(PredPropByFunc(FunctorDoStaticClause,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_throw = RepPredProp(PredPropByFunc(FunctorThrow,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_handle_throw = RepPredProp(PredPropByFunc(FunctorHandleThrow,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_is = RepPredProp(PredPropByFunc(FunctorIs,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_safe_call_cleanup = RepPredProp(PredPropByFunc(FunctorSafeCallCleanup,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_restore_regs = RepPredProp(PredPropByFunc(FunctorRestoreRegs,PROLOG_MODULE));
|
||||
#ifdef YAPOR
|
||||
Yap_heap_regs->pred_getwork = RepPredProp(PredPropByAtom(AtomGetwork,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_getwork_seq = RepPredProp(PredPropByAtom(AtomGetworkSeq,PROLOG_MODULE));
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
Yap_heap_regs->yap_do_low_level_trace = FALSE;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->low_level_trace_lock);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Yap_heap_regs->clause_space = 0;
|
||||
Yap_heap_regs->index_space_Tree = 0;
|
||||
Yap_heap_regs->index_space_EXT = 0;
|
||||
Yap_heap_regs->index_space_SW = 0;
|
||||
Yap_heap_regs->lu_clause_space = 0;
|
||||
Yap_heap_regs->lu_index_space_Tree = 0;
|
||||
Yap_heap_regs->lu_index_space_CP = 0;
|
||||
Yap_heap_regs->lu_index_space_EXT = 0;
|
||||
Yap_heap_regs->lu_index_space_SW = 0;
|
||||
|
||||
|
||||
Yap_heap_regs->dummycode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop);
|
||||
InitEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
|
||||
|
||||
InitEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
|
||||
|
||||
InitOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
|
||||
#ifdef BEAM
|
||||
Yap_heap_regs->beam_retry_code->opc = Yap_opcode(_beam_retry_code);
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
Yap_heap_regs->seq_def = FALSE;
|
||||
InitOtaplInst(GETWORK,_getwork,PredGetwork);
|
||||
InitOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
|
||||
Yap_heap_regs->getwork_first_time->opc = Yap_opcode(_getwork_first_time);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
InitOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
|
||||
InitOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
|
||||
InitOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
|
||||
InitOtaplInst(COMPLETION,_table_completion,PredFail);
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->debugger_p_before_spy = NULL;
|
||||
|
||||
Yap_heap_regs->retry_recordedp_code = NULL;
|
||||
Yap_heap_regs->retry_recorded_k_code = NULL;
|
||||
|
||||
Yap_heap_regs->system_profiling = FALSE;
|
||||
Yap_heap_regs->system_call_counting = FALSE;
|
||||
Yap_heap_regs->system_pred_goal_expansion_all = FALSE;
|
||||
Yap_heap_regs->system_pred_goal_expansion_func = FALSE;
|
||||
Yap_heap_regs->system_pred_goal_expansion_on = FALSE;
|
||||
Yap_heap_regs->compiler_optimizer_on = TRUE;
|
||||
Yap_heap_regs->compiler_compile_mode = 0;
|
||||
Yap_heap_regs->compiler_profiling = FALSE;
|
||||
Yap_heap_regs->compiler_call_counting = FALSE;
|
||||
|
||||
Yap_heap_regs->compiler_compile_arrays = FALSE;
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->dbterms_list_lock);
|
||||
#endif
|
||||
Yap_heap_regs->dbterms_list = NULL;
|
||||
|
||||
Yap_heap_regs->expand_clauses_first = NULL;
|
||||
Yap_heap_regs->expand_clauses_last = NULL;
|
||||
Yap_heap_regs->expand_clauses = 0;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->expand_clauses_list_lock);
|
||||
INIT_LOCK(Yap_heap_regs->op_list_lock);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
Yap_heap_regs->new_cps = 0L;
|
||||
Yap_heap_regs->live_cps = 0L;
|
||||
Yap_heap_regs->dirty_cps = 0L;
|
||||
Yap_heap_regs->freed_cps = 0L;
|
||||
#endif
|
||||
Yap_heap_regs->expand_clauses_sz = 0L;
|
||||
|
||||
Yap_heap_regs->udi_control_blocks = NULL;
|
||||
|
||||
|
||||
Yap_heap_regs->static_predicates_marked = FALSE;
|
||||
|
||||
Yap_heap_regs->IntKeys = NULL;
|
||||
Yap_heap_regs->IntLUKeys = NULL;
|
||||
Yap_heap_regs->IntBBKeys = NULL;
|
||||
|
||||
Yap_heap_regs->int_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||
Yap_heap_regs->int_keys_timestamp = 0L;
|
||||
Yap_heap_regs->int_bb_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||
|
||||
Yap_heap_regs->update_mode = UPDATE_MODE_LOGICAL;
|
||||
|
||||
InitDBErasedMarker();
|
||||
InitLogDBErasedMarker();
|
||||
|
||||
Yap_heap_regs->dead_static_clauses = NULL;
|
||||
Yap_heap_regs->dead_mega_clauses = NULL;
|
||||
Yap_heap_regs->dead_static_indices = NULL;
|
||||
Yap_heap_regs->db_erased_list = NULL;
|
||||
Yap_heap_regs->db_erased_ilist = NULL;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->dead_static_clauses_lock);
|
||||
INIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock);
|
||||
INIT_LOCK(Yap_heap_regs->dead_static_indices_lock);
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
Yap_heap_regs->num_of_atts = 1;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
InitFlags();
|
||||
|
||||
Yap_heap_regs->op_list = NULL;
|
||||
|
||||
|
||||
Yap_heap_regs->yap_streams = NULL;
|
||||
|
||||
Yap_heap_regs->n_of_file_aliases = 0;
|
||||
Yap_heap_regs->sz_of_file_aliases = 0;
|
||||
Yap_heap_regs->file_aliases = NULL;
|
||||
|
||||
Yap_heap_regs->atprompt = AtomNil;
|
||||
|
||||
|
||||
Yap_heap_regs->char_conversion_table = NULL;
|
||||
Yap_heap_regs->char_conversion_table2 = NULL;
|
||||
|
||||
Yap_heap_regs->parser_error_style = EXCEPTION_ON_PARSER_ERROR;
|
||||
|
||||
Yap_heap_regs->yap_lib_dir = NULL;
|
||||
|
||||
Yap_heap_regs->last_wtime = NULL;
|
||||
|
||||
Yap_heap_regs->debugger_output_msg = 0L;
|
||||
#if LOW_PROF
|
||||
Yap_heap_regs->profiler_on = FALSE;
|
||||
Yap_heap_regs->offline_profiler = FALSE;
|
||||
Yap_heap_regs->f_prof = NULL;
|
||||
Yap_heap_regs->f_preds = NULL;
|
||||
Yap_heap_regs->prof_preds = 0L;
|
||||
#endif /* LOW_PROF */
|
||||
|
||||
Yap_heap_regs->foreign_code_loaded = NULL;
|
||||
Yap_heap_regs->foreign_code_base = NULL;
|
||||
Yap_heap_regs->foreign_code_top = NULL;
|
||||
Yap_heap_regs->foreign_code_max = NULL;
|
||||
|
||||
Yap_heap_regs->yap_records = NULL;
|
||||
|
||||
InitSWIAtoms();
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->swi_blob_types = NULL;
|
||||
Yap_heap_regs->swi_blobs = NULL;
|
||||
|
||||
/* This file, ihstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_DL_MALLOC
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->dlmalloc_lock);
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->free_blocks_lock);
|
||||
INIT_LOCK(Yap_heap_regs->heap_used_lock);
|
||||
INIT_LOCK(Yap_heap_regs->heap_top_lock);
|
||||
Yap_heap_regs->heap_top_owner = -1;
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
|
||||
#endif
|
||||
|
||||
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
|
||||
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
||||
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
|
||||
Yap_heap_regs->orlast_op = Yap_opcode(_or_last);
|
||||
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
InitInvisibleAtoms();
|
||||
InitWideAtoms();
|
||||
InitAtoms();
|
||||
|
||||
#include "iatoms.h"
|
||||
#ifdef EUROTRA
|
||||
Yap_heap_regs->term_dollar_u = MkAtomTerm(AtomDollarU);
|
||||
#endif
|
||||
Yap_heap_regs->term_prolog = MkAtomTerm(AtomProlog);
|
||||
Yap_heap_regs->term_refound_var = MkAtomTerm(AtomRefoundVar);
|
||||
Yap_heap_regs->user_module = MkAtomTerm(AtomUser);
|
||||
Yap_heap_regs->idb_module = MkAtomTerm(AtomIDB);
|
||||
Yap_heap_regs->attributes_module = MkAtomTerm(AtomAttributes);
|
||||
Yap_heap_regs->charsio_module = MkAtomTerm(AtomCharsio);
|
||||
Yap_heap_regs->terms_module = MkAtomTerm(AtomTerms);
|
||||
Yap_heap_regs->system_module = MkAtomTerm(AtomSystem);
|
||||
Yap_heap_regs->operating_system_module = MkAtomTerm(AtomOperatingSystemSupport);
|
||||
Yap_heap_regs->readutil_module = MkAtomTerm(AtomReadutil);
|
||||
Yap_heap_regs->hacks_module = MkAtomTerm(AtomYapHacks);
|
||||
Yap_heap_regs->arg_module = MkAtomTerm(AtomArg);
|
||||
Yap_heap_regs->globals_module = MkAtomTerm(AtomNb);
|
||||
Yap_heap_regs->swi_module = MkAtomTerm(AtomSwi);
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->current_modules = NULL;
|
||||
|
||||
|
||||
Yap_InitModules();
|
||||
|
||||
Yap_heap_regs->execution_mode = INTERPRETED;
|
||||
|
||||
InitPredHash();
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
#endif
|
||||
Yap_heap_regs->preds_in_hash_table = 0;
|
||||
|
||||
|
||||
Yap_heap_regs->creep_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomCreep,1),PROLOG_MODULE));
|
||||
Yap_heap_regs->undef_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomUndefp,1),PROLOG_MODULE));
|
||||
Yap_heap_regs->spy_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomSpy,1),PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_fail = RepPredProp(PredPropByAtom(AtomFail,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_true = RepPredProp(PredPropByAtom(AtomTrue,PROLOG_MODULE));
|
||||
#ifdef COROUTINING
|
||||
Yap_heap_regs->wake_up_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomWakeUpGoal,2),PROLOG_MODULE));
|
||||
#endif
|
||||
Yap_heap_regs->pred_goal_expansion = RepPredProp(PredPropByFunc(FunctorGoalExpansion,USER_MODULE));
|
||||
Yap_heap_regs->pred_meta_call = RepPredProp(PredPropByFunc(FunctorMetaCall,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_dollar_catch = RepPredProp(PredPropByFunc(FunctorCatch,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_recorded_with_key = RepPredProp(PredPropByFunc(FunctorRecordedWithKey,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_log_upd_clause = RepPredProp(PredPropByFunc(FunctorDoLogUpdClause,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_log_upd_clause_erase = RepPredProp(PredPropByFunc(FunctorDoLogUpdClauseErase,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_log_upd_clause0 = RepPredProp(PredPropByFunc(FunctorDoLogUpdClause,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_static_clause = RepPredProp(PredPropByFunc(FunctorDoStaticClause,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_throw = RepPredProp(PredPropByFunc(FunctorThrow,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_handle_throw = RepPredProp(PredPropByFunc(FunctorHandleThrow,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_is = RepPredProp(PredPropByFunc(FunctorIs,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_safe_call_cleanup = RepPredProp(PredPropByFunc(FunctorSafeCallCleanup,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_restore_regs = RepPredProp(PredPropByFunc(FunctorRestoreRegs,PROLOG_MODULE));
|
||||
#ifdef YAPOR
|
||||
Yap_heap_regs->pred_getwork = RepPredProp(PredPropByAtom(AtomGetwork,PROLOG_MODULE));
|
||||
Yap_heap_regs->pred_getwork_seq = RepPredProp(PredPropByAtom(AtomGetworkSeq,PROLOG_MODULE));
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
Yap_heap_regs->yap_do_low_level_trace = FALSE;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->low_level_trace_lock);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Yap_heap_regs->clause_space = 0;
|
||||
Yap_heap_regs->index_space_Tree = 0;
|
||||
Yap_heap_regs->index_space_EXT = 0;
|
||||
Yap_heap_regs->index_space_SW = 0;
|
||||
Yap_heap_regs->lu_clause_space = 0;
|
||||
Yap_heap_regs->lu_index_space_Tree = 0;
|
||||
Yap_heap_regs->lu_index_space_CP = 0;
|
||||
Yap_heap_regs->lu_index_space_EXT = 0;
|
||||
Yap_heap_regs->lu_index_space_SW = 0;
|
||||
|
||||
|
||||
Yap_heap_regs->dummycode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop);
|
||||
InitEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
|
||||
|
||||
InitEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
|
||||
|
||||
InitOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
|
||||
#ifdef BEAM
|
||||
Yap_heap_regs->beam_retry_code->opc = Yap_opcode(_beam_retry_code);
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
Yap_heap_regs->seq_def = FALSE;
|
||||
InitOtaplInst(GETWORK,_getwork,PredGetwork);
|
||||
InitOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
|
||||
Yap_heap_regs->getwork_first_time->opc = Yap_opcode(_getwork_first_time);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
InitOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
|
||||
InitOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
|
||||
InitOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
|
||||
InitOtaplInst(COMPLETION,_table_completion,PredFail);
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->debugger_p_before_spy = NULL;
|
||||
|
||||
Yap_heap_regs->retry_recordedp_code = NULL;
|
||||
Yap_heap_regs->retry_recorded_k_code = NULL;
|
||||
|
||||
Yap_heap_regs->system_profiling = FALSE;
|
||||
Yap_heap_regs->system_call_counting = FALSE;
|
||||
Yap_heap_regs->system_pred_goal_expansion_all = FALSE;
|
||||
Yap_heap_regs->system_pred_goal_expansion_func = FALSE;
|
||||
Yap_heap_regs->system_pred_goal_expansion_on = FALSE;
|
||||
Yap_heap_regs->compiler_optimizer_on = TRUE;
|
||||
Yap_heap_regs->compiler_compile_mode = 0;
|
||||
Yap_heap_regs->compiler_profiling = FALSE;
|
||||
Yap_heap_regs->compiler_call_counting = FALSE;
|
||||
|
||||
Yap_heap_regs->compiler_compile_arrays = FALSE;
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->dbterms_list_lock);
|
||||
#endif
|
||||
Yap_heap_regs->dbterms_list = NULL;
|
||||
|
||||
Yap_heap_regs->expand_clauses_first = NULL;
|
||||
Yap_heap_regs->expand_clauses_last = NULL;
|
||||
Yap_heap_regs->expand_clauses = 0;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->expand_clauses_list_lock);
|
||||
INIT_LOCK(Yap_heap_regs->op_list_lock);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
Yap_heap_regs->new_cps = 0L;
|
||||
Yap_heap_regs->live_cps = 0L;
|
||||
Yap_heap_regs->dirty_cps = 0L;
|
||||
Yap_heap_regs->freed_cps = 0L;
|
||||
#endif
|
||||
Yap_heap_regs->expand_clauses_sz = 0L;
|
||||
|
||||
Yap_heap_regs->udi_control_blocks = NULL;
|
||||
|
||||
|
||||
Yap_heap_regs->static_predicates_marked = FALSE;
|
||||
|
||||
Yap_heap_regs->IntKeys = NULL;
|
||||
Yap_heap_regs->IntLUKeys = NULL;
|
||||
Yap_heap_regs->IntBBKeys = NULL;
|
||||
|
||||
Yap_heap_regs->int_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||
Yap_heap_regs->int_keys_timestamp = 0L;
|
||||
Yap_heap_regs->int_bb_keys_size = INT_KEYS_DEFAULT_SIZE;
|
||||
|
||||
Yap_heap_regs->update_mode = UPDATE_MODE_LOGICAL;
|
||||
|
||||
InitDBErasedMarker();
|
||||
InitLogDBErasedMarker();
|
||||
|
||||
Yap_heap_regs->dead_static_clauses = NULL;
|
||||
Yap_heap_regs->dead_mega_clauses = NULL;
|
||||
Yap_heap_regs->dead_static_indices = NULL;
|
||||
Yap_heap_regs->db_erased_list = NULL;
|
||||
Yap_heap_regs->db_erased_ilist = NULL;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(Yap_heap_regs->dead_static_clauses_lock);
|
||||
INIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock);
|
||||
INIT_LOCK(Yap_heap_regs->dead_static_indices_lock);
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
Yap_heap_regs->num_of_atts = 1;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
InitFlags();
|
||||
|
||||
Yap_heap_regs->op_list = NULL;
|
||||
|
||||
|
||||
Yap_heap_regs->yap_streams = NULL;
|
||||
|
||||
Yap_heap_regs->n_of_file_aliases = 0;
|
||||
Yap_heap_regs->sz_of_file_aliases = 0;
|
||||
Yap_heap_regs->file_aliases = NULL;
|
||||
|
||||
Yap_heap_regs->atprompt = AtomNil;
|
||||
|
||||
|
||||
Yap_heap_regs->char_conversion_table = NULL;
|
||||
Yap_heap_regs->char_conversion_table2 = NULL;
|
||||
|
||||
Yap_heap_regs->parser_error_style = EXCEPTION_ON_PARSER_ERROR;
|
||||
|
||||
Yap_heap_regs->yap_lib_dir = NULL;
|
||||
|
||||
Yap_heap_regs->last_wtime = NULL;
|
||||
|
||||
Yap_heap_regs->debugger_output_msg = 0L;
|
||||
#if LOW_PROF
|
||||
Yap_heap_regs->profiler_on = FALSE;
|
||||
Yap_heap_regs->offline_profiler = FALSE;
|
||||
Yap_heap_regs->f_prof = NULL;
|
||||
Yap_heap_regs->f_preds = NULL;
|
||||
Yap_heap_regs->prof_preds = 0L;
|
||||
#endif /* LOW_PROF */
|
||||
|
||||
Yap_heap_regs->foreign_code_loaded = NULL;
|
||||
Yap_heap_regs->foreign_code_base = NULL;
|
||||
Yap_heap_regs->foreign_code_top = NULL;
|
||||
Yap_heap_regs->foreign_code_max = NULL;
|
||||
|
||||
Yap_heap_regs->yap_records = NULL;
|
||||
|
||||
InitSWIAtoms();
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->swi_blob_types = NULL;
|
||||
Yap_heap_regs->swi_blobs = NULL;
|
||||
|
422
H/rglobals.h
422
H/rglobals.h
@ -1,211 +1,211 @@
|
||||
|
||||
/* This file, rglobals.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void RestoreWorker(int wid USES_REGS) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
FOREIGN_WL(wid)->global_arena = TermToGlobalOrAtomAdjust(FOREIGN_WL(wid)->global_arena);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreBallTerm(wid);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef COROUTINING
|
||||
FOREIGN_WL(wid)->woken_goals = TermToGlobalAdjust(FOREIGN_WL(wid)->woken_goals);
|
||||
FOREIGN_WL(wid)->atts_mutable_list = TermToGlobalAdjust(FOREIGN_WL(wid)->atts_mutable_list);
|
||||
#endif
|
||||
|
||||
FOREIGN_WL(wid)->gc_generation = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_generation);
|
||||
FOREIGN_WL(wid)->gc_phase = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_phase);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if LOW_LEVEL_TRACER
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(FOREIGN_WL(wid)->signal_lock);
|
||||
|
||||
|
||||
|
||||
|
||||
#if DEBUG && COROUTINING
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if GC_NO_TAGS
|
||||
|
||||
#endif
|
||||
#if defined(TABLING) || defined(SBA)
|
||||
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
|
||||
FOREIGN_WL(wid)->dynamic_arrays = PtoArrayEAdjust(FOREIGN_WL(wid)->dynamic_arrays);
|
||||
FOREIGN_WL(wid)->static_arrays = PtoArraySAdjust(FOREIGN_WL(wid)->static_arrays);
|
||||
FOREIGN_WL(wid)->global_variables = PtoGlobalEAdjust(FOREIGN_WL(wid)->global_variables);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void RestoreGlobal(void) {
|
||||
|
||||
#if THREADS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
REINIT_LOCK(Yap_global->bgl);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if HAVE_LIBREADLINE
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
REINIT_LOCK(Yap_global->thread_handles_lock);
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* This file, rglobals.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void RestoreWorker(int wid USES_REGS) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
FOREIGN_WL(wid)->global_arena = TermToGlobalOrAtomAdjust(FOREIGN_WL(wid)->global_arena);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreBallTerm(wid);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef COROUTINING
|
||||
FOREIGN_WL(wid)->woken_goals = TermToGlobalAdjust(FOREIGN_WL(wid)->woken_goals);
|
||||
FOREIGN_WL(wid)->atts_mutable_list = TermToGlobalAdjust(FOREIGN_WL(wid)->atts_mutable_list);
|
||||
#endif
|
||||
|
||||
FOREIGN_WL(wid)->gc_generation = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_generation);
|
||||
FOREIGN_WL(wid)->gc_phase = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_phase);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if LOW_LEVEL_TRACER
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(FOREIGN_WL(wid)->signal_lock);
|
||||
|
||||
|
||||
|
||||
|
||||
#if DEBUG && COROUTINING
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if GC_NO_TAGS
|
||||
|
||||
#endif
|
||||
#if defined(TABLING) || defined(SBA)
|
||||
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
|
||||
FOREIGN_WL(wid)->dynamic_arrays = PtoArrayEAdjust(FOREIGN_WL(wid)->dynamic_arrays);
|
||||
FOREIGN_WL(wid)->static_arrays = PtoArraySAdjust(FOREIGN_WL(wid)->static_arrays);
|
||||
FOREIGN_WL(wid)->global_variables = PtoGlobalEAdjust(FOREIGN_WL(wid)->global_variables);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void RestoreGlobal(void) {
|
||||
|
||||
#if THREADS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
REINIT_LOCK(Yap_global->bgl);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if HAVE_LIBREADLINE
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
REINIT_LOCK(Yap_global->thread_handles_lock);
|
||||
#endif
|
||||
|
||||
#if defined(YAPOR) || defined(TABLING)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
608
H/rhstruct.h
608
H/rhstruct.h
@ -1,304 +1,304 @@
|
||||
|
||||
/* This file, rhstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_DL_MALLOC
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->dlmalloc_lock);
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->free_blocks_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->heap_used_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->heap_top_lock);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
Yap_heap_regs->op_rtable = OpRTableAdjust(Yap_heap_regs->op_rtable);
|
||||
#endif
|
||||
|
||||
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
|
||||
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
||||
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
|
||||
Yap_heap_regs->orlast_op = Yap_opcode(_or_last);
|
||||
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreInvisibleAtoms();
|
||||
RestoreWideAtoms();
|
||||
RestoreAtoms();
|
||||
|
||||
#include "ratoms.h"
|
||||
#ifdef EUROTRA
|
||||
Yap_heap_regs->term_dollar_u = AtomTermAdjust(Yap_heap_regs->term_dollar_u);
|
||||
#endif
|
||||
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);
|
||||
Yap_heap_regs->system_module = AtomTermAdjust(Yap_heap_regs->system_module);
|
||||
Yap_heap_regs->operating_system_module = AtomTermAdjust(Yap_heap_regs->operating_system_module);
|
||||
Yap_heap_regs->readutil_module = AtomTermAdjust(Yap_heap_regs->readutil_module);
|
||||
Yap_heap_regs->hacks_module = AtomTermAdjust(Yap_heap_regs->hacks_module);
|
||||
Yap_heap_regs->arg_module = AtomTermAdjust(Yap_heap_regs->arg_module);
|
||||
Yap_heap_regs->globals_module = AtomTermAdjust(Yap_heap_regs->globals_module);
|
||||
Yap_heap_regs->swi_module = AtomTermAdjust(Yap_heap_regs->swi_module);
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->current_modules = ModEntryPtrAdjust(Yap_heap_regs->current_modules);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestorePredHash();
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->creep_code = PtoPredAdjust(Yap_heap_regs->creep_code);
|
||||
Yap_heap_regs->undef_code = PtoPredAdjust(Yap_heap_regs->undef_code);
|
||||
Yap_heap_regs->spy_code = PtoPredAdjust(Yap_heap_regs->spy_code);
|
||||
Yap_heap_regs->pred_fail = PtoPredAdjust(Yap_heap_regs->pred_fail);
|
||||
Yap_heap_regs->pred_true = PtoPredAdjust(Yap_heap_regs->pred_true);
|
||||
#ifdef COROUTINING
|
||||
Yap_heap_regs->wake_up_code = PtoPredAdjust(Yap_heap_regs->wake_up_code);
|
||||
#endif
|
||||
Yap_heap_regs->pred_goal_expansion = PtoPredAdjust(Yap_heap_regs->pred_goal_expansion);
|
||||
Yap_heap_regs->pred_meta_call = PtoPredAdjust(Yap_heap_regs->pred_meta_call);
|
||||
Yap_heap_regs->pred_dollar_catch = PtoPredAdjust(Yap_heap_regs->pred_dollar_catch);
|
||||
Yap_heap_regs->pred_recorded_with_key = PtoPredAdjust(Yap_heap_regs->pred_recorded_with_key);
|
||||
Yap_heap_regs->pred_log_upd_clause = PtoPredAdjust(Yap_heap_regs->pred_log_upd_clause);
|
||||
Yap_heap_regs->pred_log_upd_clause_erase = PtoPredAdjust(Yap_heap_regs->pred_log_upd_clause_erase);
|
||||
Yap_heap_regs->pred_log_upd_clause0 = PtoPredAdjust(Yap_heap_regs->pred_log_upd_clause0);
|
||||
Yap_heap_regs->pred_static_clause = PtoPredAdjust(Yap_heap_regs->pred_static_clause);
|
||||
Yap_heap_regs->pred_throw = PtoPredAdjust(Yap_heap_regs->pred_throw);
|
||||
Yap_heap_regs->pred_handle_throw = PtoPredAdjust(Yap_heap_regs->pred_handle_throw);
|
||||
Yap_heap_regs->pred_is = PtoPredAdjust(Yap_heap_regs->pred_is);
|
||||
Yap_heap_regs->pred_safe_call_cleanup = PtoPredAdjust(Yap_heap_regs->pred_safe_call_cleanup);
|
||||
Yap_heap_regs->pred_restore_regs = PtoPredAdjust(Yap_heap_regs->pred_restore_regs);
|
||||
#ifdef YAPOR
|
||||
Yap_heap_regs->pred_getwork = PtoPredAdjust(Yap_heap_regs->pred_getwork);
|
||||
Yap_heap_regs->pred_getwork_seq = PtoPredAdjust(Yap_heap_regs->pred_getwork_seq);
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->low_level_trace_lock);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->dummycode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop);
|
||||
RestoreEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
|
||||
|
||||
RestoreEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
|
||||
|
||||
RestoreOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
|
||||
#ifdef BEAM
|
||||
Yap_heap_regs->beam_retry_code->opc = Yap_opcode(_beam_retry_code);
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
|
||||
RestoreOtaplInst(GETWORK,_getwork,PredGetwork);
|
||||
RestoreOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
|
||||
Yap_heap_regs->getwork_first_time->opc = Yap_opcode(_getwork_first_time);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
RestoreOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
|
||||
RestoreOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
|
||||
RestoreOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
|
||||
RestoreOtaplInst(COMPLETION,_table_completion,PredFail);
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->debugger_p_before_spy = PtoOpAdjust(Yap_heap_regs->debugger_p_before_spy);
|
||||
|
||||
Yap_heap_regs->retry_recordedp_code = PtoOpAdjust(Yap_heap_regs->retry_recordedp_code);
|
||||
Yap_heap_regs->retry_recorded_k_code = PtoOpAdjust(Yap_heap_regs->retry_recorded_k_code);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->dbterms_list_lock);
|
||||
#endif
|
||||
RestoreDBTermsList();
|
||||
|
||||
|
||||
RestoreExpandList();
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->expand_clauses_list_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->op_list_lock);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
RestoreUdiControlBlocks();
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreIntKeys();
|
||||
RestoreIntLUKeys();
|
||||
RestoreIntBBKeys();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreDBErasedMarker();
|
||||
RestoreLogDBErasedMarker();
|
||||
|
||||
RestoreDeadStaticClauses();
|
||||
RestoreDeadMegaClauses();
|
||||
RestoreDeadStaticIndices();
|
||||
RestoreDBErasedList();
|
||||
RestoreDBErasedIList();
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->dead_static_clauses_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->dead_static_indices_lock);
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->op_list = OpListAdjust(Yap_heap_regs->op_list);
|
||||
|
||||
|
||||
RestoreStreams();
|
||||
|
||||
|
||||
|
||||
RestoreAliases();
|
||||
|
||||
Yap_heap_regs->atprompt = AtomAdjust(Yap_heap_regs->atprompt);
|
||||
|
||||
|
||||
Yap_heap_regs->char_conversion_table = CodeCharPAdjust(Yap_heap_regs->char_conversion_table);
|
||||
Yap_heap_regs->char_conversion_table2 = CodeCharPAdjust(Yap_heap_regs->char_conversion_table2);
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->yap_lib_dir = CodeCharPAdjust(Yap_heap_regs->yap_lib_dir);
|
||||
|
||||
Yap_heap_regs->last_wtime = CodeVoidPAdjust(Yap_heap_regs->last_wtime);
|
||||
|
||||
|
||||
#if LOW_PROF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* LOW_PROF */
|
||||
|
||||
RestoreForeignCode();
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreYapRecords();
|
||||
|
||||
RestoreSWIAtoms();
|
||||
|
||||
|
||||
|
||||
RestoreSWIBlobTypes();
|
||||
RestoreSWIBlobs();
|
||||
|
||||
/* This file, rhstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_DL_MALLOC
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->dlmalloc_lock);
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->free_blocks_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->heap_used_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->heap_top_lock);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
Yap_heap_regs->op_rtable = OpRTableAdjust(Yap_heap_regs->op_rtable);
|
||||
#endif
|
||||
|
||||
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
|
||||
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
||||
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
|
||||
Yap_heap_regs->orlast_op = Yap_opcode(_or_last);
|
||||
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreInvisibleAtoms();
|
||||
RestoreWideAtoms();
|
||||
RestoreAtoms();
|
||||
|
||||
#include "ratoms.h"
|
||||
#ifdef EUROTRA
|
||||
Yap_heap_regs->term_dollar_u = AtomTermAdjust(Yap_heap_regs->term_dollar_u);
|
||||
#endif
|
||||
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);
|
||||
Yap_heap_regs->system_module = AtomTermAdjust(Yap_heap_regs->system_module);
|
||||
Yap_heap_regs->operating_system_module = AtomTermAdjust(Yap_heap_regs->operating_system_module);
|
||||
Yap_heap_regs->readutil_module = AtomTermAdjust(Yap_heap_regs->readutil_module);
|
||||
Yap_heap_regs->hacks_module = AtomTermAdjust(Yap_heap_regs->hacks_module);
|
||||
Yap_heap_regs->arg_module = AtomTermAdjust(Yap_heap_regs->arg_module);
|
||||
Yap_heap_regs->globals_module = AtomTermAdjust(Yap_heap_regs->globals_module);
|
||||
Yap_heap_regs->swi_module = AtomTermAdjust(Yap_heap_regs->swi_module);
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->current_modules = ModEntryPtrAdjust(Yap_heap_regs->current_modules);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestorePredHash();
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->creep_code = PtoPredAdjust(Yap_heap_regs->creep_code);
|
||||
Yap_heap_regs->undef_code = PtoPredAdjust(Yap_heap_regs->undef_code);
|
||||
Yap_heap_regs->spy_code = PtoPredAdjust(Yap_heap_regs->spy_code);
|
||||
Yap_heap_regs->pred_fail = PtoPredAdjust(Yap_heap_regs->pred_fail);
|
||||
Yap_heap_regs->pred_true = PtoPredAdjust(Yap_heap_regs->pred_true);
|
||||
#ifdef COROUTINING
|
||||
Yap_heap_regs->wake_up_code = PtoPredAdjust(Yap_heap_regs->wake_up_code);
|
||||
#endif
|
||||
Yap_heap_regs->pred_goal_expansion = PtoPredAdjust(Yap_heap_regs->pred_goal_expansion);
|
||||
Yap_heap_regs->pred_meta_call = PtoPredAdjust(Yap_heap_regs->pred_meta_call);
|
||||
Yap_heap_regs->pred_dollar_catch = PtoPredAdjust(Yap_heap_regs->pred_dollar_catch);
|
||||
Yap_heap_regs->pred_recorded_with_key = PtoPredAdjust(Yap_heap_regs->pred_recorded_with_key);
|
||||
Yap_heap_regs->pred_log_upd_clause = PtoPredAdjust(Yap_heap_regs->pred_log_upd_clause);
|
||||
Yap_heap_regs->pred_log_upd_clause_erase = PtoPredAdjust(Yap_heap_regs->pred_log_upd_clause_erase);
|
||||
Yap_heap_regs->pred_log_upd_clause0 = PtoPredAdjust(Yap_heap_regs->pred_log_upd_clause0);
|
||||
Yap_heap_regs->pred_static_clause = PtoPredAdjust(Yap_heap_regs->pred_static_clause);
|
||||
Yap_heap_regs->pred_throw = PtoPredAdjust(Yap_heap_regs->pred_throw);
|
||||
Yap_heap_regs->pred_handle_throw = PtoPredAdjust(Yap_heap_regs->pred_handle_throw);
|
||||
Yap_heap_regs->pred_is = PtoPredAdjust(Yap_heap_regs->pred_is);
|
||||
Yap_heap_regs->pred_safe_call_cleanup = PtoPredAdjust(Yap_heap_regs->pred_safe_call_cleanup);
|
||||
Yap_heap_regs->pred_restore_regs = PtoPredAdjust(Yap_heap_regs->pred_restore_regs);
|
||||
#ifdef YAPOR
|
||||
Yap_heap_regs->pred_getwork = PtoPredAdjust(Yap_heap_regs->pred_getwork);
|
||||
Yap_heap_regs->pred_getwork_seq = PtoPredAdjust(Yap_heap_regs->pred_getwork_seq);
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->low_level_trace_lock);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->dummycode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail);
|
||||
Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop);
|
||||
RestoreEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
|
||||
|
||||
RestoreEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
|
||||
|
||||
RestoreOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
|
||||
#ifdef BEAM
|
||||
Yap_heap_regs->beam_retry_code->opc = Yap_opcode(_beam_retry_code);
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
|
||||
RestoreOtaplInst(GETWORK,_getwork,PredGetwork);
|
||||
RestoreOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
|
||||
Yap_heap_regs->getwork_first_time->opc = Yap_opcode(_getwork_first_time);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
RestoreOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
|
||||
RestoreOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
|
||||
RestoreOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
|
||||
RestoreOtaplInst(COMPLETION,_table_completion,PredFail);
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->debugger_p_before_spy = PtoOpAdjust(Yap_heap_regs->debugger_p_before_spy);
|
||||
|
||||
Yap_heap_regs->retry_recordedp_code = PtoOpAdjust(Yap_heap_regs->retry_recordedp_code);
|
||||
Yap_heap_regs->retry_recorded_k_code = PtoOpAdjust(Yap_heap_regs->retry_recorded_k_code);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->dbterms_list_lock);
|
||||
#endif
|
||||
RestoreDBTermsList();
|
||||
|
||||
|
||||
RestoreExpandList();
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->expand_clauses_list_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->op_list_lock);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
RestoreUdiControlBlocks();
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreIntKeys();
|
||||
RestoreIntLUKeys();
|
||||
RestoreIntBBKeys();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreDBErasedMarker();
|
||||
RestoreLogDBErasedMarker();
|
||||
|
||||
RestoreDeadStaticClauses();
|
||||
RestoreDeadMegaClauses();
|
||||
RestoreDeadStaticIndices();
|
||||
RestoreDBErasedList();
|
||||
RestoreDBErasedIList();
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_heap_regs->dead_static_clauses_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock);
|
||||
REINIT_LOCK(Yap_heap_regs->dead_static_indices_lock);
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->op_list = OpListAdjust(Yap_heap_regs->op_list);
|
||||
|
||||
|
||||
RestoreStreams();
|
||||
|
||||
|
||||
|
||||
RestoreAliases();
|
||||
|
||||
Yap_heap_regs->atprompt = AtomAdjust(Yap_heap_regs->atprompt);
|
||||
|
||||
|
||||
Yap_heap_regs->char_conversion_table = CodeCharPAdjust(Yap_heap_regs->char_conversion_table);
|
||||
Yap_heap_regs->char_conversion_table2 = CodeCharPAdjust(Yap_heap_regs->char_conversion_table2);
|
||||
|
||||
|
||||
|
||||
Yap_heap_regs->yap_lib_dir = CodeCharPAdjust(Yap_heap_regs->yap_lib_dir);
|
||||
|
||||
Yap_heap_regs->last_wtime = CodeVoidPAdjust(Yap_heap_regs->last_wtime);
|
||||
|
||||
|
||||
#if LOW_PROF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* LOW_PROF */
|
||||
|
||||
RestoreForeignCode();
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreYapRecords();
|
||||
|
||||
RestoreSWIAtoms();
|
||||
|
||||
|
||||
|
||||
RestoreSWIBlobTypes();
|
||||
RestoreSWIBlobs();
|
||||
|
@ -325,6 +325,7 @@ YAPDOCS=$(srcdir)/docs/yap.tex $(srcdir)/docs/chr.tex \
|
||||
IOLIB_OBJECTS=pl-buffer.o pl-codelist.o pl-ctype.o pl-dtoa.o pl-error.o \
|
||||
pl-file.o pl-files.o pl-fmt.o \
|
||||
pl-glob.o pl-option.o \
|
||||
pl-nt.o \
|
||||
pl-os.o pl-privitf.o \
|
||||
pl-read.o \
|
||||
pl-rl.o \
|
||||
@ -384,7 +385,6 @@ LIB_OBJECTS = $(ENGINE_OBJECTS) $(C_INTERFACE_OBJECTS) $(OR_OBJECTS) $(BEAM_OBJE
|
||||
OBJECTS = yap.o $(LIB_OBJECTS)
|
||||
|
||||
PLCONS_OBJECTS = \
|
||||
pl-nt.o \
|
||||
pl-ntcon.o \
|
||||
pl-ntconsole.o \
|
||||
pl-ntmain.o
|
||||
@ -552,8 +552,8 @@ regfree.o: $(srcdir)/library/regex/regfree.c $(srcdir)/library/regex/regex2.h co
|
||||
regexec.o: $(srcdir)/library/regex/regexec.c config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/library/regex $(srcdir)/library/regex/regexec.c -o regexec.o
|
||||
|
||||
pl-nt.o: $(srcdir)/console/LGPL/pl-nt.c config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/packages/PLStream $(srcdir)/console/LGPL/pl-nt.c -o $@
|
||||
pl-nt.o: $(srcdir)/packages/PLStream/pl-nt.c config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/packages/PLStream @EXTRA_INCLUDES_FOR_WIN32@ $(srcdir)/packages/PLStream/pl-nt.c -o $@
|
||||
|
||||
pl-ntcon.o: $(srcdir)/console/LGPL/pl-ntcon.c config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/console/LGPL/pl-ntcon.c -o $@
|
||||
@ -565,7 +565,7 @@ pl-ntmain.o: $(srcdir)/console/LGPL/pl-ntmain.c config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/packages/PLStream @EXTRA_INCLUDES_FOR_WIN32@ < $(srcdir)/console/LGPL/pl-ntmain.c -o $@
|
||||
|
||||
pl-buffer.o: $(srcdir)/packages/PLStream/pl-buffer.c
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/packages/PLStream @EXTRA_INCLUDES_FOR_WIN32@ $(srcdir)/packages/PLStream/pl-buffer.c -o $@
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/packages/PLStream @EXTRA_INCLUDES_FOR_WIN32@ $(srcdir)/packages/PLStream/pl-buffer.c -o $@
|
||||
|
||||
pl-codelist.o: $(srcdir)/packages/PLStream/pl-codelist.c
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/packages/PLStream @EXTRA_INCLUDES_FOR_WIN32@ $(srcdir)/packages/PLStream/pl-codelist.c -o $@
|
||||
|
@ -176,6 +176,8 @@
|
||||
#undef HAVE_ASINH
|
||||
#undef HAVE_ATANH
|
||||
#undef HAVE_CHDIR
|
||||
#undef HAVE_CLOCK
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
#undef HAVE_CTIME
|
||||
#undef HAVE_DLOPEN
|
||||
#undef HAVE_DUP2
|
||||
@ -291,6 +293,9 @@
|
||||
#define TYPE_SELECT_
|
||||
#define MYTYPE(X) MYTYPE1#X
|
||||
|
||||
#undef HAVE_VAR_TIMEZONE
|
||||
#undef HAVE_STRUCT_TIME_TM_GMTOFF
|
||||
|
||||
/* define how to pass the address of a function */
|
||||
#define FunAdr(Fn) Fn
|
||||
|
||||
|
232
configure
vendored
232
configure
vendored
@ -813,9 +813,6 @@ LIBS
|
||||
CPPFLAGS
|
||||
CXX
|
||||
CXXFLAGS
|
||||
LDFLAGS
|
||||
LIBS
|
||||
CPPFLAGS
|
||||
CCC
|
||||
CPP'
|
||||
|
||||
@ -2136,60 +2133,6 @@ rm -f conftest.val
|
||||
|
||||
} # ac_fn_c_compute_int
|
||||
|
||||
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
|
||||
# -------------------------------------------
|
||||
# Tests whether TYPE exists after having included INCLUDES, setting cache
|
||||
# variable VAR accordingly.
|
||||
ac_fn_c_check_type ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
eval "$3=no"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (sizeof ($2))
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (sizeof (($2)))
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
else
|
||||
eval "$3=yes"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_c_check_type
|
||||
|
||||
# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
|
||||
# ----------------------------------------------------
|
||||
# Tries to find if the field MEMBER exists in type AGGR, after including
|
||||
@ -2246,6 +2189,60 @@ $as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_c_check_member
|
||||
|
||||
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
|
||||
# -------------------------------------------
|
||||
# Tests whether TYPE exists after having included INCLUDES, setting cache
|
||||
# variable VAR accordingly.
|
||||
ac_fn_c_check_type ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
eval "$3=no"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (sizeof ($2))
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (sizeof (($2)))
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
else
|
||||
eval "$3=yes"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_c_check_type
|
||||
cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
@ -2509,7 +2506,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
|
||||
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "failed to load site script $ac_site_file
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
fi
|
||||
done
|
||||
|
||||
@ -2904,7 +2901,7 @@ fi
|
||||
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "no acceptable C compiler found in \$PATH
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
|
||||
# Provide some information about the compiler.
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
|
||||
@ -3019,7 +3016,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error 77 "C compiler cannot create executables
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
@ -3062,7 +3059,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
fi
|
||||
rm -f conftest conftest$ac_cv_exeext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
|
||||
@ -3121,7 +3118,7 @@ $as_echo "$ac_try_echo"; } >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot run C compiled programs.
|
||||
If you meant to cross compile, use \`--host'.
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -3173,7 +3170,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot compute suffix of object files: cannot compile
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
fi
|
||||
rm -f conftest.$ac_cv_objext conftest.$ac_ext
|
||||
fi
|
||||
@ -4235,7 +4232,7 @@ fi
|
||||
$as_echo "$ac_cv_build" >&6; }
|
||||
case $ac_cv_build in
|
||||
*-*-*) ;;
|
||||
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
|
||||
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
|
||||
esac
|
||||
build=$ac_cv_build
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
@ -4268,7 +4265,7 @@ fi
|
||||
$as_echo "$ac_cv_host" >&6; }
|
||||
case $ac_cv_host in
|
||||
*-*-*) ;;
|
||||
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
|
||||
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
|
||||
esac
|
||||
host=$ac_cv_host
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
@ -4301,7 +4298,7 @@ fi
|
||||
$as_echo "$ac_cv_target" >&6; }
|
||||
case $ac_cv_target in
|
||||
*-*-*) ;;
|
||||
*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
|
||||
*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
|
||||
esac
|
||||
target=$ac_cv_target
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
@ -5060,6 +5057,7 @@ fi
|
||||
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
|
||||
then
|
||||
INSTALL_COMMAND=install_win32
|
||||
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
||||
if test "$cygwin" = "no" -o "$target_os" = "mingw32"
|
||||
then
|
||||
if test "$target_win64" = yes
|
||||
@ -5104,8 +5102,7 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
EXTRA_LIBS_FOR_DLLS="-lws2_32 \$(abs_top_builddir)/yap.dll"
|
||||
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
||||
EXTRA_LIBS_FOR_DLLS="-lws2_32"
|
||||
elif test "$target_os" = "cygwin"
|
||||
then
|
||||
CC="${CC} -mno-cygwin"
|
||||
@ -5149,8 +5146,6 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
|
||||
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwsock32" >&5
|
||||
$as_echo_n "checking for main in -lwsock32... " >&6; }
|
||||
@ -5191,8 +5186,8 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
|
||||
fi
|
||||
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS \$(abs_top_builddir)/yap.dll"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpsapi" >&5
|
||||
$as_echo_n "checking for main in -lpsapi... " >&6; }
|
||||
if ${ac_cv_lib_psapi_main+:} false; then :
|
||||
@ -5671,7 +5666,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "--with-readline was given, but test for readline failed
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
fi
|
||||
|
||||
fi
|
||||
@ -6042,7 +6037,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
@ -6727,7 +6722,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
@ -6791,7 +6786,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot run test program while cross compiling
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
@ -8125,7 +8120,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error 77 "cannot compute sizeof (int *)
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
ac_cv_sizeof_int_p=0
|
||||
fi
|
||||
@ -8158,7 +8153,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error 77 "cannot compute sizeof (short int)
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
ac_cv_sizeof_short_int=0
|
||||
fi
|
||||
@ -8191,7 +8186,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error 77 "cannot compute sizeof (int)
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
ac_cv_sizeof_int=0
|
||||
fi
|
||||
@ -8224,7 +8219,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error 77 "cannot compute sizeof (long int)
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
ac_cv_sizeof_long_int=0
|
||||
fi
|
||||
@ -8257,7 +8252,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error 77 "cannot compute sizeof (long long int)
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
ac_cv_sizeof_long_long_int=0
|
||||
fi
|
||||
@ -8290,7 +8285,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error 77 "cannot compute sizeof (float)
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
ac_cv_sizeof_float=0
|
||||
fi
|
||||
@ -8323,7 +8318,7 @@ else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error 77 "cannot compute sizeof (double)
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
See \`config.log' for more details" "$LINENO" 5 ; }
|
||||
else
|
||||
ac_cv_sizeof_double=0
|
||||
fi
|
||||
@ -8733,6 +8728,57 @@ $as_echo "#define HAVE_SIGINFO 0" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"variable timezone in tzset\"" >&5
|
||||
$as_echo_n "checking \"variable timezone in tzset\"... " >&6; }
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming no" >&5
|
||||
$as_echo "assuming no" >&6; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef __CYGWIN__
|
||||
#define timezone _timezone
|
||||
#endif
|
||||
extern long timezone;
|
||||
|
||||
main()
|
||||
{ tzset();
|
||||
|
||||
if ( timezone > -15*3600 &&
|
||||
timezone < 15*3600 &&
|
||||
timezone % 60 == 0 )
|
||||
return 0;
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
$as_echo "#define HAVE_VAR_TIMEZONE 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
|
||||
"
|
||||
if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_STRUCT_TIME_TM_GMTOFF /**/" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking union wait" >&5
|
||||
$as_echo_n "checking union wait... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
@ -8840,7 +8886,19 @@ _ACEOF
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in alloca asinh atanh chdir ctime dlopen dup2
|
||||
for ac_func in alloca asinh atanh chdir clock clock_gettime
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in ctime dlopen dup2
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
@ -10526,7 +10584,7 @@ do
|
||||
"packages/swi-minisat2/Makefile") CONFIG_FILES="$CONFIG_FILES packages/swi-minisat2/Makefile" ;;
|
||||
"packages/swi-minisat2/C/Makefile") CONFIG_FILES="$CONFIG_FILES packages/swi-minisat2/C/Makefile" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -10843,7 +10901,7 @@ do
|
||||
esac
|
||||
case $ac_mode$ac_tag in
|
||||
:[FHL]*:*);;
|
||||
:L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
|
||||
:L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
|
||||
:[FH]-) ac_tag=-:-;;
|
||||
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
|
||||
esac
|
||||
@ -10871,7 +10929,7 @@ do
|
||||
[\\/$]*) false;;
|
||||
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
|
||||
esac ||
|
||||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
|
||||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
|
||||
esac
|
||||
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
|
||||
as_fn_append ac_file_inputs " '$ac_f'"
|
||||
@ -10898,7 +10956,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
|
||||
|
||||
case $ac_tag in
|
||||
*:-:* | *:-) cat >"$ac_tmp/stdin" \
|
||||
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
|
||||
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
43
configure.in
43
configure.in
@ -559,24 +559,22 @@ dnl
|
||||
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
|
||||
then
|
||||
INSTALL_COMMAND=install_win32
|
||||
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
||||
if test "$cygwin" = "no" -o "$target_os" = "mingw32"
|
||||
then
|
||||
if test "$target_win64" = yes
|
||||
then
|
||||
AC_CHECK_LIB(ws2_32,main)
|
||||
EXTRA_LIBS_FOR_DLLS="-lws2_32 \$(abs_top_builddir)/yap.dll"
|
||||
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
||||
EXTRA_LIBS_FOR_DLLS="-lws2_32"
|
||||
elif test "$target_os" = "cygwin"
|
||||
then
|
||||
CC="${CC} -mno-cygwin"
|
||||
CXX="${CXX} -mno-cygwin"
|
||||
AC_CHECK_LIB(wsock32,main)
|
||||
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
|
||||
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
||||
else
|
||||
AC_CHECK_LIB(wsock32,main)
|
||||
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
|
||||
fi
|
||||
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS \$(abs_top_builddir)/yap.dll"
|
||||
AC_CHECK_LIB(psapi,main)
|
||||
yap_cv_readline=no
|
||||
if test "$target_win64" = yes
|
||||
@ -1639,6 +1637,38 @@ else
|
||||
AC_DEFINE(HAVE_SIGINFO,0)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING("variable timezone in tzset")
|
||||
AC_TRY_RUN(
|
||||
[ #include <time.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef __CYGWIN__
|
||||
#define timezone _timezone
|
||||
#endif
|
||||
extern long timezone;
|
||||
|
||||
main()
|
||||
{ tzset();
|
||||
|
||||
if ( timezone > -15*3600 &&
|
||||
timezone < 15*3600 &&
|
||||
timezone % 60 == 0 )
|
||||
return 0;
|
||||
|
||||
exit(1);
|
||||
}
|
||||
],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_VAR_TIMEZONE, 1,
|
||||
[Define if tzset sets timezone variable]),
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(assuming no))
|
||||
|
||||
AC_CHECK_MEMBER(struct tm.tm_gmtoff,
|
||||
AC_DEFINE(HAVE_STRUCT_TIME_TM_GMTOFF, [],
|
||||
[Define is struct tm has tm_gmtoff]),
|
||||
[],
|
||||
[#include <time.h>])
|
||||
|
||||
dnl this is copied from the Tcl code
|
||||
dnl this code checks whether the system defines an union wait
|
||||
AC_MSG_CHECKING([union wait])
|
||||
@ -1667,7 +1697,8 @@ fi
|
||||
dnl Checks for library functions.
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS(_NSGetEnviron access acosh)
|
||||
AC_CHECK_FUNCS(alloca asinh atanh chdir ctime dlopen dup2)
|
||||
AC_CHECK_FUNCS(alloca asinh atanh chdir clock clock_gettime)
|
||||
AC_CHECK_FUNCS(ctime dlopen dup2)
|
||||
AC_CHECK_FUNCS(erf feclearexcept)
|
||||
AC_CHECK_FUNCS(fesettrapenable fgetpos finite fpclass ftime getcwd getenv)
|
||||
AC_CHECK_FUNCS(gethostbyname gethostent gethostid gethostname)
|
||||
|
2
misc/HEAPFIELDS
Normal file → Executable file
2
misc/HEAPFIELDS
Normal file → Executable file
@ -303,7 +303,7 @@ struct AliasDescS *file_aliases FileAliases =NULL RestoreAliases()
|
||||
|
||||
/* prompting */
|
||||
Atom atprompt AtPrompt =AtomNil AtomAdjust
|
||||
char prompt[MAX_PROMPT] Prompt void void
|
||||
char _prompt[MAX_PROMPT] YapPrompt void void
|
||||
|
||||
/* ISO char conversion: I will make no comments */
|
||||
char *char_conversion_table CharConversionTable =NULL CodeCharPAdjust
|
||||
|
@ -22,13 +22,13 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#ifdef __MINGW32__
|
||||
#define __WINDOWS__ 1
|
||||
#endif
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#if (_MSC_VER >= 1300)
|
||||
#if (_MSC_VER >= 1300) || defined(__MINGW32__)
|
||||
#include <winsock2.h> /* Needed on VC8 */
|
||||
#include <windows.h>
|
||||
#else
|
||||
@ -244,7 +244,6 @@ ftruncate(int fileno, int64_t length)
|
||||
}
|
||||
|
||||
|
||||
#ifndef _YAP_NOT_INSTALLED_
|
||||
/*******************************
|
||||
* QUERY CPU TIME *
|
||||
*******************************/
|
||||
@ -280,7 +279,6 @@ CpuTime(cputime_kind which)
|
||||
return t;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int
|
||||
CpuCount()
|
||||
@ -367,7 +365,7 @@ get_showCmd(term_t show, int *cmd)
|
||||
succeed;
|
||||
}
|
||||
|
||||
if ( !PL_get_chars_ex(show, &s, CVT_ATOM) )
|
||||
if ( !PL_get_chars(show, &s, CVT_ATOM|CVT_EXCEPTION) )
|
||||
fail;
|
||||
for(st=types; st->name; st++)
|
||||
{ if ( streq(st->name, s) )
|
||||
@ -574,7 +572,7 @@ pl_win_module_file(term_t module, term_t file)
|
||||
char *m;
|
||||
char *f;
|
||||
|
||||
if ( !PL_get_chars_ex(module, &m, CVT_ALL) )
|
||||
if ( !PL_get_chars(module, &m, CVT_ALL|CVT_EXCEPTION) )
|
||||
fail;
|
||||
if ( (f = findExecutable(m, buf)) )
|
||||
return PL_unify_atom_chars(file, f);
|
@ -62,6 +62,40 @@ extern long timezone;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
||||
struct tm *localtime_r (const time_t *, struct tm *);
|
||||
struct tm *gmtime_r (const time_t *, struct tm *);
|
||||
|
||||
struct tm *
|
||||
localtime_r (const time_t *timer, struct tm *result)
|
||||
{
|
||||
struct tm *local_result;
|
||||
local_result = localtime (timer);
|
||||
|
||||
if (local_result == NULL || result == NULL)
|
||||
return NULL;
|
||||
|
||||
memcpy (result, local_result, sizeof (result));
|
||||
return result;
|
||||
}
|
||||
|
||||
struct tm *
|
||||
gmtime_r (const time_t *timer, struct tm *result)
|
||||
{
|
||||
struct tm *local_result;
|
||||
local_result = gmtime (timer);
|
||||
|
||||
if (local_result == NULL || result == NULL)
|
||||
return NULL;
|
||||
|
||||
memcpy (result, local_result, sizeof (result));
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define TAI_UTC_OFFSET LL(4611686018427387914)
|
||||
|
||||
|
Reference in New Issue
Block a user