2006-10-04 15:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprc.c
* translate HB_P_INC / HB_P_DEC in (pre|post)(inc|dec)rementation
to HB_P_[PLUS|MINUS]EQ
* harbour/source/vm/hvm.c
- removed not necessary now hb_itemUnRef() in hb_vmInc()/hb_vmDec()
This commit is contained in:
@@ -8,6 +8,14 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
validation.
|
||||
I created the second version of stack macros without it in
|
||||
hbstack.h but I would like to hear other developers opinion.
|
||||
|
||||
2006-10-05 01:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbexprc.c
|
||||
* Temporary disabled optimization with references to object variables
|
||||
until we will not have extended reference items in our HVM.
|
||||
It can be enabled by compiling with HB_USE_OBJMSG_REF
|
||||
* common.mak
|
||||
* harbour/include/hbclass.h
|
||||
|
||||
@@ -458,6 +458,14 @@ void hb_compExprPushPreOp( HB_EXPR_PTR pSelf, BYTE bOper )
|
||||
HB_EXPR_GENPCODE1( hb_compGenPCode1, HB_P_PUSHOVARREF );
|
||||
|
||||
/* increase/decrease operation */
|
||||
/* We have to unreference the item on the stack, because we do not have
|
||||
such PCODE(s) then I'll trnaslate HB_P_INC/HB_P_DEC into
|
||||
HB_P_[PLUS|MINUS]EQ, Maybe in the future we will make it
|
||||
in differ way [druzus] */
|
||||
|
||||
HB_EXPR_GENPCODE1( hb_compGenPCode1, HB_P_ONE );
|
||||
bOper = ( bOper == HB_P_INC ) ? HB_P_PLUSEQ : HB_P_MINUSEQ;
|
||||
|
||||
HB_EXPR_GENPCODE1( hb_compGenPCode1, bOper );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2460,11 +2460,6 @@ static void hb_vmInc( void )
|
||||
|
||||
pItem = hb_stackItemFromTop( -1 );
|
||||
|
||||
if( HB_IS_BYREF( pItem ) )
|
||||
{
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
}
|
||||
|
||||
if( HB_IS_DATE( pItem ) )
|
||||
pItem->item.asDate.value++;
|
||||
else if( HB_IS_NUMINT( pItem ) )
|
||||
@@ -2512,11 +2507,6 @@ static void hb_vmDec( void )
|
||||
|
||||
pItem = hb_stackItemFromTop( -1 );
|
||||
|
||||
if( HB_IS_BYREF( pItem ) )
|
||||
{
|
||||
pItem = hb_itemUnRef( pItem );
|
||||
}
|
||||
|
||||
if( HB_IS_DATE( pItem ) )
|
||||
pItem->item.asDate.value--;
|
||||
else if( HB_IS_NUMINT( pItem ) )
|
||||
|
||||
Reference in New Issue
Block a user