Skip to content

Commit

Permalink
Merge pull request #936 from markuspf/globalstate-fixes
Browse files Browse the repository at this point in the history
Globalstate fixes
  • Loading branch information
ChrisJefferson authored Nov 4, 2016
2 parents b3f3601 + 57b2ba7 commit becaeff
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
19 changes: 11 additions & 8 deletions src/gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,11 @@ char *original_argv0;
static char **sysargv;
static char **sysenviron;

Obj ShellContext = 0;
Obj BaseShellContext = 0;
UInt ShellContextDepth;

/*
TL: Obj ShellContext = 0;
TL: Obj BaseShellContext = 0;
TL: UInt ShellContextDepth;
*/

Obj Shell ( Obj context,
UInt canReturnVoid,
Expand Down Expand Up @@ -1202,11 +1203,13 @@ Obj FuncWindowCmd (
*F FuncDownEnv( <self>, <level> ) . . . . . . . . . change the environment
*/

Obj ErrorLVars0;
Obj ErrorLVars;
Int ErrorLLevel;
/*
TL: Obj ErrorLVars0;
TL: Obj ErrorLVars;
TL: Int ErrorLLevel;
*/

// extern Obj BottomLVars;
// TL: extern Obj BottomLVars;


void DownEnvInner( Int depth )
Expand Down
12 changes: 10 additions & 2 deletions src/globalstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ typedef struct GlobalState
Obj IntrState;
Obj StackObj;
Int CountObj;
#if defined(HPCGAP)
UInt PeriodicCheckCount;
#endif

/* From gvar.c */
Obj CurrNamespace;
Expand All @@ -38,7 +40,9 @@ typedef struct GlobalState
Bag BottomLVars;
Bag CurrLVars;
Obj *PtrLVars;
#if defined(HPCGAP)
Bag LVarsPool[16];
#endif

/* From read.c */
syJmp_buf ReadJmpError;
Expand Down Expand Up @@ -74,7 +78,7 @@ typedef struct GlobalState
TypInputFile * TestInput;
TypOutputFile * TestOutput;
TypOutputFile * IgnoreStdoutErrout;
#ifdef HPCGAP
#if defined(HPCGAP)
Obj DefaultOutput;
Obj DefaultInput;
#endif
Expand Down Expand Up @@ -156,15 +160,17 @@ typedef struct GlobalState
Int PrintObjFull;
// HPC-GAP Obj PrintObjThissObj;
Obj PrintObjThiss[MAXPRINTDEPTH];
// HPG-GAP Obj PrintObjIndicesObj;
// HPC-GAP Obj PrintObjIndicesObj;
Int PrintObjIndices[MAXPRINTDEPTH];

#if defined(HPCGAP)
/* For serializer.c */
Obj SerializationObj;
UInt SerializationIndex;
void *SerializationDispatcher;
Obj SerializationRegistry;
Obj SerializationStack;
#endif

/* For objscoll*, objccoll* */
Obj SC_NW_STACK;
Expand All @@ -176,10 +182,12 @@ typedef struct GlobalState
Obj SC_CW2_VECTOR;
UInt SC_MAX_STACK_SIZE;

#if defined(HPCGAP)
/* Profiling */
UInt CountActive;
UInt LocksAcquired;
UInt LocksContended;
#endif

/* Allocation */
#ifdef BOEHM_GC
Expand Down

0 comments on commit becaeff

Please sign in to comment.