From 3030402cecb470e095bd26c4882854e34fb15a2d Mon Sep 17 00:00:00 2001 From: Mindaugas Kavaliauskas Date: Thu, 18 Dec 2008 15:29:27 +0000 Subject: [PATCH] 2008-12-18 17:30 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * source/compiler/hbopt.c ! suppressed optimisation if PARAMETER sentence is used ; TODO: PARAMETER sentence support * contrib/hbmisc/fileread.prg * contrib/hbmisc/nconvert.prg * contrib/hbnf/aredit.prg * contrib/hbnf/clrsel.prg * contrib/hbnf/dfile.prg * contrib/hbnf/dispmsg.prg * contrib/hbnf/dosver.prg * contrib/hbnf/menu1.prg * contrib/hbnf/menutonf.prg * contrib/hbodbc/browodbc.prg * contrib/hbodbc/todbc.prg * contrib/hbwhat/whatutil.prg * contrib/hbwhat/wincore.prg * contrib/hbwhat/windebug.prg * contrib/hbwhat/winerror.prg * contrib/hbwhat/wintabs.prg * contrib/hbwhat/wintbar.prg * contrib/hbziparc/hbziparc.prg ! fixed assigned but not used variable --- harbour/ChangeLog | 25 +++++++++++++++++++++++++ harbour/contrib/hbmisc/fileread.prg | 1 - harbour/contrib/hbmisc/nconvert.prg | 12 ++++++------ harbour/contrib/hbnf/aredit.prg | 2 +- harbour/contrib/hbnf/clrsel.prg | 12 ++++++------ harbour/contrib/hbnf/dfile.prg | 2 +- harbour/contrib/hbnf/dispmsg.prg | 4 ++-- harbour/contrib/hbnf/dosver.prg | 2 +- harbour/contrib/hbnf/menu1.prg | 4 ++-- harbour/contrib/hbnf/menutonf.prg | 2 +- harbour/contrib/hbodbc/browodbc.prg | 1 - harbour/contrib/hbodbc/todbc.prg | 2 +- harbour/contrib/hbwhat/whatutil.prg | 16 +++++++--------- harbour/contrib/hbwhat/wincore.prg | 10 +++++----- harbour/contrib/hbwhat/windebug.prg | 4 +--- harbour/contrib/hbwhat/winerror.prg | 9 +++------ harbour/contrib/hbwhat/wintabs.prg | 1 - harbour/contrib/hbwhat/wintbar.prg | 3 +-- harbour/contrib/hbziparc/hbziparc.prg | 2 +- harbour/source/compiler/hbopt.c | 19 +++++++++++++++++-- 20 files changed, 81 insertions(+), 52 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 98f0ce3ad8..c825323fc9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,31 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-12-18 17:30 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + * source/compiler/hbopt.c + ! suppressed optimisation if PARAMETER sentence is used + ; TODO: PARAMETER sentence support + + * contrib/hbmisc/fileread.prg + * contrib/hbmisc/nconvert.prg + * contrib/hbnf/aredit.prg + * contrib/hbnf/clrsel.prg + * contrib/hbnf/dfile.prg + * contrib/hbnf/dispmsg.prg + * contrib/hbnf/dosver.prg + * contrib/hbnf/menu1.prg + * contrib/hbnf/menutonf.prg + * contrib/hbodbc/browodbc.prg + * contrib/hbodbc/todbc.prg + * contrib/hbwhat/whatutil.prg + * contrib/hbwhat/wincore.prg + * contrib/hbwhat/windebug.prg + * contrib/hbwhat/winerror.prg + * contrib/hbwhat/wintabs.prg + * contrib/hbwhat/wintbar.prg + * contrib/hbziparc/hbziparc.prg + ! fixed assigned but not used variable + 2008-12-18 15:30 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * include/hbcomp.h * source/compiler/hbmain.c diff --git a/harbour/contrib/hbmisc/fileread.prg b/harbour/contrib/hbmisc/fileread.prg index 34c82ef20c..26034d0c8b 100644 --- a/harbour/contrib/hbmisc/fileread.prg +++ b/harbour/contrib/hbmisc/fileread.prg @@ -121,7 +121,6 @@ METHOD ReadLine() CLASS TFileRead ELSE // Add what was read to the readahead buffer. ::cBuffer += cLine - cLine := "" ENDIF // Is there a whole line in the readahead buffer yet? nPos := ::EOL_pos() diff --git a/harbour/contrib/hbmisc/nconvert.prg b/harbour/contrib/hbmisc/nconvert.prg index 481755f566..db1ac57b10 100644 --- a/harbour/contrib/hbmisc/nconvert.prg +++ b/harbour/contrib/hbmisc/nconvert.prg @@ -96,7 +96,7 @@ FUNCTION IsHexa(cString) FUNCTION DecToBin(nNumber) local cNewString:='' - local nTemp:=0 + local nTemp WHILE(nNumber > 0) nTemp:=(nNumber%2) cNewString:=SubStr('01',(nTemp+1),1)+cNewString @@ -106,7 +106,7 @@ FUNCTION DecToBin(nNumber) FUNCTION DecToOctal(nNumber) local cNewString:='' - local nTemp:=0 + local nTemp WHILE(nNumber > 0) nTemp:=(nNumber%8) cNewString:=SubStr('01234567',(nTemp+1),1)+cNewString @@ -116,7 +116,7 @@ FUNCTION DecToOctal(nNumber) FUNCTION DecToHexa(nNumber) local cNewString:='' - local nTemp:=0 + local nTemp WHILE(nNumber > 0) nTemp:=(nNumber%16) cNewString:=SubStr('0123456789ABCDEF',(nTemp+1),1)+cNewString @@ -125,7 +125,7 @@ FUNCTION DecToHexa(nNumber) RETURN(cNewString) FUNCTION BinToDec(cString) - local nNumber:=0,nX:=0 + local nNumber:=0,nX local cNewString:=AllTrim(cString) local nLen:=Len(cNewString) FOR nX:=1 to nLen @@ -135,7 +135,7 @@ FUNCTION BinToDec(cString) RETURN(nNumber) FUNCTION OctalToDec(cString) - local nNumber:=0,nX:=0 + local nNumber:=0,nX local cNewString:=AllTrim(cString) local nLen:=Len(cNewString) FOR nX:=1 to nLen @@ -145,7 +145,7 @@ FUNCTION OctalToDec(cString) RETURN(nNumber) FUNCTION HexaToDec(cString) - local nNumber:=0,nX:=0 + local nNumber:=0,nX local cNewString:=AllTrim(cString) local nLen:=Len(cNewString) FOR nX:=1 to nLen diff --git a/harbour/contrib/hbnf/aredit.prg b/harbour/contrib/hbnf/aredit.prg index 11947b4c94..d308e5b78a 100644 --- a/harbour/contrib/hbnf/aredit.prg +++ b/harbour/contrib/hbnf/aredit.prg @@ -196,7 +196,7 @@ FUNCTION FT_ArEdit( nTop, nLeft, nBot, nRight, ; * NOTE: When evaluated a code block is passed the array element to * be edited - LOCAL exit_requested := .F., nKey, meth_no, ; + LOCAL exit_requested, nKey, meth_no, ; cSaveWin, i, b, column LOCAL nDim, cType, cVal LOCAL tb_methods := ; diff --git a/harbour/contrib/hbnf/clrsel.prg b/harbour/contrib/hbnf/clrsel.prg index 0f6297e2b6..e0b4ce4fce 100644 --- a/harbour/contrib/hbnf/clrsel.prg +++ b/harbour/contrib/hbnf/clrsel.prg @@ -262,7 +262,7 @@ LOCAL nB, nT, nL, nR LOCAL nChoice := 1 LOCAL nLen := 0 LOCAL aPrompt := {} -LOCAL aClrPal := {} +LOCAL aClrPal LOCAL aClrTab := { "N","B","G","BG","R","RB","GR","W" } LOCAL aClrBW := { "N","B","W" } LOCAL nRowSav := ROW() @@ -348,11 +348,11 @@ STATIC FUNCTION _ftColours( aOpt, aClrPal, lColour ) // Return -> aOpt with modified colour strings LOCAL nB, nT, nL, nR -LOCAL nX := 0 +LOCAL nX LOCAL aClrs := {} -LOCAL cClr := "" +LOCAL cClr LOCAL nChoice := 1 -LOCAL aPrompt := {} +LOCAL aPrompt LOCAL nLen := 0 LOCAL cColour := SETCOLOR() LOCAL cScrSav := SAVESCREEN( 18, 00, MAXROW(), MAXCOL() ) @@ -559,10 +559,10 @@ STATIC FUNCTION _ftClrSel( aClrPal, cClr, nElem, aOpt ) // cClr is the current colour being modified // Return -> selected colour combination -LOCAL nR := 1 +LOCAL nR LOCAL nC := 1 LOCAL lFound := .F. -LOCAL nKey := 0 +LOCAL nKey LOCAL nDim := LEN( aClrPal ) LOCAL nTop := 0 LOCAL nLeft := 28 diff --git a/harbour/contrib/hbnf/dfile.prg b/harbour/contrib/hbnf/dfile.prg index e8067dd390..cfe3aa94fb 100644 --- a/harbour/contrib/hbnf/dfile.prg +++ b/harbour/contrib/hbnf/dfile.prg @@ -145,7 +145,7 @@ function FT_DFSETUP(cInFile, nTop, nLeft, nBottom, nRight,; nStart, nCNormal, nCHighlight, cExitKeys,; lBrowse, nColSkip, nRMargin, nBuffSize ) - local rval := 0 + local rval if File(cInFile) nTop := iif(ValType(nTop) == "N", nTop, 0) diff --git a/harbour/contrib/hbnf/dispmsg.prg b/harbour/contrib/hbnf/dispmsg.prg index 7101b7a65a..951a9a6998 100644 --- a/harbour/contrib/hbnf/dispmsg.prg +++ b/harbour/contrib/hbnf/dispmsg.prg @@ -208,7 +208,6 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow ) y, ; aPos := {}, ; nLeft, ; - nTop, ; aLeft FOR i := 1 TO LEN( aInfo[1] ) @@ -236,10 +235,11 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow ) nLeft := nBoxLeft + 2 ENDIF +/* IF nBoxTop == NIL nTop := ( MAXROW() - LEN( aInfo[1] ) - 2 ) / 2 + 2 ENDIF - +*/ /* calculate location of box */ IF nBoxLeft == NIL diff --git a/harbour/contrib/hbnf/dosver.prg b/harbour/contrib/hbnf/dosver.prg index 4d247df99d..02d6e77040 100644 --- a/harbour/contrib/hbnf/dosver.prg +++ b/harbour/contrib/hbnf/dosver.prg @@ -74,7 +74,7 @@ FUNCTION FT_DOSVER() /* local aRegs[ INT86_MAX_REGS ] */ - local cResult := "" + local cResult /* aRegs[ AX ] = MAKEHI( DOSVER ) if FT_INT86( DOS, aRegs ) diff --git a/harbour/contrib/hbnf/menu1.prg b/harbour/contrib/hbnf/menu1.prg index ca3932d9ea..fa92afe96e 100644 --- a/harbour/contrib/hbnf/menu1.prg +++ b/harbour/contrib/hbnf/menu1.prg @@ -312,7 +312,7 @@ STATIC NHPOS, NVPOS, NMAXROW, NMAXCOL FUNCTION FT_MENU1( aBar, aOptions, aColors, nTopRow, lShadow ) - LOCAL nTtlWid, nTtlUsed + LOCAL nTtlUsed LOCAL sMainScrn, lCancMode, lLooping := .t. // column position for each item on the menu bar @@ -353,7 +353,7 @@ FUNCTION FT_MENU1( aBar, aOptions, aColors, nTopRow, lShadow ) // this is the routine that calculates the position of each item // on the menu bar. - nTtlWid := 0 + aBarCol[1] := 0 nTtlUsed := LEN( aBar[1] ) + 1 AEVAL( aBar, ; diff --git a/harbour/contrib/hbnf/menutonf.prg b/harbour/contrib/hbnf/menutonf.prg index 3092b41cb8..c095620c90 100644 --- a/harbour/contrib/hbnf/menutonf.prg +++ b/harbour/contrib/hbnf/menutonf.prg @@ -349,7 +349,7 @@ return NIL function FT_MenuTo( bGetSet, cReadVar, lCold ) local nMenu := nLevel++ -local nActive := 1 +local nActive local nCount := len( aRow[ nMenu ] ) local lChoice := .F. local nCursor := set( _SET_CURSOR,SC_NONE ) diff --git a/harbour/contrib/hbodbc/browodbc.prg b/harbour/contrib/hbodbc/browodbc.prg index f407609e51..33f1ed776c 100644 --- a/harbour/contrib/hbodbc/browodbc.prg +++ b/harbour/contrib/hbodbc/browodbc.prg @@ -68,7 +68,6 @@ function BrowseODBC( nTop, nLeft, nBottom, nRight, oDataSource ) local n, nOldCursor local nKey := 0 local lExit := .f. - local lGotKey := .f. local bAction local oColumn //LOCAL cFName diff --git a/harbour/contrib/hbodbc/todbc.prg b/harbour/contrib/hbodbc/todbc.prg index 488a8cc0d2..2301c19b2b 100644 --- a/harbour/contrib/hbodbc/todbc.prg +++ b/harbour/contrib/hbodbc/todbc.prg @@ -693,7 +693,7 @@ RETURN ::Next() METHOD eof() CLASS TODBC - LOCAL lResult := .F. + LOCAL lResult // Do we have any data in recordset? diff --git a/harbour/contrib/hbwhat/whatutil.prg b/harbour/contrib/hbwhat/whatutil.prg index 83303e9862..408d045d82 100644 --- a/harbour/contrib/hbwhat/whatutil.prg +++ b/harbour/contrib/hbwhat/whatutil.prg @@ -83,8 +83,8 @@ Function WHT_Alert( cMsg, aChoices ) Local aDlg, i, n, aChoose, amSG Local hWnd, hDC - Local lErr := .F., w , h, t := 0, cTitle, msgh, butwidth - Local crpos := 0, txth := 0, atm := { } + Local w , h, t := 0, cTitle, msgh, butwidth + Local crpos, txth LOCAL hFont:= VWN_CreateFont( { 8, 0, 0, 0, 700, 0, 0, 0, 0, 1, 2, 1, 34, "MS Sans Serif" } ) LOCAL hOldFont LOCAL xBase @@ -265,8 +265,6 @@ Function WHT_UnMapDialogRect(cText,hfont) Local aTextExt := VWN_GetTextExtentPoint32( hDC,; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") - Local arect := { 0,0,100,100 } - nW:=aTextExt[ 1 ] nH:=aTextExt[ 2 ] @@ -288,11 +286,11 @@ Function WHT_UnMapDialogRect(cText,hfont) //----------------------------------------------------------------------// Function WHT_CenterWindow( hWnd, NewX, NewY, hParent ) - Local aChild_[ 4 ] + Local aChild_ Local iCWidth Local iCHeight - Local aParent_[ 4 ] - Local aPoint_[ 2 ] + Local aParent_ + Local aPoint_ aChild_ := VWN_GetWindowRect( hWnd ) iCWidth := aChild_[ 3 ] - aChild_[ 1 ] @@ -378,7 +376,7 @@ Function WHT_asString( x ) Function WHT_str2a( string, parser ) Local retar := { } - Local commapos := 0 + Local commapos If parser == NIL parser := "," @@ -709,7 +707,7 @@ FUNCTION WHT_WinColors( nfg, nbg ) LOCAL ishibg := ( "*" $ ccolor ) LOCAL cfg := Upper(StrTran( Left( ccolor, at( "/", ccolor ) - 1 ) , "*", "" )) LOCAL cbg := Upper(StrTran(SubStr( ccolor, at( "/", ccolor ) + 1 ),"*","")) + iif( ishibg, "+", "" ) - LOCAL npos := 0 + LOCAL npos nfg := VWN_RGB( 255, 255, 255 ) nbg := VWN_RGB( 0, 0, 0 ) diff --git a/harbour/contrib/hbwhat/wincore.prg b/harbour/contrib/hbwhat/wincore.prg index 7ed743b021..3999e5a594 100644 --- a/harbour/contrib/hbwhat/wincore.prg +++ b/harbour/contrib/hbwhat/wincore.prg @@ -216,7 +216,7 @@ Function WHT__ProcessMsg( hWnd, nMsg, nwParam, nlParam, nIndex ) Local anWM Local bProc Local nType := WT_WINDOW - Local nRet := 0 + Local nRet Local nProc //:=s_aProc[nIndex] Local oObj Local xCargo @@ -323,9 +323,9 @@ Function __KillWindow( hWnd ) // to the codeblock // Function WHT__ProcessDlgMsg( hDlg, nMsg, nwParam, nlParam ) - Local nIndex := 0 + Local nIndex Local nResult - Local n := 0 + Local n If ( ( nIndex := aScan( s_aDialog, { | x | hDlg == x[ 1 ] } ) ) == 0 ) If ( ( nIndex := aScan( s_aDialog, { | x | 0 == x[ 1 ] } ) ) == 0 ) @@ -347,7 +347,7 @@ Function WHT__ProcessDlgMsg( hDlg, nMsg, nwParam, nlParam ) If nMsg == WM_NCDESTROY s_aDialog[ nIndex ] := { NIL , NIL , NIL, NIL, NIL } - If ( n := aScan( s_aWindow, { | x | hDlg == x[ 1 ] .AND. WT_DIALOG == x[ 2 ] .AND. Empty( x[ 3 ] ) } ) ) > 0 + If aScan( s_aWindow, { | x | hDlg == x[ 1 ] .AND. WT_DIALOG == x[ 2 ] .AND. Empty( x[ 3 ] ) } ) > 0 __KillWindow( hDlg ) EndIf EndIf @@ -357,7 +357,7 @@ Function WHT__ProcessDlgMsg( hDlg, nMsg, nwParam, nlParam ) //----------------------------------------------------------------------// Function WHT_DialogBox( hInst, acnDlg, hWnd, bAction, oObj, xCargo ) - Local nResult := 0 + Local nResult Local nIndex Local cTemplate diff --git a/harbour/contrib/hbwhat/windebug.prg b/harbour/contrib/hbwhat/windebug.prg index 44ce74b191..73589964e0 100644 --- a/harbour/contrib/hbwhat/windebug.prg +++ b/harbour/contrib/hbwhat/windebug.prg @@ -98,7 +98,7 @@ STATIC FUNCTION DSINGLE_VIEW( heading, data_type, value ) RETURN NIL //----------------------------------------------------------------------// STATIC FUNCTION DQOUT( a, b, c, d, show_len ) - LOCAL e := '' + LOCAL e IF ValType( show_len ) == 'L' .AND. show_len e := ' (' + LEFT(ALLTRIM(a),1)+ ALLTRIM(STR( Len( d ) , 4, 0 ))+')' @@ -109,8 +109,6 @@ STATIC FUNCTION DQOUT( a, b, c, d, show_len ) e:=' ('+LEFT(ALLTRIM(a),1)+')' ENDIF - e:="" - VWN_OutputDebugString( b + e + c + asstring( d ) +CRLF) RETURN NIL //----------------------------------------------------------------------// diff --git a/harbour/contrib/hbwhat/winerror.prg b/harbour/contrib/hbwhat/winerror.prg index 79d4e75386..70146147e7 100644 --- a/harbour/contrib/hbwhat/winerror.prg +++ b/harbour/contrib/hbwhat/winerror.prg @@ -78,8 +78,6 @@ STATIC FUNCTION DefError( e ) aAdd( aOptions, "Default" ) END - nChoice := 0 - IF ( Empty( e:osCode ) ) nChoice := eAlert( cMessage, aOptions, cErr ) ELSE @@ -149,7 +147,6 @@ STATIC FUNCTION ErrorMessage( e ) //----------------------------------------------------------------------// STATIC FUNCTION LogError( e, cProcStack ) LOCAL Args := ConvertArgs( e:args ) - LOCAL i := 3 LOCAL cErr := '' LOCAL dVer @@ -259,7 +256,7 @@ STATIC FUNCTION ConvertArgs( a ) RETURN ifempty( Ret_Val ) //----------------------------------------------------------------------// STATIC FUNCTION GetAliasCount() - LOCAL Counter := 0 + LOCAL Counter LOCAL nCounter := 0 FOR Counter := 1 TO 255 @@ -449,8 +446,8 @@ STATIC FUNCTION eAlert( cMsg, aChoices, cDetail ) LOCAL aDlg, i, n, aChoose, aMsg LOCAL hWnd, hDC - LOCAL lErr := .F., w , h, t := 0, cTitle, Msgh, ButWidth - LOCAL crPos := 0, txth := 0, atm := { } + LOCAL w , h, t := 0, cTitle, Msgh, ButWidth + LOCAL crPos, txth LOCAL isDetail := .F. IF !ISCHARACTER( cMsg ) diff --git a/harbour/contrib/hbwhat/wintabs.prg b/harbour/contrib/hbwhat/wintabs.prg index 64614dd37f..b39b7f78f0 100644 --- a/harbour/contrib/hbwhat/wintabs.prg +++ b/harbour/contrib/hbwhat/wintabs.prg @@ -191,7 +191,6 @@ METHOD Configure() LOCAL aTab :=VWN_GetClientRect(::hTab) local acRect:={0,0,0,0} LOCAL aTemp - LOCAL aWnd:={} LOCAL hCtrl LOCAL i LOCAL aPt diff --git a/harbour/contrib/hbwhat/wintbar.prg b/harbour/contrib/hbwhat/wintbar.prg index a15c3dcc97..9c6c17caf9 100644 --- a/harbour/contrib/hbwhat/wintbar.prg +++ b/harbour/contrib/hbwhat/wintbar.prg @@ -196,7 +196,6 @@ METHOD addstring( cText ) //----------------------------------------------------------------------// METHOD Create(hParent,nStyle,nId,nImg,hBMInst,nBMId,xBtn,yBtn,xBmp,yBmp) LOCAL cButtons:="" - LOCAL cStrings:="" LOCAL tbb IS TBBUTTON LOCAL i @@ -270,7 +269,7 @@ METHOD tbProc(nMsg,nwParam,nlParam) CASE Hdr:code==TBN_DROPDOWN Nmt IS NMTOOLBAR nmt:buffer( WHT_Peek(nlParam,nmt:sizeof)) - IF (n:=ASCAN( ::aMenus,{|a| a[1]==nmt:iItem})) > 0 + IF ASCAN( ::aMenus,{|a| a[1]==nmt:iItem}) > 0 ::nBtn:=nmt:iItem hMenu := VWN_CreatePopupMenu() FOR x:=1 TO len(::aMenus) diff --git a/harbour/contrib/hbziparc/hbziparc.prg b/harbour/contrib/hbziparc/hbziparc.prg index 8d4b71018b..4186b41fdd 100644 --- a/harbour/contrib/hbziparc/hbziparc.prg +++ b/harbour/contrib/hbziparc/hbziparc.prg @@ -739,7 +739,7 @@ FUNCTION hb_ZipFile( cFileName,; LOCAL nLen LOCAL cBuffer := Space( s_nReadBuffer ) LOCAL cFileToZip - LOCAL nPos := 1 + LOCAL nPos LOCAL nRead LOCAL cName, cExt, cDrive, cPath LOCAL nSize diff --git a/harbour/source/compiler/hbopt.c b/harbour/source/compiler/hbopt.c index 9d7b86150d..2e11b77e85 100644 --- a/harbour/source/compiler/hbopt.c +++ b/harbour/source/compiler/hbopt.c @@ -1445,6 +1445,19 @@ void hb_compPCodeTraceOptimizer( HB_COMP_DECL ) if( ! usLocalCount ) return; + /* TOFIX: Support for PARAMETER sentence is not implemented. + The temporary solution is to disable optmisation at all if PARAMETER is used. */ + { + ULONG ulPos = 0; + + while( ulPos < pFunc->lPCodePos ) + { + if( pFunc->pCode[ ulPos ] == HB_P_PARAMETER ) + return; + ulPos += hb_compPCodeSize( pFunc, ulPos ); + } + } + /* Initial scan */ pLocals = ( PHB_OPT_LOCAL ) hb_xgrab( sizeof( HB_OPT_LOCAL ) * usLocalCount ); memset( pLocals, 0, sizeof( HB_OPT_LOCAL ) * usLocalCount ); @@ -1455,10 +1468,12 @@ void hb_compPCodeTraceOptimizer( HB_COMP_DECL ) pVar = pFunc->pLocals; while( pVar ) { + /* TOFIX: PARAMETERS sentence + The temporary solution is to disable optmisation if PARAMETERS is used. + */ /* Compiler and optimizer should have the same opinion about variable usage */ assert( ( ! ( pVar->iUsed & VU_USED ) && pLocals[ usIndex ].bFlags == 0 ) || - ( ( pVar->iUsed & VU_USED ) && pLocals[ usIndex ].bFlags != 0 ) ); - + ( ( pVar->iUsed & VU_USED ) && pLocals[ usIndex ].bFlags != 0 ) ); pVar = pVar->pNext; usIndex++; }