diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ff8bfb1c1f..3c47803a05 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,25 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar */ +2002-01-31 08:00 UTC+0100 Antonio Linares + * source/vm/hvm.c + - removed two uneeded calls to hb_itemClear() from + hb_vmOperatorCall() and hb_vmOperatorCallUnary() + + Notice: hb_itemCopy( pDest, pOrigin ) already performs a + hb_itemClear( pDest ), so there is no need to do this: + + hb_itemClear( pDest ); <<< This is not needed + hb_itemCopy( pDest, pOrigin ); + +2002-01-30 22:40 UTC+0100 Antonio Linares + * include/hbexprc.c + * some minor fixes regarding strings sharing implementation + +2002-01-30 16:25 UTC+0100 Antonio Linares + + * include/hbexprb.c + * macros using "." bug fixed (reported by Matteo Bacan) 2002-01-30 11:30 UTC+0100 Antonio Linares diff --git a/harbour/include/hbpcode.h b/harbour/include/hbpcode.h index d9a5a02530..37f67d459c 100644 --- a/harbour/include/hbpcode.h +++ b/harbour/include/hbpcode.h @@ -188,8 +188,9 @@ typedef enum HB_P_ONE, /* 122 places a ONE on the virtual machine stack */ HB_P_MACROLIST, /* 122 HB_P_MACROPUSHLIST envelope start. */ HB_P_MACROLISTEND, /* 123 HB_P_MACROPUSHLIST envelope end. */ + HB_P_MPUSHSTR, /* 124 Macro compiled pushed string */ /* NOTE: This have to be the last definition */ - HB_P_LAST_PCODE /* 123 this defines the number of defined pcodes */ + HB_P_LAST_PCODE /* 125 this defines the number of defined pcodes */ } HB_PCODE; -#endif /* HB_PCODE_H_ */ +#endif /* HB_PCODE_H_ */ \ No newline at end of file diff --git a/harbour/source/compiler/genc.c b/harbour/source/compiler/genc.c index f391a66bd0..d19e3af53c 100644 --- a/harbour/source/compiler/genc.c +++ b/harbour/source/compiler/genc.c @@ -1939,7 +1939,10 @@ static HB_GENC_FUNC_PTR s_verbose_table[] = { hb_p_zero, hb_p_one, hb_p_macrolist, - hb_p_macrolistend + hb_p_macrolistend, + /* start: more pcodes generated by macro compiler */ + hb_p_dummy + /* end: */ }; static void hb_compGenCReadable( PFUNCTION pFunc, FILE * yyc ) diff --git a/harbour/source/compiler/hbfix.c b/harbour/source/compiler/hbfix.c index 4231e5cbce..fe05afbc9a 100644 --- a/harbour/source/compiler/hbfix.c +++ b/harbour/source/compiler/hbfix.c @@ -379,7 +379,8 @@ static HB_FIX_FUNC_PTR s_fixlocals_table[] = NULL, /* HB_P_ZERO, */ NULL, /* HB_P_ONE, */ NULL, /* HB_P_MACROLIST, */ - NULL /* HB_P_MACROLISTEND, */ + NULL, /* HB_P_MACROLISTEND, */ + NULL /* HB_P_MPUSHSTR */ }; void hb_compFixFuncPCode( PFUNCTION pFunc ) @@ -391,4 +392,4 @@ void hb_compFixFuncPCode( PFUNCTION pFunc ) assert( HB_P_LAST_PCODE == sizeof( s_fixlocals_table ) / sizeof( HB_FIX_FUNC_PTR ) ); hb_compPCodeEval( pFunc, ( HB_PCODE_FUNC_PTR * ) s_fixlocals_table, ( void * ) &fix_info ); -} +} \ No newline at end of file diff --git a/harbour/source/compiler/hbpcode.c b/harbour/source/compiler/hbpcode.c index 8c9b9360ee..8b6cea71d2 100644 --- a/harbour/source/compiler/hbpcode.c +++ b/harbour/source/compiler/hbpcode.c @@ -168,7 +168,8 @@ static BYTE s_pcode_len[] = { 1, /* HB_P_ZERO, */ 1, /* HB_P_ONE, */ 1, /* HB_P_MACROLIST, */ - 1 /* HB_P_MACROLISTEND, */ + 1, /* HB_P_MACROLISTEND, */ + 0 /* HB_P_MPUSHSTR */ }; static PVAR hb_compPrivateFind( char * szPrivateName ) @@ -953,7 +954,7 @@ void hb_compStrongType( int iSize ) /* printf( "\nBefore Cond: %i\n", pFunc->iStackIndex ); */ - + /* Saving Stack depth befor Jump. */ /* TODO: Remove Hard coded limitation. */ if( s_iCondIndex < 16 ) @@ -3176,4 +3177,4 @@ void hb_compGenPCodeN( BYTE * pBuffer, ULONG ulSize, BOOL bStackAffected ) if( hb_comp_iWarnings >= 3 && bStackAffected ) hb_compStrongType( ulSize ); -} +} \ No newline at end of file diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index 8b536c6662..6337684d78 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -1767,10 +1767,9 @@ HB_FUNC( __OBJSENDMSG ) { USHORT uiParam; + hb_vmPushSymbol( pMsg->pSymbol ); /* Push message symbol */ hb_vmPush( pObject ); /* Push object */ - hb_vmMessage( pMsg->pSymbol ); /* Push char symbol as message */ - for( uiParam = 3; uiParam <= uiPCount; uiParam++ ) /* Push arguments on stack */ hb_vmPush( hb_param( uiParam, HB_IT_ANY ) ); diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 3c831a2c6e..52068cf300 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -1546,6 +1546,15 @@ void HB_EXPORT hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) break; } + case HB_P_MPUSHSTR: + { + USHORT uiSize = pCode[ w + 1 ] + ( pCode[ w + 2 ] * 256 ); + + hb_vmPushString( ( char * ) ( pCode ) + w + 3, ( ULONG )( uiSize - 1 ) ); + w += ( 3 + uiSize ); + break; + } + /* misc */ case HB_P_NOOP: diff --git a/harbour/source/vm/macro.c b/harbour/source/vm/macro.c index 7bc785a77f..66c16636ec 100644 --- a/harbour/source/vm/macro.c +++ b/harbour/source/vm/macro.c @@ -1400,7 +1400,7 @@ void hb_compGenPushFunCall( char * szFunName, HB_MACRO_DECL ) /* generates the pcode to push a string on the virtual machine stack */ void hb_compGenPushString( char * szText, ULONG ulStrLen, HB_MACRO_DECL ) { - hb_compGenPCode3( HB_P_PUSHSTR, HB_LOBYTE( ulStrLen ), HB_HIBYTE( ulStrLen ), HB_MACRO_PARAM ); + hb_compGenPCode3( HB_P_MPUSHSTR, HB_LOBYTE( ulStrLen ), HB_HIBYTE( ulStrLen ), HB_MACRO_PARAM ); hb_compGenPCodeN( ( BYTE * ) szText, ulStrLen, HB_MACRO_PARAM ); } @@ -1549,4 +1549,4 @@ void hb_compCodeBlockEnd( HB_MACRO_DECL ) /* free memory allocated for a codeblock */ hb_xfree( ( void * ) pCodeblock->pCode ); hb_xfree( ( void * ) pCodeblock ); -} +} \ No newline at end of file