diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c886b657e4..65c013a990 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,12 +1,20 @@ +20000423-04:02 GMT+1 Victor Szakats + + * source/compiler/genc.c + * source/compiler/harbour.c + * source/vm/hvm.c + ! PUSHLOCALNEAR and POPLOCALNEAR pcodes fixed. They didn't work in a + codeblock. + 20000423-03:24 GMT+1 Victor Szakats * source/compiler/harbour.c ! Frame optimizer is called after all functions have been processed, otherwise the static frames cannot be fixed up correctly. ! Frame optimizer also called for the static initialization function to - fixup or remove its SFRAME pcode. + fixup or remove its SFRAME/STATICS pcode. ! Frame optimizer now fixes up HB_P_STATICS pcode. - + Added SFRAME removing for the static initializatoin function. + + Added SFRAME removing for the static initialization function. % The frame pcode removing made much faster. 20000422-22:47 GMT+1 Victor Szakats diff --git a/harbour/source/compiler/genc.c b/harbour/source/compiler/genc.c index 16226d6968..a446895076 100644 --- a/harbour/source/compiler/genc.c +++ b/harbour/source/compiler/genc.c @@ -748,7 +748,7 @@ static void hb_compGenCReadable( PFUNCTION pFunc, FILE * yyc ) pFunc->pCode[ lPCodePos + 1 ] ); if( bVerbose ) { - SHORT wVar = ( SHORT ) pFunc->pCode[ lPCodePos + 1 ]; + char wVar = ( char ) pFunc->pCode[ lPCodePos + 1 ]; /* Variable with negative order are local variables * referenced in a codeblock -handle it with care */ @@ -961,7 +961,7 @@ static void hb_compGenCReadable( PFUNCTION pFunc, FILE * yyc ) pFunc->pCode[ lPCodePos + 1 ] ); if( bVerbose ) { - SHORT wVar = ( SHORT ) pFunc->pCode[ lPCodePos + 1 ]; + char wVar = ( char ) pFunc->pCode[ lPCodePos + 1 ]; /* Variable with negative order are local variables * referenced in a codeblock -handle it with care */ diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index 2bc7e29687..c10744fb7d 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -1834,7 +1834,7 @@ void hb_compGenPopVar( char * szVarName ) /* generates the pcode to pop a value /* local variable */ if( iVar >= -128 && iVar <= 127 ) - hb_compGenPCode2( HB_P_POPLOCALNEAR, iVar ); + hb_compGenPCode2( HB_P_POPLOCALNEAR, ( BYTE ) iVar ); else hb_compGenPCode3( HB_P_POPLOCAL, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ) ); } @@ -1990,7 +1990,7 @@ void hb_compGenPushVar( char * szVarName ) /* local variable */ if( iVar >= -128 && iVar <= 127 ) - hb_compGenPCode2( HB_P_PUSHLOCALNEAR, iVar ); + hb_compGenPCode2( HB_P_PUSHLOCALNEAR, ( BYTE ) iVar ); else hb_compGenPCode3( HB_P_PUSHLOCAL, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ) ); } @@ -2630,7 +2630,7 @@ void hb_compOptimizeJumps( void ) break; } - /* Only intrested in forward (positive) jumps. */ + /* Only interested in forward (positive) jumps. */ if( bForward ) { //printf( "\rCurrent NOOP=%li, Address=%li, Jump=%i, Base=%li, Offset=%li, Target=%li", iNOOP, pNOOPs[ iNOOP ], iJump, pJumps[ iJump ], ulOffset, pJumps[ iJump ] + ulOffset ); diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index ea9ba59b3d..3f2ed630da 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -983,7 +983,7 @@ void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) break; case HB_P_PUSHLOCALNEAR: - hb_vmPushLocal( ( SHORT ) pCode[ w + 1 ] ); + hb_vmPushLocal( ( char ) pCode[ w + 1 ] ); w += 2; break; @@ -1072,7 +1072,7 @@ void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) break; case HB_P_POPLOCALNEAR: - hb_vmPopLocal( ( SHORT ) pCode[ w + 1 ] ); + hb_vmPopLocal( ( char ) pCode[ w + 1 ] ); w += 2; break;