Skip to content

Commit

Permalink
kernel: (re)move some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Dec 22, 2022
1 parent c7d7960 commit f563a36
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 83 deletions.
11 changes: 0 additions & 11 deletions src/code.h
Original file line number Diff line number Diff line change
Expand Up @@ -653,17 +653,6 @@ EXPORT_INLINE Stat READ_EXPR(Expr expr, Int idx)
#define NARG_SIZE_INFO(size) ((size) / sizeof(Expr))
#define SIZE_NARG_INFO(narg) ((narg) * sizeof(Expr))


/****************************************************************************
**
*V CodeResult . . . . . . . . . . . . . . . . . . . . . . result of coding
**
** 'CodeResult' is the result of the coding, i.e., the function that was
** coded.
*/
// TL: extern Obj CodeResult;


/****************************************************************************
**
*F * * * * * * * * * * * * * coder functions * * * * * * * * * * * * * * * *
Expand Down
1 change: 0 additions & 1 deletion src/funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ static Obj EvalFunccallXargs(Expr call)
**
*/

// TL: Int RecursionDepth;
UInt RecursionTrapInterval;

void RecursionDepthTrap( void )
Expand Down
13 changes: 13 additions & 0 deletions src/gapstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,20 @@ typedef struct GAPState {
Obj CurrNamespace;

// From vars.c

// 'CurrLVars' is the bag containing the values of the local variables of
// the currently executing interpreted function.
//
// Assignments to the local variables change this bag. We do not call
// 'CHANGED_BAG' for each of such change. Instead we wait until a garbage
// collection begins and then call 'CHANGED_BAG' in 'BeginCollectBags'.
Bag CurrLVars;

// 'PtrLVars' is a pointer to the 'STATE(CurrLVars)' bag. This makes it
// faster to access local variables.
//
// Since a garbage collection may move this bag around, the pointer
// 'PtrLVars' must be recalculated afterwards in 'VarsAfterCollectBags'.
Obj * PtrLVars;

Bag LVarsPool[16];
Expand Down
2 changes: 0 additions & 2 deletions src/gvars.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,6 @@ Obj ExprGVar ( UInt gvar )

#define NSCHAR '@'

// TL: Obj CurrNamespace = 0;

static Obj FuncSET_NAMESPACE(Obj self, Obj str)
{
STATE(CurrNamespace) = str;
Expand Down
4 changes: 1 addition & 3 deletions src/intrprtr.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,12 @@ static void INTERPRETER_PROFILE_HOOK(IntrState * intr, int ignoreLevel)

/****************************************************************************
**
*F StackObj . . . . . . . . . . . . . . . . . . . . . . . . . values stack
*F PushObj(<val>) . . . . . . . . . . . . . . . . push value onto the stack
*F PushVoidObj() . . . . . . . . . . . . . . push void value onto the stack
*F PopObj() . . . . . . . . . . . . . . . . . . . pop value from the stack
*F PopVoidObj() . . . . . . . . . . . . . . . . . pop value from the stack
**
** 'StackObj' is the stack of values.
** 'intr->StackObj' is the stack of values.
**
** 'PushObj' pushes the value <val> onto the values stack. It is an error
** to push the void value. The stack is automatically resized if necessary.
Expand All @@ -107,7 +106,6 @@ static void INTERPRETER_PROFILE_HOOK(IntrState * intr, int ignoreLevel)
** 'PopVoidObj' returns the top element from the values stack and pops it.
** It is an error if the stack is empty but not if the top element is void.
*/
// TL: Obj StackObj;

static void PushObj(IntrState * intr, Obj val)
{
Expand Down
11 changes: 0 additions & 11 deletions src/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,6 @@ UInt OpenInputLogStream(Obj stream);
*/
UInt CloseInputLog(void);

/****************************************************************************
**
*V Prompt . . . . . . . . . . . . . . . . . . . . . . prompt to be printed
**
** 'Prompt' holds the string that is to be printed if a new line is read
** from the interactive files '*stdin*' or '*errin*'.
**
** It is set to 'gap> ' or 'brk> ' in the read-eval-print loops and changed
** to the partial prompt '> ' in 'Read' after the first symbol is read.
*/
// TL: extern const Char * Prompt;

/****************************************************************************
**
Expand Down
1 change: 0 additions & 1 deletion src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
** This is automatically ensured if one just calls interpreter functions,
** as the interpreter does not use TRY_IF_NO_ERROR.
*/
// TL: extern jmp_buf ReadJmpError;


#define TRY_IF_NO_ERROR \
Expand Down
27 changes: 0 additions & 27 deletions src/vars.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@
#include <stdio.h>


/****************************************************************************
**
*V CurrLVars . . . . . . . . . . . . . . . . . . . . . local variables bag
**
** 'CurrLVars' is the bag containing the values of the local variables of
** the currently executing interpreted function.
**
** Assignments to the local variables change this bag. We do not call
** 'CHANGED_BAG' for each of such change. Instead we wait until a garbage
** collection begins and then call 'CHANGED_BAG' in 'BeginCollectBags'.
*/
// TL: Bag CurrLVars;


/****************************************************************************
**
*V BottomLVars . . . . . . . . . . . . . . . . . bottom local variables bag
Expand All @@ -72,19 +58,6 @@
static Bag BottomLVars;


/****************************************************************************
**
*V PtrLVars . . . . . . . . . . . . . . . . pointer to local variables bag
**
** 'PtrLVars' is a pointer to the 'STATE(CurrLVars)' bag. This makes it faster to
** access local variables.
**
** Since a garbage collection may move this bag around, the pointer
** 'PtrLVars' must be recalculated afterwards in 'VarsAfterCollectBags'.
*/
// TL: Obj * PtrLVars;


/****************************************************************************
**
*F ObjLVar(<lvar>) . . . . . . . . . . . . . . . . value of a local variable
Expand Down
27 changes: 0 additions & 27 deletions src/vars.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,13 @@
#include "objects.h"


/****************************************************************************
**
*V CurrLVars . . . . . . . . . . . . . . . . . . . . . local variables bag
**
** 'CurrLVars' is the bag containing the values of the local variables of
** the currently executing interpreted function.
**
** Assignments to the local variables change this bag. We do not call
** 'CHANGED_BAG' for each of such change. Instead we wait until a garbage
** collection begins and then call 'CHANGED_BAG' in 'BeginCollectBags'.
*/
// TL: extern Bag CurrLVars;


/****************************************************************************
**
*F IsBottomLVars(<lvars>) . . test whether lvars is at the call stack bottom
*/
BOOL IsBottomLVars(Obj lvars);


/****************************************************************************
**
*V PtrLVars . . . . . . . . . . . . . . . . pointer to local variables bag
**
** 'PtrLVars' is a pointer to the 'CurrLVars' bag. This makes it faster to
** access local variables.
**
** Since a garbage collection may move this bag around, the pointer
** 'PtrLVars' must be recalculated afterwards in 'VarsAfterCollectBags'.
*/
// TL: extern Obj * PtrLVars;


/****************************************************************************
**
*F IS_LVARS_OR_HVARS()
Expand Down

0 comments on commit f563a36

Please sign in to comment.