2010-03-04 11:06 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
* harbour/src/vm/macro.c
% changed HB_PCODE_INFO structure to eliminate one memory allocation
in macro compiler
* harbour/include/hbapi.h
* harbour/include/hbvm.h
* harbour/src/vm/codebloc.c
* harbour/src/vm/itemapi.c
* harbour/src/vm/hvm.c
* changed second parameter in hb_codeblockGet*() function to 'int'
* merged codeblock execution context setting into one function
hb_vmDoBlock() and removed hb_codeblockEvaluate()
+ added new internal function hb_vmEval()
* harbour/src/vm/arrays.c
% use hb_vmEval()
* harbour/src/macro/macrolex.c
* added missing const to maro text declaration
* harbour/tests/speedtst.prg
! fixed to work with CLIP and xHarbour after we changed
SECONDSCPU() to HB_SECONDSCPU() - all these compilers and FlagShip
have SECONDSCPU() function
This commit is contained in:
@@ -1011,9 +1011,8 @@ extern HB_EXPORT HB_BOOL hb_winmainArgGet( void * phInstance, void * phPrevInsta
|
||||
extern HB_EXPORT void * hb_codeblockId( PHB_ITEM pItem ); /* retrieves the codeblock unique ID */
|
||||
extern HB_CODEBLOCK_PTR hb_codeblockNew( const HB_BYTE * pBuffer, HB_USHORT uiLocals, const HB_BYTE * pLocalPosTable, PHB_SYMB pSymbols, HB_SIZE ulLen ); /* create a code-block */
|
||||
extern HB_CODEBLOCK_PTR hb_codeblockMacroNew( const HB_BYTE * pBuffer, HB_SIZE ulLen );
|
||||
extern PHB_ITEM hb_codeblockGetVar( PHB_ITEM pItem, HB_LONG iItemPos ); /* get local variable referenced in a codeblock */
|
||||
extern PHB_ITEM hb_codeblockGetRef( HB_CODEBLOCK_PTR pCBlock, HB_LONG iItemPos ); /* get local variable passed by reference */
|
||||
extern void hb_codeblockEvaluate( HB_ITEM_PTR pItem ); /* evaluate a codeblock */
|
||||
extern PHB_ITEM hb_codeblockGetVar( PHB_ITEM pItem, int iItemPos ); /* get local variable referenced in a codeblock */
|
||||
extern PHB_ITEM hb_codeblockGetRef( HB_CODEBLOCK_PTR pCBlock, int iItemPos ); /* get local variable passed by reference */
|
||||
|
||||
/* memvars subsystem */
|
||||
extern void hb_memvarsClear( HB_BOOL fAll ); /* clear all PUBLIC and PRIVATE variables optionally without GetList PUBLIC variable */
|
||||
|
||||
@@ -649,8 +649,8 @@ typedef struct HB_PCODE_INFO_ /* compiled pcode container for macro compiler */
|
||||
HB_ULONG lPCodeSize; /* total memory size for pcode */
|
||||
HB_ULONG lPCodePos; /* actual pcode offset */
|
||||
HB_BOOL fVParams; /* function/codeblock with variable parameters */
|
||||
struct HB_PCODE_INFO_ * pPrev;
|
||||
HB_CBVAR_PTR pLocals;
|
||||
struct HB_PCODE_INFO_ * pPrev;
|
||||
} HB_PCODE_INFO, * HB_PCODE_INFO_PTR;
|
||||
|
||||
typedef struct HB_MACRO_ /* a macro compiled pcode container */
|
||||
@@ -673,6 +673,7 @@ typedef struct HB_MACRO_ /* a macro compiled pcode container */
|
||||
int exprType; /* type of successfully compiled expression */
|
||||
HB_USHORT uiListElements; /* number of elements in macro list expression */
|
||||
HB_USHORT uiNameLen; /* the maximum symbol name length */
|
||||
HB_PCODE_INFO pCodeInfoBuffer;
|
||||
} HB_MACRO;
|
||||
|
||||
#else
|
||||
|
||||
@@ -112,6 +112,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, HB_USHOR
|
||||
|
||||
extern void hb_vmUpdateAllocator( PHB_ALLOCUPDT_FUNC pFunc, int iCount );
|
||||
|
||||
extern void hb_vmEval( HB_USHORT uiParams );
|
||||
#endif
|
||||
|
||||
extern void hb_vmSetExceptionHandler( void );
|
||||
|
||||
Reference in New Issue
Block a user