Skip to content

Commit

Permalink
kernel: fix some comment formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed May 10, 2019
1 parent 9150efb commit 84cd55e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 42 deletions.
53 changes: 26 additions & 27 deletions src/code.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ enum STAT_TNUM {
// run full). We don't want to compound statements to be interrupted,
// relying instead on their sub-statements being interruptible. This
// results in a slightly better user experience in break loops, where
// the interrupted statement is printed, which works better for single
// statements than for compound statements.
// the interrupted statement is printed, which works better for
// single statements than for compound statements.
START_ENUM_RANGE(FIRST_NON_INTERRUPT_STAT),

START_ENUM_RANGE(FIRST_COMPOUND_STAT),
Expand Down Expand Up @@ -368,17 +368,17 @@ void SET_VISITED_STAT(Stat stat);

/****************************************************************************
**
*F IS_REF_LVAR(<expr>). . . . test if an expression is a reference to a local
*F REF_LVAR_LVAR(<lvar>) . . . . . convert a local to a reference to a local
*F LVAR_REF_LVAR(<expr>) . . . . . convert a reference to a local to a local
*F IS_REF_LVAR(<expr>) . . . test if an expression is a reference to a local
*F REF_LVAR_LVAR(<lvar>) . . . . . convert a local to a reference to a local
*F LVAR_REF_LVAR(<expr>) . . . . . convert a reference to a local to a local
**
** 'IS_REF_LVAR' returns 1 if the expression <expr> is an (immediate)
** 'IS_REF_LVAR' returns 1 if the expression <expr> is an (immediate)
** reference to a local variable, and 0 otherwise.
**
** 'REF_LVAR_LVAR' returns a (immediate) reference to the local variable
** 'REF_LVAR_LVAR' returns a (immediate) reference to the local variable
** <lvar> (given by its index).
**
** 'LVAR_REF_LVAR' returns the local variable (by its index) to which <expr>
** 'LVAR_REF_LVAR' returns the local variable (by its index) to which <expr>
** is a (immediate) reference.
*/
EXPORT_INLINE Int IS_REF_LVAR(Expr expr)
Expand Down Expand Up @@ -682,9 +682,8 @@ void CodeFuncCallEnd(UInt funccall, UInt options, UInt nr);
**
** 'CodeFuncExprEnd' is an action to code a function expression. It is
** called when the reader encounters the end of a function expression. <nr>
** is the number of statements in the body of the function. If <pushExpr>
** is set, the current function expression is pushed on the expression stack.
**
** is the number of statements in the body of the function. If <pushExpr> is
** set, the current function expression is pushed on the expression stack.
*/
void CodeFuncExprBegin(Int narg, Int nloc, Obj nams, Int startLine);

Expand All @@ -709,9 +708,9 @@ Int AddValueToBody(Obj val);
*F CodeFuncCallOptionsEndElmEmpty() .. . . . . . .code options, end element
*F CodeFuncCallOptionsEnd(<nr>) . . . . . . . . . . . . . code options, end
**
** The net effect of all of these is to leave a record expression on the stack
** containing the options record. It will be picked up by
** CodeFuncCallEnd()
** The net effect of all of these is to leave a record expression on the
** stack containing the options record. It will be picked up by
** CodeFuncCallEnd().
**
*/
void CodeFuncCallOptionsBegin(void);
Expand Down Expand Up @@ -811,26 +810,26 @@ void CodeForEnd(void);

/****************************************************************************
**
*F CodeAtomicBegin() . . . . . . . code atomic-statement, begin of statement
*F CodeAtomicBeginBody() . . . . . . . . code atomic-statement, begin of body
*F CodeAtomicEndBody( <nr> ) . . . . . . . code atomic-statement, end of body
*F CodeAtomicEnd() . . . . . . . . . code atomic-statement, end of statement
*F CodeAtomicBegin() . . . . . . . code atomic-statement, begin of statement
*F CodeAtomicBeginBody() . . . . . . . code atomic-statement, begin of body
*F CodeAtomicEndBody(<nr>) . . . . . . . code atomic-statement, end of body
*F CodeAtomicEnd() . . . . . . . . . code atomic-statement, end of statement
**
** 'CodeAtomicBegin' is an action to code a atomic-statement. It is called
** when the reader encounters the 'atomic', i.e., *before* the condition is
** 'CodeAtomicBegin' is an action to code an atomic-statement. It is called
** when the reader encounters the 'atomic', i.e., *before* the condition is
** read.
**
** 'CodeAtomicBeginBody' is an action to code a atomic-statement. It is
** called when the reader encounters the beginning of the statement body,
** 'CodeAtomicBeginBody' is an action to code a atomic-statement. It is
** called when the reader encounters the beginning of the statement body,
** i.e., *after* the condition is read.
**
** 'CodeAtomicEndBody' is an action to code a atomic-statement. It is called
** when the reader encounters the end of the statement body. <nr> is the
** 'CodeAtomicEndBody' is an action to code a atomic-statement. It is called
** when the reader encounters the end of the statement body. <nr> is the
** number of statements in the body.
**
** 'CodeAtomicEnd' is an action to code a atomic-statement. It is called when
** the reader encounters the end of the statement, i.e., immediate after
** 'CodeAtomicEndBody'.
** 'CodeAtomicEnd' is an action to code a atomic-statement. It is called
** when the reader encounters the end of the statement, i.e., immediately
** after 'CodeAtomicEndBody'.
*/

void CodeAtomicBegin(void);
Expand Down
26 changes: 13 additions & 13 deletions src/compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static Int CompFastListFuncs;

/****************************************************************************
**
*V CompCheckTypes . . . . option to emit code that assumes all types are ok.
*V CompCheckTypes . . . . option to emit code that assumes all types are ok.
*/
static Int CompCheckTypes;

Expand Down Expand Up @@ -1030,7 +1030,7 @@ static CVar CompFunccall0to6Args(Expr expr)

/****************************************************************************
**
*F CompFunccallXArgs( <expr> ) . . . . . . . . . . . . . . EXPR_FUNCCALL_XARGS
*F CompFunccallXArgs( <expr> ) . . . . . . . . . . . . . EXPR_FUNCCALL_XARGS
*/
static CVar CompFunccallXArgs(Expr expr)
{
Expand Down Expand Up @@ -1087,7 +1087,7 @@ static CVar CompFunccallXArgs(Expr expr)

/****************************************************************************
**
*F CompFunccallXArgs( <expr> ) . . . . . . . . . . . . . . EXPR_FUNCCALL_OPTS
*F CompFunccallXArgs( <expr> ) . . . . . . . . . . . . . EXPR_FUNCCALL_OPTS
*/
static CVar CompFunccallOpts(Expr expr)
{
Expand All @@ -1109,7 +1109,7 @@ static CVar CompFunccallOpts(Expr expr)

/****************************************************************************
**
*F CompFuncExpr( <expr> ) . . . . . . . . . . . . . . . . . . . EXPR_FUNC
*F CompFuncExpr( <expr> ) . . . . . . . . . . . . . . . . . . . . EXPR_FUNC
*/
static CVar CompFuncExpr(Expr expr)
{
Expand Down Expand Up @@ -1165,7 +1165,7 @@ static CVar CompFuncExpr(Expr expr)

/****************************************************************************
**
*F CompOr( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . . . EXPR_OR
*F CompOr( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . . EXPR_OR
*/
static CVar CompOr(Expr expr)
{
Expand Down Expand Up @@ -1204,7 +1204,7 @@ static CVar CompOr(Expr expr)

/****************************************************************************
**
*F CompOrBool( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . EXPR_OR
*F CompOrBool( <expr> ) . . . . . . . . . . . . . . . . . . . . . . EXPR_OR
*/
static CVar CompOrBool(Expr expr)
{
Expand Down Expand Up @@ -1243,7 +1243,7 @@ static CVar CompOrBool(Expr expr)

/****************************************************************************
**
*F CompAnd( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . . . EXPR_AND
*F CompAnd( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . EXPR_AND
*/
static CVar CompAnd(Expr expr)
{
Expand Down Expand Up @@ -1301,7 +1301,7 @@ static CVar CompAnd(Expr expr)

/****************************************************************************
**
*F CompAndBool( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . EXPR_AND
*F CompAndBool( <expr> ) . . . . . . . . . . . . . . . . . . . . . EXPR_AND
*/
static CVar CompAndBool(Expr expr)
{
Expand Down Expand Up @@ -1340,7 +1340,7 @@ static CVar CompAndBool(Expr expr)

/****************************************************************************
**
*F CompNot( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . . . EXPR_NOT
*F CompNot( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . EXPR_NOT
*/
static CVar CompNot(Expr expr)
{
Expand Down Expand Up @@ -1369,7 +1369,7 @@ static CVar CompNot(Expr expr)

/****************************************************************************
**
*F CompNotBoot( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . EXPR_NOT
*F CompNotBoot( <expr> ) . . . . . . . . . . . . . . . . . . . . . EXPR_NOT
*/
static CVar CompNotBool(Expr expr)
{
Expand Down Expand Up @@ -1398,7 +1398,7 @@ static CVar CompNotBool(Expr expr)

/****************************************************************************
**
*F CompEq( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . . . EXPR_EQ
*F CompEq( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . . EXPR_EQ
*/
static CVar CompEq(Expr expr)
{
Expand Down Expand Up @@ -1435,7 +1435,7 @@ static CVar CompEq(Expr expr)

/****************************************************************************
**
*F CompEqBool( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . EXPR_EQ
*F CompEqBool( <expr> ) . . . . . . . . . . . . . . . . . . . . . . EXPR_EQ
*/
static CVar CompEqBool(Expr expr)
{
Expand Down Expand Up @@ -1472,7 +1472,7 @@ static CVar CompEqBool(Expr expr)

/****************************************************************************
**
*F CompNe( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . . . EXPR_NE
*F CompNe( <expr> ) . . . . . . . . . . . . . . . . . . . . . . . . . EXPR_NE
*/
static CVar CompNe(Expr expr)
{
Expand Down
4 changes: 2 additions & 2 deletions src/exprs.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

/****************************************************************************
**
*F OBJ_REF_LVAR(<expr>) . . . . . . . . . . . value of a reference to a local
*F OBJ_REF_LVAR(<expr>) . . . . . . . . . . .value of a reference to a local
**
** 'OBJ_REF_LVAR' returns the value of the reference to a local variable
** 'OBJ_REF_LVAR' returns the value of the reference to a local variable
** <expr>.
*/
EXPORT_INLINE Obj OBJ_REF_LVAR(Expr expr)
Expand Down

0 comments on commit 84cd55e

Please sign in to comment.