break GLOBALS into GLOBALS+LOCALS

This commit is contained in:
Vítor Santos Costa 2011-03-23 16:45:47 +00:00
parent 92af2e8740
commit 0ffe3fa6a5
14 changed files with 1505 additions and 2226 deletions

View File

@ -1233,6 +1233,7 @@ Yap_CloseScratchPad(void)
}
#include "iglobals.h"
#include "ilocals.h"
#if defined(YAPOR) || defined(THREADS)
#define MAX_INITS MAX_AGENTS

View File

@ -178,6 +178,7 @@ typedef struct various_codes {
} all_heap_codes;
#include "hglobals.h"
#include "hlocals.h"
#if defined(YAPOR) && !defined(THREADS)
extern struct worker_shared *Yap_global;
@ -211,6 +212,7 @@ extern struct various_codes *Yap_heap_regs;
#include "dhstruct.h"
#include "dglobals.h"
#include "dlocals.h"
/*******************
these are the global variables: they need not be restored...

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1023,6 +1023,7 @@ RestoreBallTerm(int wid)
}
#include "rglobals.h"
#include "rlocals.h"
/* restore the failcodes */
static void

View File

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

View File

@ -161,18 +161,22 @@ HEADERS = \
$(srcdir)/H/corout.h \
$(srcdir)/H/dlmalloc.h \
$(srcdir)/H/dglobals.h \
$(srcdir)/H/dlocals.h \
$(srcdir)/H/dhstruct.h \
$(srcdir)/H/eval.h \
$(srcdir)/H/heapgc.h \
$(srcdir)/H/hglobals.h \
$(srcdir)/H/hlocals.h \
$(srcdir)/H/hstruct.h \
$(srcdir)/H/iglobals.h \
$(srcdir)/H/ilocals.h \
$(srcdir)/H/ihstruct.h \
$(srcdir)/H/index.h \
$(srcdir)/H/iopreds.h \
$(srcdir)/H/iswiatoms.h \
$(srcdir)/H/rclause.h \
$(srcdir)/H/rglobals.h \
$(srcdir)/H/rlocals.h \
$(srcdir)/H/rheap.h \
$(srcdir)/H/rhstruct.h \
$(srcdir)/H/threads.h \

View File

@ -17,169 +17,6 @@
//
// Stuff that must be considered local to a thread or worker
START_WORKER_LOCAL
// Streams
int c_input_stream Yap_c_input_stream =0
int c_output_stream Yap_c_output_stream =1
int c_error_stream Yap_c_error_stream =2
/* shifts and restore: per local data-structure */
restoreinfo rinfo
. rinfo.old_ASP OldASP =NULL
. rinfo.old_LCL0 OldLCL0 =NULL
. rinfo.old_TR OldTR =NULL
. rinfo.old_GlobalBase OldGlobalBase =NULL
. rinfo.old_H OldH =NULL
. rinfo.old_H0 OldH0 =NULL
. rinfo.old_TrailBase OldTrailBase =NULL
. rinfo.old_TrailTop OldTrailTop =NULL
. rinfo.old_HeapBase OldHeapBase =NULL
. rinfo.old_HeapTop OldHeapTop =NULL
. rinfo.cl_diff ClDiff =0L
. rinfo.g_diff GDiff =0L
. rinfo.h_diff HDiff =0L
. rinfo.g_diff0 GDiff0 =0L
. rinfo.g_split GSplit =NULL
. rinfo.l_diff LDiff =0L
. rinfo.tr_diff TrDiff =0L
. rinfo.x_diff XDiff =0L
. rinfo.delay_diff DelayDiff =0L
. rinfo.base_diff BaseDiff =0L
struct reduction_counters call_counters
. call_counters.reductions ReductionsCounter =0L
. call_counters.reductions_retries PredEntriesCounter =0L
. call_counters.retries RetriesCounter =0L
. call_counters.reductions_on ReductionsCounterOn =0L
. call_counters.reductions_retries_on PredEntriesCounterOn =0L
. call_counters.retries_on RetriesCounterOn =0L
int interrupts_disabled Yap_InterruptsDisabled =FALSE
// support for consulting files
/* current consult stack */
union CONSULT_OBJ* consultsp ConsultSp =NULL
/* current maximum number of cells in consult stack */
UInt consultcapacity ConsultCapacity void
/* top of consult stack */
union CONSULT_OBJ* consultbase ConsultBase =NULL
/* low-water mark for consult */
union CONSULT_OBJ* consultlow ConsultLow =NULL
//global variables
Term global_arena GlobalArena =0L TermToGlobalOrAtomAdjust
UInt global_arena_overflows GlobalArenaOverflows =0L
Int delay_arena_overflows DelayArenaOverflows =0L
Int arena_overflows ArenaOverflows =0L
Int depth_arenas DepthArenas =0
int arith_error ArithError =FALSE
struct pred_entry* last_asserted_pred LastAssertedPred =NULL
int debug_on DebugOn =FALSE
struct format_status* f_info FormatInfo =NULL
char* scanner_stack ScannerStack =NULL
struct scanner_extra_alloc* scanner_extra_blocks ScannerExtraBlocks =NULL
struct DB_TERM *ball_term BallTerm =NULL RestoreBallTerm(wid)
UInt active_signals ActiveSignals =0L
UInt i_pred_arity IPredArity =0L
yamop* prof_end ProfEnd =NULL
int uncaught_throw UncaughtThrow =FALSE
int doing_undefp DoingUndefp =FALSE
Int start_line StartLine =0L
scratch_block scratchpad ScratchPad InitScratchPad(wid)
#ifdef COROUTINING
Term woken_goals WokenGoals =0L TermToGlobalAdjust
Term atts_mutable_list AttsMutableList =0L TermToGlobalAdjust
#endif
// gc_stuff
Term gc_generation GcGeneration =0L TermToGlobalAdjust
Term gc_phase GcPhase =0L TermToGlobalAdjust
UInt gc_current_phase GcCurrentPhase =0L
UInt gc_calls GcCalls =0L
Int tot_gc_time TotGcTime =0L
YAP_ULONG_LONG tot_gc_recovered TotGcRecovered =0L
Int last_gc_time LastGcTime =0L
Int last_ss_time LastSSTime =0L
#if LOW_LEVEL_TRACER
Int total_cps Yap_total_choicepoints =0
#endif
// global variables that cannot be global in a thread/or-p implementation
#if defined(YAPOR) || defined(THREADS)
lockvar signal_lock SignalLock MkLock
struct pred_entry* wpp WPP =NULL
/* in a single gc */
Int tot_marked total_marked =0L
Int tot_oldies total_oldies =0L
#if DEBUG && COROUTINING
UInt tot_smarked total_smarked =0L
#endif
struct choicept *wl_current_B current_B =NULL
CELL* wl_prev_HB prev_HB =NULL
CELL* hgen HGEN =NULL
CELL** ip_top iptop =NULL
#if GC_NO_TAGS
char* b_p Yap_bp =NULL
#endif
#if defined(TABLING) || defined(SBA)
struct trail_frame* wl_sTR sTR =NULL
struct trail_frame* wl_sTR0 sTR0 =NULL
struct trail_frame* new_tr new_TR =NULL
#else
Term *wl_sTR sTR =NULL
Term *wl_sTR0 sTR0 =NULL
Term *new_tr new_TR =NULL
#endif
struct gc_mark_continuation* conttop0 cont_top0 =NULL
struct gc_mark_continuation* conttop cont_top =NULL
int disc_trail_entries discard_trail_entries =0
gc_ma_hash_entry Gc_ma_hash_table[GC_MAVARS_HASH_SIZE] gc_ma_hash_table void
gc_ma_hash_entry* Gc_ma_h_top gc_ma_h_top =NULL
gc_ma_hash_entry* Gc_ma_h_list gc_ma_h_list =NULL
UInt Gc_timestamp gc_timestamp =0L
ADDR DB_vec db_vec =NULL
ADDR DB_vec0 db_vec0 =NULL
struct RB_red_blk_node* DB_root db_root =NULL
struct RB_red_blk_node* DB_nil db_nil =NULL
#endif /* defined(YAPOR) || defined(THREADS) */
sigjmp_buf gc_restore Yap_gc_restore void
struct array_entry* dynamic_arrays DynamicArrays =NULL PtoArrayEAdjust
struct static_array_entry* static_arrays StaticArrays =NULL PtoArraySAdjust
struct global_entry* global_variables GlobalVariables =NULL PtoGlobalEAdjust
int allow_restart Yap_AllowRestart =FALSE
// Thread Local Area for Fast Storage of Intermediate Compiled Code.
struct mem_blk* cmem_first_block Yap_CMemFirstBlock =NULL
UInt cmem_first_block_sz Yap_CMemFirstBlockSz =0L
// Thread Local Area for Labels.
Int* label_first_array Yap_LabelFirstArray =NULL
UInt label_first_array_sz Yap_LabelFirstArraySz =0L
// Thread Local Area for SWI-Prolog emulation routines.
struct PL_local_data *Yap_ld_ PL_local_data_p =Yap_InitThreadIO(wid)
struct open_query_struct* _execution execution =NULL
// Ricardo's stuff
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
struct worker worker WORKER void
#endif
#ifdef THREADS
struct thandle thread_handle ThreadHandle InitThreadHandle(wid)
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
#define MY_ThreadHandle (Yap_WLocal[worker_id]->thread_handle)
#endif
// END WORKER LOCAL STUFF
END_WORKER_LOCAL
// Stuff that must be shared by all threads or workers
START_WORKER_SHARED

View File

@ -25,7 +25,11 @@ main :-
file_filter_with_init('misc/GLOBALS','H/hglobals.h',gen_struct,Warning,['hglobals.h','GLOBALS']),
file_filter_with_init('misc/GLOBALS','H/dglobals.h',gen_dstruct,Warning,['dglobals.h','GLOBALS']),
file_filter_with_init('misc/GLOBALS','H/rglobals.h',gen_hstruct,Warning,['rglobals.h','GLOBALS']),
file_filter_with_init('misc/GLOBALS','H/iglobals.h',gen_init,Warning,['iglobals.h','GLOBALS']).
file_filter_with_init('misc/GLOBALS','H/iglobals.h',gen_init,Warning,['iglobals.h','GLOBALS']),
file_filter_with_init('misc/LOCALS','H/hlocals.h',gen_struct,Warning,['hlocals.h','LOCALS']),
file_filter_with_init('misc/LOCALS','H/dlocals.h',gen_dstruct,Warning,['dlocals.h','LOCALS']),
file_filter_with_init('misc/LOCALS','H/rlocals.h',gen_hstruct,Warning,['rlocals.h','LOCALS']),
file_filter_with_init('misc/LOCALS','H/ilocals.h',gen_init,Warning,['ilocals.h','LOCALS']).
warning('~n /* This file, ~a, was generated automatically by \"yap -L misc/buildheap\"~n please do not update, update misc/~a instead */~n~n').