20000423-04:02 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-04-23 01:59:52 +00:00
parent a110bc7ea0
commit 523eb5e21d
4 changed files with 17 additions and 9 deletions

View File

@@ -1,12 +1,20 @@
20000423-04:02 GMT+1 Victor Szakats <info@szelvesz.hu>
* 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 <info@szelvesz.hu>
* 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 <info@szelvesz.hu>

View File

@@ -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
*/

View File

@@ -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 );

View File

@@ -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;