Skip to content

Commit

Permalink
kernel: some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Aug 30, 2018
1 parent 279e237 commit 1fc85a8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2502,7 +2502,7 @@ CVar CompListTildeExpr (

/* remember the old value of '~' */
tilde = CVAR_TEMP( NewTemp( "tilde" ) );
Emit( "%c = STATE( Tilde );\n", tilde );
Emit( "%c = STATE(Tilde);\n", tilde );

/* create the list value */
list = CompListExpr1( expr );
Expand Down Expand Up @@ -2718,19 +2718,19 @@ CVar CompRecTildeExpr (

/* remember the old value of '~' */
tilde = CVAR_TEMP( NewTemp( "tilde" ) );
Emit( "%c = STATE( Tilde );\n", tilde );
Emit( "%c = STATE(Tilde);\n", tilde );

/* create the record value */
rec = CompRecExpr1( expr );

/* assign the record value to the variable '~' */
Emit( "STATE( Tilde ) = %c;\n", rec );
Emit( "STATE(Tilde) = %c;\n", rec );

/* evaluate the subexpressions into the record value */
CompRecExpr2( rec, expr );

/* restore the old value of '~' */
Emit( "STATE( Tilde ) = %c;\n", tilde );
Emit( "STATE(Tilde) = %c;\n", tilde );
if ( IS_TEMP_CVAR( tilde ) ) FreeTemp( TEMP_CVAR( tilde ) );

/* return the record value */
Expand Down
4 changes: 1 addition & 3 deletions src/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,12 @@ Obj FuncCALL_WITH_CATCH(Obj self, Obj func, volatile Obj args)
SWITCH_TO_OLD_LVARS(currLVars);
STATE(CurrStat) = currStat;
SetRecursionDepth(recursionDepth);
#ifdef HPCGAP
STATE(Tilde) = tilde;
#ifdef HPCGAP
PopRegionLocks(lockSP);
TLS(currentRegion) = savedRegion;
if (TLS(CurrentHashLock))
HashUnlock(TLS(CurrentHashLock));
#else
STATE(Tilde) = tilde;
#endif
}
else {
Expand Down
4 changes: 2 additions & 2 deletions src/exprs.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ Obj EvalListTildeExpr (
Obj tilde; /* old value of tilde */

/* remember the old value of '~' */
tilde = STATE( Tilde );
tilde = STATE(Tilde);

/* create the list value */
list = ListExpr1(expr, 1);
Expand Down Expand Up @@ -1310,7 +1310,7 @@ Obj EvalRecTildeExpr (
Obj tilde; /* old value of tilde */

/* remember the old value of '~' */
tilde = STATE( Tilde );
tilde = STATE(Tilde);

/* create the record value */
rec = RecExpr1( expr );
Expand Down
6 changes: 3 additions & 3 deletions src/intrprtr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,7 @@ void IntrListExprBegin (
/* if this is an outmost list, save it for reference in '~' */
/* (and save the old value of '~' on the values stack) */
if ( top ) {
old = STATE( Tilde );
old = STATE(Tilde);
if ( old != 0 ) { PushObj( old ); }
else { PushVoidObj(); }
STATE(Tilde) = list;
Expand Down Expand Up @@ -2288,10 +2288,10 @@ void IntrRecExprBegin (
/* if this is an outmost record, save it for reference in '~' */
/* (and save the old value of '~' on the values stack) */
if ( top ) {
old = STATE( Tilde );
old = STATE(Tilde);
if ( old != 0 ) { PushObj( old ); }
else { PushVoidObj(); }
STATE( Tilde ) = record;
STATE(Tilde) = record;
}

/* push the record */
Expand Down
3 changes: 1 addition & 2 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,8 +1080,7 @@ static void ReadRecExpr (
nr++;
}

}
while ( STATE(Symbol) == S_COMMA );
} while (STATE(Symbol) == S_COMMA);

/* ')' */
Match( S_RPAREN, ")", follow );
Expand Down

0 comments on commit 1fc85a8

Please sign in to comment.