Remove LOCAL_ variables declaration from heapgc.c.
This commit is contained in:
parent
65a514349f
commit
bada4ddfcf
41
C/heapgc.c
41
C/heapgc.c
@ -97,47 +97,6 @@ typedef struct RB_red_blk_node {
|
||||
#define LOCAL_cont_top0 (cont *)LOCAL_sTR
|
||||
#endif
|
||||
|
||||
#if !defined(YAPOR) && !defined(THREADS)
|
||||
/* in a single gc */
|
||||
static unsigned long int LOCAL_total_marked, LOCAL_total_oldies; /* number of heap objects marked */
|
||||
|
||||
#ifdef EASY_SHUNTING
|
||||
static choiceptr LOCAL_current_B;
|
||||
|
||||
static tr_fr_ptr LOCAL_sTR, LOCAL_sTR0;
|
||||
|
||||
static CELL *LOCAL_prev_HB;
|
||||
#endif
|
||||
|
||||
static tr_fr_ptr LOCAL_new_TR;
|
||||
|
||||
static CELL *LOCAL_HGEN;
|
||||
|
||||
char *LOCAL_bp;
|
||||
|
||||
static int LOCAL_discard_trail_entries = 0;
|
||||
|
||||
#ifdef HYBRID_SCHEME
|
||||
static CELL_PTR *LOCAL_iptop;
|
||||
#endif
|
||||
|
||||
#ifndef EASY_SHUNTING
|
||||
static cont *LOCAL_cont_top0;
|
||||
#endif
|
||||
static cont *LOCAL_cont_top;
|
||||
|
||||
static gc_ma_hash_entry LOCAL_gc_ma_hash_table[GC_MAVARS_HASH_SIZE];
|
||||
|
||||
static gc_ma_hash_entry *LOCAL_gc_ma_h_top, *LOCAL_gc_ma_h_list;
|
||||
|
||||
static UInt LOCAL_gc_timestamp; /* an unsigned int */
|
||||
|
||||
static ADDR LOCAL_db_vec, LOCAL_db_vec0;
|
||||
|
||||
static rb_red_blk_node *LOCAL_db_root, *LOCAL_db_nil;
|
||||
|
||||
#endif /* !defined(YAPOR) && !defined(THREADS) */
|
||||
|
||||
/* support for hybrid garbage collection scheme */
|
||||
|
||||
static void
|
||||
|
13
H/dlocals.h
13
H/dlocals.h
@ -80,23 +80,21 @@
|
||||
#define LOCAL_total_choicepoints WL->total_cps
|
||||
#endif
|
||||
#define LOCAL_consult_level WL->consult_level_
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define LOCAL_SignalLock WL->signal_lock
|
||||
#endif
|
||||
|
||||
#define LOCAL_total_marked WL->tot_marked
|
||||
#define LOCAL_total_oldies WL->tot_oldies
|
||||
#if DEBUG && COROUTINING
|
||||
#define LOCAL_total_smarked WL->tot_smarked
|
||||
#endif
|
||||
#define LOCAL_current_B WL->wl_current_B
|
||||
#define LOCAL_prev_HB WL->wl_prev_HB
|
||||
#define LOCAL_HGEN WL->hgen
|
||||
#define LOCAL_iptop WL->ip_top
|
||||
#if GC_NO_TAGS
|
||||
|
||||
#if defined(GC_NO_TAGS)
|
||||
#define LOCAL_bp WL->b_p
|
||||
#endif
|
||||
#if defined(TABLING) || defined(YAPOR_SBA)
|
||||
#if !defined(TABLING) && !defined(YAPOR_SBA) && (defined(YAPOR) || defined(THREADS))
|
||||
#define LOCAL_sTR WL->wl_sTR
|
||||
#define LOCAL_sTR0 WL->wl_sTR0
|
||||
#define LOCAL_new_TR WL->new_tr
|
||||
@ -104,7 +102,7 @@
|
||||
#define LOCAL_sTR WL->wl_sTR
|
||||
#define LOCAL_sTR0 WL->wl_sTR0
|
||||
#define LOCAL_new_TR WL->new_tr
|
||||
#endif
|
||||
#endif /* !TABLING && !YAPOR_SBA && (YAPOR || THREADS) */
|
||||
#define LOCAL_cont_top0 WL->conttop0
|
||||
#define LOCAL_cont_top WL->conttop
|
||||
#define LOCAL_discard_trail_entries WL->disc_trail_entries
|
||||
@ -116,7 +114,6 @@
|
||||
#define LOCAL_db_vec0 WL->DB_vec0
|
||||
#define LOCAL_db_root WL->DB_root
|
||||
#define LOCAL_db_nil WL->DB_nil
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
#define LOCAL_gc_restore WL->gc_restore
|
||||
#define LOCAL_DynamicArrays WL->dynamic_arrays
|
||||
#define LOCAL_StaticArrays WL->static_arrays
|
||||
|
@ -77,10 +77,6 @@
|
||||
(CellPtr(B) < CellPtr(val) && CellPtr(val) <= \
|
||||
LCL0 && HEAP_PTR(val))))
|
||||
|
||||
#if !defined(YAPOR) && !defined(THREADS)
|
||||
extern char *LOCAL_bp;
|
||||
#endif
|
||||
|
||||
#define MARK_BIT ((char)1)
|
||||
#define RMARK_BIT ((char)2)
|
||||
|
||||
|
27
H/hlocals.h
27
H/hlocals.h
@ -57,7 +57,7 @@ typedef struct worker_local {
|
||||
int debug_on;
|
||||
char* scanner_stack;
|
||||
struct scanner_extra_alloc* scanner_extra_blocks;
|
||||
struct DB_TERM *ball_term;
|
||||
struct DB_TERM* ball_term;
|
||||
UInt active_signals;
|
||||
UInt i_pred_arity;
|
||||
yamop* prof_end;
|
||||
@ -82,31 +82,29 @@ typedef struct worker_local {
|
||||
Int total_cps;
|
||||
#endif
|
||||
int consult_level_;
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar signal_lock;
|
||||
#endif
|
||||
|
||||
Int tot_marked;
|
||||
Int tot_oldies;
|
||||
#if DEBUG && COROUTINING
|
||||
UInt tot_smarked;
|
||||
#endif
|
||||
struct choicept *wl_current_B;
|
||||
struct choicept* wl_current_B;
|
||||
CELL* wl_prev_HB;
|
||||
CELL* hgen;
|
||||
CELL** ip_top;
|
||||
#if GC_NO_TAGS
|
||||
|
||||
#if defined(GC_NO_TAGS)
|
||||
char* b_p;
|
||||
#endif
|
||||
#if defined(TABLING) || defined(YAPOR_SBA)
|
||||
#if !defined(TABLING) && !defined(YAPOR_SBA) && (defined(YAPOR) || defined(THREADS))
|
||||
Term* wl_sTR;
|
||||
Term* wl_sTR0;
|
||||
Term* new_tr;
|
||||
#else
|
||||
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
|
||||
#endif /* !TABLING && !YAPOR_SBA && (YAPOR || THREADS) */
|
||||
struct gc_mark_continuation* conttop0;
|
||||
struct gc_mark_continuation* conttop;
|
||||
int disc_trail_entries;
|
||||
@ -118,7 +116,6 @@ typedef struct worker_local {
|
||||
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;
|
||||
@ -131,7 +128,7 @@ typedef struct worker_local {
|
||||
Int* label_first_array;
|
||||
UInt label_first_array_sz;
|
||||
|
||||
struct PL_local_data *Yap_ld_;
|
||||
struct PL_local_data* Yap_ld_;
|
||||
struct open_query_struct* _execution;
|
||||
#ifdef THREADS
|
||||
struct thandle thread_handle;
|
||||
|
13
H/ilocals.h
13
H/ilocals.h
@ -80,23 +80,21 @@ static void InitWorker(int wid) {
|
||||
FOREIGN(wid)->total_cps = 0;
|
||||
#endif
|
||||
FOREIGN(wid)->consult_level_ = 0;
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(FOREIGN(wid)->signal_lock);
|
||||
#endif
|
||||
|
||||
FOREIGN(wid)->tot_marked = 0L;
|
||||
FOREIGN(wid)->tot_oldies = 0L;
|
||||
#if DEBUG && COROUTINING
|
||||
FOREIGN(wid)->tot_smarked = 0L;
|
||||
#endif
|
||||
FOREIGN(wid)->wl_current_B = NULL;
|
||||
FOREIGN(wid)->wl_prev_HB = NULL;
|
||||
FOREIGN(wid)->hgen = NULL;
|
||||
FOREIGN(wid)->ip_top = NULL;
|
||||
#if GC_NO_TAGS
|
||||
|
||||
#if defined(GC_NO_TAGS)
|
||||
FOREIGN(wid)->b_p = NULL;
|
||||
#endif
|
||||
#if defined(TABLING) || defined(YAPOR_SBA)
|
||||
#if !defined(TABLING) && !defined(YAPOR_SBA) && (defined(YAPOR) || defined(THREADS))
|
||||
FOREIGN(wid)->wl_sTR = NULL;
|
||||
FOREIGN(wid)->wl_sTR0 = NULL;
|
||||
FOREIGN(wid)->new_tr = NULL;
|
||||
@ -104,7 +102,7 @@ static void InitWorker(int wid) {
|
||||
FOREIGN(wid)->wl_sTR = NULL;
|
||||
FOREIGN(wid)->wl_sTR0 = NULL;
|
||||
FOREIGN(wid)->new_tr = NULL;
|
||||
#endif
|
||||
#endif /* !TABLING && !YAPOR_SBA && (YAPOR || THREADS) */
|
||||
FOREIGN(wid)->conttop0 = NULL;
|
||||
FOREIGN(wid)->conttop = NULL;
|
||||
FOREIGN(wid)->disc_trail_entries = 0;
|
||||
@ -116,7 +114,6 @@ static void InitWorker(int wid) {
|
||||
FOREIGN(wid)->DB_vec0 = NULL;
|
||||
FOREIGN(wid)->DB_root = NULL;
|
||||
FOREIGN(wid)->DB_nil = NULL;
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
|
||||
FOREIGN(wid)->dynamic_arrays = NULL;
|
||||
FOREIGN(wid)->static_arrays = NULL;
|
||||
|
17
H/rlocals.h
17
H/rlocals.h
@ -80,23 +80,21 @@ static void RestoreWorker(int wid USES_REGS) {
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(FOREIGN(wid)->signal_lock);
|
||||
|
||||
|
||||
|
||||
#if DEBUG && COROUTINING
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if GC_NO_TAGS
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(GC_NO_TAGS)
|
||||
|
||||
#endif
|
||||
#if defined(TABLING) || defined(YAPOR_SBA)
|
||||
#if !defined(TABLING) && !defined(YAPOR_SBA) && (defined(YAPOR) || defined(THREADS))
|
||||
|
||||
|
||||
|
||||
@ -104,7 +102,7 @@ static void RestoreWorker(int wid USES_REGS) {
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* !TABLING && !YAPOR_SBA && (YAPOR || THREADS) */
|
||||
|
||||
|
||||
|
||||
@ -116,7 +114,6 @@ static void RestoreWorker(int wid USES_REGS) {
|
||||
|
||||
|
||||
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
|
||||
FOREIGN(wid)->dynamic_arrays = PtoArrayEAdjust(FOREIGN(wid)->dynamic_arrays);
|
||||
FOREIGN(wid)->static_arrays = PtoArraySAdjust(FOREIGN(wid)->static_arrays);
|
||||
|
30
misc/LOCALS
30
misc/LOCALS
@ -60,7 +60,7 @@ struct pred_entry* last_asserted_pred LOCAL_LastAssertedPred =NULL
|
||||
int debug_on LOCAL_DebugOn =FALSE
|
||||
char* scanner_stack LOCAL_ScannerStack =NULL
|
||||
struct scanner_extra_alloc* scanner_extra_blocks LOCAL_ScannerExtraBlocks =NULL
|
||||
struct DB_TERM *ball_term LOCAL_BallTerm =NULL RestoreBallTerm(wid)
|
||||
struct DB_TERM* ball_term LOCAL_BallTerm =NULL RestoreBallTerm(wid)
|
||||
UInt active_signals LOCAL_ActiveSignals =0L
|
||||
UInt i_pred_arity LOCAL_IPredArity =0L
|
||||
yamop* prof_end LOCAL_ProfEnd =NULL
|
||||
@ -89,31 +89,30 @@ Int total_cps LOCAL_total_choicepoints =0
|
||||
|
||||
int consult_level_ LOCAL_consult_level =0
|
||||
|
||||
// global variables that cannot be global in a thread/or-p implementation
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar signal_lock LOCAL_SignalLock MkLock
|
||||
#endif
|
||||
/* in a single gc */
|
||||
Int tot_marked LOCAL_total_marked =0L
|
||||
Int tot_oldies LOCAL_total_oldies =0L
|
||||
#if DEBUG && COROUTINING
|
||||
UInt tot_smarked LOCAL_total_smarked =0L
|
||||
#endif
|
||||
struct choicept *wl_current_B LOCAL_current_B =NULL
|
||||
struct choicept* wl_current_B LOCAL_current_B =NULL
|
||||
CELL* wl_prev_HB LOCAL_prev_HB =NULL
|
||||
CELL* hgen LOCAL_HGEN =NULL
|
||||
CELL** ip_top LOCAL_iptop =NULL
|
||||
#if GC_NO_TAGS
|
||||
//#endif
|
||||
#if defined(GC_NO_TAGS)
|
||||
char* b_p LOCAL_bp =NULL
|
||||
#endif
|
||||
#if defined(TABLING) || defined(YAPOR_SBA)
|
||||
|
||||
#if !defined(TABLING) && !defined(YAPOR_SBA) && (defined(YAPOR) || defined(THREADS))
|
||||
Term* wl_sTR LOCAL_sTR =NULL
|
||||
Term* wl_sTR0 LOCAL_sTR0 =NULL
|
||||
Term* new_tr LOCAL_new_TR =NULL
|
||||
#else
|
||||
struct trail_frame* wl_sTR LOCAL_sTR =NULL
|
||||
struct trail_frame* wl_sTR0 LOCAL_sTR0 =NULL
|
||||
struct trail_frame* new_tr LOCAL_new_TR =NULL
|
||||
#else
|
||||
Term *wl_sTR LOCAL_sTR =NULL
|
||||
Term *wl_sTR0 LOCAL_sTR0 =NULL
|
||||
Term *new_tr LOCAL_new_TR =NULL
|
||||
#endif
|
||||
#endif /* !TABLING && !YAPOR_SBA && (YAPOR || THREADS) */
|
||||
struct gc_mark_continuation* conttop0 LOCAL_cont_top0 =NULL
|
||||
struct gc_mark_continuation* conttop LOCAL_cont_top =NULL
|
||||
int disc_trail_entries LOCAL_discard_trail_entries =0
|
||||
@ -125,8 +124,6 @@ ADDR DB_vec LOCAL_db_vec =NULL
|
||||
ADDR DB_vec0 LOCAL_db_vec0 =NULL
|
||||
struct RB_red_blk_node* DB_root LOCAL_db_root =NULL
|
||||
struct RB_red_blk_node* DB_nil LOCAL_db_nil =NULL
|
||||
#endif /* defined(YAPOR) || defined(THREADS) */
|
||||
|
||||
|
||||
sigjmp_buf gc_restore LOCAL_gc_restore void
|
||||
struct array_entry* dynamic_arrays LOCAL_DynamicArrays =NULL PtoArrayEAdjust
|
||||
@ -143,11 +140,10 @@ Int* label_first_array LOCAL_LabelFirstArray =NULL
|
||||
UInt label_first_array_sz LOCAL_LabelFirstArraySz =0L
|
||||
|
||||
// Thread Local Area for SWI-Prolog emulation routines.
|
||||
struct PL_local_data *Yap_ld_ LOCAL_PL_local_data_p =Yap_InitThreadIO(wid)
|
||||
struct PL_local_data* Yap_ld_ LOCAL_PL_local_data_p =Yap_InitThreadIO(wid)
|
||||
|
||||
struct open_query_struct* _execution LOCAL_execution =NULL
|
||||
|
||||
|
||||
#ifdef THREADS
|
||||
struct thandle thread_handle LOCAL_ThreadHandle InitThreadHandle(wid)
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)]->thread_handle)
|
||||
|
Reference in New Issue
Block a user