From 62edb729029b8852f2a346b1cbab3ddab321469f Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sun, 16 Jul 2006 15:46:53 +0000 Subject: [PATCH] 2006-07-45 16:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/compiler/harbour.c ! fixed typo in binary or - || was used instead of | * reenabled frame optimization for compilation without -n switch --- harbour/ChangeLog | 5 +++++ harbour/source/compiler/harbour.c | 37 +++++++++++-------------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 43a4951360..14a6e22d2c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2006-07-45 16:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + I think that it will be much easier and also using _DEFAULT as suffix + does not resolve fully 10 character symbol but will work if GT name + is not longer then 3 characters + 2006-07-16 16:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/compiler/harbour.c ! fixed typo in binary or - || was used instead of | diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index 343054e0d8..02004912c4 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -4961,46 +4961,35 @@ int hb_compCompile( char * szPrg, int argc, char * argv[], BOOL bSingleFile ) if( ! hb_comp_bSyntaxCheckOnly && ! bSkipGen && ( hb_comp_iErrorCount == 0 ) ) { - PFUNCTION pFunc; char * szFirstFunction = NULL; + PFUNCTION *pFunPtr; /* we create the output file name */ hb_compOutputFile(); - if( ! hb_comp_bStartProc ) + pFunPtr = &hb_comp_functions.pFirst; + while( *pFunPtr ) { /* remove function frames with no names */ - PFUNCTION *pFunPtr = &hb_comp_functions.pFirst; - - while( *pFunPtr ) + if( ! hb_comp_bStartProc && ! (*pFunPtr)->szName[0] ) { - if( ! (*pFunPtr)->szName[0] ) - { - *pFunPtr = hb_compFunctionKill( *pFunPtr ); - hb_comp_functions.iCount--; - hb_comp_iFunctionCnt--; - } - else - { - hb_compOptimizeFrames( *pFunPtr ); + *pFunPtr = hb_compFunctionKill( *pFunPtr ); + hb_comp_functions.iCount--; + hb_comp_iFunctionCnt--; + } + else + { + hb_compOptimizeFrames( *pFunPtr ); if( szFirstFunction == NULL && - ! ( ( *pFunPtr )->cScope & (HB_FS_INIT || HB_FS_EXIT) ) ) + ! ( ( *pFunPtr )->cScope & (HB_FS_INIT | HB_FS_EXIT) ) ) { szFirstFunction = ( *pFunPtr )->szName; } - pFunPtr = &(*pFunPtr)->pNext; - } + pFunPtr = &(*pFunPtr)->pNext; } } - pFunc = hb_comp_functions.pFirst; - while( pFunc ) - { - - pFunc = pFunc->pNext; - } - if( szFirstFunction ) { PCOMSYMBOL pSym = hb_comp_symbols.pFirst;