make var names available as a global var

This commit is contained in:
Vítor Santos Costa 2015-03-04 09:46:55 +00:00
parent dbfe42b360
commit 8ea17007f0
5 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,8 @@
#define LOCAL_ConsultLow LOCAL->ConsultLow_
#define REMOTE_ConsultLow(wid) REMOTE(wid)->ConsultLow_
#define LOCAL_VarNames LOCAL->VarNames_
#define REMOTE_VarNames(wid) REMOTE(wid)->VarNames_
#define LOCAL_GlobalArena LOCAL->GlobalArena_
#define REMOTE_GlobalArena(wid) REMOTE(wid)->GlobalArena_

View File

@ -45,6 +45,7 @@ typedef struct worker_local {
union CONSULT_OBJ* ConsultBase_;
union CONSULT_OBJ* ConsultLow_;
Term VarNames_;
Term GlobalArena_;
UInt GlobalArenaOverflows_;

View File

@ -45,6 +45,7 @@ static void InitWorker(int wid) {
REMOTE_ConsultBase(wid) = NULL;
REMOTE_ConsultLow(wid) = NULL;
REMOTE_VarNames(wid) = ((Term)0);
REMOTE_GlobalArena(wid) = 0L;
REMOTE_GlobalArenaOverflows(wid) = 0L;

View File

@ -44,6 +44,7 @@ static void RestoreWorker(int wid USES_REGS) {
REMOTE_GlobalArena(wid) = TermToGlobalOrAtomAdjust(REMOTE_GlobalArena(wid));

View File

@ -45,6 +45,7 @@ UInt ConsultCapacity void
union CONSULT_OBJ* ConsultBase =NULL
/* low-water mark for consult */
union CONSULT_OBJ* ConsultLow =NULL
Term VarNames =((Term)0)
//global variables
Term GlobalArena =0L TermToGlobalOrAtomAdjust