WIN32 patches

This commit is contained in:
U-WIN-ENP104VVO3U\Vítor Santos Costa 2011-03-21 17:07:58 +00:00
parent 417bbd6d46
commit 7670ce631b
18 changed files with 2296 additions and 2175 deletions

View File

@ -862,7 +862,7 @@ ExtendWorkSpace(Int s, int fixed_allocation)
} }
brk = (LPVOID) ((Int) b + s); brk = (LPVOID) ((Int) b + s);
#if DEBUG_WIN32_ALLOC #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 #endif
Yap_PrologMode = OldPrologMode; Yap_PrologMode = OldPrologMode;
return TRUE; return TRUE;

View File

@ -1200,8 +1200,8 @@ Yap_InitThread(int new_id)
static void static void
InitFirstWorkerThreadHandle(void) InitFirstWorkerThreadHandle(void)
{ {
CACHE_REGS
#ifdef THREADS #ifdef THREADS
CACHE_REGS
ThreadHandle.id = 0; ThreadHandle.id = 0;
ThreadHandle.in_use = TRUE; ThreadHandle.in_use = TRUE;
ThreadHandle.default_yaam_regs = ThreadHandle.default_yaam_regs =
@ -1256,8 +1256,8 @@ static void
InitCodes(void) InitCodes(void)
{ {
CACHE_REGS CACHE_REGS
int wid;
#if THREADS #if THREADS
int wid;
for (wid = 1; wid < MAX_INITS; wid++) { for (wid = 1; wid < MAX_INITS; wid++) {
Yap_WLocal[wid] = NULL; Yap_WLocal[wid] = NULL;
} }
@ -1268,9 +1268,7 @@ InitCodes(void)
#endif #endif
InitGlobal(); InitGlobal();
InitWorker(0); InitWorker(0);
#if THREADS
InitFirstWorkerThreadHandle(); InitFirstWorkerThreadHandle();
#endif
/* make sure no one else can use these two atoms */ /* make sure no one else can use these two atoms */
CurrentModule = 0; CurrentModule = 0;
Yap_ReleaseAtom(AtomOfTerm(TermReFoundVar)); Yap_ReleaseAtom(AtomOfTerm(TermReFoundVar));

5
H/TermExt.h Normal file → Executable file
View File

@ -515,7 +515,7 @@ IsAttachedTerm (Term t)
return (Int) ((IsVarTerm (t) && IsAttVar(VarOfTerm(t)))); return (Int) ((IsVarTerm (t) && IsAttVar(VarOfTerm(t))));
} }
inline EXTERN Int IsAttachedTerm (Term); inline EXTERN Int GlobalIsAttachedTerm (Term);
inline EXTERN Int inline EXTERN Int
GlobalIsAttachedTerm (Term t) GlobalIsAttachedTerm (Term t)
@ -523,9 +523,6 @@ GlobalIsAttachedTerm (Term t)
return (Int) ((IsVarTerm (t) && GlobalIsAttVar(VarOfTerm(t)))); return (Int) ((IsVarTerm (t) && GlobalIsAttVar(VarOfTerm(t))));
} }
inline EXTERN Int SafeIsAttachedTerm (Term); inline EXTERN Int SafeIsAttachedTerm (Term);
inline EXTERN Int inline EXTERN Int

View File

@ -1,211 +1,211 @@
/* This file, dglobals.h, was generated automatically by "yap -L misc/buildheap" /* This file, dglobals.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/GLOBALS instead */ please do not update, update misc/GLOBALS instead */
#define Yap_c_input_stream WL->c_input_stream #define Yap_c_input_stream WL->c_input_stream
#define Yap_c_output_stream WL->c_output_stream #define Yap_c_output_stream WL->c_output_stream
#define Yap_c_error_stream WL->c_error_stream #define Yap_c_error_stream WL->c_error_stream
#define OldASP WL->rinfo.old_ASP #define OldASP WL->rinfo.old_ASP
#define OldLCL0 WL->rinfo.old_LCL0 #define OldLCL0 WL->rinfo.old_LCL0
#define OldTR WL->rinfo.old_TR #define OldTR WL->rinfo.old_TR
#define OldGlobalBase WL->rinfo.old_GlobalBase #define OldGlobalBase WL->rinfo.old_GlobalBase
#define OldH WL->rinfo.old_H #define OldH WL->rinfo.old_H
#define OldH0 WL->rinfo.old_H0 #define OldH0 WL->rinfo.old_H0
#define OldTrailBase WL->rinfo.old_TrailBase #define OldTrailBase WL->rinfo.old_TrailBase
#define OldTrailTop WL->rinfo.old_TrailTop #define OldTrailTop WL->rinfo.old_TrailTop
#define OldHeapBase WL->rinfo.old_HeapBase #define OldHeapBase WL->rinfo.old_HeapBase
#define OldHeapTop WL->rinfo.old_HeapTop #define OldHeapTop WL->rinfo.old_HeapTop
#define ClDiff WL->rinfo.cl_diff #define ClDiff WL->rinfo.cl_diff
#define GDiff WL->rinfo.g_diff #define GDiff WL->rinfo.g_diff
#define HDiff WL->rinfo.h_diff #define HDiff WL->rinfo.h_diff
#define GDiff0 WL->rinfo.g_diff0 #define GDiff0 WL->rinfo.g_diff0
#define GSplit WL->rinfo.g_split #define GSplit WL->rinfo.g_split
#define LDiff WL->rinfo.l_diff #define LDiff WL->rinfo.l_diff
#define TrDiff WL->rinfo.tr_diff #define TrDiff WL->rinfo.tr_diff
#define XDiff WL->rinfo.x_diff #define XDiff WL->rinfo.x_diff
#define DelayDiff WL->rinfo.delay_diff #define DelayDiff WL->rinfo.delay_diff
#define BaseDiff WL->rinfo.base_diff #define BaseDiff WL->rinfo.base_diff
#define ReductionsCounter WL->call_counters.reductions #define ReductionsCounter WL->call_counters.reductions
#define PredEntriesCounter WL->call_counters.reductions_retries #define PredEntriesCounter WL->call_counters.reductions_retries
#define RetriesCounter WL->call_counters.retries #define RetriesCounter WL->call_counters.retries
#define ReductionsCounterOn WL->call_counters.reductions_on #define ReductionsCounterOn WL->call_counters.reductions_on
#define PredEntriesCounterOn WL->call_counters.reductions_retries_on #define PredEntriesCounterOn WL->call_counters.reductions_retries_on
#define RetriesCounterOn WL->call_counters.retries_on #define RetriesCounterOn WL->call_counters.retries_on
#define Yap_InterruptsDisabled WL->interrupts_disabled #define Yap_InterruptsDisabled WL->interrupts_disabled
#define ConsultSp WL->consultsp #define ConsultSp WL->consultsp
#define ConsultCapacity WL->consultcapacity #define ConsultCapacity WL->consultcapacity
#define ConsultBase WL->consultbase #define ConsultBase WL->consultbase
#define ConsultLow WL->consultlow #define ConsultLow WL->consultlow
#define GlobalArena WL->global_arena #define GlobalArena WL->global_arena
#define GlobalArenaOverflows WL->global_arena_overflows #define GlobalArenaOverflows WL->global_arena_overflows
#define DelayArenaOverflows WL->delay_arena_overflows #define DelayArenaOverflows WL->delay_arena_overflows
#define ArenaOverflows WL->arena_overflows #define ArenaOverflows WL->arena_overflows
#define DepthArenas WL->depth_arenas #define DepthArenas WL->depth_arenas
#define ArithError WL->arith_error #define ArithError WL->arith_error
#define LastAssertedPred WL->last_asserted_pred #define LastAssertedPred WL->last_asserted_pred
#define DebugOn WL->debug_on #define DebugOn WL->debug_on
#define FormatInfo WL->f_info #define FormatInfo WL->f_info
#define ScannerStack WL->scanner_stack #define ScannerStack WL->scanner_stack
#define ScannerExtraBlocks WL->scanner_extra_blocks #define ScannerExtraBlocks WL->scanner_extra_blocks
#define BallTerm WL->ball_term #define BallTerm WL->ball_term
#define ActiveSignals WL->active_signals #define ActiveSignals WL->active_signals
#define IPredArity WL->i_pred_arity #define IPredArity WL->i_pred_arity
#define ProfEnd WL->prof_end #define ProfEnd WL->prof_end
#define UncaughtThrow WL->uncaught_throw #define UncaughtThrow WL->uncaught_throw
#define DoingUndefp WL->doing_undefp #define DoingUndefp WL->doing_undefp
#define StartLine WL->start_line #define StartLine WL->start_line
#define ScratchPad WL->scratchpad #define ScratchPad WL->scratchpad
#ifdef COROUTINING #ifdef COROUTINING
#define WokenGoals WL->woken_goals #define WokenGoals WL->woken_goals
#define AttsMutableList WL->atts_mutable_list #define AttsMutableList WL->atts_mutable_list
#endif #endif
#define GcGeneration WL->gc_generation #define GcGeneration WL->gc_generation
#define GcPhase WL->gc_phase #define GcPhase WL->gc_phase
#define GcCurrentPhase WL->gc_current_phase #define GcCurrentPhase WL->gc_current_phase
#define GcCalls WL->gc_calls #define GcCalls WL->gc_calls
#define TotGcTime WL->tot_gc_time #define TotGcTime WL->tot_gc_time
#define TotGcRecovered WL->tot_gc_recovered #define TotGcRecovered WL->tot_gc_recovered
#define LastGcTime WL->last_gc_time #define LastGcTime WL->last_gc_time
#define LastSSTime WL->last_ss_time #define LastSSTime WL->last_ss_time
#if LOW_LEVEL_TRACER #if LOW_LEVEL_TRACER
#define Yap_total_choicepoints WL->total_cps #define Yap_total_choicepoints WL->total_cps
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define SignalLock WL->signal_lock #define SignalLock WL->signal_lock
#define WPP WL->wpp #define WPP WL->wpp
#define total_marked WL->tot_marked #define total_marked WL->tot_marked
#define total_oldies WL->tot_oldies #define total_oldies WL->tot_oldies
#if DEBUG && COROUTINING #if DEBUG && COROUTINING
#define total_smarked WL->tot_smarked #define total_smarked WL->tot_smarked
#endif #endif
#define current_B WL->wl_current_B #define current_B WL->wl_current_B
#define prev_HB WL->wl_prev_HB #define prev_HB WL->wl_prev_HB
#define HGEN WL->hgen #define HGEN WL->hgen
#define iptop WL->ip_top #define iptop WL->ip_top
#if GC_NO_TAGS #if GC_NO_TAGS
#define Yap_bp WL->b_p #define Yap_bp WL->b_p
#endif #endif
#if defined(TABLING) || defined(SBA) #if defined(TABLING) || defined(SBA)
#define sTR WL->wl_sTR #define sTR WL->wl_sTR
#define sTR0 WL->wl_sTR0 #define sTR0 WL->wl_sTR0
#define new_TR WL->new_tr #define new_TR WL->new_tr
#else #else
#define sTR WL->wl_sTR #define sTR WL->wl_sTR
#define sTR0 WL->wl_sTR0 #define sTR0 WL->wl_sTR0
#define new_TR WL->new_tr #define new_TR WL->new_tr
#endif #endif
#define cont_top0 WL->conttop0 #define cont_top0 WL->conttop0
#define cont_top WL->conttop #define cont_top WL->conttop
#define discard_trail_entries WL->disc_trail_entries #define discard_trail_entries WL->disc_trail_entries
#define gc_ma_hash_table WL->Gc_ma_hash_table #define gc_ma_hash_table WL->Gc_ma_hash_table
#define gc_ma_h_top WL->Gc_ma_h_top #define gc_ma_h_top WL->Gc_ma_h_top
#define gc_ma_h_list WL->Gc_ma_h_list #define gc_ma_h_list WL->Gc_ma_h_list
#define gc_timestamp WL->Gc_timestamp #define gc_timestamp WL->Gc_timestamp
#define db_vec WL->DB_vec #define db_vec WL->DB_vec
#define db_vec0 WL->DB_vec0 #define db_vec0 WL->DB_vec0
#define db_root WL->DB_root #define db_root WL->DB_root
#define db_nil WL->DB_nil #define db_nil WL->DB_nil
#endif /* defined(YAPOR) || defined(THREADS) */ #endif /* defined(YAPOR) || defined(THREADS) */
#define Yap_gc_restore WL->gc_restore #define Yap_gc_restore WL->gc_restore
#define DynamicArrays WL->dynamic_arrays #define DynamicArrays WL->dynamic_arrays
#define StaticArrays WL->static_arrays #define StaticArrays WL->static_arrays
#define GlobalVariables WL->global_variables #define GlobalVariables WL->global_variables
#define Yap_AllowRestart WL->allow_restart #define Yap_AllowRestart WL->allow_restart
#define Yap_CMemFirstBlock WL->cmem_first_block #define Yap_CMemFirstBlock WL->cmem_first_block
#define Yap_CMemFirstBlockSz WL->cmem_first_block_sz #define Yap_CMemFirstBlockSz WL->cmem_first_block_sz
#define Yap_LabelFirstArray WL->label_first_array #define Yap_LabelFirstArray WL->label_first_array
#define Yap_LabelFirstArraySz WL->label_first_array_sz #define Yap_LabelFirstArraySz WL->label_first_array_sz
#define PL_local_data_p WL->Yap_ld_ #define PL_local_data_p WL->Yap_ld_
#define execution WL->_execution #define execution WL->_execution
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS) #if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
#define WORKER WL->worker #define WORKER WL->worker
#endif #endif
#ifdef THREADS #ifdef THREADS
#define ThreadHandle WL->thread_handle #define ThreadHandle WL->thread_handle
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle) #define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle) #define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
#endif #endif
#if THREADS #if THREADS
#define NOfThreads Yap_global->n_of_threads #define NOfThreads Yap_global->n_of_threads
#define NOfThreadsCreated Yap_global->n_of_threads_created #define NOfThreadsCreated Yap_global->n_of_threads_created
#define ThreadsTotalTime Yap_global->threads_total_time #define ThreadsTotalTime Yap_global->threads_total_time
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define BGL Yap_global->bgl #define BGL Yap_global->bgl
#endif #endif
#define Yap_AllowLocalExpansion Yap_global->allow_local_expansion #define Yap_AllowLocalExpansion Yap_global->allow_local_expansion
#define Yap_AllowGlobalExpansion Yap_global->allow_global_expansion #define Yap_AllowGlobalExpansion Yap_global->allow_global_expansion
#define Yap_AllowTrailExpansion Yap_global->allow_trail_expansion #define Yap_AllowTrailExpansion Yap_global->allow_trail_expansion
#define SizeOfOverflow Yap_global->size_of_overflow #define SizeOfOverflow Yap_global->size_of_overflow
#define AGcLastCall Yap_global->agc_last_call #define AGcLastCall Yap_global->agc_last_call
#define AGcThreshold Yap_global->agc_threshold #define AGcThreshold Yap_global->agc_threshold
#define AGCHook Yap_global->agc_hook #define AGCHook Yap_global->agc_hook
#if HAVE_LIBREADLINE #if HAVE_LIBREADLINE
#define ReadlineBuf Yap_global->readline_buf #define ReadlineBuf Yap_global->readline_buf
#define ReadlinePos Yap_global->readline_pos #define ReadlinePos Yap_global->readline_pos
#endif #endif
#ifdef THREADS #ifdef THREADS
#define ThreadHandlesLock Yap_global->thread_handles_lock #define ThreadHandlesLock Yap_global->thread_handles_lock
#endif #endif
#if defined(YAPOR) || defined(TABLING) #if defined(YAPOR) || defined(TABLING)
#define GLOBAL Yap_global->global #define GLOBAL Yap_global->global
#define REMOTE Yap_global->remote #define REMOTE Yap_global->remote
#endif #endif
#define Yap_Initialised Yap_global->initialised #define Yap_Initialised Yap_global->initialised
#define Yap_InitialisedFromPL Yap_global->initialised_from_pl #define Yap_InitialisedFromPL Yap_global->initialised_from_pl
#define Yap_PL_Argc Yap_global->pl_argc #define Yap_PL_Argc Yap_global->pl_argc
#define Yap_PL_Argv Yap_global->pl_argv #define Yap_PL_Argv Yap_global->pl_argv
#define Yap_HaltHooks Yap_global->yap_halt_hook #define Yap_HaltHooks Yap_global->yap_halt_hook

View File

@ -1,304 +1,304 @@
/* This file, dhstruct.h, was generated automatically by "yap -L misc/buildheap" /* This file, dhstruct.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/HEAPFIELDS instead */ please do not update, update misc/HEAPFIELDS instead */
#define Yap_HoleSize Yap_heap_regs->hole_size #define Yap_HoleSize Yap_heap_regs->hole_size
#define Yap_av Yap_heap_regs->av_ #define Yap_av Yap_heap_regs->av_
#if USE_DL_MALLOC #if USE_DL_MALLOC
#define Yap_MemoryHoles Yap_heap_regs->memory_holes #define Yap_MemoryHoles Yap_heap_regs->memory_holes
#define Yap_NOfMemoryHoles Yap_heap_regs->nof_memory_holes #define Yap_NOfMemoryHoles Yap_heap_regs->nof_memory_holes
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define DLMallocLock Yap_heap_regs->dlmalloc_lock #define DLMallocLock Yap_heap_regs->dlmalloc_lock
#endif #endif
#endif #endif
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO) #if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
#ifndef HeapUsed #ifndef HeapUsed
#define HeapUsed Yap_givemallinfo() #define HeapUsed Yap_givemallinfo()
#endif #endif
#define NotHeapUsed Yap_heap_regs->heap_used #define NotHeapUsed Yap_heap_regs->heap_used
#else #else
#define HeapUsed Yap_heap_regs->heap_used #define HeapUsed Yap_heap_regs->heap_used
#endif #endif
#define HeapMax Yap_heap_regs->heap_max #define HeapMax Yap_heap_regs->heap_max
#define HeapTop Yap_heap_regs->heap_top #define HeapTop Yap_heap_regs->heap_top
#define HeapLim Yap_heap_regs->heap_lim #define HeapLim Yap_heap_regs->heap_lim
#define FreeBlocks Yap_heap_regs->free_blocks #define FreeBlocks Yap_heap_regs->free_blocks
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define FreeBlocksLock Yap_heap_regs->free_blocks_lock #define FreeBlocksLock Yap_heap_regs->free_blocks_lock
#define HeapUsedLock Yap_heap_regs->heap_used_lock #define HeapUsedLock Yap_heap_regs->heap_used_lock
#define HeapTopLock Yap_heap_regs->heap_top_lock #define HeapTopLock Yap_heap_regs->heap_top_lock
#define HeapTopOwner Yap_heap_regs->heap_top_owner #define HeapTopOwner Yap_heap_regs->heap_top_owner
#endif #endif
#if USE_THREADED_CODE #if USE_THREADED_CODE
#define OP_RTABLE Yap_heap_regs->op_rtable #define OP_RTABLE Yap_heap_regs->op_rtable
#endif #endif
#define EXECUTE_CPRED_OP_CODE Yap_heap_regs->execute_cpred_op_code #define EXECUTE_CPRED_OP_CODE Yap_heap_regs->execute_cpred_op_code
#define EXPAND_OP_CODE Yap_heap_regs->expand_op_code #define EXPAND_OP_CODE Yap_heap_regs->expand_op_code
#define FAIL_OPCODE Yap_heap_regs->fail_op #define FAIL_OPCODE Yap_heap_regs->fail_op
#define INDEX_OPCODE Yap_heap_regs->index_op #define INDEX_OPCODE Yap_heap_regs->index_op
#define LOCKPRED_OPCODE Yap_heap_regs->lockpred_op #define LOCKPRED_OPCODE Yap_heap_regs->lockpred_op
#define ORLAST_OPCODE Yap_heap_regs->orlast_op #define ORLAST_OPCODE Yap_heap_regs->orlast_op
#define UNDEF_OPCODE Yap_heap_regs->undef_op #define UNDEF_OPCODE Yap_heap_regs->undef_op
#define NOfAtoms Yap_heap_regs->n_of_atoms #define NOfAtoms Yap_heap_regs->n_of_atoms
#define AtomHashTableSize Yap_heap_regs->atom_hash_table_size #define AtomHashTableSize Yap_heap_regs->atom_hash_table_size
#define WideAtomHashTableSize Yap_heap_regs->wide_atom_hash_table_size #define WideAtomHashTableSize Yap_heap_regs->wide_atom_hash_table_size
#define NOfWideAtoms Yap_heap_regs->n_of_wide_atoms #define NOfWideAtoms Yap_heap_regs->n_of_wide_atoms
#define INVISIBLECHAIN Yap_heap_regs->invisiblechain #define INVISIBLECHAIN Yap_heap_regs->invisiblechain
#define WideHashChain Yap_heap_regs->wide_hash_chain #define WideHashChain Yap_heap_regs->wide_hash_chain
#define HashChain Yap_heap_regs->hash_chain #define HashChain Yap_heap_regs->hash_chain
#ifdef EUROTRA #ifdef EUROTRA
#define TermDollarU Yap_heap_regs->term_dollar_u #define TermDollarU Yap_heap_regs->term_dollar_u
#endif #endif
#define TermProlog Yap_heap_regs->term_prolog #define TermProlog Yap_heap_regs->term_prolog
#define TermReFoundVar Yap_heap_regs->term_refound_var #define TermReFoundVar Yap_heap_regs->term_refound_var
#define USER_MODULE Yap_heap_regs->user_module #define USER_MODULE Yap_heap_regs->user_module
#define IDB_MODULE Yap_heap_regs->idb_module #define IDB_MODULE Yap_heap_regs->idb_module
#define ATTRIBUTES_MODULE Yap_heap_regs->attributes_module #define ATTRIBUTES_MODULE Yap_heap_regs->attributes_module
#define CHARSIO_MODULE Yap_heap_regs->charsio_module #define CHARSIO_MODULE Yap_heap_regs->charsio_module
#define TERMS_MODULE Yap_heap_regs->terms_module #define TERMS_MODULE Yap_heap_regs->terms_module
#define SYSTEM_MODULE Yap_heap_regs->system_module #define SYSTEM_MODULE Yap_heap_regs->system_module
#define OPERATING_SYSTEM_MODULE Yap_heap_regs->operating_system_module #define OPERATING_SYSTEM_MODULE Yap_heap_regs->operating_system_module
#define READUTIL_MODULE Yap_heap_regs->readutil_module #define READUTIL_MODULE Yap_heap_regs->readutil_module
#define HACKS_MODULE Yap_heap_regs->hacks_module #define HACKS_MODULE Yap_heap_regs->hacks_module
#define ARG_MODULE Yap_heap_regs->arg_module #define ARG_MODULE Yap_heap_regs->arg_module
#define GLOBALS_MODULE Yap_heap_regs->globals_module #define GLOBALS_MODULE Yap_heap_regs->globals_module
#define SWI_MODULE Yap_heap_regs->swi_module #define SWI_MODULE Yap_heap_regs->swi_module
#define CurrentModules Yap_heap_regs->current_modules #define CurrentModules Yap_heap_regs->current_modules
#define Yap_ExecutionMode Yap_heap_regs->execution_mode #define Yap_ExecutionMode Yap_heap_regs->execution_mode
#define PredHash Yap_heap_regs->pred_hash #define PredHash Yap_heap_regs->pred_hash
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define PredHashRWLock Yap_heap_regs->pred_hash_rw_lock #define PredHashRWLock Yap_heap_regs->pred_hash_rw_lock
#endif #endif
#define PredsInHashTable Yap_heap_regs->preds_in_hash_table #define PredsInHashTable Yap_heap_regs->preds_in_hash_table
#define PredHashTableSize Yap_heap_regs->pred_hash_table_size #define PredHashTableSize Yap_heap_regs->pred_hash_table_size
#define CreepCode Yap_heap_regs->creep_code #define CreepCode Yap_heap_regs->creep_code
#define UndefCode Yap_heap_regs->undef_code #define UndefCode Yap_heap_regs->undef_code
#define SpyCode Yap_heap_regs->spy_code #define SpyCode Yap_heap_regs->spy_code
#define PredFail Yap_heap_regs->pred_fail #define PredFail Yap_heap_regs->pred_fail
#define PredTrue Yap_heap_regs->pred_true #define PredTrue Yap_heap_regs->pred_true
#ifdef COROUTINING #ifdef COROUTINING
#define WakeUpCode Yap_heap_regs->wake_up_code #define WakeUpCode Yap_heap_regs->wake_up_code
#endif #endif
#define PredGoalExpansion Yap_heap_regs->pred_goal_expansion #define PredGoalExpansion Yap_heap_regs->pred_goal_expansion
#define PredMetaCall Yap_heap_regs->pred_meta_call #define PredMetaCall Yap_heap_regs->pred_meta_call
#define PredDollarCatch Yap_heap_regs->pred_dollar_catch #define PredDollarCatch Yap_heap_regs->pred_dollar_catch
#define PredRecordedWithKey Yap_heap_regs->pred_recorded_with_key #define PredRecordedWithKey Yap_heap_regs->pred_recorded_with_key
#define PredLogUpdClause Yap_heap_regs->pred_log_upd_clause #define PredLogUpdClause Yap_heap_regs->pred_log_upd_clause
#define PredLogUpdClauseErase Yap_heap_regs->pred_log_upd_clause_erase #define PredLogUpdClauseErase Yap_heap_regs->pred_log_upd_clause_erase
#define PredLogUpdClause0 Yap_heap_regs->pred_log_upd_clause0 #define PredLogUpdClause0 Yap_heap_regs->pred_log_upd_clause0
#define PredStaticClause Yap_heap_regs->pred_static_clause #define PredStaticClause Yap_heap_regs->pred_static_clause
#define PredThrow Yap_heap_regs->pred_throw #define PredThrow Yap_heap_regs->pred_throw
#define PredHandleThrow Yap_heap_regs->pred_handle_throw #define PredHandleThrow Yap_heap_regs->pred_handle_throw
#define PredIs Yap_heap_regs->pred_is #define PredIs Yap_heap_regs->pred_is
#define PredSafeCallCleanup Yap_heap_regs->pred_safe_call_cleanup #define PredSafeCallCleanup Yap_heap_regs->pred_safe_call_cleanup
#define PredRestoreRegs Yap_heap_regs->pred_restore_regs #define PredRestoreRegs Yap_heap_regs->pred_restore_regs
#ifdef YAPOR #ifdef YAPOR
#define PredGetwork Yap_heap_regs->pred_getwork #define PredGetwork Yap_heap_regs->pred_getwork
#define PredGetworkSeq Yap_heap_regs->pred_getwork_seq #define PredGetworkSeq Yap_heap_regs->pred_getwork_seq
#endif /* YAPOR */ #endif /* YAPOR */
#ifdef LOW_LEVEL_TRACER #ifdef LOW_LEVEL_TRACER
#define Yap_do_low_level_trace Yap_heap_regs->yap_do_low_level_trace #define Yap_do_low_level_trace Yap_heap_regs->yap_do_low_level_trace
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define Yap_low_level_trace_lock Yap_heap_regs->low_level_trace_lock #define Yap_low_level_trace_lock Yap_heap_regs->low_level_trace_lock
#endif #endif
#endif #endif
#define Yap_ClauseSpace Yap_heap_regs->clause_space #define Yap_ClauseSpace Yap_heap_regs->clause_space
#define Yap_IndexSpace_Tree Yap_heap_regs->index_space_Tree #define Yap_IndexSpace_Tree Yap_heap_regs->index_space_Tree
#define Yap_IndexSpace_EXT Yap_heap_regs->index_space_EXT #define Yap_IndexSpace_EXT Yap_heap_regs->index_space_EXT
#define Yap_IndexSpace_SW Yap_heap_regs->index_space_SW #define Yap_IndexSpace_SW Yap_heap_regs->index_space_SW
#define Yap_LUClauseSpace Yap_heap_regs->lu_clause_space #define Yap_LUClauseSpace Yap_heap_regs->lu_clause_space
#define Yap_LUIndexSpace_Tree Yap_heap_regs->lu_index_space_Tree #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_CP Yap_heap_regs->lu_index_space_CP
#define Yap_LUIndexSpace_EXT Yap_heap_regs->lu_index_space_EXT #define Yap_LUIndexSpace_EXT Yap_heap_regs->lu_index_space_EXT
#define Yap_LUIndexSpace_SW Yap_heap_regs->lu_index_space_SW #define Yap_LUIndexSpace_SW Yap_heap_regs->lu_index_space_SW
#define COMMA_CODE Yap_heap_regs->comma_code #define COMMA_CODE Yap_heap_regs->comma_code
#define DUMMYCODE Yap_heap_regs->dummycode #define DUMMYCODE Yap_heap_regs->dummycode
#define FAILCODE Yap_heap_regs->failcode #define FAILCODE Yap_heap_regs->failcode
#define NOCODE Yap_heap_regs->nocode #define NOCODE Yap_heap_regs->nocode
#define ENV_FOR_TRUSTFAIL Yap_heap_regs->env_for_trustfail #define ENV_FOR_TRUSTFAIL Yap_heap_regs->env_for_trustfail
#define TRUSTFAILCODE Yap_heap_regs->trustfailcode #define TRUSTFAILCODE Yap_heap_regs->trustfailcode
#define ENV_FOR_YESCODE Yap_heap_regs->env_for_yescode #define ENV_FOR_YESCODE Yap_heap_regs->env_for_yescode
#define YESCODE Yap_heap_regs->yescode #define YESCODE Yap_heap_regs->yescode
#define RTRYCODE Yap_heap_regs->rtrycode #define RTRYCODE Yap_heap_regs->rtrycode
#ifdef BEAM #ifdef BEAM
#define BEAM_RETRY_CODE Yap_heap_regs->beam_retry_code #define BEAM_RETRY_CODE Yap_heap_regs->beam_retry_code
#endif /* BEAM */ #endif /* BEAM */
#ifdef YAPOR #ifdef YAPOR
#define SEQUENTIAL_IS_DEFAULT Yap_heap_regs->seq_def #define SEQUENTIAL_IS_DEFAULT Yap_heap_regs->seq_def
#define GETWORK Yap_heap_regs->getwork_code #define GETWORK Yap_heap_regs->getwork_code
#define GETWORK_SEQ Yap_heap_regs->getwork_seq_code #define GETWORK_SEQ Yap_heap_regs->getwork_seq_code
#define GETWORK_FIRST_TIME Yap_heap_regs->getwork_first_time #define GETWORK_FIRST_TIME Yap_heap_regs->getwork_first_time
#endif /* YAPOR */ #endif /* YAPOR */
#ifdef TABLING #ifdef TABLING
#define LOAD_ANSWER Yap_heap_regs->table_load_answer_code #define LOAD_ANSWER Yap_heap_regs->table_load_answer_code
#define TRY_ANSWER Yap_heap_regs->table_try_answer_code #define TRY_ANSWER Yap_heap_regs->table_try_answer_code
#define ANSWER_RESOLUTION Yap_heap_regs->table_answer_resolution_code #define ANSWER_RESOLUTION Yap_heap_regs->table_answer_resolution_code
#define COMPLETION Yap_heap_regs->table_completion_code #define COMPLETION Yap_heap_regs->table_completion_code
#endif /* TABLING */ #endif /* TABLING */
#define P_before_spy Yap_heap_regs->debugger_p_before_spy #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_RECORDEDP_CODE Yap_heap_regs->retry_recordedp_code
#define RETRY_C_RECORDED_K_CODE Yap_heap_regs->retry_recorded_k_code #define RETRY_C_RECORDED_K_CODE Yap_heap_regs->retry_recorded_k_code
#define PROFILING Yap_heap_regs->system_profiling #define PROFILING Yap_heap_regs->system_profiling
#define CALL_COUNTING Yap_heap_regs->system_call_counting #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_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_FUNC Yap_heap_regs->system_pred_goal_expansion_func
#define PRED_GOAL_EXPANSION_ON Yap_heap_regs->system_pred_goal_expansion_on #define PRED_GOAL_EXPANSION_ON Yap_heap_regs->system_pred_goal_expansion_on
#define optimizer_on Yap_heap_regs->compiler_optimizer_on #define optimizer_on Yap_heap_regs->compiler_optimizer_on
#define compile_mode Yap_heap_regs->compiler_compile_mode #define compile_mode Yap_heap_regs->compiler_compile_mode
#define profiling Yap_heap_regs->compiler_profiling #define profiling Yap_heap_regs->compiler_profiling
#define call_counting Yap_heap_regs->compiler_call_counting #define call_counting Yap_heap_regs->compiler_call_counting
#define compile_arrays Yap_heap_regs->compiler_compile_arrays #define compile_arrays Yap_heap_regs->compiler_compile_arrays
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define DBTermsListLock Yap_heap_regs->dbterms_list_lock #define DBTermsListLock Yap_heap_regs->dbterms_list_lock
#endif #endif
#define DBTermsList Yap_heap_regs->dbterms_list #define DBTermsList Yap_heap_regs->dbterms_list
#define ExpandClausesFirst Yap_heap_regs->expand_clauses_first #define ExpandClausesFirst Yap_heap_regs->expand_clauses_first
#define ExpandClausesLast Yap_heap_regs->expand_clauses_last #define ExpandClausesLast Yap_heap_regs->expand_clauses_last
#define Yap_ExpandClauses Yap_heap_regs->expand_clauses #define Yap_ExpandClauses Yap_heap_regs->expand_clauses
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define ExpandClausesListLock Yap_heap_regs->expand_clauses_list_lock #define ExpandClausesListLock Yap_heap_regs->expand_clauses_list_lock
#define OpListLock Yap_heap_regs->op_list_lock #define OpListLock Yap_heap_regs->op_list_lock
#endif #endif
#ifdef DEBUG #ifdef DEBUG
#define Yap_NewCps Yap_heap_regs->new_cps #define Yap_NewCps Yap_heap_regs->new_cps
#define Yap_LiveCps Yap_heap_regs->live_cps #define Yap_LiveCps Yap_heap_regs->live_cps
#define Yap_DirtyCps Yap_heap_regs->dirty_cps #define Yap_DirtyCps Yap_heap_regs->dirty_cps
#define Yap_FreedCps Yap_heap_regs->freed_cps #define Yap_FreedCps Yap_heap_regs->freed_cps
#endif #endif
#define Yap_expand_clauses_sz Yap_heap_regs->expand_clauses_sz #define Yap_expand_clauses_sz Yap_heap_regs->expand_clauses_sz
#define UdiControlBlocks Yap_heap_regs->udi_control_blocks #define UdiControlBlocks Yap_heap_regs->udi_control_blocks
#define STATIC_PREDICATES_MARKED Yap_heap_regs->static_predicates_marked #define STATIC_PREDICATES_MARKED Yap_heap_regs->static_predicates_marked
#define INT_KEYS Yap_heap_regs->IntKeys #define INT_KEYS Yap_heap_regs->IntKeys
#define INT_LU_KEYS Yap_heap_regs->IntLUKeys #define INT_LU_KEYS Yap_heap_regs->IntLUKeys
#define INT_BB_KEYS Yap_heap_regs->IntBBKeys #define INT_BB_KEYS Yap_heap_regs->IntBBKeys
#define INT_KEYS_SIZE Yap_heap_regs->int_keys_size #define INT_KEYS_SIZE Yap_heap_regs->int_keys_size
#define INT_KEYS_TIMESTAMP Yap_heap_regs->int_keys_timestamp #define INT_KEYS_TIMESTAMP Yap_heap_regs->int_keys_timestamp
#define INT_BB_KEYS_SIZE Yap_heap_regs->int_bb_keys_size #define INT_BB_KEYS_SIZE Yap_heap_regs->int_bb_keys_size
#define UPDATE_MODE Yap_heap_regs->update_mode #define UPDATE_MODE Yap_heap_regs->update_mode
#define DBErasedMarker Yap_heap_regs->db_erased_marker #define DBErasedMarker Yap_heap_regs->db_erased_marker
#define LogDBErasedMarker Yap_heap_regs->logdb_erased_marker #define LogDBErasedMarker Yap_heap_regs->logdb_erased_marker
#define DeadStaticClauses Yap_heap_regs->dead_static_clauses #define DeadStaticClauses Yap_heap_regs->dead_static_clauses
#define DeadMegaClauses Yap_heap_regs->dead_mega_clauses #define DeadMegaClauses Yap_heap_regs->dead_mega_clauses
#define DeadStaticIndices Yap_heap_regs->dead_static_indices #define DeadStaticIndices Yap_heap_regs->dead_static_indices
#define DBErasedList Yap_heap_regs->db_erased_list #define DBErasedList Yap_heap_regs->db_erased_list
#define DBErasedIList Yap_heap_regs->db_erased_ilist #define DBErasedIList Yap_heap_regs->db_erased_ilist
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#define DeadStaticClausesLock Yap_heap_regs->dead_static_clauses_lock #define DeadStaticClausesLock Yap_heap_regs->dead_static_clauses_lock
#define DeadMegaClausesLock Yap_heap_regs->dead_mega_clauses_lock #define DeadMegaClausesLock Yap_heap_regs->dead_mega_clauses_lock
#define DeadStaticIndicesLock Yap_heap_regs->dead_static_indices_lock #define DeadStaticIndicesLock Yap_heap_regs->dead_static_indices_lock
#endif #endif
#ifdef COROUTINING #ifdef COROUTINING
#define NUM_OF_ATTS Yap_heap_regs->num_of_atts #define NUM_OF_ATTS Yap_heap_regs->num_of_atts
#define Yap_AttsSize Yap_heap_regs->atts_size #define Yap_AttsSize Yap_heap_regs->atts_size
#endif #endif
#define yap_flags Yap_heap_regs->yap_flags_field #define yap_flags Yap_heap_regs->yap_flags_field
#define OpList Yap_heap_regs->op_list #define OpList Yap_heap_regs->op_list
#define Stream Yap_heap_regs->yap_streams #define Stream Yap_heap_regs->yap_streams
#define NOfFileAliases Yap_heap_regs->n_of_file_aliases #define NOfFileAliases Yap_heap_regs->n_of_file_aliases
#define SzOfFileAliases Yap_heap_regs->sz_of_file_aliases #define SzOfFileAliases Yap_heap_regs->sz_of_file_aliases
#define FileAliases Yap_heap_regs->file_aliases #define FileAliases Yap_heap_regs->file_aliases
#define AtPrompt Yap_heap_regs->atprompt #define AtPrompt Yap_heap_regs->atprompt
#define Prompt Yap_heap_regs->prompt #define YapPrompt Yap_heap_regs->_prompt
#define CharConversionTable Yap_heap_regs->char_conversion_table #define CharConversionTable Yap_heap_regs->char_conversion_table
#define CharConversionTable2 Yap_heap_regs->char_conversion_table2 #define CharConversionTable2 Yap_heap_regs->char_conversion_table2
#define ParserErrorStyle Yap_heap_regs->parser_error_style #define ParserErrorStyle Yap_heap_regs->parser_error_style
#define Yap_LibDir Yap_heap_regs->yap_lib_dir #define Yap_LibDir Yap_heap_regs->yap_lib_dir
#define LastWtimePtr Yap_heap_regs->last_wtime #define LastWtimePtr Yap_heap_regs->last_wtime
#define output_msg Yap_heap_regs->debugger_output_msg #define output_msg Yap_heap_regs->debugger_output_msg
#if LOW_PROF #if LOW_PROF
#define ProfilerOn Yap_heap_regs->profiler_on #define ProfilerOn Yap_heap_regs->profiler_on
#define Yap_OffLineProfiler Yap_heap_regs->offline_profiler #define Yap_OffLineProfiler Yap_heap_regs->offline_profiler
#define FProf Yap_heap_regs->f_prof #define FProf Yap_heap_regs->f_prof
#define FPreds Yap_heap_regs->f_preds #define FPreds Yap_heap_regs->f_preds
#define ProfPreds Yap_heap_regs->prof_preds #define ProfPreds Yap_heap_regs->prof_preds
#endif /* LOW_PROF */ #endif /* LOW_PROF */
#define ForeignCodeLoaded Yap_heap_regs->foreign_code_loaded #define ForeignCodeLoaded Yap_heap_regs->foreign_code_loaded
#define ForeignCodeBase Yap_heap_regs->foreign_code_base #define ForeignCodeBase Yap_heap_regs->foreign_code_base
#define ForeignCodeTop Yap_heap_regs->foreign_code_top #define ForeignCodeTop Yap_heap_regs->foreign_code_top
#define ForeignCodeMax Yap_heap_regs->foreign_code_max #define ForeignCodeMax Yap_heap_regs->foreign_code_max
#define Yap_Records Yap_heap_regs->yap_records #define Yap_Records Yap_heap_regs->yap_records
#define SWI_Atoms Yap_heap_regs->swi_atoms #define SWI_Atoms Yap_heap_regs->swi_atoms
#define SWI_Functors Yap_heap_regs->swi_functors #define SWI_Functors Yap_heap_regs->swi_functors
#define SWI_ReverseHash Yap_heap_regs->swi_reverse_hash #define SWI_ReverseHash Yap_heap_regs->swi_reverse_hash
#define SWI_BlobTypes Yap_heap_regs->swi_blob_types #define SWI_BlobTypes Yap_heap_regs->swi_blob_types
#define SWI_Blobs Yap_heap_regs->swi_blobs #define SWI_Blobs Yap_heap_regs->swi_blobs

View File

@ -1,213 +1,213 @@
/* This file, hglobals.h, was generated automatically by "yap -L misc/buildheap" /* This file, hglobals.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/GLOBALS instead */ please do not update, update misc/GLOBALS instead */
typedef struct worker_local { typedef struct worker_local {
int c_input_stream; int c_input_stream;
int c_output_stream; int c_output_stream;
int c_error_stream; int c_error_stream;
restoreinfo rinfo; restoreinfo rinfo;
struct reduction_counters call_counters; struct reduction_counters call_counters;
int interrupts_disabled; int interrupts_disabled;
union CONSULT_OBJ* consultsp; union CONSULT_OBJ* consultsp;
UInt consultcapacity; UInt consultcapacity;
union CONSULT_OBJ* consultbase; union CONSULT_OBJ* consultbase;
union CONSULT_OBJ* consultlow; union CONSULT_OBJ* consultlow;
Term global_arena; Term global_arena;
UInt global_arena_overflows; UInt global_arena_overflows;
Int delay_arena_overflows; Int delay_arena_overflows;
Int arena_overflows; Int arena_overflows;
Int depth_arenas; Int depth_arenas;
int arith_error; int arith_error;
struct pred_entry* last_asserted_pred; struct pred_entry* last_asserted_pred;
int debug_on; int debug_on;
struct format_status* f_info; struct format_status* f_info;
char* scanner_stack; char* scanner_stack;
struct scanner_extra_alloc* scanner_extra_blocks; struct scanner_extra_alloc* scanner_extra_blocks;
struct DB_TERM *ball_term; struct DB_TERM *ball_term;
UInt active_signals; UInt active_signals;
UInt i_pred_arity; UInt i_pred_arity;
yamop* prof_end; yamop* prof_end;
int uncaught_throw; int uncaught_throw;
int doing_undefp; int doing_undefp;
Int start_line; Int start_line;
scratch_block scratchpad; scratch_block scratchpad;
#ifdef COROUTINING #ifdef COROUTINING
Term woken_goals; Term woken_goals;
Term atts_mutable_list; Term atts_mutable_list;
#endif #endif
Term gc_generation; Term gc_generation;
Term gc_phase; Term gc_phase;
UInt gc_current_phase; UInt gc_current_phase;
UInt gc_calls; UInt gc_calls;
Int tot_gc_time; Int tot_gc_time;
YAP_ULONG_LONG tot_gc_recovered; YAP_ULONG_LONG tot_gc_recovered;
Int last_gc_time; Int last_gc_time;
Int last_ss_time; Int last_ss_time;
#if LOW_LEVEL_TRACER #if LOW_LEVEL_TRACER
Int total_cps; Int total_cps;
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
lockvar signal_lock; lockvar signal_lock;
struct pred_entry* wpp; struct pred_entry* wpp;
Int tot_marked; Int tot_marked;
Int tot_oldies; Int tot_oldies;
#if DEBUG && COROUTINING #if DEBUG && COROUTINING
UInt tot_smarked; UInt tot_smarked;
#endif #endif
struct choicept *wl_current_B; struct choicept *wl_current_B;
CELL* wl_prev_HB; CELL* wl_prev_HB;
CELL* hgen; CELL* hgen;
CELL** ip_top; CELL** ip_top;
#if GC_NO_TAGS #if GC_NO_TAGS
char* b_p; char* b_p;
#endif #endif
#if defined(TABLING) || defined(SBA) #if defined(TABLING) || defined(SBA)
struct trail_frame* wl_sTR; struct trail_frame* wl_sTR;
struct trail_frame* wl_sTR0; struct trail_frame* wl_sTR0;
struct trail_frame* new_tr; struct trail_frame* new_tr;
#else #else
Term *wl_sTR; Term *wl_sTR;
Term *wl_sTR0; Term *wl_sTR0;
Term *new_tr; Term *new_tr;
#endif #endif
struct gc_mark_continuation* conttop0; struct gc_mark_continuation* conttop0;
struct gc_mark_continuation* conttop; struct gc_mark_continuation* conttop;
int disc_trail_entries; int disc_trail_entries;
gc_ma_hash_entry Gc_ma_hash_table[GC_MAVARS_HASH_SIZE]; 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_top;
gc_ma_hash_entry* Gc_ma_h_list; gc_ma_hash_entry* Gc_ma_h_list;
UInt Gc_timestamp; UInt Gc_timestamp;
ADDR DB_vec; ADDR DB_vec;
ADDR DB_vec0; ADDR DB_vec0;
struct RB_red_blk_node* DB_root; struct RB_red_blk_node* DB_root;
struct RB_red_blk_node* DB_nil; struct RB_red_blk_node* DB_nil;
#endif /* defined(YAPOR) || defined(THREADS) */ #endif /* defined(YAPOR) || defined(THREADS) */
sigjmp_buf gc_restore; sigjmp_buf gc_restore;
struct array_entry* dynamic_arrays; struct array_entry* dynamic_arrays;
struct static_array_entry* static_arrays; struct static_array_entry* static_arrays;
struct global_entry* global_variables; struct global_entry* global_variables;
int allow_restart; int allow_restart;
struct mem_blk* cmem_first_block; struct mem_blk* cmem_first_block;
UInt cmem_first_block_sz; UInt cmem_first_block_sz;
Int* label_first_array; Int* label_first_array;
UInt label_first_array_sz; UInt label_first_array_sz;
struct PL_local_data *Yap_ld_; struct PL_local_data *Yap_ld_;
struct open_query_struct* _execution; struct open_query_struct* _execution;
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS) #if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
struct worker worker; struct worker worker;
#endif #endif
#ifdef THREADS #ifdef THREADS
struct thandle thread_handle; struct thandle thread_handle;
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle) #define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle) #define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
#endif #endif
} w_local; } w_local;
typedef struct worker_shared { typedef struct worker_shared {
#if THREADS #if THREADS
UInt n_of_threads; UInt n_of_threads;
UInt n_of_threads_created; UInt n_of_threads_created;
UInt threads_total_time; UInt threads_total_time;
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
lockvar bgl; lockvar bgl;
#endif #endif
int allow_local_expansion; int allow_local_expansion;
int allow_global_expansion; int allow_global_expansion;
int allow_trail_expansion; int allow_trail_expansion;
UInt size_of_overflow; UInt size_of_overflow;
UInt agc_last_call; UInt agc_last_call;
UInt agc_threshold; UInt agc_threshold;
Agc_hook agc_hook; Agc_hook agc_hook;
#if HAVE_LIBREADLINE #if HAVE_LIBREADLINE
char *readline_buf; char *readline_buf;
char *readline_pos; char *readline_pos;
#endif #endif
#ifdef THREADS #ifdef THREADS
lockvar thread_handles_lock; lockvar thread_handles_lock;
#endif #endif
#if defined(YAPOR) || defined(TABLING) #if defined(YAPOR) || defined(TABLING)
struct global_data global; struct global_data global;
struct local_data remote[MAX_WORKERS]; struct local_data remote[MAX_WORKERS];
#endif #endif
int initialised; int initialised;
int initialised_from_pl; int initialised_from_pl;
int pl_argc; int pl_argc;
char **pl_argv; char **pl_argv;
struct halt_hook *yap_halt_hook; struct halt_hook *yap_halt_hook;
} w_shared; } w_shared;

View File

@ -1,304 +1,304 @@
/* This file, hstruct.h, was generated automatically by "yap -L misc/buildheap" /* This file, hstruct.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/HEAPFIELDS instead */ please do not update, update misc/HEAPFIELDS instead */
UInt hole_size; UInt hole_size;
struct malloc_state *av_; struct malloc_state *av_;
#if USE_DL_MALLOC #if USE_DL_MALLOC
struct memory_hole memory_holes[MAX_DLMALLOC_HOLES]; struct memory_hole memory_holes[MAX_DLMALLOC_HOLES];
UInt nof_memory_holes; UInt nof_memory_holes;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
lockvar dlmalloc_lock; lockvar dlmalloc_lock;
#endif #endif
#endif #endif
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO) #if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
#ifndef HeapUsed #ifndef HeapUsed
#define HeapUsed Yap_givemallinfo() #define HeapUsed Yap_givemallinfo()
#endif #endif
Int heap_used; Int heap_used;
#else #else
Int heap_used; Int heap_used;
#endif #endif
Int heap_max; Int heap_max;
ADDR heap_top; ADDR heap_top;
ADDR heap_lim; ADDR heap_lim;
struct FREEB *free_blocks; struct FREEB *free_blocks;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
lockvar free_blocks_lock; lockvar free_blocks_lock;
lockvar heap_used_lock; lockvar heap_used_lock;
lockvar heap_top_lock; lockvar heap_top_lock;
int heap_top_owner; int heap_top_owner;
#endif #endif
#if USE_THREADED_CODE #if USE_THREADED_CODE
opentry *op_rtable; opentry *op_rtable;
#endif #endif
OPCODE execute_cpred_op_code; OPCODE execute_cpred_op_code;
OPCODE expand_op_code; OPCODE expand_op_code;
OPCODE fail_op; OPCODE fail_op;
OPCODE index_op; OPCODE index_op;
OPCODE lockpred_op; OPCODE lockpred_op;
OPCODE orlast_op; OPCODE orlast_op;
OPCODE undef_op; OPCODE undef_op;
UInt n_of_atoms; UInt n_of_atoms;
UInt atom_hash_table_size; UInt atom_hash_table_size;
UInt wide_atom_hash_table_size; UInt wide_atom_hash_table_size;
UInt n_of_wide_atoms; UInt n_of_wide_atoms;
AtomHashEntry invisiblechain; AtomHashEntry invisiblechain;
AtomHashEntry *wide_hash_chain; AtomHashEntry *wide_hash_chain;
AtomHashEntry *hash_chain; AtomHashEntry *hash_chain;
#include "tatoms.h" #include "tatoms.h"
#ifdef EUROTRA #ifdef EUROTRA
Term term_dollar_u; Term term_dollar_u;
#endif #endif
Term term_prolog; Term term_prolog;
Term term_refound_var; Term term_refound_var;
Term user_module; Term user_module;
Term idb_module; Term idb_module;
Term attributes_module; Term attributes_module;
Term charsio_module; Term charsio_module;
Term terms_module; Term terms_module;
Term system_module; Term system_module;
Term operating_system_module; Term operating_system_module;
Term readutil_module; Term readutil_module;
Term hacks_module; Term hacks_module;
Term arg_module; Term arg_module;
Term globals_module; Term globals_module;
Term swi_module; Term swi_module;
struct mod_entry *current_modules; struct mod_entry *current_modules;
yap_exec_mode execution_mode; yap_exec_mode execution_mode;
struct pred_entry **pred_hash; struct pred_entry **pred_hash;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
rwlock_t pred_hash_rw_lock; rwlock_t pred_hash_rw_lock;
#endif #endif
UInt preds_in_hash_table; UInt preds_in_hash_table;
UInt pred_hash_table_size; UInt pred_hash_table_size;
struct pred_entry *creep_code; struct pred_entry *creep_code;
struct pred_entry *undef_code; struct pred_entry *undef_code;
struct pred_entry *spy_code; struct pred_entry *spy_code;
struct pred_entry *pred_fail; struct pred_entry *pred_fail;
struct pred_entry *pred_true; struct pred_entry *pred_true;
#ifdef COROUTINING #ifdef COROUTINING
struct pred_entry *wake_up_code; struct pred_entry *wake_up_code;
#endif #endif
struct pred_entry *pred_goal_expansion; struct pred_entry *pred_goal_expansion;
struct pred_entry *pred_meta_call; struct pred_entry *pred_meta_call;
struct pred_entry *pred_dollar_catch; struct pred_entry *pred_dollar_catch;
struct pred_entry *pred_recorded_with_key; struct pred_entry *pred_recorded_with_key;
struct pred_entry *pred_log_upd_clause; struct pred_entry *pred_log_upd_clause;
struct pred_entry *pred_log_upd_clause_erase; struct pred_entry *pred_log_upd_clause_erase;
struct pred_entry *pred_log_upd_clause0; struct pred_entry *pred_log_upd_clause0;
struct pred_entry *pred_static_clause; struct pred_entry *pred_static_clause;
struct pred_entry *pred_throw; struct pred_entry *pred_throw;
struct pred_entry *pred_handle_throw; struct pred_entry *pred_handle_throw;
struct pred_entry *pred_is; struct pred_entry *pred_is;
struct pred_entry *pred_safe_call_cleanup; struct pred_entry *pred_safe_call_cleanup;
struct pred_entry *pred_restore_regs; struct pred_entry *pred_restore_regs;
#ifdef YAPOR #ifdef YAPOR
struct pred_entry *pred_getwork; struct pred_entry *pred_getwork;
struct pred_entry *pred_getwork_seq; struct pred_entry *pred_getwork_seq;
#endif /* YAPOR */ #endif /* YAPOR */
#ifdef LOW_LEVEL_TRACER #ifdef LOW_LEVEL_TRACER
int yap_do_low_level_trace; int yap_do_low_level_trace;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
lockvar low_level_trace_lock; lockvar low_level_trace_lock;
#endif #endif
#endif #endif
UInt clause_space; UInt clause_space;
UInt index_space_Tree; UInt index_space_Tree;
UInt index_space_EXT; UInt index_space_EXT;
UInt index_space_SW; UInt index_space_SW;
UInt lu_clause_space; UInt lu_clause_space;
UInt lu_index_space_Tree; UInt lu_index_space_Tree;
UInt lu_index_space_CP; UInt lu_index_space_CP;
UInt lu_index_space_EXT; UInt lu_index_space_EXT;
UInt lu_index_space_SW; UInt lu_index_space_SW;
yamop comma_code[5]; yamop comma_code[5];
yamop dummycode[1]; yamop dummycode[1];
yamop failcode[1]; yamop failcode[1];
yamop nocode[1]; yamop nocode[1];
yamop env_for_trustfail[2]; yamop env_for_trustfail[2];
yamop *trustfailcode; yamop *trustfailcode;
yamop env_for_yescode[2]; yamop env_for_yescode[2];
yamop *yescode; yamop *yescode;
yamop rtrycode[1]; yamop rtrycode[1];
#ifdef BEAM #ifdef BEAM
yamop beam_retry_code[1]; yamop beam_retry_code[1];
#endif /* BEAM */ #endif /* BEAM */
#ifdef YAPOR #ifdef YAPOR
int seq_def; int seq_def;
yamop getwork_code[1]; yamop getwork_code[1];
yamop getwork_seq_code[1]; yamop getwork_seq_code[1];
yamop getwork_first_time[1]; yamop getwork_first_time[1];
#endif /* YAPOR */ #endif /* YAPOR */
#ifdef TABLING #ifdef TABLING
yamop table_load_answer_code[1]; yamop table_load_answer_code[1];
yamop table_try_answer_code[1]; yamop table_try_answer_code[1];
yamop table_answer_resolution_code[1]; yamop table_answer_resolution_code[1];
yamop table_completion_code[1]; yamop table_completion_code[1];
#endif /* TABLING */ #endif /* TABLING */
yamop *debugger_p_before_spy; yamop *debugger_p_before_spy;
yamop *retry_recordedp_code; yamop *retry_recordedp_code;
yamop *retry_recorded_k_code; yamop *retry_recorded_k_code;
int system_profiling; int system_profiling;
int system_call_counting; int system_call_counting;
int system_pred_goal_expansion_all; int system_pred_goal_expansion_all;
int system_pred_goal_expansion_func; int system_pred_goal_expansion_func;
int system_pred_goal_expansion_on; int system_pred_goal_expansion_on;
int compiler_optimizer_on; int compiler_optimizer_on;
int compiler_compile_mode; int compiler_compile_mode;
int compiler_profiling; int compiler_profiling;
int compiler_call_counting; int compiler_call_counting;
int compiler_compile_arrays; int compiler_compile_arrays;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
lockvar dbterms_list_lock; lockvar dbterms_list_lock;
#endif #endif
struct dbterm_list *dbterms_list; struct dbterm_list *dbterms_list;
yamop *expand_clauses_first; yamop *expand_clauses_first;
yamop *expand_clauses_last; yamop *expand_clauses_last;
UInt expand_clauses; UInt expand_clauses;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
lockvar expand_clauses_list_lock; lockvar expand_clauses_list_lock;
lockvar op_list_lock; lockvar op_list_lock;
#endif #endif
#ifdef DEBUG #ifdef DEBUG
UInt new_cps; UInt new_cps;
UInt live_cps; UInt live_cps;
UInt dirty_cps; UInt dirty_cps;
UInt freed_cps; UInt freed_cps;
#endif #endif
UInt expand_clauses_sz; UInt expand_clauses_sz;
struct udi_info *udi_control_blocks; struct udi_info *udi_control_blocks;
Int static_predicates_marked; Int static_predicates_marked;
Prop *IntKeys; Prop *IntKeys;
Prop *IntLUKeys; Prop *IntLUKeys;
Prop *IntBBKeys; Prop *IntBBKeys;
UInt int_keys_size; UInt int_keys_size;
UInt int_keys_timestamp; UInt int_keys_timestamp;
UInt int_bb_keys_size; UInt int_bb_keys_size;
int update_mode; int update_mode;
struct DB_STRUCT *db_erased_marker; struct DB_STRUCT *db_erased_marker;
struct logic_upd_clause *logdb_erased_marker; struct logic_upd_clause *logdb_erased_marker;
struct static_clause *dead_static_clauses; struct static_clause *dead_static_clauses;
struct static_mega_clause *dead_mega_clauses; struct static_mega_clause *dead_mega_clauses;
struct static_index *dead_static_indices; struct static_index *dead_static_indices;
struct logic_upd_clause *db_erased_list; struct logic_upd_clause *db_erased_list;
struct logic_upd_index *db_erased_ilist; struct logic_upd_index *db_erased_ilist;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
lockvar dead_static_clauses_lock; lockvar dead_static_clauses_lock;
lockvar dead_mega_clauses_lock; lockvar dead_mega_clauses_lock;
lockvar dead_static_indices_lock; lockvar dead_static_indices_lock;
#endif #endif
#ifdef COROUTINING #ifdef COROUTINING
int num_of_atts; int num_of_atts;
UInt atts_size; UInt atts_size;
#endif #endif
Int yap_flags_field[NUMBER_OF_YAP_FLAGS]; Int yap_flags_field[NUMBER_OF_YAP_FLAGS];
struct operator_entry *op_list; struct operator_entry *op_list;
struct stream_desc *yap_streams; struct stream_desc *yap_streams;
UInt n_of_file_aliases; UInt n_of_file_aliases;
UInt sz_of_file_aliases; UInt sz_of_file_aliases;
struct AliasDescS *file_aliases; struct AliasDescS *file_aliases;
Atom atprompt; Atom atprompt;
char prompt[MAX_PROMPT]; char _prompt[MAX_PROMPT];
char *char_conversion_table; char *char_conversion_table;
char *char_conversion_table2; char *char_conversion_table2;
int parser_error_style; int parser_error_style;
char *yap_lib_dir; char *yap_lib_dir;
void *last_wtime; void *last_wtime;
int debugger_output_msg; int debugger_output_msg;
#if LOW_PROF #if LOW_PROF
int profiler_on; int profiler_on;
int offline_profiler; int offline_profiler;
FILE *f_prof; FILE *f_prof;
FILE *f_preds; FILE *f_preds;
UInt prof_preds; UInt prof_preds;
#endif /* LOW_PROF */ #endif /* LOW_PROF */
struct ForeignLoadItem *foreign_code_loaded; struct ForeignLoadItem *foreign_code_loaded;
ADDR foreign_code_base; ADDR foreign_code_base;
ADDR foreign_code_top; ADDR foreign_code_top;
ADDR foreign_code_max; ADDR foreign_code_max;
struct record_list *yap_records; struct record_list *yap_records;
Atom swi_atoms[N_SWI_ATOMS]; Atom swi_atoms[N_SWI_ATOMS];
Functor swi_functors[N_SWI_FUNCTORS]; Functor swi_functors[N_SWI_FUNCTORS];
struct swi_reverse_hash swi_reverse_hash[N_SWI_HASH]; struct swi_reverse_hash swi_reverse_hash[N_SWI_HASH];
struct PL_blob_t *swi_blob_types; struct PL_blob_t *swi_blob_types;
struct AtomEntryStruct *swi_blobs; struct AtomEntryStruct *swi_blobs;

View File

@ -1,211 +1,211 @@
/* This file, iglobals.h, was generated automatically by "yap -L misc/buildheap" /* This file, iglobals.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/GLOBALS instead */ please do not update, update misc/GLOBALS instead */
static void InitWorker(int wid) { static void InitWorker(int wid) {
FOREIGN_WL(wid)->c_input_stream = 0; FOREIGN_WL(wid)->c_input_stream = 0;
FOREIGN_WL(wid)->c_output_stream = 1; FOREIGN_WL(wid)->c_output_stream = 1;
FOREIGN_WL(wid)->c_error_stream = 2; FOREIGN_WL(wid)->c_error_stream = 2;
FOREIGN_WL(wid)->rinfo.old_ASP = NULL; FOREIGN_WL(wid)->rinfo.old_ASP = NULL;
FOREIGN_WL(wid)->rinfo.old_LCL0 = NULL; FOREIGN_WL(wid)->rinfo.old_LCL0 = NULL;
FOREIGN_WL(wid)->rinfo.old_TR = NULL; FOREIGN_WL(wid)->rinfo.old_TR = NULL;
FOREIGN_WL(wid)->rinfo.old_GlobalBase = NULL; FOREIGN_WL(wid)->rinfo.old_GlobalBase = NULL;
FOREIGN_WL(wid)->rinfo.old_H = NULL; FOREIGN_WL(wid)->rinfo.old_H = NULL;
FOREIGN_WL(wid)->rinfo.old_H0 = NULL; FOREIGN_WL(wid)->rinfo.old_H0 = NULL;
FOREIGN_WL(wid)->rinfo.old_TrailBase = NULL; FOREIGN_WL(wid)->rinfo.old_TrailBase = NULL;
FOREIGN_WL(wid)->rinfo.old_TrailTop = NULL; FOREIGN_WL(wid)->rinfo.old_TrailTop = NULL;
FOREIGN_WL(wid)->rinfo.old_HeapBase = NULL; FOREIGN_WL(wid)->rinfo.old_HeapBase = NULL;
FOREIGN_WL(wid)->rinfo.old_HeapTop = NULL; FOREIGN_WL(wid)->rinfo.old_HeapTop = NULL;
FOREIGN_WL(wid)->rinfo.cl_diff = 0L; FOREIGN_WL(wid)->rinfo.cl_diff = 0L;
FOREIGN_WL(wid)->rinfo.g_diff = 0L; FOREIGN_WL(wid)->rinfo.g_diff = 0L;
FOREIGN_WL(wid)->rinfo.h_diff = 0L; FOREIGN_WL(wid)->rinfo.h_diff = 0L;
FOREIGN_WL(wid)->rinfo.g_diff0 = 0L; FOREIGN_WL(wid)->rinfo.g_diff0 = 0L;
FOREIGN_WL(wid)->rinfo.g_split = NULL; FOREIGN_WL(wid)->rinfo.g_split = NULL;
FOREIGN_WL(wid)->rinfo.l_diff = 0L; FOREIGN_WL(wid)->rinfo.l_diff = 0L;
FOREIGN_WL(wid)->rinfo.tr_diff = 0L; FOREIGN_WL(wid)->rinfo.tr_diff = 0L;
FOREIGN_WL(wid)->rinfo.x_diff = 0L; FOREIGN_WL(wid)->rinfo.x_diff = 0L;
FOREIGN_WL(wid)->rinfo.delay_diff = 0L; FOREIGN_WL(wid)->rinfo.delay_diff = 0L;
FOREIGN_WL(wid)->rinfo.base_diff = 0L; FOREIGN_WL(wid)->rinfo.base_diff = 0L;
FOREIGN_WL(wid)->call_counters.reductions = 0L; FOREIGN_WL(wid)->call_counters.reductions = 0L;
FOREIGN_WL(wid)->call_counters.reductions_retries = 0L; FOREIGN_WL(wid)->call_counters.reductions_retries = 0L;
FOREIGN_WL(wid)->call_counters.retries = 0L; FOREIGN_WL(wid)->call_counters.retries = 0L;
FOREIGN_WL(wid)->call_counters.reductions_on = 0L; FOREIGN_WL(wid)->call_counters.reductions_on = 0L;
FOREIGN_WL(wid)->call_counters.reductions_retries_on = 0L; FOREIGN_WL(wid)->call_counters.reductions_retries_on = 0L;
FOREIGN_WL(wid)->call_counters.retries_on = 0L; FOREIGN_WL(wid)->call_counters.retries_on = 0L;
FOREIGN_WL(wid)->interrupts_disabled = FALSE; FOREIGN_WL(wid)->interrupts_disabled = FALSE;
FOREIGN_WL(wid)->consultsp = NULL; FOREIGN_WL(wid)->consultsp = NULL;
FOREIGN_WL(wid)->consultbase = NULL; FOREIGN_WL(wid)->consultbase = NULL;
FOREIGN_WL(wid)->consultlow = NULL; FOREIGN_WL(wid)->consultlow = NULL;
FOREIGN_WL(wid)->global_arena = 0L; FOREIGN_WL(wid)->global_arena = 0L;
FOREIGN_WL(wid)->global_arena_overflows = 0L; FOREIGN_WL(wid)->global_arena_overflows = 0L;
FOREIGN_WL(wid)->delay_arena_overflows = 0L; FOREIGN_WL(wid)->delay_arena_overflows = 0L;
FOREIGN_WL(wid)->arena_overflows = 0L; FOREIGN_WL(wid)->arena_overflows = 0L;
FOREIGN_WL(wid)->depth_arenas = 0; FOREIGN_WL(wid)->depth_arenas = 0;
FOREIGN_WL(wid)->arith_error = FALSE; FOREIGN_WL(wid)->arith_error = FALSE;
FOREIGN_WL(wid)->last_asserted_pred = NULL; FOREIGN_WL(wid)->last_asserted_pred = NULL;
FOREIGN_WL(wid)->debug_on = FALSE; FOREIGN_WL(wid)->debug_on = FALSE;
FOREIGN_WL(wid)->f_info = NULL; FOREIGN_WL(wid)->f_info = NULL;
FOREIGN_WL(wid)->scanner_stack = NULL; FOREIGN_WL(wid)->scanner_stack = NULL;
FOREIGN_WL(wid)->scanner_extra_blocks = NULL; FOREIGN_WL(wid)->scanner_extra_blocks = NULL;
FOREIGN_WL(wid)->ball_term = NULL; FOREIGN_WL(wid)->ball_term = NULL;
FOREIGN_WL(wid)->active_signals = 0L; FOREIGN_WL(wid)->active_signals = 0L;
FOREIGN_WL(wid)->i_pred_arity = 0L; FOREIGN_WL(wid)->i_pred_arity = 0L;
FOREIGN_WL(wid)->prof_end = NULL; FOREIGN_WL(wid)->prof_end = NULL;
FOREIGN_WL(wid)->uncaught_throw = FALSE; FOREIGN_WL(wid)->uncaught_throw = FALSE;
FOREIGN_WL(wid)->doing_undefp = FALSE; FOREIGN_WL(wid)->doing_undefp = FALSE;
FOREIGN_WL(wid)->start_line = 0L; FOREIGN_WL(wid)->start_line = 0L;
InitScratchPad(wid); InitScratchPad(wid);
#ifdef COROUTINING #ifdef COROUTINING
FOREIGN_WL(wid)->woken_goals = 0L; FOREIGN_WL(wid)->woken_goals = 0L;
FOREIGN_WL(wid)->atts_mutable_list = 0L; FOREIGN_WL(wid)->atts_mutable_list = 0L;
#endif #endif
FOREIGN_WL(wid)->gc_generation = 0L; FOREIGN_WL(wid)->gc_generation = 0L;
FOREIGN_WL(wid)->gc_phase = 0L; FOREIGN_WL(wid)->gc_phase = 0L;
FOREIGN_WL(wid)->gc_current_phase = 0L; FOREIGN_WL(wid)->gc_current_phase = 0L;
FOREIGN_WL(wid)->gc_calls = 0L; FOREIGN_WL(wid)->gc_calls = 0L;
FOREIGN_WL(wid)->tot_gc_time = 0L; FOREIGN_WL(wid)->tot_gc_time = 0L;
FOREIGN_WL(wid)->tot_gc_recovered = 0L; FOREIGN_WL(wid)->tot_gc_recovered = 0L;
FOREIGN_WL(wid)->last_gc_time = 0L; FOREIGN_WL(wid)->last_gc_time = 0L;
FOREIGN_WL(wid)->last_ss_time = 0L; FOREIGN_WL(wid)->last_ss_time = 0L;
#if LOW_LEVEL_TRACER #if LOW_LEVEL_TRACER
FOREIGN_WL(wid)->total_cps = 0; FOREIGN_WL(wid)->total_cps = 0;
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
INIT_LOCK(FOREIGN_WL(wid)->signal_lock); INIT_LOCK(FOREIGN_WL(wid)->signal_lock);
FOREIGN_WL(wid)->wpp = NULL; FOREIGN_WL(wid)->wpp = NULL;
FOREIGN_WL(wid)->tot_marked = 0L; FOREIGN_WL(wid)->tot_marked = 0L;
FOREIGN_WL(wid)->tot_oldies = 0L; FOREIGN_WL(wid)->tot_oldies = 0L;
#if DEBUG && COROUTINING #if DEBUG && COROUTINING
FOREIGN_WL(wid)->tot_smarked = 0L; FOREIGN_WL(wid)->tot_smarked = 0L;
#endif #endif
FOREIGN_WL(wid)->wl_current_B = NULL; FOREIGN_WL(wid)->wl_current_B = NULL;
FOREIGN_WL(wid)->wl_prev_HB = NULL; FOREIGN_WL(wid)->wl_prev_HB = NULL;
FOREIGN_WL(wid)->hgen = NULL; FOREIGN_WL(wid)->hgen = NULL;
FOREIGN_WL(wid)->ip_top = NULL; FOREIGN_WL(wid)->ip_top = NULL;
#if GC_NO_TAGS #if GC_NO_TAGS
FOREIGN_WL(wid)->b_p = NULL; FOREIGN_WL(wid)->b_p = NULL;
#endif #endif
#if defined(TABLING) || defined(SBA) #if defined(TABLING) || defined(SBA)
FOREIGN_WL(wid)->wl_sTR = NULL; FOREIGN_WL(wid)->wl_sTR = NULL;
FOREIGN_WL(wid)->wl_sTR0 = NULL; FOREIGN_WL(wid)->wl_sTR0 = NULL;
FOREIGN_WL(wid)->new_tr = NULL; FOREIGN_WL(wid)->new_tr = NULL;
#else #else
FOREIGN_WL(wid)->wl_sTR = NULL; FOREIGN_WL(wid)->wl_sTR = NULL;
FOREIGN_WL(wid)->wl_sTR0 = NULL; FOREIGN_WL(wid)->wl_sTR0 = NULL;
FOREIGN_WL(wid)->new_tr = NULL; FOREIGN_WL(wid)->new_tr = NULL;
#endif #endif
FOREIGN_WL(wid)->conttop0 = NULL; FOREIGN_WL(wid)->conttop0 = NULL;
FOREIGN_WL(wid)->conttop = NULL; FOREIGN_WL(wid)->conttop = NULL;
FOREIGN_WL(wid)->disc_trail_entries = 0; FOREIGN_WL(wid)->disc_trail_entries = 0;
FOREIGN_WL(wid)->Gc_ma_h_top = NULL; FOREIGN_WL(wid)->Gc_ma_h_top = NULL;
FOREIGN_WL(wid)->Gc_ma_h_list = NULL; FOREIGN_WL(wid)->Gc_ma_h_list = NULL;
FOREIGN_WL(wid)->Gc_timestamp = 0L; FOREIGN_WL(wid)->Gc_timestamp = 0L;
FOREIGN_WL(wid)->DB_vec = NULL; FOREIGN_WL(wid)->DB_vec = NULL;
FOREIGN_WL(wid)->DB_vec0 = NULL; FOREIGN_WL(wid)->DB_vec0 = NULL;
FOREIGN_WL(wid)->DB_root = NULL; FOREIGN_WL(wid)->DB_root = NULL;
FOREIGN_WL(wid)->DB_nil = NULL; FOREIGN_WL(wid)->DB_nil = NULL;
#endif /* defined(YAPOR) || defined(THREADS) */ #endif /* defined(YAPOR) || defined(THREADS) */
FOREIGN_WL(wid)->dynamic_arrays = NULL; FOREIGN_WL(wid)->dynamic_arrays = NULL;
FOREIGN_WL(wid)->static_arrays = NULL; FOREIGN_WL(wid)->static_arrays = NULL;
FOREIGN_WL(wid)->global_variables = NULL; FOREIGN_WL(wid)->global_variables = NULL;
FOREIGN_WL(wid)->allow_restart = FALSE; FOREIGN_WL(wid)->allow_restart = FALSE;
FOREIGN_WL(wid)->cmem_first_block = NULL; FOREIGN_WL(wid)->cmem_first_block = NULL;
FOREIGN_WL(wid)->cmem_first_block_sz = 0L; FOREIGN_WL(wid)->cmem_first_block_sz = 0L;
FOREIGN_WL(wid)->label_first_array = NULL; FOREIGN_WL(wid)->label_first_array = NULL;
FOREIGN_WL(wid)->label_first_array_sz = 0L; FOREIGN_WL(wid)->label_first_array_sz = 0L;
FOREIGN_WL(wid)->Yap_ld_ = Yap_InitThreadIO(wid); FOREIGN_WL(wid)->Yap_ld_ = Yap_InitThreadIO(wid);
FOREIGN_WL(wid)->_execution = NULL; FOREIGN_WL(wid)->_execution = NULL;
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS) #if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
#endif #endif
#ifdef THREADS #ifdef THREADS
InitThreadHandle(wid); InitThreadHandle(wid);
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle) #define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle) #define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
#endif #endif
} }
static void InitGlobal(void) { static void InitGlobal(void) {
#if THREADS #if THREADS
Yap_global->n_of_threads = 1; Yap_global->n_of_threads = 1;
Yap_global->n_of_threads_created = 1; Yap_global->n_of_threads_created = 1;
Yap_global->threads_total_time = 0L; Yap_global->threads_total_time = 0L;
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
INIT_LOCK(Yap_global->bgl); INIT_LOCK(Yap_global->bgl);
#endif #endif
Yap_global->allow_local_expansion = TRUE; Yap_global->allow_local_expansion = TRUE;
Yap_global->allow_global_expansion = TRUE; Yap_global->allow_global_expansion = TRUE;
Yap_global->allow_trail_expansion = TRUE; Yap_global->allow_trail_expansion = TRUE;
Yap_global->size_of_overflow = 0; Yap_global->size_of_overflow = 0;
Yap_global->agc_last_call = 0; Yap_global->agc_last_call = 0;
Yap_global->agc_threshold = 10000; Yap_global->agc_threshold = 10000;
Yap_global->agc_hook = NULL; Yap_global->agc_hook = NULL;
#if HAVE_LIBREADLINE #if HAVE_LIBREADLINE
Yap_global->readline_buf = NULL; Yap_global->readline_buf = NULL;
Yap_global->readline_pos = 0L; Yap_global->readline_pos = 0L;
#endif #endif
#ifdef THREADS #ifdef THREADS
INIT_LOCK(Yap_global->thread_handles_lock); INIT_LOCK(Yap_global->thread_handles_lock);
#endif #endif
#if defined(YAPOR) || defined(TABLING) #if defined(YAPOR) || defined(TABLING)
#endif #endif
Yap_global->initialised = FALSE; Yap_global->initialised = FALSE;
Yap_global->initialised_from_pl = FALSE; Yap_global->initialised_from_pl = FALSE;
Yap_global->pl_argc = 0; Yap_global->pl_argc = 0;
Yap_global->pl_argv = NULL; Yap_global->pl_argv = NULL;
Yap_global->yap_halt_hook = NULL; Yap_global->yap_halt_hook = NULL;
} }

View File

@ -1,304 +1,304 @@
/* This file, ihstruct.h, was generated automatically by "yap -L misc/buildheap" /* This file, ihstruct.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/HEAPFIELDS instead */ please do not update, update misc/HEAPFIELDS instead */
#if USE_DL_MALLOC #if USE_DL_MALLOC
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
INIT_LOCK(Yap_heap_regs->dlmalloc_lock); INIT_LOCK(Yap_heap_regs->dlmalloc_lock);
#endif #endif
#endif #endif
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO) #if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
#ifndef HeapUsed #ifndef HeapUsed
#define HeapUsed Yap_givemallinfo() #define HeapUsed Yap_givemallinfo()
#endif #endif
#else #else
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
INIT_LOCK(Yap_heap_regs->free_blocks_lock); INIT_LOCK(Yap_heap_regs->free_blocks_lock);
INIT_LOCK(Yap_heap_regs->heap_used_lock); INIT_LOCK(Yap_heap_regs->heap_used_lock);
INIT_LOCK(Yap_heap_regs->heap_top_lock); INIT_LOCK(Yap_heap_regs->heap_top_lock);
Yap_heap_regs->heap_top_owner = -1; Yap_heap_regs->heap_top_owner = -1;
#endif #endif
#if USE_THREADED_CODE #if USE_THREADED_CODE
#endif #endif
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred); Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index); Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
Yap_heap_regs->fail_op = Yap_opcode(_op_fail); Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
Yap_heap_regs->index_op = Yap_opcode(_index_pred); Yap_heap_regs->index_op = Yap_opcode(_index_pred);
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred); Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
Yap_heap_regs->orlast_op = Yap_opcode(_or_last); Yap_heap_regs->orlast_op = Yap_opcode(_or_last);
Yap_heap_regs->undef_op = Yap_opcode(_undef_p); Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
InitInvisibleAtoms(); InitInvisibleAtoms();
InitWideAtoms(); InitWideAtoms();
InitAtoms(); InitAtoms();
#include "iatoms.h" #include "iatoms.h"
#ifdef EUROTRA #ifdef EUROTRA
Yap_heap_regs->term_dollar_u = MkAtomTerm(AtomDollarU); Yap_heap_regs->term_dollar_u = MkAtomTerm(AtomDollarU);
#endif #endif
Yap_heap_regs->term_prolog = MkAtomTerm(AtomProlog); Yap_heap_regs->term_prolog = MkAtomTerm(AtomProlog);
Yap_heap_regs->term_refound_var = MkAtomTerm(AtomRefoundVar); Yap_heap_regs->term_refound_var = MkAtomTerm(AtomRefoundVar);
Yap_heap_regs->user_module = MkAtomTerm(AtomUser); Yap_heap_regs->user_module = MkAtomTerm(AtomUser);
Yap_heap_regs->idb_module = MkAtomTerm(AtomIDB); Yap_heap_regs->idb_module = MkAtomTerm(AtomIDB);
Yap_heap_regs->attributes_module = MkAtomTerm(AtomAttributes); Yap_heap_regs->attributes_module = MkAtomTerm(AtomAttributes);
Yap_heap_regs->charsio_module = MkAtomTerm(AtomCharsio); Yap_heap_regs->charsio_module = MkAtomTerm(AtomCharsio);
Yap_heap_regs->terms_module = MkAtomTerm(AtomTerms); Yap_heap_regs->terms_module = MkAtomTerm(AtomTerms);
Yap_heap_regs->system_module = MkAtomTerm(AtomSystem); Yap_heap_regs->system_module = MkAtomTerm(AtomSystem);
Yap_heap_regs->operating_system_module = MkAtomTerm(AtomOperatingSystemSupport); Yap_heap_regs->operating_system_module = MkAtomTerm(AtomOperatingSystemSupport);
Yap_heap_regs->readutil_module = MkAtomTerm(AtomReadutil); Yap_heap_regs->readutil_module = MkAtomTerm(AtomReadutil);
Yap_heap_regs->hacks_module = MkAtomTerm(AtomYapHacks); Yap_heap_regs->hacks_module = MkAtomTerm(AtomYapHacks);
Yap_heap_regs->arg_module = MkAtomTerm(AtomArg); Yap_heap_regs->arg_module = MkAtomTerm(AtomArg);
Yap_heap_regs->globals_module = MkAtomTerm(AtomNb); Yap_heap_regs->globals_module = MkAtomTerm(AtomNb);
Yap_heap_regs->swi_module = MkAtomTerm(AtomSwi); Yap_heap_regs->swi_module = MkAtomTerm(AtomSwi);
Yap_heap_regs->current_modules = NULL; Yap_heap_regs->current_modules = NULL;
Yap_InitModules(); Yap_InitModules();
Yap_heap_regs->execution_mode = INTERPRETED; Yap_heap_regs->execution_mode = INTERPRETED;
InitPredHash(); InitPredHash();
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#endif #endif
Yap_heap_regs->preds_in_hash_table = 0; Yap_heap_regs->preds_in_hash_table = 0;
Yap_heap_regs->creep_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomCreep,1),PROLOG_MODULE)); 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->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->spy_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomSpy,1),PROLOG_MODULE));
Yap_heap_regs->pred_fail = RepPredProp(PredPropByAtom(AtomFail,PROLOG_MODULE)); Yap_heap_regs->pred_fail = RepPredProp(PredPropByAtom(AtomFail,PROLOG_MODULE));
Yap_heap_regs->pred_true = RepPredProp(PredPropByAtom(AtomTrue,PROLOG_MODULE)); Yap_heap_regs->pred_true = RepPredProp(PredPropByAtom(AtomTrue,PROLOG_MODULE));
#ifdef COROUTINING #ifdef COROUTINING
Yap_heap_regs->wake_up_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomWakeUpGoal,2),PROLOG_MODULE)); Yap_heap_regs->wake_up_code = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomWakeUpGoal,2),PROLOG_MODULE));
#endif #endif
Yap_heap_regs->pred_goal_expansion = RepPredProp(PredPropByFunc(FunctorGoalExpansion,USER_MODULE)); 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_meta_call = RepPredProp(PredPropByFunc(FunctorMetaCall,PROLOG_MODULE));
Yap_heap_regs->pred_dollar_catch = RepPredProp(PredPropByFunc(FunctorCatch,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_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 = RepPredProp(PredPropByFunc(FunctorDoLogUpdClause,PROLOG_MODULE));
Yap_heap_regs->pred_log_upd_clause_erase = RepPredProp(PredPropByFunc(FunctorDoLogUpdClauseErase,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_log_upd_clause0 = RepPredProp(PredPropByFunc(FunctorDoLogUpdClause,PROLOG_MODULE));
Yap_heap_regs->pred_static_clause = RepPredProp(PredPropByFunc(FunctorDoStaticClause,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_throw = RepPredProp(PredPropByFunc(FunctorThrow,PROLOG_MODULE));
Yap_heap_regs->pred_handle_throw = RepPredProp(PredPropByFunc(FunctorHandleThrow,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_is = RepPredProp(PredPropByFunc(FunctorIs,PROLOG_MODULE));
Yap_heap_regs->pred_safe_call_cleanup = RepPredProp(PredPropByFunc(FunctorSafeCallCleanup,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)); Yap_heap_regs->pred_restore_regs = RepPredProp(PredPropByFunc(FunctorRestoreRegs,PROLOG_MODULE));
#ifdef YAPOR #ifdef YAPOR
Yap_heap_regs->pred_getwork = RepPredProp(PredPropByAtom(AtomGetwork,PROLOG_MODULE)); Yap_heap_regs->pred_getwork = RepPredProp(PredPropByAtom(AtomGetwork,PROLOG_MODULE));
Yap_heap_regs->pred_getwork_seq = RepPredProp(PredPropByAtom(AtomGetworkSeq,PROLOG_MODULE)); Yap_heap_regs->pred_getwork_seq = RepPredProp(PredPropByAtom(AtomGetworkSeq,PROLOG_MODULE));
#endif /* YAPOR */ #endif /* YAPOR */
#ifdef LOW_LEVEL_TRACER #ifdef LOW_LEVEL_TRACER
Yap_heap_regs->yap_do_low_level_trace = FALSE; Yap_heap_regs->yap_do_low_level_trace = FALSE;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
INIT_LOCK(Yap_heap_regs->low_level_trace_lock); INIT_LOCK(Yap_heap_regs->low_level_trace_lock);
#endif #endif
#endif #endif
Yap_heap_regs->clause_space = 0; Yap_heap_regs->clause_space = 0;
Yap_heap_regs->index_space_Tree = 0; Yap_heap_regs->index_space_Tree = 0;
Yap_heap_regs->index_space_EXT = 0; Yap_heap_regs->index_space_EXT = 0;
Yap_heap_regs->index_space_SW = 0; Yap_heap_regs->index_space_SW = 0;
Yap_heap_regs->lu_clause_space = 0; Yap_heap_regs->lu_clause_space = 0;
Yap_heap_regs->lu_index_space_Tree = 0; Yap_heap_regs->lu_index_space_Tree = 0;
Yap_heap_regs->lu_index_space_CP = 0; Yap_heap_regs->lu_index_space_CP = 0;
Yap_heap_regs->lu_index_space_EXT = 0; Yap_heap_regs->lu_index_space_EXT = 0;
Yap_heap_regs->lu_index_space_SW = 0; Yap_heap_regs->lu_index_space_SW = 0;
Yap_heap_regs->dummycode->opc = Yap_opcode(_op_fail); Yap_heap_regs->dummycode->opc = Yap_opcode(_op_fail);
Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail); Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail);
Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop); Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop);
InitEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail); InitEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
InitEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail); InitEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
InitOtaplInst(RTRYCODE,_retry_and_mark,PredFail); InitOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
#ifdef BEAM #ifdef BEAM
Yap_heap_regs->beam_retry_code->opc = Yap_opcode(_beam_retry_code); Yap_heap_regs->beam_retry_code->opc = Yap_opcode(_beam_retry_code);
#endif /* BEAM */ #endif /* BEAM */
#ifdef YAPOR #ifdef YAPOR
Yap_heap_regs->seq_def = FALSE; Yap_heap_regs->seq_def = FALSE;
InitOtaplInst(GETWORK,_getwork,PredGetwork); InitOtaplInst(GETWORK,_getwork,PredGetwork);
InitOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq); InitOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
Yap_heap_regs->getwork_first_time->opc = Yap_opcode(_getwork_first_time); Yap_heap_regs->getwork_first_time->opc = Yap_opcode(_getwork_first_time);
#endif /* YAPOR */ #endif /* YAPOR */
#ifdef TABLING #ifdef TABLING
InitOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail); InitOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
InitOtaplInst(TRY_ANSWER,_table_try_answer,PredFail); InitOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
InitOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail); InitOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
InitOtaplInst(COMPLETION,_table_completion,PredFail); InitOtaplInst(COMPLETION,_table_completion,PredFail);
#endif /* TABLING */ #endif /* TABLING */
Yap_heap_regs->debugger_p_before_spy = NULL; Yap_heap_regs->debugger_p_before_spy = NULL;
Yap_heap_regs->retry_recordedp_code = NULL; Yap_heap_regs->retry_recordedp_code = NULL;
Yap_heap_regs->retry_recorded_k_code = NULL; Yap_heap_regs->retry_recorded_k_code = NULL;
Yap_heap_regs->system_profiling = FALSE; Yap_heap_regs->system_profiling = FALSE;
Yap_heap_regs->system_call_counting = FALSE; Yap_heap_regs->system_call_counting = FALSE;
Yap_heap_regs->system_pred_goal_expansion_all = 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_func = FALSE;
Yap_heap_regs->system_pred_goal_expansion_on = FALSE; Yap_heap_regs->system_pred_goal_expansion_on = FALSE;
Yap_heap_regs->compiler_optimizer_on = TRUE; Yap_heap_regs->compiler_optimizer_on = TRUE;
Yap_heap_regs->compiler_compile_mode = 0; Yap_heap_regs->compiler_compile_mode = 0;
Yap_heap_regs->compiler_profiling = FALSE; Yap_heap_regs->compiler_profiling = FALSE;
Yap_heap_regs->compiler_call_counting = FALSE; Yap_heap_regs->compiler_call_counting = FALSE;
Yap_heap_regs->compiler_compile_arrays = FALSE; Yap_heap_regs->compiler_compile_arrays = FALSE;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
INIT_LOCK(Yap_heap_regs->dbterms_list_lock); INIT_LOCK(Yap_heap_regs->dbterms_list_lock);
#endif #endif
Yap_heap_regs->dbterms_list = NULL; Yap_heap_regs->dbterms_list = NULL;
Yap_heap_regs->expand_clauses_first = NULL; Yap_heap_regs->expand_clauses_first = NULL;
Yap_heap_regs->expand_clauses_last = NULL; Yap_heap_regs->expand_clauses_last = NULL;
Yap_heap_regs->expand_clauses = 0; Yap_heap_regs->expand_clauses = 0;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
INIT_LOCK(Yap_heap_regs->expand_clauses_list_lock); INIT_LOCK(Yap_heap_regs->expand_clauses_list_lock);
INIT_LOCK(Yap_heap_regs->op_list_lock); INIT_LOCK(Yap_heap_regs->op_list_lock);
#endif #endif
#ifdef DEBUG #ifdef DEBUG
Yap_heap_regs->new_cps = 0L; Yap_heap_regs->new_cps = 0L;
Yap_heap_regs->live_cps = 0L; Yap_heap_regs->live_cps = 0L;
Yap_heap_regs->dirty_cps = 0L; Yap_heap_regs->dirty_cps = 0L;
Yap_heap_regs->freed_cps = 0L; Yap_heap_regs->freed_cps = 0L;
#endif #endif
Yap_heap_regs->expand_clauses_sz = 0L; Yap_heap_regs->expand_clauses_sz = 0L;
Yap_heap_regs->udi_control_blocks = NULL; Yap_heap_regs->udi_control_blocks = NULL;
Yap_heap_regs->static_predicates_marked = FALSE; Yap_heap_regs->static_predicates_marked = FALSE;
Yap_heap_regs->IntKeys = NULL; Yap_heap_regs->IntKeys = NULL;
Yap_heap_regs->IntLUKeys = NULL; Yap_heap_regs->IntLUKeys = NULL;
Yap_heap_regs->IntBBKeys = NULL; Yap_heap_regs->IntBBKeys = NULL;
Yap_heap_regs->int_keys_size = INT_KEYS_DEFAULT_SIZE; Yap_heap_regs->int_keys_size = INT_KEYS_DEFAULT_SIZE;
Yap_heap_regs->int_keys_timestamp = 0L; Yap_heap_regs->int_keys_timestamp = 0L;
Yap_heap_regs->int_bb_keys_size = INT_KEYS_DEFAULT_SIZE; Yap_heap_regs->int_bb_keys_size = INT_KEYS_DEFAULT_SIZE;
Yap_heap_regs->update_mode = UPDATE_MODE_LOGICAL; Yap_heap_regs->update_mode = UPDATE_MODE_LOGICAL;
InitDBErasedMarker(); InitDBErasedMarker();
InitLogDBErasedMarker(); InitLogDBErasedMarker();
Yap_heap_regs->dead_static_clauses = NULL; Yap_heap_regs->dead_static_clauses = NULL;
Yap_heap_regs->dead_mega_clauses = NULL; Yap_heap_regs->dead_mega_clauses = NULL;
Yap_heap_regs->dead_static_indices = NULL; Yap_heap_regs->dead_static_indices = NULL;
Yap_heap_regs->db_erased_list = NULL; Yap_heap_regs->db_erased_list = NULL;
Yap_heap_regs->db_erased_ilist = NULL; Yap_heap_regs->db_erased_ilist = NULL;
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
INIT_LOCK(Yap_heap_regs->dead_static_clauses_lock); INIT_LOCK(Yap_heap_regs->dead_static_clauses_lock);
INIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock); INIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock);
INIT_LOCK(Yap_heap_regs->dead_static_indices_lock); INIT_LOCK(Yap_heap_regs->dead_static_indices_lock);
#endif #endif
#ifdef COROUTINING #ifdef COROUTINING
Yap_heap_regs->num_of_atts = 1; Yap_heap_regs->num_of_atts = 1;
#endif #endif
InitFlags(); InitFlags();
Yap_heap_regs->op_list = NULL; Yap_heap_regs->op_list = NULL;
Yap_heap_regs->yap_streams = NULL; Yap_heap_regs->yap_streams = NULL;
Yap_heap_regs->n_of_file_aliases = 0; Yap_heap_regs->n_of_file_aliases = 0;
Yap_heap_regs->sz_of_file_aliases = 0; Yap_heap_regs->sz_of_file_aliases = 0;
Yap_heap_regs->file_aliases = NULL; Yap_heap_regs->file_aliases = NULL;
Yap_heap_regs->atprompt = AtomNil; Yap_heap_regs->atprompt = AtomNil;
Yap_heap_regs->char_conversion_table = NULL; Yap_heap_regs->char_conversion_table = NULL;
Yap_heap_regs->char_conversion_table2 = NULL; Yap_heap_regs->char_conversion_table2 = NULL;
Yap_heap_regs->parser_error_style = EXCEPTION_ON_PARSER_ERROR; Yap_heap_regs->parser_error_style = EXCEPTION_ON_PARSER_ERROR;
Yap_heap_regs->yap_lib_dir = NULL; Yap_heap_regs->yap_lib_dir = NULL;
Yap_heap_regs->last_wtime = NULL; Yap_heap_regs->last_wtime = NULL;
Yap_heap_regs->debugger_output_msg = 0L; Yap_heap_regs->debugger_output_msg = 0L;
#if LOW_PROF #if LOW_PROF
Yap_heap_regs->profiler_on = FALSE; Yap_heap_regs->profiler_on = FALSE;
Yap_heap_regs->offline_profiler = FALSE; Yap_heap_regs->offline_profiler = FALSE;
Yap_heap_regs->f_prof = NULL; Yap_heap_regs->f_prof = NULL;
Yap_heap_regs->f_preds = NULL; Yap_heap_regs->f_preds = NULL;
Yap_heap_regs->prof_preds = 0L; Yap_heap_regs->prof_preds = 0L;
#endif /* LOW_PROF */ #endif /* LOW_PROF */
Yap_heap_regs->foreign_code_loaded = NULL; Yap_heap_regs->foreign_code_loaded = NULL;
Yap_heap_regs->foreign_code_base = NULL; Yap_heap_regs->foreign_code_base = NULL;
Yap_heap_regs->foreign_code_top = NULL; Yap_heap_regs->foreign_code_top = NULL;
Yap_heap_regs->foreign_code_max = NULL; Yap_heap_regs->foreign_code_max = NULL;
Yap_heap_regs->yap_records = NULL; Yap_heap_regs->yap_records = NULL;
InitSWIAtoms(); InitSWIAtoms();
Yap_heap_regs->swi_blob_types = NULL; Yap_heap_regs->swi_blob_types = NULL;
Yap_heap_regs->swi_blobs = NULL; Yap_heap_regs->swi_blobs = NULL;

View File

@ -1,211 +1,211 @@
/* This file, rglobals.h, was generated automatically by "yap -L misc/buildheap" /* This file, rglobals.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/GLOBALS instead */ please do not update, update misc/GLOBALS instead */
static void RestoreWorker(int wid USES_REGS) { static void RestoreWorker(int wid USES_REGS) {
FOREIGN_WL(wid)->global_arena = TermToGlobalOrAtomAdjust(FOREIGN_WL(wid)->global_arena); FOREIGN_WL(wid)->global_arena = TermToGlobalOrAtomAdjust(FOREIGN_WL(wid)->global_arena);
RestoreBallTerm(wid); RestoreBallTerm(wid);
#ifdef COROUTINING #ifdef COROUTINING
FOREIGN_WL(wid)->woken_goals = TermToGlobalAdjust(FOREIGN_WL(wid)->woken_goals); FOREIGN_WL(wid)->woken_goals = TermToGlobalAdjust(FOREIGN_WL(wid)->woken_goals);
FOREIGN_WL(wid)->atts_mutable_list = TermToGlobalAdjust(FOREIGN_WL(wid)->atts_mutable_list); FOREIGN_WL(wid)->atts_mutable_list = TermToGlobalAdjust(FOREIGN_WL(wid)->atts_mutable_list);
#endif #endif
FOREIGN_WL(wid)->gc_generation = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_generation); FOREIGN_WL(wid)->gc_generation = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_generation);
FOREIGN_WL(wid)->gc_phase = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_phase); FOREIGN_WL(wid)->gc_phase = TermToGlobalAdjust(FOREIGN_WL(wid)->gc_phase);
#if LOW_LEVEL_TRACER #if LOW_LEVEL_TRACER
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(FOREIGN_WL(wid)->signal_lock); REINIT_LOCK(FOREIGN_WL(wid)->signal_lock);
#if DEBUG && COROUTINING #if DEBUG && COROUTINING
#endif #endif
#if GC_NO_TAGS #if GC_NO_TAGS
#endif #endif
#if defined(TABLING) || defined(SBA) #if defined(TABLING) || defined(SBA)
#else #else
#endif #endif
#endif /* defined(YAPOR) || defined(THREADS) */ #endif /* defined(YAPOR) || defined(THREADS) */
FOREIGN_WL(wid)->dynamic_arrays = PtoArrayEAdjust(FOREIGN_WL(wid)->dynamic_arrays); 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)->static_arrays = PtoArraySAdjust(FOREIGN_WL(wid)->static_arrays);
FOREIGN_WL(wid)->global_variables = PtoGlobalEAdjust(FOREIGN_WL(wid)->global_variables); FOREIGN_WL(wid)->global_variables = PtoGlobalEAdjust(FOREIGN_WL(wid)->global_variables);
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS) #if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
#endif #endif
#ifdef THREADS #ifdef THREADS
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle) #define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle) #define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
#endif #endif
} }
static void RestoreGlobal(void) { static void RestoreGlobal(void) {
#if THREADS #if THREADS
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(Yap_global->bgl); REINIT_LOCK(Yap_global->bgl);
#endif #endif
#if HAVE_LIBREADLINE #if HAVE_LIBREADLINE
#endif #endif
#ifdef THREADS #ifdef THREADS
REINIT_LOCK(Yap_global->thread_handles_lock); REINIT_LOCK(Yap_global->thread_handles_lock);
#endif #endif
#if defined(YAPOR) || defined(TABLING) #if defined(YAPOR) || defined(TABLING)
#endif #endif
} }

View File

@ -1,304 +1,304 @@
/* This file, rhstruct.h, was generated automatically by "yap -L misc/buildheap" /* This file, rhstruct.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/HEAPFIELDS instead */ please do not update, update misc/HEAPFIELDS instead */
#if USE_DL_MALLOC #if USE_DL_MALLOC
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(Yap_heap_regs->dlmalloc_lock); REINIT_LOCK(Yap_heap_regs->dlmalloc_lock);
#endif #endif
#endif #endif
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO) #if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
#ifndef HeapUsed #ifndef HeapUsed
#define HeapUsed Yap_givemallinfo() #define HeapUsed Yap_givemallinfo()
#endif #endif
#else #else
#endif #endif
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(Yap_heap_regs->free_blocks_lock); REINIT_LOCK(Yap_heap_regs->free_blocks_lock);
REINIT_LOCK(Yap_heap_regs->heap_used_lock); REINIT_LOCK(Yap_heap_regs->heap_used_lock);
REINIT_LOCK(Yap_heap_regs->heap_top_lock); REINIT_LOCK(Yap_heap_regs->heap_top_lock);
#endif #endif
#if USE_THREADED_CODE #if USE_THREADED_CODE
Yap_heap_regs->op_rtable = OpRTableAdjust(Yap_heap_regs->op_rtable); Yap_heap_regs->op_rtable = OpRTableAdjust(Yap_heap_regs->op_rtable);
#endif #endif
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred); Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index); Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
Yap_heap_regs->fail_op = Yap_opcode(_op_fail); Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
Yap_heap_regs->index_op = Yap_opcode(_index_pred); Yap_heap_regs->index_op = Yap_opcode(_index_pred);
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred); Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
Yap_heap_regs->orlast_op = Yap_opcode(_or_last); Yap_heap_regs->orlast_op = Yap_opcode(_or_last);
Yap_heap_regs->undef_op = Yap_opcode(_undef_p); Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
RestoreInvisibleAtoms(); RestoreInvisibleAtoms();
RestoreWideAtoms(); RestoreWideAtoms();
RestoreAtoms(); RestoreAtoms();
#include "ratoms.h" #include "ratoms.h"
#ifdef EUROTRA #ifdef EUROTRA
Yap_heap_regs->term_dollar_u = AtomTermAdjust(Yap_heap_regs->term_dollar_u); Yap_heap_regs->term_dollar_u = AtomTermAdjust(Yap_heap_regs->term_dollar_u);
#endif #endif
Yap_heap_regs->term_prolog = AtomTermAdjust(Yap_heap_regs->term_prolog); 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->term_refound_var = AtomTermAdjust(Yap_heap_regs->term_refound_var);
Yap_heap_regs->user_module = AtomTermAdjust(Yap_heap_regs->user_module); 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->idb_module = AtomTermAdjust(Yap_heap_regs->idb_module);
Yap_heap_regs->attributes_module = AtomTermAdjust(Yap_heap_regs->attributes_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->charsio_module = AtomTermAdjust(Yap_heap_regs->charsio_module);
Yap_heap_regs->terms_module = AtomTermAdjust(Yap_heap_regs->terms_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->system_module = AtomTermAdjust(Yap_heap_regs->system_module);
Yap_heap_regs->operating_system_module = AtomTermAdjust(Yap_heap_regs->operating_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->readutil_module = AtomTermAdjust(Yap_heap_regs->readutil_module);
Yap_heap_regs->hacks_module = AtomTermAdjust(Yap_heap_regs->hacks_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->arg_module = AtomTermAdjust(Yap_heap_regs->arg_module);
Yap_heap_regs->globals_module = AtomTermAdjust(Yap_heap_regs->globals_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->swi_module = AtomTermAdjust(Yap_heap_regs->swi_module);
Yap_heap_regs->current_modules = ModEntryPtrAdjust(Yap_heap_regs->current_modules); Yap_heap_regs->current_modules = ModEntryPtrAdjust(Yap_heap_regs->current_modules);
RestorePredHash(); RestorePredHash();
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
#endif #endif
Yap_heap_regs->creep_code = PtoPredAdjust(Yap_heap_regs->creep_code); 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->undef_code = PtoPredAdjust(Yap_heap_regs->undef_code);
Yap_heap_regs->spy_code = PtoPredAdjust(Yap_heap_regs->spy_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_fail = PtoPredAdjust(Yap_heap_regs->pred_fail);
Yap_heap_regs->pred_true = PtoPredAdjust(Yap_heap_regs->pred_true); Yap_heap_regs->pred_true = PtoPredAdjust(Yap_heap_regs->pred_true);
#ifdef COROUTINING #ifdef COROUTINING
Yap_heap_regs->wake_up_code = PtoPredAdjust(Yap_heap_regs->wake_up_code); Yap_heap_regs->wake_up_code = PtoPredAdjust(Yap_heap_regs->wake_up_code);
#endif #endif
Yap_heap_regs->pred_goal_expansion = PtoPredAdjust(Yap_heap_regs->pred_goal_expansion); 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_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_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_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 = 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_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_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_static_clause = PtoPredAdjust(Yap_heap_regs->pred_static_clause);
Yap_heap_regs->pred_throw = PtoPredAdjust(Yap_heap_regs->pred_throw); 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_handle_throw = PtoPredAdjust(Yap_heap_regs->pred_handle_throw);
Yap_heap_regs->pred_is = PtoPredAdjust(Yap_heap_regs->pred_is); 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_safe_call_cleanup = PtoPredAdjust(Yap_heap_regs->pred_safe_call_cleanup);
Yap_heap_regs->pred_restore_regs = PtoPredAdjust(Yap_heap_regs->pred_restore_regs); Yap_heap_regs->pred_restore_regs = PtoPredAdjust(Yap_heap_regs->pred_restore_regs);
#ifdef YAPOR #ifdef YAPOR
Yap_heap_regs->pred_getwork = PtoPredAdjust(Yap_heap_regs->pred_getwork); Yap_heap_regs->pred_getwork = PtoPredAdjust(Yap_heap_regs->pred_getwork);
Yap_heap_regs->pred_getwork_seq = PtoPredAdjust(Yap_heap_regs->pred_getwork_seq); Yap_heap_regs->pred_getwork_seq = PtoPredAdjust(Yap_heap_regs->pred_getwork_seq);
#endif /* YAPOR */ #endif /* YAPOR */
#ifdef LOW_LEVEL_TRACER #ifdef LOW_LEVEL_TRACER
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(Yap_heap_regs->low_level_trace_lock); REINIT_LOCK(Yap_heap_regs->low_level_trace_lock);
#endif #endif
#endif #endif
Yap_heap_regs->dummycode->opc = Yap_opcode(_op_fail); Yap_heap_regs->dummycode->opc = Yap_opcode(_op_fail);
Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail); Yap_heap_regs->failcode->opc = Yap_opcode(_op_fail);
Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop); Yap_heap_regs->nocode->opc = Yap_opcode(_Nstop);
RestoreEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail); RestoreEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
RestoreEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail); RestoreEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
RestoreOtaplInst(RTRYCODE,_retry_and_mark,PredFail); RestoreOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
#ifdef BEAM #ifdef BEAM
Yap_heap_regs->beam_retry_code->opc = Yap_opcode(_beam_retry_code); Yap_heap_regs->beam_retry_code->opc = Yap_opcode(_beam_retry_code);
#endif /* BEAM */ #endif /* BEAM */
#ifdef YAPOR #ifdef YAPOR
RestoreOtaplInst(GETWORK,_getwork,PredGetwork); RestoreOtaplInst(GETWORK,_getwork,PredGetwork);
RestoreOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq); RestoreOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
Yap_heap_regs->getwork_first_time->opc = Yap_opcode(_getwork_first_time); Yap_heap_regs->getwork_first_time->opc = Yap_opcode(_getwork_first_time);
#endif /* YAPOR */ #endif /* YAPOR */
#ifdef TABLING #ifdef TABLING
RestoreOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail); RestoreOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
RestoreOtaplInst(TRY_ANSWER,_table_try_answer,PredFail); RestoreOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
RestoreOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail); RestoreOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
RestoreOtaplInst(COMPLETION,_table_completion,PredFail); RestoreOtaplInst(COMPLETION,_table_completion,PredFail);
#endif /* TABLING */ #endif /* TABLING */
Yap_heap_regs->debugger_p_before_spy = PtoOpAdjust(Yap_heap_regs->debugger_p_before_spy); 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_recordedp_code = PtoOpAdjust(Yap_heap_regs->retry_recordedp_code);
Yap_heap_regs->retry_recorded_k_code = PtoOpAdjust(Yap_heap_regs->retry_recorded_k_code); Yap_heap_regs->retry_recorded_k_code = PtoOpAdjust(Yap_heap_regs->retry_recorded_k_code);
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(Yap_heap_regs->dbterms_list_lock); REINIT_LOCK(Yap_heap_regs->dbterms_list_lock);
#endif #endif
RestoreDBTermsList(); RestoreDBTermsList();
RestoreExpandList(); RestoreExpandList();
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(Yap_heap_regs->expand_clauses_list_lock); REINIT_LOCK(Yap_heap_regs->expand_clauses_list_lock);
REINIT_LOCK(Yap_heap_regs->op_list_lock); REINIT_LOCK(Yap_heap_regs->op_list_lock);
#endif #endif
#ifdef DEBUG #ifdef DEBUG
#endif #endif
RestoreUdiControlBlocks(); RestoreUdiControlBlocks();
RestoreIntKeys(); RestoreIntKeys();
RestoreIntLUKeys(); RestoreIntLUKeys();
RestoreIntBBKeys(); RestoreIntBBKeys();
RestoreDBErasedMarker(); RestoreDBErasedMarker();
RestoreLogDBErasedMarker(); RestoreLogDBErasedMarker();
RestoreDeadStaticClauses(); RestoreDeadStaticClauses();
RestoreDeadMegaClauses(); RestoreDeadMegaClauses();
RestoreDeadStaticIndices(); RestoreDeadStaticIndices();
RestoreDBErasedList(); RestoreDBErasedList();
RestoreDBErasedIList(); RestoreDBErasedIList();
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
REINIT_LOCK(Yap_heap_regs->dead_static_clauses_lock); REINIT_LOCK(Yap_heap_regs->dead_static_clauses_lock);
REINIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock); REINIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock);
REINIT_LOCK(Yap_heap_regs->dead_static_indices_lock); REINIT_LOCK(Yap_heap_regs->dead_static_indices_lock);
#endif #endif
#ifdef COROUTINING #ifdef COROUTINING
#endif #endif
Yap_heap_regs->op_list = OpListAdjust(Yap_heap_regs->op_list); Yap_heap_regs->op_list = OpListAdjust(Yap_heap_regs->op_list);
RestoreStreams(); RestoreStreams();
RestoreAliases(); RestoreAliases();
Yap_heap_regs->atprompt = AtomAdjust(Yap_heap_regs->atprompt); 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_table = CodeCharPAdjust(Yap_heap_regs->char_conversion_table);
Yap_heap_regs->char_conversion_table2 = CodeCharPAdjust(Yap_heap_regs->char_conversion_table2); 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->yap_lib_dir = CodeCharPAdjust(Yap_heap_regs->yap_lib_dir);
Yap_heap_regs->last_wtime = CodeVoidPAdjust(Yap_heap_regs->last_wtime); Yap_heap_regs->last_wtime = CodeVoidPAdjust(Yap_heap_regs->last_wtime);
#if LOW_PROF #if LOW_PROF
#endif /* LOW_PROF */ #endif /* LOW_PROF */
RestoreForeignCode(); RestoreForeignCode();
RestoreYapRecords(); RestoreYapRecords();
RestoreSWIAtoms(); RestoreSWIAtoms();
RestoreSWIBlobTypes(); RestoreSWIBlobTypes();
RestoreSWIBlobs(); RestoreSWIBlobs();

View File

@ -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 \ 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-file.o pl-files.o pl-fmt.o \
pl-glob.o pl-option.o \ pl-glob.o pl-option.o \
pl-nt.o \
pl-os.o pl-privitf.o \ pl-os.o pl-privitf.o \
pl-read.o \ pl-read.o \
pl-rl.o \ pl-rl.o \
@ -384,7 +385,6 @@ LIB_OBJECTS = $(ENGINE_OBJECTS) $(C_INTERFACE_OBJECTS) $(OR_OBJECTS) $(BEAM_OBJE
OBJECTS = yap.o $(LIB_OBJECTS) OBJECTS = yap.o $(LIB_OBJECTS)
PLCONS_OBJECTS = \ PLCONS_OBJECTS = \
pl-nt.o \
pl-ntcon.o \ pl-ntcon.o \
pl-ntconsole.o \ pl-ntconsole.o \
pl-ntmain.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 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 $(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 pl-nt.o: $(srcdir)/packages/PLStream/pl-nt.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/packages/PLStream $(srcdir)/console/LGPL/pl-nt.c -o $@ $(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 pl-ntcon.o: $(srcdir)/console/LGPL/pl-ntcon.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/console/LGPL/pl-ntcon.c -o $@ $(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 $@ $(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 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 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 $@ $(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/packages/PLStream @EXTRA_INCLUDES_FOR_WIN32@ $(srcdir)/packages/PLStream/pl-codelist.c -o $@

View File

@ -176,6 +176,8 @@
#undef HAVE_ASINH #undef HAVE_ASINH
#undef HAVE_ATANH #undef HAVE_ATANH
#undef HAVE_CHDIR #undef HAVE_CHDIR
#undef HAVE_CLOCK
#undef HAVE_CLOCK_GETTIME
#undef HAVE_CTIME #undef HAVE_CTIME
#undef HAVE_DLOPEN #undef HAVE_DLOPEN
#undef HAVE_DUP2 #undef HAVE_DUP2
@ -291,6 +293,9 @@
#define TYPE_SELECT_ #define TYPE_SELECT_
#define MYTYPE(X) MYTYPE1#X #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 how to pass the address of a function */
#define FunAdr(Fn) Fn #define FunAdr(Fn) Fn

232
configure vendored
View File

@ -813,9 +813,6 @@ LIBS
CPPFLAGS CPPFLAGS
CXX CXX
CXXFLAGS CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC CCC
CPP' CPP'
@ -2136,60 +2133,6 @@ rm -f conftest.val
} # ac_fn_c_compute_int } # 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 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
# ---------------------------------------------------- # ----------------------------------------------------
# Tries to find if the field MEMBER exists in type AGGR, after including # 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 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member } # 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 cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file 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 fi
done done
@ -2904,7 +2901,7 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 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_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH 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. # Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 $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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables 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 else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link 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 fi
rm -f conftest conftest$ac_cv_exeext rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 { $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_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs. as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'. 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 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile 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 fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi fi
@ -4235,7 +4232,7 @@ fi
$as_echo "$ac_cv_build" >&6; } $as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in 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 esac
build=$ac_cv_build build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-' ac_save_IFS=$IFS; IFS='-'
@ -4268,7 +4265,7 @@ fi
$as_echo "$ac_cv_host" >&6; } $as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in 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 esac
host=$ac_cv_host host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-' ac_save_IFS=$IFS; IFS='-'
@ -4301,7 +4298,7 @@ fi
$as_echo "$ac_cv_target" >&6; } $as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in 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 esac
target=$ac_cv_target target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-' ac_save_IFS=$IFS; IFS='-'
@ -5060,6 +5057,7 @@ fi
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32" if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
then then
INSTALL_COMMAND=install_win32 INSTALL_COMMAND=install_win32
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
if test "$cygwin" = "no" -o "$target_os" = "mingw32" if test "$cygwin" = "no" -o "$target_os" = "mingw32"
then then
if test "$target_win64" = yes if test "$target_win64" = yes
@ -5104,8 +5102,7 @@ _ACEOF
fi fi
EXTRA_LIBS_FOR_DLLS="-lws2_32 \$(abs_top_builddir)/yap.dll" EXTRA_LIBS_FOR_DLLS="-lws2_32"
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
elif test "$target_os" = "cygwin" elif test "$target_os" = "cygwin"
then then
CC="${CC} -mno-cygwin" CC="${CC} -mno-cygwin"
@ -5149,8 +5146,6 @@ _ACEOF
fi fi
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwsock32" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwsock32" >&5
$as_echo_n "checking for main in -lwsock32... " >&6; } $as_echo_n "checking for main in -lwsock32... " >&6; }
@ -5191,8 +5186,8 @@ _ACEOF
fi fi
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
fi 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 "$as_me:${as_lineno-$LINENO}: checking for main in -lpsapi" >&5
$as_echo_n "checking for main in -lpsapi... " >&6; } $as_echo_n "checking for main in -lpsapi... " >&6; }
if ${ac_cv_lib_psapi_main+:} false; then : 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "--with-readline was given, but test for readline failed 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
fi fi
@ -6042,7 +6037,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 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 fi
ac_ext=c ac_ext=c
@ -6727,7 +6722,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 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 fi
ac_ext=c ac_ext=c
@ -6791,7 +6786,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling 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 else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
@ -8125,7 +8120,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int *) 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 else
ac_cv_sizeof_int_p=0 ac_cv_sizeof_int_p=0
fi fi
@ -8158,7 +8153,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short int) 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 else
ac_cv_sizeof_short_int=0 ac_cv_sizeof_short_int=0
fi fi
@ -8191,7 +8186,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int) 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 else
ac_cv_sizeof_int=0 ac_cv_sizeof_int=0
fi fi
@ -8224,7 +8219,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long int) 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 else
ac_cv_sizeof_long_int=0 ac_cv_sizeof_long_int=0
fi fi
@ -8257,7 +8252,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long long int) 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 else
ac_cv_sizeof_long_long_int=0 ac_cv_sizeof_long_long_int=0
fi fi
@ -8290,7 +8285,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (float) 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 else
ac_cv_sizeof_float=0 ac_cv_sizeof_float=0
fi fi
@ -8323,7 +8318,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (double) 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 else
ac_cv_sizeof_double=0 ac_cv_sizeof_double=0
fi fi
@ -8733,6 +8728,57 @@ $as_echo "#define HAVE_SIGINFO 0" >>confdefs.h
fi 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 "$as_me:${as_lineno-$LINENO}: checking union wait" >&5
$as_echo_n "checking union wait... " >&6; } $as_echo_n "checking union wait... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@ -8840,7 +8886,19 @@ _ACEOF
fi fi
done 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 : do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 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/Makefile") CONFIG_FILES="$CONFIG_FILES packages/swi-minisat2/Makefile" ;;
"packages/swi-minisat2/C/Makefile") CONFIG_FILES="$CONFIG_FILES packages/swi-minisat2/C/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 esac
done done
@ -10843,7 +10901,7 @@ do
esac esac
case $ac_mode$ac_tag in case $ac_mode$ac_tag in
:[FHL]*:*);; :[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=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac esac
@ -10871,7 +10929,7 @@ do
[\\/$]*) false;; [\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac || 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 esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'" as_fn_append ac_file_inputs " '$ac_f'"
@ -10898,7 +10956,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
case $ac_tag in case $ac_tag in
*:-:* | *:-) cat >"$ac_tmp/stdin" \ *:-:* | *:-) 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
;; ;;
esac esac

View File

@ -559,24 +559,22 @@ dnl
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32" if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
then then
INSTALL_COMMAND=install_win32 INSTALL_COMMAND=install_win32
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
if test "$cygwin" = "no" -o "$target_os" = "mingw32" if test "$cygwin" = "no" -o "$target_os" = "mingw32"
then then
if test "$target_win64" = yes if test "$target_win64" = yes
then then
AC_CHECK_LIB(ws2_32,main) AC_CHECK_LIB(ws2_32,main)
EXTRA_LIBS_FOR_DLLS="-lws2_32 \$(abs_top_builddir)/yap.dll" EXTRA_LIBS_FOR_DLLS="-lws2_32"
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
elif test "$target_os" = "cygwin" elif test "$target_os" = "cygwin"
then then
CC="${CC} -mno-cygwin" CC="${CC} -mno-cygwin"
CXX="${CXX} -mno-cygwin" CXX="${CXX} -mno-cygwin"
AC_CHECK_LIB(wsock32,main) AC_CHECK_LIB(wsock32,main)
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
else else
AC_CHECK_LIB(wsock32,main) AC_CHECK_LIB(wsock32,main)
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
fi fi
EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS \$(abs_top_builddir)/yap.dll"
AC_CHECK_LIB(psapi,main) AC_CHECK_LIB(psapi,main)
yap_cv_readline=no yap_cv_readline=no
if test "$target_win64" = yes if test "$target_win64" = yes
@ -1639,6 +1637,38 @@ else
AC_DEFINE(HAVE_SIGINFO,0) AC_DEFINE(HAVE_SIGINFO,0)
fi 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 is copied from the Tcl code
dnl this code checks whether the system defines an union wait dnl this code checks whether the system defines an union wait
AC_MSG_CHECKING([union wait]) AC_MSG_CHECKING([union wait])
@ -1667,7 +1697,8 @@ fi
dnl Checks for library functions. dnl Checks for library functions.
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_CHECK_FUNCS(_NSGetEnviron access acosh) 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(erf feclearexcept)
AC_CHECK_FUNCS(fesettrapenable fgetpos finite fpclass ftime getcwd getenv) AC_CHECK_FUNCS(fesettrapenable fgetpos finite fpclass ftime getcwd getenv)
AC_CHECK_FUNCS(gethostbyname gethostent gethostid gethostname) AC_CHECK_FUNCS(gethostbyname gethostent gethostid gethostname)

2
misc/HEAPFIELDS Normal file → Executable file
View File

@ -303,7 +303,7 @@ struct AliasDescS *file_aliases FileAliases =NULL RestoreAliases()
/* prompting */ /* prompting */
Atom atprompt AtPrompt =AtomNil AtomAdjust 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 */ /* ISO char conversion: I will make no comments */
char *char_conversion_table CharConversionTable =NULL CodeCharPAdjust char *char_conversion_table CharConversionTable =NULL CodeCharPAdjust

View File

@ -22,13 +22,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifdef _YAP_NOT_INSTALLED_ #ifdef __MINGW32__
#define __WINDOWS__ 1 #define __WINDOWS__ 1
#endif #endif
#ifdef __WINDOWS__ #ifdef __WINDOWS__
#define _WIN32_WINNT 0x0400 #define _WIN32_WINNT 0x0400
#if (_MSC_VER >= 1300) #if (_MSC_VER >= 1300) || defined(__MINGW32__)
#include <winsock2.h> /* Needed on VC8 */ #include <winsock2.h> /* Needed on VC8 */
#include <windows.h> #include <windows.h>
#else #else
@ -244,7 +244,6 @@ ftruncate(int fileno, int64_t length)
} }
#ifndef _YAP_NOT_INSTALLED_
/******************************* /*******************************
* QUERY CPU TIME * * QUERY CPU TIME *
*******************************/ *******************************/
@ -280,7 +279,6 @@ CpuTime(cputime_kind which)
return t; return t;
} }
#endif
static int static int
CpuCount() CpuCount()
@ -367,7 +365,7 @@ get_showCmd(term_t show, int *cmd)
succeed; succeed;
} }
if ( !PL_get_chars_ex(show, &s, CVT_ATOM) ) if ( !PL_get_chars(show, &s, CVT_ATOM|CVT_EXCEPTION) )
fail; fail;
for(st=types; st->name; st++) for(st=types; st->name; st++)
{ if ( streq(st->name, s) ) { if ( streq(st->name, s) )
@ -574,7 +572,7 @@ pl_win_module_file(term_t module, term_t file)
char *m; char *m;
char *f; char *f;
if ( !PL_get_chars_ex(module, &m, CVT_ALL) ) if ( !PL_get_chars(module, &m, CVT_ALL|CVT_EXCEPTION) )
fail; fail;
if ( (f = findExecutable(m, buf)) ) if ( (f = findExecutable(m, buf)) )
return PL_unify_atom_chars(file, f); return PL_unify_atom_chars(file, f);

View File

@ -62,6 +62,40 @@ extern long timezone;
#endif #endif
#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) #define TAI_UTC_OFFSET LL(4611686018427387914)