make LOCAL a register

This commit is contained in:
Vitor Santos Costa 2010-02-10 09:22:20 +00:00
parent 0e85839517
commit 95e596a8a1
4 changed files with 6 additions and 6 deletions

View File

@ -132,6 +132,9 @@ typedef struct
int sba_end_;
int sba_size_;
#endif /* SBA */
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
struct local_data *LOCAL_;
#endif
#endif /* YAPOR || THREADS */
#if PUSH_REGS
/* On a X86 machine, the best solution is to keep the
@ -697,6 +700,9 @@ EXTERN inline void restore_B(void) {
#ifdef COROUTINING
#define DelayedVars Yap_REGS.DelayedVars_
#endif
#if (defined(YAPOR) || defined(TABLING)) && defined(THREADS)
#define LOCAL Yap_REGS.LOCAL_
#endif
#define CurrentModule Yap_REGS.CurrentModule_
#define ARITH_EXCEPTION Yap_REGS.ARITH_EXCEPTION_
#define Yap_isint Yap_REGS.isint_

View File

@ -186,7 +186,6 @@ typedef struct worker_local_struct {
Term global_delay_arena;
yamop trust_lu_code[3];
#if (defined(YAPOR) || defined(TABLING) ) && defined(THREADS)
struct local_data *local;
#ifdef YAPOR
struct worker worker;
#endif /* YAPOR */
@ -370,7 +369,6 @@ extern struct various_codes *Yap_heap_regs;
#define GLOBAL Yap_heap_regs->global
#define REMOTE Yap_heap_regs->remote
#ifdef THREADS
#define LOCAL Yap_heap_regs->WL.local
#define WORKER Yap_heap_regs->WL.worker
#endif
#endif /* YAPOR || TABLING */

View File

@ -371,8 +371,6 @@ struct local_data{
#endif /* TABLING */
};
extern struct local_data *LOCAL;
#define LOCAL_lock (LOCAL->lock)
#define LOCAL_load (LOCAL->load)
#if THREADS

View File

@ -319,11 +319,9 @@ void SCH_set_load(choiceptr current_cp) {
LOCAL_load = lub;
else
LOCAL_load = lub + YAMOP_LTT(current_cp->cp_ap);
return;
}
static inline
void SCH_new_alternative(yamop *curpc, yamop *new) {
OrFr_alternative(LOCAL_top_or_fr) = new;