make LOCAL a register
This commit is contained in:
parent
0e85839517
commit
95e596a8a1
6
H/Regs.h
6
H/Regs.h
@ -132,6 +132,9 @@ typedef struct
|
|||||||
int sba_end_;
|
int sba_end_;
|
||||||
int sba_size_;
|
int sba_size_;
|
||||||
#endif /* SBA */
|
#endif /* SBA */
|
||||||
|
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||||
|
struct local_data *LOCAL_;
|
||||||
|
#endif
|
||||||
#endif /* YAPOR || THREADS */
|
#endif /* YAPOR || THREADS */
|
||||||
#if PUSH_REGS
|
#if PUSH_REGS
|
||||||
/* On a X86 machine, the best solution is to keep the
|
/* On a X86 machine, the best solution is to keep the
|
||||||
@ -697,6 +700,9 @@ EXTERN inline void restore_B(void) {
|
|||||||
#ifdef COROUTINING
|
#ifdef COROUTINING
|
||||||
#define DelayedVars Yap_REGS.DelayedVars_
|
#define DelayedVars Yap_REGS.DelayedVars_
|
||||||
#endif
|
#endif
|
||||||
|
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
|
||||||
|
#define LOCAL Yap_REGS.LOCAL_
|
||||||
|
#endif
|
||||||
#define CurrentModule Yap_REGS.CurrentModule_
|
#define CurrentModule Yap_REGS.CurrentModule_
|
||||||
#define ARITH_EXCEPTION Yap_REGS.ARITH_EXCEPTION_
|
#define ARITH_EXCEPTION Yap_REGS.ARITH_EXCEPTION_
|
||||||
#define Yap_isint Yap_REGS.isint_
|
#define Yap_isint Yap_REGS.isint_
|
||||||
|
@ -186,7 +186,6 @@ typedef struct worker_local_struct {
|
|||||||
Term global_delay_arena;
|
Term global_delay_arena;
|
||||||
yamop trust_lu_code[3];
|
yamop trust_lu_code[3];
|
||||||
#if (defined(YAPOR) || defined(TABLING) ) && defined(THREADS)
|
#if (defined(YAPOR) || defined(TABLING) ) && defined(THREADS)
|
||||||
struct local_data *local;
|
|
||||||
#ifdef YAPOR
|
#ifdef YAPOR
|
||||||
struct worker worker;
|
struct worker worker;
|
||||||
#endif /* YAPOR */
|
#endif /* YAPOR */
|
||||||
@ -370,7 +369,6 @@ extern struct various_codes *Yap_heap_regs;
|
|||||||
#define GLOBAL Yap_heap_regs->global
|
#define GLOBAL Yap_heap_regs->global
|
||||||
#define REMOTE Yap_heap_regs->remote
|
#define REMOTE Yap_heap_regs->remote
|
||||||
#ifdef THREADS
|
#ifdef THREADS
|
||||||
#define LOCAL Yap_heap_regs->WL.local
|
|
||||||
#define WORKER Yap_heap_regs->WL.worker
|
#define WORKER Yap_heap_regs->WL.worker
|
||||||
#endif
|
#endif
|
||||||
#endif /* YAPOR || TABLING */
|
#endif /* YAPOR || TABLING */
|
||||||
|
@ -371,8 +371,6 @@ struct local_data{
|
|||||||
#endif /* TABLING */
|
#endif /* TABLING */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct local_data *LOCAL;
|
|
||||||
|
|
||||||
#define LOCAL_lock (LOCAL->lock)
|
#define LOCAL_lock (LOCAL->lock)
|
||||||
#define LOCAL_load (LOCAL->load)
|
#define LOCAL_load (LOCAL->load)
|
||||||
#if THREADS
|
#if THREADS
|
||||||
|
@ -319,11 +319,9 @@ void SCH_set_load(choiceptr current_cp) {
|
|||||||
LOCAL_load = lub;
|
LOCAL_load = lub;
|
||||||
else
|
else
|
||||||
LOCAL_load = lub + YAMOP_LTT(current_cp->cp_ap);
|
LOCAL_load = lub + YAMOP_LTT(current_cp->cp_ap);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
void SCH_new_alternative(yamop *curpc, yamop *new) {
|
void SCH_new_alternative(yamop *curpc, yamop *new) {
|
||||||
OrFr_alternative(LOCAL_top_or_fr) = new;
|
OrFr_alternative(LOCAL_top_or_fr) = new;
|
||||||
|
Reference in New Issue
Block a user