2000-12-28 20:50 UTC+0800 Ron Pinkas <ron@profit-master.com>

* source/vm/eval.c
     * Minor formatting.

   * source/vm/hvm.c
     * Added derefferncing of Block Vars in hb_vmPushLocal()
     /* Ryszard can you please review this change. */
This commit is contained in:
Ron Pinkas
2000-12-29 08:46:24 +00:00
parent 6ec206ee97
commit 2a91e7a436
3 changed files with 30 additions and 9 deletions

View File

@@ -1,3 +1,11 @@
2000-12-28 20:50 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/vm/eval.c
* Minor formatting.
* source/vm/hvm.c
* Added derefferncing of Block Vars in hb_vmPushLocal()
/* Ryszard can you please review this change. */
2000-12-29 9:18 GMT+3 Alexander Kresin <alex@belacy.belgorod.su>
* utils/hbpp/hbpp.c
* Now it creates exactly the same .ppo as Harbour, without extra empty

View File

@@ -55,10 +55,15 @@ HB_FUNC( EVAL )
* hb_param() is dereferencing the passed parameters
*/
for( uiParam = 2; uiParam <= uiPCount; uiParam++ )
hb_vmPush( hb_stackItemFromBase( uiParam ) );
{
hb_vmPush( hb_stackItemFromBase( uiParam ) );
}
hb_vmDo( uiPCount - 1 );
}
else
{
hb_errRT_BASE_SubstR( EG_NOMETHOD, 1004, NULL, "EVAL" );
}
}

View File

@@ -2789,7 +2789,7 @@ void hb_vmDo( USHORT uiParams )
HB_TRACE(HB_TR_DEBUG, ("hb_vmDo(%hu)", uiParams));
pItem = hb_stackNewFrame( &sStackState, uiParams );
pItem = hb_stackNewFrame( &sStackState, uiParams );
pSym = pItem->item.asSymbol.value;
pSelf = hb_stackSelfItem(); /* NIL, OBJECT or BLOCK */
bDebugPrevState = s_bDebugging;
@@ -2924,6 +2924,7 @@ static HARBOUR hb_vmDoBlock( void )
/* Check for valid count of parameters */
iParam = pBlock->item.asBlock.paramcnt - hb_pcount();
/* add missing parameters */
while( iParam-- > 0 )
hb_vmPushNil();
@@ -3477,24 +3478,31 @@ static void hb_vmPushAliasedVar( PHB_SYMB pSym )
static void hb_vmPushLocal( SHORT iLocal )
{
PHB_ITEM pLocal;
HB_TRACE(HB_TR_DEBUG, ("hb_vmPushLocal(%hd)", iLocal));
if( iLocal >= 0 )
{
PHB_ITEM pLocal;
/* local variable or local parameter */
pLocal = hb_stackItemFromBase( iLocal );
if( HB_IS_BYREF( pLocal ) )
hb_itemCopy( ( hb_stackTopItem() ), hb_itemUnRef( pLocal ) );
else
hb_itemCopy( ( hb_stackTopItem() ), pLocal );
}
else
{
/* local variable referenced in a codeblock
* hb_stackSelfItem() points to a codeblock that is currently evaluated
*/
hb_itemCopy( ( hb_stackTopItem() ), hb_codeblockGetVar( hb_stackSelfItem(), ( LONG ) iLocal ) );
pLocal = hb_codeblockGetVar( hb_stackSelfItem(), ( LONG ) iLocal );
}
if( HB_IS_BYREF( pLocal ) )
{
hb_itemCopy( ( hb_stackTopItem() ), hb_itemUnRef( pLocal ) );
}
else
{
hb_itemCopy( ( hb_stackTopItem() ), pLocal );
}
hb_stackPush();
}