From 1fc85a83931585aa5aa8976ca6318f52f6f15fdd Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 27 Aug 2018 22:05:28 +0200 Subject: [PATCH] kernel: some formatting --- src/compiler.c | 8 ++++---- src/error.c | 4 +--- src/exprs.c | 4 ++-- src/intrprtr.c | 6 +++--- src/read.c | 3 +-- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/compiler.c b/src/compiler.c index 64927b06bf..2f51d708de 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -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 ); @@ -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 */ diff --git a/src/error.c b/src/error.c index a4200611cc..9bb3be8a04 100644 --- a/src/error.c +++ b/src/error.c @@ -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 { diff --git a/src/exprs.c b/src/exprs.c index 6b1ad4ba20..9b13b3f5bd 100644 --- a/src/exprs.c +++ b/src/exprs.c @@ -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); @@ -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 ); diff --git a/src/intrprtr.c b/src/intrprtr.c index 27862f2f14..e4ef4226f1 100644 --- a/src/intrprtr.c +++ b/src/intrprtr.c @@ -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; @@ -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 */ diff --git a/src/read.c b/src/read.c index 784a6acff6..b4d9cc3363 100644 --- a/src/read.c +++ b/src/read.c @@ -1080,8 +1080,7 @@ static void ReadRecExpr ( nr++; } - } - while ( STATE(Symbol) == S_COMMA ); + } while (STATE(Symbol) == S_COMMA); /* ')' */ Match( S_RPAREN, ")", follow );