diff --git a/harbour/ChangeLog.txt b/harbour/ChangeLog.txt index eb48213fc7..38a169fc33 100644 --- a/harbour/ChangeLog.txt +++ b/harbour/ChangeLog.txt @@ -10,6 +10,29 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2012-12-16 06:26 UTC+0100 Viktor Szakats (harbour syenar.net) + * ChangeLog.txt + * include/hbcomp.h + * include/hbcompdf.h + * include/hbexprb.c + * src/compiler/genc.c + * src/compiler/gencc.c + * src/compiler/genhrb.c + * src/compiler/harbour.y + * src/compiler/harbour.yyc + * src/compiler/hbdbginf.c + * src/compiler/hbdead.c + * src/compiler/hbfix.c + * src/compiler/hbgenerr.c + * src/compiler/hblbl.c + * src/compiler/hbmain.c + * src/compiler/hbopt.c + * src/compiler/hbpcode.c + * src/compiler/hbstripl.c + * src/vm/memvars.c + * renamed most remaining non-prefixed Harbour types + See: 2012-12-16 00:17 UTC+0100 + 2012-12-16 05:33 UTC+0100 Viktor Szakats (harbour syenar.net) * config/darwin/clang.mk + use 'clang++' in C++ mode @@ -79,27 +102,27 @@ with bcc64 (as per xhb commit) ; TODO: Here is portion from my TODO backlog with a list of other remaining non-prefixed types to fix: + VS_* -> HB_VSCOMP_* [DONE] + VU_* -> HB_VU_* [DONE] + VT_* -> HB_VT_* [DONE] + FUN_* -> HB_FUNF_* [DONE] + *COMDECLARED -> [P]HB_HDECLARED [DONE] + *COMCLASS -> [P]HB_HCLASS [DONE] + *COMSYMBOL -> [P]HB_HSYMBOL [DONE] + VAR, PVAR -> [P]HB_HVAR [DONE] + _FUNC, PFUNCTION -> [P]HB_HFUNC [DONE] + _FUNCALL, PFUNCALL -> [P]HB_HFUNCALL [DONE] + _INLINE, PINLINE -> [P]HB_HINLINE [DONE] + _EXTERN, PEXTERN -> [P]HB_HEXTERN [DONE] + FUNCTIONS -> HB_HFUNCTION_LIST [DONE] + INLINES -> HB_HINLINE_LIST [DONE] + SYMBOLS -> HB_HSYMBOL_LIST [DONE] + -- These spill via .ch files included into .c code: FS_* -> HB_FS_* FC_* -> HB_FC_* FO_* -> HB_FO_* FD_* -> HB_FD_* F_ERROR -> (-) - VS_* -> HB_VSCOMP_* - VU_* -> HB_VU_* - VT_* -> HB_VT_* - FUN_* -> HB_FUN_* - *COMDECLARED -> [P]HB_HDECLARED [DONE] - *COMCLASS -> [P]HB_HCLASS [DONE] - *COMSYMBOL -> [P]HB_HSYMBOL [DONE] - VAR, PVAR -> [P]HB_HVAR - _FUNC, PFUNCTION -> [P]HB_HFUNC - _FUNCALL, PFUNCALL -> [P]HB_HFUNCALL - _INLINE, PINLINE [P]HB_HINLINE [DONE] - _EXTERN, PEXTERN -> [P]HB_HEXTERN - AUTOOPEN, PAUTOOPEN -> [P]HB_HAUTOOPEN - FUNCTIONS -> HB_HFUNCTION_LIST - INLINES -> HB_HINLINE_LIST - SYMBOLS -> HB_HSYMBOL_LIST 2012-12-16 00:06 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/3rd/sqlite3/sqlite3.hbp diff --git a/harbour/include/hbcomp.h b/harbour/include/hbcomp.h index 505b1d3d63..6941aa1502 100644 --- a/harbour/include/hbcomp.h +++ b/harbour/include/hbcomp.h @@ -66,14 +66,14 @@ HB_EXTERN_BEGIN /* definitions for hb_compPCodeEval() support */ typedef void * HB_VOID_PTR; -#define HB_PCODE_FUNC( func, type ) HB_SIZE func( PFUNCTION pFunc, HB_SIZE nPCodePos, type cargo ) +#define HB_PCODE_FUNC( func, type ) HB_SIZE func( PHB_HFUNC pFunc, HB_SIZE nPCodePos, type cargo ) typedef HB_PCODE_FUNC( ( * HB_PCODE_FUNC_PTR ), HB_VOID_PTR ); -extern HB_ISIZ hb_compPCodeSize( PFUNCTION, HB_SIZE ); -extern void hb_compPCodeEval( PFUNCTION, const HB_PCODE_FUNC_PTR *, void * ); -extern void hb_compPCodeTrace( PFUNCTION, const HB_PCODE_FUNC_PTR *, void * ); +extern HB_ISIZ hb_compPCodeSize( PHB_HFUNC, HB_SIZE ); +extern void hb_compPCodeEval( PHB_HFUNC, const HB_PCODE_FUNC_PTR *, void * ); +extern void hb_compPCodeTrace( PHB_HFUNC, const HB_PCODE_FUNC_PTR *, void * ); -extern void hb_compGenLabelTable( PFUNCTION pFunc, PHB_LABEL_INFO label_info ); +extern void hb_compGenLabelTable( PHB_HFUNC pFunc, PHB_LABEL_INFO label_info ); extern PHB_DEBUGINFO hb_compGetDebugInfo( HB_COMP_DECL ); extern void hb_compChkFileSwitches( int argc, char * argv[] ); @@ -85,16 +85,16 @@ extern int hb_comp_yyparse( HB_COMP_DECL ); extern void hb_compParserStop( HB_COMP_DECL ); extern void hb_compParserRun( HB_COMP_DECL ); -#define VS_NONE 0 -#define VS_LOCAL 1 -#define VS_STATIC 2 -#define VS_FIELD 4 -#define VS_PARAMETER 8 -#define VS_THREAD 16 -#define VS_PRIVATE 64 -#define VS_PUBLIC 128 -#define VS_MEMVAR ( VS_PUBLIC | VS_PRIVATE ) -#define VS_TH_STATIC ( VS_STATIC | VS_THREAD ) +#define HB_VSCOMP_NONE 0 +#define HB_VSCOMP_LOCAL 1 +#define HB_VSCOMP_STATIC 2 +#define HB_VSCOMP_FIELD 4 +#define HB_VSCOMP_PARAMETER 8 +#define HB_VSCOMP_THREAD 16 +#define HB_VSCOMP_PRIVATE 64 +#define HB_VSCOMP_PUBLIC 128 +#define HB_VSCOMP_MEMVAR ( HB_VSCOMP_PUBLIC | HB_VSCOMP_PRIVATE ) +#define HB_VSCOMP_TH_STATIC ( HB_VSCOMP_STATIC | HB_VSCOMP_THREAD ) /* return detailed information about a class of variable */ extern int hb_compVariableScope( HB_COMP_DECL, const char * ); @@ -111,27 +111,27 @@ extern int hb_compVariableScope( HB_COMP_DECL, const char * ); #define HB_VS_GLOBAL_FIELD ( HB_VS_FILEWIDE | HB_VS_LOCAL_FIELD ) #define HB_VS_GLOBAL_STATIC ( HB_VS_FILEWIDE | HB_VS_STATIC_VAR ) -#define VU_NOT_USED 0 -#define VU_INITIALIZED 1 -#define VU_USED 2 +#define HB_VU_NOT_USED 0 +#define HB_VU_INITIALIZED 1 +#define HB_VU_USED 2 -#define VT_OFFSET_BYREF 60 -#define VT_OFFSET_VARIANT 90 -#define VT_OFFSET_OPTIONAL 90 +#define HB_VT_OFFSET_BYREF 60 +#define HB_VT_OFFSET_VARIANT 90 +#define HB_VT_OFFSET_OPTIONAL 90 /* * flags for funFlags member */ -#define FUN_STATEMENTS 0x0001 /* Function have at least one executable statement */ -#define FUN_USES_STATICS 0x0002 /* Function uses static variables */ -#define FUN_PROCEDURE 0x0004 /* This is a procedure that shouldn't return value */ -#define FUN_BREAK_CODE 0x0008 /* last statement breaks execution flow */ -#define FUN_USES_LOCAL_PARAMS 0x0010 /* parameters are declared using () */ -#define FUN_WITH_RETURN 0x0020 /* there was RETURN statement in previous line */ -#define FUN_EXTBLOCK 0x0040 /* it's extended codeblock */ -#define FUN_FILE_DECL 0x0080 /* pseudo function with file wide declarations */ -#define FUN_FILE_FIRST 0x0100 /* 1-st real or pseudo function in compiled .prg module */ -#define FUN_ATTACHED 0x0200 /* function attached to function list */ +#define HB_FUNF_STATEMENTS 0x0001 /* Function have at least one executable statement */ +#define HB_FUNF_USES_STATICS 0x0002 /* Function uses static variables */ +#define HB_FUNF_PROCEDURE 0x0004 /* This is a procedure that shouldn't return value */ +#define HB_FUNF_BREAK_CODE 0x0008 /* last statement breaks execution flow */ +#define HB_FUNF_USES_LOCAL_PARAMS 0x0010 /* parameters are declared using () */ +#define HB_FUNF_WITH_RETURN 0x0020 /* there was RETURN statement in previous line */ +#define HB_FUNF_EXTBLOCK 0x0040 /* it's extended codeblock */ +#define HB_FUNF_FILE_DECL 0x0080 /* pseudo function with file wide declarations */ +#define HB_FUNF_FILE_FIRST 0x0100 /* 1-st real or pseudo function in compiled .prg module */ +#define HB_FUNF_ATTACHED 0x0200 /* function attached to function list */ extern void hb_compFunctionAdd( HB_COMP_DECL, const char * szFunName, HB_SYMBOLSCOPE cScope, int iType ); /* starts a new Clipper language function definition */ extern PHB_HINLINE hb_compInlineAdd( HB_COMP_DECL, const char * szFunName, int iLine ); @@ -141,8 +141,8 @@ extern HB_BOOL hb_compFunCallCheck( HB_COMP_DECL, const char extern PHB_VARTYPE hb_compVarTypeNew( HB_COMP_DECL, char cVarType, const char * szFromClass ); extern void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarType ); /* add a new param, local, static variable to a function definition or a public or private */ -extern PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int * piScope ); -extern const char * hb_compLocalVariableName( PFUNCTION pFunc, HB_USHORT wVar ); /* returns the name of local variable */ +extern PHB_HVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int * piScope ); +extern const char * hb_compLocalVariableName( PHB_HFUNC pFunc, HB_USHORT wVar ); /* returns the name of local variable */ extern const char * hb_compStaticVariableName( HB_COMP_DECL, HB_USHORT wVar ); /* returns the name of static variable */ #define HB_SYM_MEMVAR HB_FALSE @@ -165,10 +165,10 @@ extern void hb_compExternAdd( HB_COMP_DECL, const char * szExternName, HB_SYMBOL extern void hb_compModuleAdd( HB_COMP_DECL, const char * szModuleName, HB_BOOL fForce ); -extern void hb_compRTVariableKill( HB_COMP_DECL, PFUNCTION ); -extern void hb_compSwitchKill( HB_COMP_DECL, PFUNCTION ); -extern void hb_compElseIfKill( PFUNCTION ); -extern void hb_compLoopKill( PFUNCTION ); +extern void hb_compRTVariableKill( HB_COMP_DECL, PHB_HFUNC ); +extern void hb_compSwitchKill( HB_COMP_DECL, PHB_HFUNC ); +extern void hb_compElseIfKill( PHB_HFUNC ); +extern void hb_compLoopKill( PHB_HFUNC ); extern void hb_compGenError( HB_COMP_DECL, const char * const szErrors[], char cPrefix, int iError, const char * szError1, const char * szError2 ); /* generic parsing error management function */ extern void hb_compGenWarning( HB_COMP_DECL, const char * const szWarnings[], char cPrefix, int iWarning, const char * szWarning1, const char * szWarning2); /* generic parsing warning management function */ @@ -227,7 +227,7 @@ extern int hb_compFieldsCount( HB_COMP_DECL ); extern void hb_compStaticDefStart( HB_COMP_DECL ); extern void hb_compStaticDefEnd( HB_COMP_DECL, const char * szVarName ); -extern HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PFUNCTION ); +extern HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PHB_HFUNC ); #define HB_COMP_ERROR_TYPE( x ) HB_COMP_PARAM->funcs->ErrorType( HB_COMP_PARAM, x ) #define HB_COMP_ERROR_SYNTAX( x ) HB_COMP_PARAM->funcs->ErrorSyntax( HB_COMP_PARAM, x ) @@ -308,18 +308,18 @@ extern void hb_compPrintLogo( HB_COMP_DECL ); extern void hb_compPrintModes( HB_COMP_DECL ); /* Misc functions defined in harbour.c */ -extern void hb_compNOOPfill( PFUNCTION pFunc, HB_SIZE nFrom, HB_ISIZ nCount, HB_BOOL fPop, HB_BOOL fCheck ); -extern HB_BOOL hb_compHasJump( PFUNCTION pFunc, HB_SIZE nPos ); +extern void hb_compNOOPfill( PHB_HFUNC pFunc, HB_SIZE nFrom, HB_ISIZ nCount, HB_BOOL fPop, HB_BOOL fCheck ); +extern HB_BOOL hb_compHasJump( PHB_HFUNC pFunc, HB_SIZE nPos ); /* Misc functions defined in hbfix.c */ -extern void hb_compFixFuncPCode( HB_COMP_DECL, PFUNCTION pFunc ); +extern void hb_compFixFuncPCode( HB_COMP_DECL, PHB_HFUNC pFunc ); /* Misc functions defined in hbdead.c */ -extern void hb_compCodeTraceMarkDead( HB_COMP_DECL, PFUNCTION pFunc ); +extern void hb_compCodeTraceMarkDead( HB_COMP_DECL, PHB_HFUNC pFunc ); /* Misc functions defined in hbopt.c */ -extern void hb_compOptimizePCode( HB_COMP_DECL, PFUNCTION pFunc ); +extern void hb_compOptimizePCode( HB_COMP_DECL, PHB_HFUNC pFunc ); extern void hb_compPCodeTraceOptimizer( HB_COMP_DECL ); /* Misc functions defined in hbstripl.c */ -extern void hb_compStripFuncLines( HB_COMP_DECL, PFUNCTION pFunc ); +extern void hb_compStripFuncLines( HB_COMP_DECL, PHB_HFUNC pFunc ); /* output related functions defined in gen*.c */ extern void hb_compGenCCode( HB_COMP_DECL, PHB_FNAME ); /* generates the C language output */ @@ -327,7 +327,7 @@ extern void hb_compGenPortObj( HB_COMP_DECL, PHB_FNAME ); /* generates the po extern void hb_compGenBufPortObj( HB_COMP_DECL, HB_BYTE ** pBufPtr, HB_SIZE * pnSize ); /* generates the portable objects to memory buffer */ -extern void hb_compGenCRealCode( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc ); +extern void hb_compGenCRealCode( HB_COMP_DECL, PHB_HFUNC pFunc, FILE * yyc ); extern void hb_compGenCString( FILE * yyc, const HB_BYTE * pText, HB_SIZE nLen ); /* hbident.c */ diff --git a/harbour/include/hbcompdf.h b/harbour/include/hbcompdf.h index f3d1dedae1..84a82676b3 100644 --- a/harbour/include/hbcompdf.h +++ b/harbour/include/hbcompdf.h @@ -101,7 +101,7 @@ typedef struct _HB_HCLASS } HB_HCLASS, * PHB_HCLASS; /* locals, static, public variables support */ -typedef struct _VAR +typedef struct _HB_HVAR { const char * szName; /* variable name */ const char * szAlias; /* variable alias namespace */ @@ -110,8 +110,8 @@ typedef struct _VAR HB_USHORT uiFlags; /* optional falgs, f.e. THREAD STATIC */ HB_BYTE cType; /* optional strong typing */ PHB_HCLASS pClass; - struct _VAR * pNext; /* pointer to next defined variable */ -} VAR, * PVAR; + struct _HB_HVAR * pNext; /* pointer to next defined variable */ +} HB_HVAR, * PHB_HVAR; /* local variables declared in a codeblock */ typedef struct HB_CBVAR_ @@ -131,20 +131,20 @@ typedef struct _HB_VARTYPE /* value types seen at language level */ -#define HB_EV_UNKNOWN 0x0000 -#define HB_EV_NIL 0x0001 -#define HB_EV_NUMERIC 0x0002 -#define HB_EV_STRING 0x0004 -#define HB_EV_CODEBLOCK 0x0008 -#define HB_EV_LOGICAL 0x0010 -#define HB_EV_OBJECT 0x0020 -#define HB_EV_ARRAY 0x0040 -#define HB_EV_SYMBOL 0x0080 -#define HB_EV_VARREF 0x0100 -#define HB_EV_FUNREF 0x0200 -#define HB_EV_DATE 0x0400 -#define HB_EV_TIMESTAMP 0x0800 -#define HB_EV_HASH 0x1000 +#define HB_EV_UNKNOWN 0x0000 +#define HB_EV_NIL 0x0001 +#define HB_EV_NUMERIC 0x0002 +#define HB_EV_STRING 0x0004 +#define HB_EV_CODEBLOCK 0x0008 +#define HB_EV_LOGICAL 0x0010 +#define HB_EV_OBJECT 0x0020 +#define HB_EV_ARRAY 0x0040 +#define HB_EV_SYMBOL 0x0080 +#define HB_EV_VARREF 0x0100 +#define HB_EV_FUNREF 0x0200 +#define HB_EV_DATE 0x0400 +#define HB_EV_TIMESTAMP 0x0800 +#define HB_EV_HASH 0x1000 /* messages sent to expressions */ @@ -163,19 +163,19 @@ typedef enum /* additional definitions used to distinguish numeric expressions */ -#define HB_ET_LONG 1 -#define HB_ET_DOUBLE 2 +#define HB_ET_LONG 1 +#define HB_ET_DOUBLE 2 /* additional definitions used to distinguish macro expressions */ -#define HB_ET_MACRO_VAR 0 /* &variable */ -#define HB_ET_MACRO_SYMBOL 1 /* &fimcall() */ -#define HB_ET_MACRO_ALIASED 2 /* &alias->&variable */ -#define HB_ET_MACRO_EXPR 4 /* &( expr ) */ -#define HB_ET_MACRO_LIST 16 /* &variable used as in literal arrays or function call argument. */ -#define HB_ET_MACRO_PARE 32 /* &variable used as parentesised expressions. */ -#define HB_ET_MACRO_REFER 64 /* ¯o used in @ (pass by reference) */ -#define HB_ET_MACRO_ASSIGN 128 /* o:&msgname := value */ +#define HB_ET_MACRO_VAR 0 /* &variable */ +#define HB_ET_MACRO_SYMBOL 1 /* &fimcall() */ +#define HB_ET_MACRO_ALIASED 2 /* &alias->&variable */ +#define HB_ET_MACRO_EXPR 4 /* &( expr ) */ +#define HB_ET_MACRO_LIST 16 /* &variable used as in literal arrays or function call argument. */ +#define HB_ET_MACRO_PARE 32 /* &variable used as parentesised expressions. */ +#define HB_ET_MACRO_REFER 64 /* ¯o used in @ (pass by reference) */ +#define HB_ET_MACRO_ASSIGN 128 /* o:&msgname := value */ /* types of expressions * NOTE: the order of these definition is important - change it carefully @@ -494,19 +494,19 @@ typedef struct HB_RTVAR_ } HB_RTVAR, * HB_RTVAR_PTR; /* structure to hold a Clipper defined function */ -typedef struct __FUNC +typedef struct _HB_HFUNC { const char * szName; /* name of a defined Clipper function */ HB_SYMBOLSCOPE cScope; /* scope of a defined Clipper function */ HB_USHORT funFlags; /* some flags we may need */ HB_USHORT wParamCount; /* number of declared parameters */ HB_USHORT wParamNum; /* current parameter number */ - PVAR pLocals; /* pointer to local variables list */ - PVAR pStatics; /* pointer to static variables list */ - PVAR pFields; /* pointer to fields variables list */ - PVAR pMemvars; /* pointer to memvar variables list */ - PVAR pDetached; /* pointer to detached local variables list */ - PVAR pPrivates; /* pointer to private variables list */ + PHB_HVAR pLocals; /* pointer to local variables list */ + PHB_HVAR pStatics; /* pointer to static variables list */ + PHB_HVAR pFields; /* pointer to fields variables list */ + PHB_HVAR pMemvars; /* pointer to memvar variables list */ + PHB_HVAR pDetached; /* pointer to detached local variables list */ + PHB_HVAR pPrivates; /* pointer to private variables list */ HB_BYTE * pCode; /* pointer to a memory block where pcode is stored */ HB_SIZE nPCodeSize; /* total memory size for pcode */ HB_SIZE nPCodePos; /* actual pcode offset */ @@ -520,8 +520,8 @@ typedef struct __FUNC HB_BOOL fVParams; /* HB_TRUE if variable number of parameters is used */ HB_BOOL bError; /* error during function compilation */ HB_BOOL bBlock; /* HB_TRUE if simple codeblock body is compiled */ - struct __FUNC * pOwner; /* pointer to the function/procedure that owns the codeblock */ - struct __FUNC * pNext; /* pointer to the next defined function */ + struct _HB_HFUNC * pOwner; /* pointer to the function/procedure that owns the codeblock */ + struct _HB_HFUNC * pNext; /* pointer to the next defined function */ HB_ENUMERATOR_PTR pEnum; /* pointer to FOR EACH variables */ HB_LOOPEXIT_PTR pLoops; HB_SWITCHCMD_PTR pSwitch; @@ -535,7 +535,7 @@ typedef struct __FUNC HB_USHORT wCaseCounter; HB_USHORT wSwitchCounter; HB_USHORT wWithObjectCnt; -} _FUNC, * PFUNCTION; +} HB_HFUNC, * PHB_HFUNC; /* structure to hold an INLINE block of source */ typedef struct _HB_HINLINE @@ -549,20 +549,20 @@ typedef struct _HB_HINLINE } HB_HINLINE, * PHB_HINLINE; /* structure to hold a called functions */ -typedef struct __FUNCALL +typedef struct _HB_HFUNCALL { const char * szName; /* name of a called function */ HB_SYMBOLSCOPE cScope; /* the scope of the function */ - struct __FUNCALL * pNext; /* pointer to the next called function */ -} _FUNCALL, * PFUNCALL; + struct _HB_HFUNCALL * pNext; /* pointer to the next called function */ +} HB_HFUNCALL, PHB_HFUNCALL; /* structure to control all Clipper defined functions */ typedef struct { - PFUNCTION pFirst; /* pointer to the first defined funtion */ - PFUNCTION pLast; /* pointer to the last defined function */ + PHB_HFUNC pFirst; /* pointer to the first defined funtion */ + PHB_HFUNC pLast; /* pointer to the last defined function */ int iCount; /* number of defined functions */ -} FUNCTIONS; +} HB_HFUNCTION_LIST; /* structure to control all Clipper defined functions */ typedef struct @@ -570,7 +570,7 @@ typedef struct PHB_HINLINE pFirst; /* pointer to the first defined inline */ PHB_HINLINE pLast; /* pointer to the last defined inline */ int iCount; /* number of defined inlines */ -} INLINES; +} HB_HINLINE_LIST; /* compiler symbol support structure */ typedef struct _HB_HSYMBOL @@ -578,7 +578,7 @@ typedef struct _HB_HSYMBOL const char * szName; /* the name of the symbol */ HB_SYMBOLSCOPE cScope; /* the scope of the symbol */ int iFunc; /* is it a function name (TRUE) or memvar (FALSE) */ - PFUNCTION pFunc; + PHB_HFUNC pFunc; struct _HB_HSYMBOL * pNext; /* pointer to the next defined symbol */ } HB_HSYMBOL, * PHB_HSYMBOL; @@ -588,14 +588,14 @@ typedef struct PHB_HSYMBOL pFirst; /* pointer to the first defined symbol */ PHB_HSYMBOL pLast; /* pointer to the last defined symbol */ int iCount; /* number of defined symbols */ -} SYMBOLS; +} HB_HSYMBOL_LIST; -typedef struct __EXTERN +typedef struct _HB_HEXTERN { const char * szName; /* name of the extern function */ HB_SYMBOLSCOPE cScope; /* the scope of the function */ - struct __EXTERN * pNext; -} _EXTERN, * PEXTERN; /* support structure for extern symbols */ + struct _HB_HEXTERN * pNext; +} HB_HEXTERN, * PHB_HEXTERN; /* support structure for extern symbols */ /* as they have to be placed on the symbol table later than the first public symbol */ typedef struct _HB_MODULE @@ -639,8 +639,7 @@ typedef struct _HB_COMMON int mode; /* HB_MODE_* */ int supported; /* various flags for supported capabilities */ const struct _HB_COMP_FUNCS * funcs; -} -HB_COMMON, * HB_COMMON_PTR; +} HB_COMMON, * HB_COMMON_PTR; #define HB_COMP_PARAM pCommon #define HB_COMP_DECL HB_COMMON_PTR HB_COMP_PARAM @@ -720,23 +719,20 @@ typedef struct _HB_COMP_LEX int iState; HB_BOOL fEol; const char * lasttok; -} -HB_COMP_LEX, * PHB_COMP_LEX; +} HB_COMP_LEX, * PHB_COMP_LEX; typedef struct _HB_EXPRLST { HB_EXPR Expression; struct _HB_EXPRLST * pPrev; struct _HB_EXPRLST * pNext; -} -HB_EXPRLST, * PHB_EXPRLST; +} HB_EXPRLST, * PHB_EXPRLST; typedef struct _HB_INCLST { struct _HB_INCLST * pNext; char szFileName[ 1 ]; -} -HB_INCLST, * PHB_INCLST; +} HB_INCLST, * PHB_INCLST; typedef struct _HB_COMP { @@ -750,10 +746,10 @@ typedef struct _HB_COMP PHB_EXPRLST pExprLst; HB_HASH_TABLE_PTR pIdentifiers; - FUNCTIONS functions; - SYMBOLS symbols; - INLINES inlines; - PEXTERN externs; + HB_HFUNCTION_LIST functions; + HB_HSYMBOL_LIST symbols; + HB_HINLINE_LIST inlines; + PHB_HEXTERN externs; PHB_MODULE modules; PHB_VARTYPE pVarType; PHB_INCLST incfiles; @@ -764,9 +760,9 @@ typedef struct _HB_COMP PHB_HCLASS pFirstClass; PHB_HCLASS pLastClass; - PFUNCTION pInitFunc; - PFUNCTION pLineFunc; - PFUNCTION pDeclFunc; + PHB_HFUNC pInitFunc; + PHB_HFUNC pLineFunc; + PHB_HFUNC pDeclFunc; PHB_FNAME pFileName; PHB_FNAME pOutPath; PHB_FNAME pPpoPath; @@ -835,8 +831,7 @@ typedef struct _HB_COMP HB_BOOL fNoArchDefs; /* do not define architecture dependent macros: __PLATFORM__*, __ARCH??BIT__, __*_ENDIAN__ */ HB_BOOL fMeaningful; /* do not generate warnings about meaningless expression usage */ HB_BOOL fINCLUDE; /* use INCLUDE envvar as header path (default) */ -} -HB_COMP, * HB_COMP_PTR; +} HB_COMP, * HB_COMP_PTR; typedef struct { @@ -853,8 +848,7 @@ typedef struct int iExitLevel; int iHidden; int supported; -} -HB_COMP_SWITCHES, * PHB_COMP_SWITCHES; +} HB_COMP_SWITCHES, * PHB_COMP_SWITCHES; extern HB_COMP_PTR hb_comp_new( void ); extern void hb_comp_free( HB_COMP_PTR ); diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index 2ec23f9f73..17cf30bf8a 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -4508,7 +4508,7 @@ static HB_BOOL hb_compExprCodeblockPush( HB_EXPR_PTR pSelf, int iEarlyEvalPass, { HB_CBVAR_PTR pVar; - HB_COMP_PARAM->iVarScope = VS_PARAMETER; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER; pVar = pSelf->value.asCodeblock.pLocals; while( pVar ) { diff --git a/harbour/src/compiler/genc.c b/harbour/src/compiler/genc.c index 37106bb9ee..52e3aa2908 100644 --- a/harbour/src/compiler/genc.c +++ b/harbour/src/compiler/genc.c @@ -30,8 +30,8 @@ #include "hbdate.h" #include "hbassert.h" -static void hb_compGenCReadable( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc ); -static void hb_compGenCCompact( PFUNCTION pFunc, FILE * yyc ); +static void hb_compGenCReadable( HB_COMP_DECL, PHB_HFUNC pFunc, FILE * yyc ); +static void hb_compGenCCompact( PHB_HFUNC pFunc, FILE * yyc ); static void hb_compGenCFunc( FILE * yyc, const char * cDecor, const char * szName, HB_BOOL fStrip, int iFuncSuffix ); static void hb_writeEndInit( HB_COMP_DECL, FILE * yyc, const char * szModulname, const char * szSourceFile ); @@ -169,7 +169,7 @@ void hb_compGenCCode( HB_COMP_DECL, PHB_FNAME pFileName ) /* generates the { char szFileName[ HB_PATH_MAX ]; PHB_HSYMBOL pSym; - PFUNCTION pFunc; + PHB_HFUNC pFunc; PHB_HINLINE pInline; FILE * yyc; /* file handle for C output */ HB_BOOL fHasHbInline = HB_FALSE; @@ -209,7 +209,7 @@ void hb_compGenCCode( HB_COMP_DECL, PHB_FNAME pFileName ) /* generates the pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc && - ( ( pFunc->funFlags & FUN_FILE_DECL ) != 0 || + ( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) != 0 || pFunc == HB_COMP_PARAM->pInitFunc || pFunc == HB_COMP_PARAM->pLineFunc ) ) pFunc = pFunc->pNext; @@ -309,7 +309,7 @@ void hb_compGenCCode( HB_COMP_DECL, PHB_FNAME pFileName ) /* generates the else fprintf( yyc, "HB_FS_PUBLIC" ); - if( pSym->cScope & VS_MEMVAR ) + if( pSym->cScope & HB_VSCOMP_MEMVAR ) fprintf( yyc, " | HB_FS_MEMVAR" ); if( pSym->cScope & HB_FS_MESSAGE ) @@ -353,7 +353,7 @@ void hb_compGenCCode( HB_COMP_DECL, PHB_FNAME pFileName ) /* generates the pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc ) { - if( ( pFunc->funFlags & FUN_FILE_DECL ) == 0 ) + if( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) == 0 ) { /* Is it _STATICS$ - static initialization function */ if( pFunc == HB_COMP_PARAM->pInitFunc ) @@ -519,7 +519,7 @@ static void hb_compGenCByteStr( FILE * yyc, const HB_BYTE * pText, HB_SIZE nLen } } -static void hb_compGenCLocalName( PFUNCTION pFunc, int iLocal, HB_SIZE nPCodePos, HB_GENC_INFO_PTR cargo ) +static void hb_compGenCLocalName( PHB_HFUNC pFunc, int iLocal, HB_SIZE nPCodePos, HB_GENC_INFO_PTR cargo ) { /* Variable with negative order are local variables * referenced in a codeblock -handle it with care @@ -2727,7 +2727,7 @@ static const HB_GENC_FUNC_PTR s_verbose_table[] = { hb_p_pushaparams }; -static void hb_compGenCReadable( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc ) +static void hb_compGenCReadable( HB_COMP_DECL, PHB_HFUNC pFunc, FILE * yyc ) { const HB_GENC_FUNC_PTR * pFuncTable = s_verbose_table; HB_GENC_INFO genc_info; @@ -2749,7 +2749,7 @@ static void hb_compGenCReadable( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc ) fprintf( yyc, " hb_vmExecute( pcode, symbols );\n}\n" ); } -static void hb_compGenCCompact( PFUNCTION pFunc, FILE * yyc ) +static void hb_compGenCCompact( PHB_HFUNC pFunc, FILE * yyc ) { HB_SIZE nPCodePos = 0; int nChar; diff --git a/harbour/src/compiler/gencc.c b/harbour/src/compiler/gencc.c index 14e65d8bb6..6cff377979 100644 --- a/harbour/src/compiler/gencc.c +++ b/harbour/src/compiler/gencc.c @@ -151,7 +151,7 @@ static void hb_gencc_copyLocals( FILE * yyc, int iLocal1, int iLocal2 ) fprintf( yyc, "\thb_xvmCopyLocals( %d, %d );\n", iLocal1, iLocal2 ); } -static int hb_gencc_checkJumpCondAhead( HB_LONG lValue, PFUNCTION pFunc, HB_SIZE nPCodePos, PHB_LABEL_INFO cargo, +static int hb_gencc_checkJumpCondAhead( HB_LONG lValue, PHB_HFUNC pFunc, HB_SIZE nPCodePos, PHB_LABEL_INFO cargo, const char * szFunc ) { if( HB_GENC_GETLABEL( nPCodePos + 1 ) == 0 ) @@ -210,7 +210,7 @@ static int hb_gencc_checkJumpCondAhead( HB_LONG lValue, PFUNCTION pFunc, HB_SIZE return 1; } -static int hb_gencc_checkNumAhead( HB_LONG lValue, PFUNCTION pFunc, HB_SIZE nPCodePos, PHB_LABEL_INFO cargo ) +static int hb_gencc_checkNumAhead( HB_LONG lValue, PHB_HFUNC pFunc, HB_SIZE nPCodePos, PHB_LABEL_INFO cargo ) { if( HB_GENC_GETLABEL( nPCodePos ) == 0 ) { @@ -299,7 +299,7 @@ static int hb_gencc_checkNumAhead( HB_LONG lValue, PFUNCTION pFunc, HB_SIZE nPCo return 0; } -static int hb_gencc_checkPlusAhead( PFUNCTION pFunc, HB_SIZE nPCodePos, PHB_LABEL_INFO cargo ) +static int hb_gencc_checkPlusAhead( PHB_HFUNC pFunc, HB_SIZE nPCodePos, PHB_LABEL_INFO cargo ) { if( HB_GENC_GETLABEL( nPCodePos ) == 0 ) { @@ -1840,7 +1840,7 @@ static HB_GENC_FUNC( hb_p_switch ) fprintf( cargo->yyc, "\t\tconst char * pszText;\n\t\tHB_SIZE nLen;\n" ); if( fNum ) fprintf( cargo->yyc, "\t\tlong lVal;\n" ); - fprintf( cargo->yyc, + fprintf( cargo->yyc, "\t\tif( hb_xvmSwitchGet( &pSwitch ) ) break;\n" "\t\ttype = hb_itemType( pSwitch );\n" ); if( fStr ) @@ -2377,7 +2377,7 @@ static const HB_GENC_FUNC_PTR s_verbose_table[] = { hb_p_pushaparams }; -void hb_compGenCRealCode( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc ) +void hb_compGenCRealCode( HB_COMP_DECL, PHB_HFUNC pFunc, FILE * yyc ) { const HB_GENC_FUNC_PTR * pFuncTable = s_verbose_table; HB_LABEL_INFO label_info; diff --git a/harbour/src/compiler/genhrb.c b/harbour/src/compiler/genhrb.c index 7c254bc555..dadefe3e97 100644 --- a/harbour/src/compiler/genhrb.c +++ b/harbour/src/compiler/genhrb.c @@ -38,7 +38,7 @@ static HB_SIZE hb_compHrbSize( HB_COMP_DECL, HB_ULONG * pulSymbols, HB_ULONG * pulFunctions ) { - PFUNCTION pFunc; + PHB_HFUNC pFunc; PHB_HSYMBOL pSym; HB_SIZE nSize; @@ -58,7 +58,7 @@ static HB_SIZE hb_compHrbSize( HB_COMP_DECL, HB_ULONG * pulSymbols, HB_ULONG * p pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc ) { - if( ( pFunc->funFlags & FUN_FILE_DECL ) == 0 ) + if( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) == 0 ) { ( *pulFunctions )++; nSize += strlen( pFunc->szName ) + 5 + pFunc->nPCodePos; /* \0 + func_size[4] + function_body */ @@ -71,7 +71,7 @@ static HB_SIZE hb_compHrbSize( HB_COMP_DECL, HB_ULONG * pulSymbols, HB_ULONG * p void hb_compGenBufPortObj( HB_COMP_DECL, HB_BYTE ** pBufPtr, HB_SIZE * pnSize ) { - PFUNCTION pFunc; + PHB_HFUNC pFunc; PHB_HSYMBOL pSym; HB_ULONG ulSymbols, ulFunctions; HB_SIZE nLen; @@ -124,7 +124,7 @@ void hb_compGenBufPortObj( HB_COMP_DECL, HB_BYTE ** pBufPtr, HB_SIZE * pnSize ) pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc ) { - if( ( pFunc->funFlags & FUN_FILE_DECL ) == 0 ) + if( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) == 0 ) { nLen = strlen( pFunc->szName ) + 1; memcpy( ptr, pFunc->szName, nLen ); diff --git a/harbour/src/compiler/harbour.y b/harbour/src/compiler/harbour.y index 312a980d97..53d0273704 100644 --- a/harbour/src/compiler/harbour.y +++ b/harbour/src/compiler/harbour.y @@ -323,9 +323,9 @@ Line : LINE NUM_LONG Crlf ; Function : FunScope FUNCTION IdentName { hb_compFunctionAdd( HB_COMP_PARAM, $3, ( HB_SYMBOLSCOPE ) $1, 0 ); } Crlf - | FunScope PROCEDURE IdentName { hb_compFunctionAdd( HB_COMP_PARAM, $3, ( HB_SYMBOLSCOPE ) $1, FUN_PROCEDURE ); } Crlf - | FunScope FUNCTION IdentName { hb_compFunctionAdd( HB_COMP_PARAM, $3, ( HB_SYMBOLSCOPE ) $1, 0 ); HB_COMP_PARAM->iVarScope = VS_PARAMETER; } '(' Params ')' Crlf - | FunScope PROCEDURE IdentName { hb_compFunctionAdd( HB_COMP_PARAM, $3, ( HB_SYMBOLSCOPE ) $1, FUN_PROCEDURE ); HB_COMP_PARAM->iVarScope = VS_PARAMETER;} '(' Params ')' Crlf + | FunScope PROCEDURE IdentName { hb_compFunctionAdd( HB_COMP_PARAM, $3, ( HB_SYMBOLSCOPE ) $1, HB_FUNF_PROCEDURE ); } Crlf + | FunScope FUNCTION IdentName { hb_compFunctionAdd( HB_COMP_PARAM, $3, ( HB_SYMBOLSCOPE ) $1, 0 ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER; } '(' Params ')' Crlf + | FunScope PROCEDURE IdentName { hb_compFunctionAdd( HB_COMP_PARAM, $3, ( HB_SYMBOLSCOPE ) $1, HB_FUNF_PROCEDURE ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER;} '(' Params ')' Crlf ; FunScope : { $$ = HB_FS_PUBLIC; } @@ -380,45 +380,45 @@ ParamList : IdentName AsType { hb_compVariableAdd( HB_COMP_PARAM * stop compilation if invalid syntax will be used. */ Statement : ExecFlow CrlfStmnt - | IfInline CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | FunCall CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | AliasExpr CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | ObjectMethod CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + | IfInline CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | FunCall CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | AliasExpr CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | ObjectMethod CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } | MacroAny CrlfStmnt { if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_XBASE ) ) HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); else HB_COMP_EXPR_FREE( HB_COMP_ERROR_SYNTAX( $1 ) ); - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } - | PareExpList CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | ExprPreOp CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | ExprPostOp CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | ExprOperEq CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | ExprEqual CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | ExprAssign CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } - | DoProc CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + | PareExpList CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | ExprPreOp CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | ExprPostOp CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | ExprOperEq CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | ExprEqual CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | ExprAssign CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } + | DoProc CrlfStmnt { HB_COMP_EXPR_FREE( hb_compExprGenStatement( $1, HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } | BREAK CrlfStmnt { hb_compGenBreak( HB_COMP_PARAM ); hb_compGenPCode2( HB_P_DOSHORT, 0, HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_BREAK_CODE; } + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } | BREAK { hb_compLinePushIfInside( HB_COMP_PARAM ); } Expression Crlf { hb_compGenBreak( HB_COMP_PARAM ); HB_COMP_EXPR_FREE( hb_compExprGenPush( $3, HB_COMP_PARAM ) ); hb_compGenPCode2( HB_P_DOSHORT, 1, HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } - | EXIT CrlfStmnt { hb_compLoopExit( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= FUN_BREAK_CODE; } - | LOOP CrlfStmnt { hb_compLoopLoop( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= FUN_BREAK_CODE; } + | EXIT CrlfStmnt { hb_compLoopExit( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } + | LOOP CrlfStmnt { hb_compLoopLoop( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } | RETURN CrlfStmnt { if( HB_COMP_PARAM->functions.pLast->wSeqCounter ) { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "RETURN", NULL ); } hb_compGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM ); - if( ( HB_COMP_PARAM->functions.pLast->funFlags & FUN_PROCEDURE ) == 0 ) + if( ( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_PROCEDURE ) == 0 ) { /* return from a function without a return value */ hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_NO_RETURN_VALUE, NULL, NULL ); } - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_WITH_RETURN | FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE; } | RETURN { hb_compLinePushIfInside( HB_COMP_PARAM ); } Expression Crlf @@ -429,29 +429,29 @@ Statement : ExecFlow CrlfStmnt } /* TODO: check if return value agree with declared value */ HB_COMP_EXPR_FREE( hb_compExprGenPush( $3, HB_COMP_PARAM ) ); - if( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) + if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) /* extended clodeblock, use HB_P_ENDBLOCK to return value and stop execution */ hb_compGenPCode1( HB_P_ENDBLOCK, HB_COMP_PARAM ); else hb_compGenPCode2( HB_P_RETVALUE, HB_P_ENDPROC, HB_COMP_PARAM ); - if( HB_COMP_PARAM->functions.pLast->funFlags & FUN_PROCEDURE ) + if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_PROCEDURE ) { /* procedure returns a value */ hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_PROC_RETURN_VALUE, NULL, NULL ); } - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_WITH_RETURN | FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE; } - | PUBLIC { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = VS_PUBLIC; } + | PUBLIC { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PUBLIC; } ExtVarList { hb_compRTVariableGen( HB_COMP_PARAM, "__MVPUBLIC" ); - HB_COMP_PARAM->iVarScope = VS_NONE; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } Crlf - | PRIVATE { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = VS_PRIVATE; } + | PRIVATE { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PRIVATE; } ExtVarList { hb_compRTVariableGen( HB_COMP_PARAM, "__MVPRIVATE" ); - HB_COMP_PARAM->iVarScope = VS_NONE; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } Crlf | VarDefs | FieldsDef @@ -1029,8 +1029,8 @@ BlockVars : /* empty list */ { $$ = NULL; } | BlockVarList ',' EPSILON { $$ = $1; $0->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; } ; -BlockVarList : IdentName AsType { HB_COMP_PARAM->iVarScope = VS_LOCAL; $$ = hb_compExprCBVarAdd( $0, $1, $2->cVarType, HB_COMP_PARAM ); } - | BlockVarList ',' IdentName AsType { HB_COMP_PARAM->iVarScope = VS_LOCAL; $$ = hb_compExprCBVarAdd( $0, $3, $4->cVarType, HB_COMP_PARAM ); } +BlockVarList : IdentName AsType { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; $$ = hb_compExprCBVarAdd( $0, $1, $2->cVarType, HB_COMP_PARAM ); } + | BlockVarList ',' IdentName AsType { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; $$ = hb_compExprCBVarAdd( $0, $3, $4->cVarType, HB_COMP_PARAM ); } ; BlockExpList : Expression { $$ = hb_compExprAddCodeblockExpr( $-1, $1 ); } @@ -1049,7 +1049,7 @@ CodeBlock : BlockHead $$ = HB_COMP_PARAM->functions.pLast->nPCodePos; $2 = HB_COMP_PARAM->lastLine; hb_compCodeBlockStart( HB_COMP_PARAM, 0 ); - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_EXTBLOCK; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_EXTBLOCK; HB_COMP_PARAM->functions.pLast->fVParams = ( $1->value.asCodeblock.flags & HB_BLOCK_VPARAMS ) != 0; @@ -1061,7 +1061,7 @@ CodeBlock : BlockHead $1->nLength = 0; } - HB_COMP_PARAM->iVarScope = VS_PARAMETER; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER; pVar = $1->value.asCodeblock.pLocals; while( pVar ) { @@ -1102,20 +1102,20 @@ IfInline : IIF '(' Expression ',' Argument ',' Argument ')' IfInlineAlias : IfInline ALIASOP ; -VarDefs : LOCAL { HB_COMP_PARAM->iVarScope = VS_LOCAL; hb_compLinePush( HB_COMP_PARAM ); } +VarDefs : LOCAL { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; hb_compLinePush( HB_COMP_PARAM ); } VarList Crlf - | STATIC { HB_COMP_PARAM->iVarScope = VS_STATIC; hb_compLinePush( HB_COMP_PARAM ); } + | STATIC { HB_COMP_PARAM->iVarScope = HB_VSCOMP_STATIC; hb_compLinePush( HB_COMP_PARAM ); } VarList Crlf - | THREAD STATIC { HB_COMP_PARAM->iVarScope = VS_TH_STATIC; hb_compLinePush( HB_COMP_PARAM ); } + | THREAD STATIC { HB_COMP_PARAM->iVarScope = HB_VSCOMP_TH_STATIC; hb_compLinePush( HB_COMP_PARAM ); } VarList Crlf - | PARAMETERS { if( HB_COMP_PARAM->functions.pLast->funFlags & FUN_USES_LOCAL_PARAMS ) + | PARAMETERS { if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_USES_LOCAL_PARAMS ) hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_PARAMETERS_NOT_ALLOWED, NULL, NULL ); else { HB_COMP_PARAM->functions.pLast->wParamNum = 0; - HB_COMP_PARAM->iVarScope = ( VS_PRIVATE | VS_PARAMETER ); + HB_COMP_PARAM->iVarScope = ( HB_VSCOMP_PRIVATE | HB_VSCOMP_PARAMETER ); } - } MemvarList Crlf { HB_COMP_PARAM->iVarScope = VS_NONE; } + } MemvarList Crlf { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } ; VarList : VarDef { $$ = 1; } @@ -1148,17 +1148,17 @@ ExtVarDef : VarDef VarDef : IdentName AsType { hb_compVariableAdd( HB_COMP_PARAM, $1, $2 ); - if( HB_COMP_PARAM->iVarScope & VS_STATIC ) + if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_STATIC ) { hb_compStaticDefStart( HB_COMP_PARAM ); /* switch to statics pcode buffer */ hb_compStaticDefEnd( HB_COMP_PARAM, $1 ); } - else if( HB_COMP_PARAM->iVarScope == VS_PUBLIC || HB_COMP_PARAM->iVarScope == VS_PRIVATE ) + else if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_PUBLIC || HB_COMP_PARAM->iVarScope == HB_VSCOMP_PRIVATE ) { hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( $1, NULL, HB_COMP_PARAM ), HB_FALSE ); } - else if( HB_COMP_PARAM->iVarScope == VS_LOCAL && - ( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) ) + else if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_LOCAL && + ( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) ) { HB_COMP_EXPR_FREE( hb_compExprGenPush( hb_compExprNewNil( HB_COMP_PARAM ), HB_COMP_PARAM ) ); } @@ -1169,19 +1169,19 @@ VarDef : IdentName AsType INASSIGN Expression { HB_COMP_PARAM->iVarScope = $3; - if( HB_COMP_PARAM->iVarScope & VS_STATIC ) + if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_STATIC ) { hb_compStaticDefStart( HB_COMP_PARAM ); /* switch to statics pcode buffer */ HB_COMP_EXPR_FREE( hb_compExprGenStatement( hb_compExprAssignStatic( hb_compExprNewVar( $1, HB_COMP_PARAM ), $5, HB_COMP_PARAM ), HB_COMP_PARAM ) ); hb_compStaticDefEnd( HB_COMP_PARAM, $1 ); } - else if( HB_COMP_PARAM->iVarScope == VS_PUBLIC || HB_COMP_PARAM->iVarScope == VS_PRIVATE ) + else if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_PUBLIC || HB_COMP_PARAM->iVarScope == HB_VSCOMP_PRIVATE ) { HB_COMP_EXPR_FREE( hb_compExprGenPush( $5, HB_COMP_PARAM ) ); hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( $1, NULL, HB_COMP_PARAM ), HB_TRUE ); } - else if( HB_COMP_PARAM->iVarScope == VS_LOCAL && - ( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) ) + else if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_LOCAL && + ( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) ) { HB_COMP_EXPR_FREE( hb_compExprGenPush( $5, HB_COMP_PARAM ) ); } @@ -1206,7 +1206,7 @@ DimIndex : '[' Expression { $$ = hb_compExprNewArgList( $2, HB_C | DimIndex ']' '[' Expression { $$ = hb_compExprAddListExpr( $1, $4 ); } ; -FieldsDef : FIELD { HB_COMP_PARAM->iVarScope = VS_FIELD; } +FieldsDef : FIELD { HB_COMP_PARAM->iVarScope = HB_VSCOMP_FIELD; } FieldList InAlias Crlf { if( $4 ) hb_compFieldSetAlias( HB_COMP_PARAM, $4, $3 ); @@ -1221,7 +1221,7 @@ InAlias : /* no alias */ { $$ = NULL; } | IN IdentName { $$ = $2; } ; -MemvarDef : MEMVAR { HB_COMP_PARAM->iVarScope = VS_MEMVAR; } MemvarList Crlf +MemvarDef : MEMVAR { HB_COMP_PARAM->iVarScope = HB_VSCOMP_MEMVAR; } MemvarList Crlf ; MemvarList : IdentName AsType { hb_compVariableAdd( HB_COMP_PARAM, $1, $2 ); } @@ -1245,13 +1245,13 @@ Declaration: DECLARE IdentName '(' { hb_compDeclaredAdd( HB_COMP_PARAM, $2 ); HB } } HB_COMP_PARAM->szDeclaredFun = NULL; - HB_COMP_PARAM->iVarScope = VS_NONE; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } - | DECLARE IdentName { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, $2, NULL ); } ClassInfo Crlf { HB_COMP_PARAM->iVarScope = VS_NONE; } - | DECLARE_CLASS IdentName Crlf { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, $2, NULL ); HB_COMP_PARAM->iVarScope = VS_NONE; } - | DECLARE_CLASS IdentName IdentName Crlf { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, $2, $3 ); HB_COMP_PARAM->iVarScope = VS_NONE; } - | DECLARE_MEMBER DecMethod Crlf { HB_COMP_PARAM->iVarScope = VS_NONE; } - | DECLARE_MEMBER '{' AsType { HB_COMP_PARAM->cDataListType = $3->cVarType; } DecDataList '}' Crlf { HB_COMP_PARAM->cDataListType = 0; HB_COMP_PARAM->iVarScope = VS_NONE; } + | DECLARE IdentName { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, $2, NULL ); } ClassInfo Crlf { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } + | DECLARE_CLASS IdentName Crlf { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, $2, NULL ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } + | DECLARE_CLASS IdentName IdentName Crlf { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, $2, $3 ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } + | DECLARE_MEMBER DecMethod Crlf { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } + | DECLARE_MEMBER '{' AsType { HB_COMP_PARAM->cDataListType = $3->cVarType; } DecDataList '}' Crlf { HB_COMP_PARAM->cDataListType = 0; HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } ; DecDataList: DecData @@ -1361,19 +1361,19 @@ DummyArgument : EmptyExpression { HB_COMP_EXPR_FREE( $1 ); } ; FormalList : IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $1, $2 ); } - | '@' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $2, hb_compVarTypeNew( HB_COMP_PARAM, $3->cVarType + VT_OFFSET_BYREF, NULL ) ); } + | '@' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $2, hb_compVarTypeNew( HB_COMP_PARAM, $3->cVarType + HB_VT_OFFSET_BYREF, NULL ) ); } | '@' IdentName '(' DummyArgList ')' { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $2, hb_compVarTypeNew( HB_COMP_PARAM, 'F', NULL ) ); } | FormalList ',' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $3, $4 ); } - | FormalList ',' '@' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $4, hb_compVarTypeNew( HB_COMP_PARAM, $5->cVarType + VT_OFFSET_BYREF, NULL ) ); } + | FormalList ',' '@' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $4, hb_compVarTypeNew( HB_COMP_PARAM, $5->cVarType + HB_VT_OFFSET_BYREF, NULL ) ); } | FormalList ',' '@' IdentName '(' DummyArgList ')' { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $4, hb_compVarTypeNew( HB_COMP_PARAM, 'F', NULL ) ); } ; -OptList : OPTIONAL IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $2, hb_compVarTypeNew( HB_COMP_PARAM, $3->cVarType + VT_OFFSET_OPTIONAL, NULL ) ); } - | OPTIONAL '@' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $3, hb_compVarTypeNew( HB_COMP_PARAM, $4->cVarType + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF, NULL ) ); } - | OPTIONAL '@' IdentName '(' DummyArgList ')' { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $3, hb_compVarTypeNew( HB_COMP_PARAM, 'F' + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF, NULL ) ); } - | OptList ',' OPTIONAL IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $4, hb_compVarTypeNew( HB_COMP_PARAM, $5->cVarType + VT_OFFSET_OPTIONAL, NULL ) ); } - | OptList ',' OPTIONAL '@' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $5, hb_compVarTypeNew( HB_COMP_PARAM, $6->cVarType + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF, NULL ) ); } - | OptList ',' OPTIONAL '@' IdentName '(' DummyArgList ')' { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $5, hb_compVarTypeNew( HB_COMP_PARAM, 'F' + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF, NULL ) ); } +OptList : OPTIONAL IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $2, hb_compVarTypeNew( HB_COMP_PARAM, $3->cVarType + HB_VT_OFFSET_OPTIONAL, NULL ) ); } + | OPTIONAL '@' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $3, hb_compVarTypeNew( HB_COMP_PARAM, $4->cVarType + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } + | OPTIONAL '@' IdentName '(' DummyArgList ')' { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $3, hb_compVarTypeNew( HB_COMP_PARAM, 'F' + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } + | OptList ',' OPTIONAL IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $4, hb_compVarTypeNew( HB_COMP_PARAM, $5->cVarType + HB_VT_OFFSET_OPTIONAL, NULL ) ); } + | OptList ',' OPTIONAL '@' IdentName AsType { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $5, hb_compVarTypeNew( HB_COMP_PARAM, $6->cVarType + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } + | OptList ',' OPTIONAL '@' IdentName '(' DummyArgList ')' { hb_compDeclaredParameterAdd( HB_COMP_PARAM, $5, hb_compVarTypeNew( HB_COMP_PARAM, 'F' + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } ; ExecFlow : IfEndif @@ -1400,11 +1400,11 @@ IfBegin : IF ExpList { $$ = hb_compGenJump( 0, HB_COMP_PARAM ); hb_compGenJumpHere( $5, HB_COMP_PARAM ); } ; -IfElse : ELSE Crlf { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } +IfElse : ELSE Crlf { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } EmptyStats ; -IfElseIf : ELSEIF { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } +IfElseIf : ELSEIF { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } ExpList Crlf { HB_COMP_EXPR_FREE( hb_compExprGenPush( $3, HB_COMP_PARAM ) ); $$ = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); @@ -1414,7 +1414,7 @@ IfElseIf : ELSEIF { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CO hb_compGenJumpHere( $5, HB_COMP_PARAM ); } - | IfElseIf ELSEIF { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } + | IfElseIf ELSEIF { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } ExpList Crlf { HB_COMP_EXPR_FREE( hb_compExprGenPush( $4, HB_COMP_PARAM ) ); $$ = hb_compGenJumpFalse( 0, HB_COMP_PARAM ); @@ -1429,7 +1429,7 @@ EndIf : EndIfID { if( HB_COMP_PARAM->functions.pLast->wIfCounter ) --HB_COMP_PARAM->functions.pLast->wIfCounter; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } ; @@ -1457,7 +1457,7 @@ DoCase : DoCaseBegin EndCase : EndCaseID { if( HB_COMP_PARAM->functions.pLast->wCaseCounter ) --HB_COMP_PARAM->functions.pLast->wCaseCounter; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } ; @@ -1484,7 +1484,7 @@ Cases : CASE { hb_compLinePushIfInside( HB_COMP_PARAM ); } ExpList Crlf } EmptyStats { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; $$ = hb_compElseIfGen( HB_COMP_PARAM, NULL, hb_compGenJump( 0, HB_COMP_PARAM ) ); hb_compGenJumpHere( $5, HB_COMP_PARAM ); } @@ -1496,13 +1496,13 @@ Cases : CASE { hb_compLinePushIfInside( HB_COMP_PARAM ); } ExpList Crlf } EmptyStats { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; $$ = hb_compElseIfGen( HB_COMP_PARAM, $1, hb_compGenJump( 0, HB_COMP_PARAM ) ); hb_compGenJumpHere( $6, HB_COMP_PARAM ); } ; -Otherwise : OTHERWISE {hb_compLinePushIfDebugger( HB_COMP_PARAM ); } Crlf { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } +Otherwise : OTHERWISE {hb_compLinePushIfDebugger( HB_COMP_PARAM ); } Crlf { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } EmptyStats | Otherwise OTHERWISE { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_MAYHEM_IN_CASE, NULL, NULL ); } Crlf EmptyStats @@ -1524,7 +1524,7 @@ DoWhile : WhileBegin ExpList Crlf if( HB_COMP_PARAM->functions.pLast->wWhileCounter ) --HB_COMP_PARAM->functions.pLast->wWhileCounter; hb_compLoopEnd( HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } ; @@ -1538,7 +1538,7 @@ WhileBegin : WHILE ; EndWhile : EndWhileID - { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } + { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } ; EndWhileID : ENDDO @@ -1608,7 +1608,7 @@ ForNext : FOR LValue ForAssign Expression /* 1 2 3 4 */ if( hb_compExprAsSymbol( $2 ) ) hb_compForEnd( HB_COMP_PARAM, hb_compExprAsSymbol( $2 ) ); HB_COMP_EXPR_FREE( $5 ); /* deletes $5, $2, $4 */ - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } ; @@ -1680,7 +1680,7 @@ ForEach : FOREACH ForList IN ForArgs /* 1 2 3 4 */ hb_compGenJumpHere( $9, HB_COMP_PARAM ); hb_compLoopEnd( HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); hb_compEnumEnd( HB_COMP_PARAM, $2 ); HB_COMP_EXPR_FREE( $2 ); HB_COMP_EXPR_FREE( $4 ); @@ -1715,7 +1715,7 @@ EndSwitch : EndSwitchID { if( HB_COMP_PARAM->functions.pLast->wSwitchCounter ) --HB_COMP_PARAM->functions.pLast->wSwitchCounter; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } ; @@ -1755,7 +1755,7 @@ SwitchCases : CASE Expression { hb_compSwitchAdd( HB_COMP_PARAM, $2 ); hb_compLi | SwitchCases SwitchDefault ; -SwitchDefault : OTHERWISE { hb_compSwitchAdd( HB_COMP_PARAM, NULL ); hb_compLinePush( HB_COMP_PARAM ); } Crlf { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } +SwitchDefault : OTHERWISE { hb_compSwitchAdd( HB_COMP_PARAM, NULL ); hb_compLinePush( HB_COMP_PARAM ); } Crlf { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } EmptyStats ; @@ -1791,7 +1791,7 @@ BeginSeq : BEGINSEQ /* 1 */ AlwaysSeq /* 9 */ { /* 10 */ long lLoopCount = hb_compLoopCount( HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); if( $9 ) { if( $4 != lLoopCount ) @@ -1839,21 +1839,21 @@ AlwaysSeq : /* no always */ { $$ = 0; } Always : ALWAYS { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); $$ = HB_COMP_PARAM->functions.pLast->nPCodePos; ++HB_COMP_PARAM->functions.pLast->wAlwaysCounter; hb_compSequenceAlways( HB_COMP_PARAM ); } ; -RecoverSeq : /* no recover */ { $$ = 0; HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } +RecoverSeq : /* no recover */ { $$ = 0; HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } | RecoverEmpty Crlf EmptyStats | RecoverUsing Crlf EmptyStats ; RecoverEmpty : RECOVER { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; $$ = HB_COMP_PARAM->functions.pLast->nPCodePos; if( HB_COMP_PARAM->functions.pLast->wSeqCounter ) --HB_COMP_PARAM->functions.pLast->wSeqCounter; @@ -1864,7 +1864,7 @@ RecoverEmpty : RECOVER RecoverUsing : RECOVERUSING IdentName { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; $$ = HB_COMP_PARAM->functions.pLast->nPCodePos; if( HB_COMP_PARAM->functions.pLast->wSeqCounter ) --HB_COMP_PARAM->functions.pLast->wSeqCounter; @@ -1966,7 +1966,7 @@ Crlf : '\n' { HB_COMP_PARAM->fError = HB_FALSE; } static void hb_compLoopStart( HB_COMP_DECL, HB_BOOL fCanLoop ) { HB_LOOPEXIT_PTR pLoop = ( HB_LOOPEXIT_PTR ) hb_xgrab( sizeof( HB_LOOPEXIT ) ); - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; if( pFunc->pLoops ) { @@ -1995,7 +1995,7 @@ static void hb_compLoopStart( HB_COMP_DECL, HB_BOOL fCanLoop ) static long hb_compLoopCount( HB_COMP_DECL ) { HB_LOOPEXIT_PTR pLastLoop, pLastExit, pLoop; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; long lCount = 0; pLastLoop = pLastExit = NULL; @@ -2034,7 +2034,7 @@ static long hb_compLoopCount( HB_COMP_DECL ) static void hb_compLoopLoop( HB_COMP_DECL ) { HB_LOOPEXIT_PTR pLast = NULL, pLoop; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; pLoop = pFunc->pLoops; while( pLoop ) @@ -2092,7 +2092,7 @@ static void hb_compLoopLoop( HB_COMP_DECL ) */ static void hb_compLoopExit( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; if( ! pFunc->pLoops ) { @@ -2148,7 +2148,7 @@ static void hb_compLoopExit( HB_COMP_DECL ) */ static void hb_compLoopHere( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_LOOPEXIT_PTR pLoop = pFunc->pLoops, pFree, pLast; if( pLoop ) @@ -2174,7 +2174,7 @@ static void hb_compLoopHere( HB_COMP_DECL ) */ static void hb_compLoopEnd( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_LOOPEXIT_PTR pLoop = pFunc->pLoops, pLast = pFunc->pLoops, pExit, pFree; if( pLoop ) @@ -2201,7 +2201,7 @@ static void hb_compLoopEnd( HB_COMP_DECL ) } } -void hb_compLoopKill( PFUNCTION pFunc ) +void hb_compLoopKill( PHB_HFUNC pFunc ) { HB_LOOPEXIT_PTR pLoop, pFree; @@ -2228,7 +2228,7 @@ void hb_compLoopKill( PFUNCTION pFunc ) static void * hb_compElseIfGen( HB_COMP_DECL, void * pFirst, HB_SIZE nOffset ) { HB_ELSEIF_PTR pElseIf = ( HB_ELSEIF_PTR ) hb_xgrab( sizeof( HB_ELSEIF ) ), pLast; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; pElseIf->nOffset = nOffset; pElseIf->pPrev = NULL; @@ -2269,7 +2269,7 @@ static void hb_compElseIfFix( HB_COMP_DECL, void * pFixElseIfs ) } } -void hb_compElseIfKill( PFUNCTION pFunc ) +void hb_compElseIfKill( PHB_HFUNC pFunc ) { HB_ELSEIF_PTR pFix; HB_ELSEIF_PTR pDel; @@ -2290,7 +2290,7 @@ void hb_compElseIfKill( PFUNCTION pFunc ) static void hb_compRTVariableAdd( HB_COMP_DECL, HB_EXPR_PTR pVar, HB_BOOL bPopInitValue ) { HB_RTVAR_PTR pRTvar = ( HB_RTVAR_PTR ) hb_xgrab( sizeof( HB_RTVAR ) ); - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; pRTvar->pVar = pVar; pRTvar->bPopValue = bPopInitValue; @@ -2312,7 +2312,7 @@ static void hb_compRTVariableAdd( HB_COMP_DECL, HB_EXPR_PTR pVar, HB_BOOL bPopIn static void hb_compRTVariableGen( HB_COMP_DECL, const char * szCreateFun ) { HB_USHORT usCount = 0; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_RTVAR_PTR pVar = pFunc->rtvars; HB_RTVAR_PTR pDel; @@ -2349,7 +2349,7 @@ static void hb_compRTVariableGen( HB_COMP_DECL, const char * szCreateFun ) pFunc->rtvars = NULL; } -void hb_compRTVariableKill( HB_COMP_DECL, PFUNCTION pFunc ) +void hb_compRTVariableKill( HB_COMP_DECL, PHB_HFUNC pFunc ) { HB_RTVAR_PTR pVar; @@ -2383,13 +2383,13 @@ static HB_EXPR_PTR hb_compArrayDimPush( HB_EXPR_PTR pInitValue, HB_COMP_DECL ) static void hb_compVariableDim( const char * szName, HB_EXPR_PTR pInitValue, HB_COMP_DECL ) { - if( HB_COMP_PARAM->iVarScope == VS_PUBLIC || HB_COMP_PARAM->iVarScope == VS_PRIVATE ) + if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_PUBLIC || HB_COMP_PARAM->iVarScope == HB_VSCOMP_PRIVATE ) { hb_compVariableAdd( HB_COMP_PARAM, szName, hb_compVarTypeNew( HB_COMP_PARAM, 'A', NULL ) ); HB_COMP_EXPR_FREE( hb_compArrayDimPush( pInitValue, HB_COMP_PARAM ) ); hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( szName, NULL, HB_COMP_PARAM ), HB_TRUE ); } - else if( HB_COMP_PARAM->iVarScope & VS_STATIC ) + else if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_STATIC ) { HB_EXPR_PTR pVar = hb_compExprNewVar( szName, HB_COMP_PARAM ); HB_EXPR_PTR pAssign; @@ -2412,8 +2412,8 @@ static void hb_compVariableDim( const char * szName, HB_EXPR_PTR pInitValue, HB_ { hb_compVariableAdd( HB_COMP_PARAM, szName, hb_compVarTypeNew( HB_COMP_PARAM, 'A', NULL ) ); HB_COMP_EXPR_FREE( hb_compArrayDimPush( pInitValue, HB_COMP_PARAM ) ); - if( HB_COMP_PARAM->iVarScope != VS_LOCAL || - !( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) ) + if( HB_COMP_PARAM->iVarScope != HB_VSCOMP_LOCAL || + !( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) ) { HB_COMP_EXPR_FREE( hb_compExprGenPop( hb_compExprNewVar( szName, HB_COMP_PARAM ), HB_COMP_PARAM ) ); } @@ -2563,7 +2563,7 @@ static void hb_compEnumEnd( HB_COMP_DECL, HB_EXPR_PTR pExpr ) static void hb_compSwitchStart( HB_COMP_DECL, HB_EXPR_PTR pExpr ) { HB_SWITCHCMD_PTR pSwitch = ( HB_SWITCHCMD_PTR ) hb_xgrab( sizeof( HB_SWITCHCMD ) ); - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; pSwitch->pCases = NULL; pSwitch->pLast = NULL; @@ -2577,9 +2577,9 @@ static void hb_compSwitchStart( HB_COMP_DECL, HB_EXPR_PTR pExpr ) static void hb_compSwitchAdd( HB_COMP_DECL, HB_EXPR_PTR pExpr ) { HB_SWITCHCASE_PTR pCase; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; - pFunc->funFlags &= ~FUN_BREAK_CODE; + pFunc->funFlags &= ~HB_FUNF_BREAK_CODE; if( pExpr ) { @@ -2647,7 +2647,7 @@ static void hb_compSwitchAdd( HB_COMP_DECL, HB_EXPR_PTR pExpr ) static void hb_compSwitchEnd( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_SWITCHCMD_PTR pSwitch = pFunc->pSwitch; HB_EXPR_PTR pExpr = pSwitch->pExpr; HB_SWITCHCASE_PTR pCase, pTmp; @@ -2749,7 +2749,7 @@ static void hb_compSwitchEnd( HB_COMP_DECL ) /* Release all switch statements */ -void hb_compSwitchKill( HB_COMP_DECL, PFUNCTION pFunc ) +void hb_compSwitchKill( HB_COMP_DECL, PHB_HFUNC pFunc ) { HB_SWITCHCASE_PTR pCase; HB_SWITCHCMD_PTR pSwitch; @@ -2830,7 +2830,7 @@ static HB_EXPR_PTR hb_compCheckMethod( HB_COMP_DECL, HB_EXPR_PTR pExpr ) /* ************************************************************************* */ -HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PFUNCTION pFunc ) +HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PHB_HFUNC pFunc ) { HB_BOOL fUnclosed = HB_TRUE; @@ -2869,10 +2869,10 @@ HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PFUNCTION pFunc ) hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_UNCLOSED_STRU, "BEGIN SEQUENCE", NULL ); pFunc->wSeqCounter = 0; } - else if( pFunc->funFlags & FUN_EXTBLOCK ) + else if( pFunc->funFlags & HB_FUNF_EXTBLOCK ) { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_UNCLOSED_STRU, "{||...}", NULL ); - pFunc->funFlags &= ~FUN_EXTBLOCK; + pFunc->funFlags &= ~HB_FUNF_EXTBLOCK; } else fUnclosed = HB_FALSE; diff --git a/harbour/src/compiler/harbour.yyc b/harbour/src/compiler/harbour.yyc index f8b48a1a68..e29b8382b6 100644 --- a/harbour/src/compiler/harbour.yyc +++ b/harbour/src/compiler/harbour.yyc @@ -4305,21 +4305,21 @@ yyreduce: /* Line 1806 of yacc.c */ #line 326 "harbour.y" - { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[(3) - (3)].string), ( HB_SYMBOLSCOPE ) (yyvsp[(1) - (3)].iNumber), FUN_PROCEDURE ); } + { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[(3) - (3)].string), ( HB_SYMBOLSCOPE ) (yyvsp[(1) - (3)].iNumber), HB_FUNF_PROCEDURE ); } break; case 23: /* Line 1806 of yacc.c */ #line 327 "harbour.y" - { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[(3) - (3)].string), ( HB_SYMBOLSCOPE ) (yyvsp[(1) - (3)].iNumber), 0 ); HB_COMP_PARAM->iVarScope = VS_PARAMETER; } + { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[(3) - (3)].string), ( HB_SYMBOLSCOPE ) (yyvsp[(1) - (3)].iNumber), 0 ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER; } break; case 25: /* Line 1806 of yacc.c */ #line 328 "harbour.y" - { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[(3) - (3)].string), ( HB_SYMBOLSCOPE ) (yyvsp[(1) - (3)].iNumber), FUN_PROCEDURE ); HB_COMP_PARAM->iVarScope = VS_PARAMETER;} + { hb_compFunctionAdd( HB_COMP_PARAM, (yyvsp[(3) - (3)].string), ( HB_SYMBOLSCOPE ) (yyvsp[(1) - (3)].iNumber), HB_FUNF_PROCEDURE ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER;} break; case 27: @@ -4522,28 +4522,28 @@ yyreduce: /* Line 1806 of yacc.c */ #line 383 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 61: /* Line 1806 of yacc.c */ #line 384 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 62: /* Line 1806 of yacc.c */ #line 385 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 63: /* Line 1806 of yacc.c */ #line 386 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 64: @@ -4554,7 +4554,7 @@ yyreduce: HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); else HB_COMP_EXPR_FREE( HB_COMP_ERROR_SYNTAX( (yyvsp[(1) - (2)].asExpr) ) ); - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; @@ -4562,49 +4562,49 @@ yyreduce: /* Line 1806 of yacc.c */ #line 393 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 66: /* Line 1806 of yacc.c */ #line 394 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 67: /* Line 1806 of yacc.c */ #line 395 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 68: /* Line 1806 of yacc.c */ #line 396 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 69: /* Line 1806 of yacc.c */ #line 397 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 70: /* Line 1806 of yacc.c */ #line 398 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 71: /* Line 1806 of yacc.c */ #line 399 "harbour.y" - { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; } + { HB_COMP_EXPR_FREE( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM ) ); HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; case 72: @@ -4612,7 +4612,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 400 "harbour.y" { hb_compGenBreak( HB_COMP_PARAM ); hb_compGenPCode2( HB_P_DOSHORT, 0, HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_BREAK_CODE; } + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } break; case 73: @@ -4629,7 +4629,7 @@ yyreduce: { hb_compGenBreak( HB_COMP_PARAM ); HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[(3) - (4)].asExpr), HB_COMP_PARAM ) ); hb_compGenPCode2( HB_P_DOSHORT, 1, HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } break; @@ -4637,14 +4637,14 @@ yyreduce: /* Line 1806 of yacc.c */ #line 408 "harbour.y" - { hb_compLoopExit( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= FUN_BREAK_CODE; } + { hb_compLoopExit( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } break; case 76: /* Line 1806 of yacc.c */ #line 409 "harbour.y" - { hb_compLoopLoop( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= FUN_BREAK_CODE; } + { hb_compLoopLoop( HB_COMP_PARAM ); HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_BREAK_CODE; } break; case 77: @@ -4657,11 +4657,11 @@ yyreduce: hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "RETURN", NULL ); } hb_compGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM ); - if( (HB_COMP_PARAM->functions.pLast->funFlags & FUN_PROCEDURE) == 0 ) + if( (HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_PROCEDURE) == 0 ) { /* return from a function without a return value */ hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_NO_RETURN_VALUE, NULL, NULL ); } - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_WITH_RETURN | FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE; } break; @@ -4683,16 +4683,16 @@ yyreduce: } /* TODO: check if return value agree with declared value */ HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[(3) - (4)].asExpr), HB_COMP_PARAM ) ); - if( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) + if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) /* extended clodeblock, use HB_P_ENDBLOCK to return value and stop execution */ hb_compGenPCode1( HB_P_ENDBLOCK, HB_COMP_PARAM ); else hb_compGenPCode2( HB_P_RETVALUE, HB_P_ENDPROC, HB_COMP_PARAM ); - if( HB_COMP_PARAM->functions.pLast->funFlags & FUN_PROCEDURE ) + if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_PROCEDURE ) { /* procedure returns a value */ hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_PROC_RETURN_VALUE, NULL, NULL ); } - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_WITH_RETURN | FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE; } break; @@ -4700,7 +4700,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 442 "harbour.y" - { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = VS_PUBLIC; } + { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PUBLIC; } break; case 81: @@ -4708,8 +4708,8 @@ yyreduce: /* Line 1806 of yacc.c */ #line 444 "harbour.y" { hb_compRTVariableGen( HB_COMP_PARAM, "__MVPUBLIC" ); - HB_COMP_PARAM->iVarScope = VS_NONE; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; @@ -4717,7 +4717,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 448 "harbour.y" - { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = VS_PRIVATE; } + { hb_compLinePushIfInside( HB_COMP_PARAM ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_PRIVATE; } break; case 84: @@ -4725,8 +4725,8 @@ yyreduce: /* Line 1806 of yacc.c */ #line 450 "harbour.y" { hb_compRTVariableGen( HB_COMP_PARAM, "__MVPRIVATE" ); - HB_COMP_PARAM->iVarScope = VS_NONE; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; @@ -6101,14 +6101,14 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1030 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (2)].asExpr), (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].asVarType)->cVarType, HB_COMP_PARAM ); } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (2)].asExpr), (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].asVarType)->cVarType, HB_COMP_PARAM ); } break; case 383: /* Line 1806 of yacc.c */ #line 1031 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (4)].asExpr), (yyvsp[(3) - (4)].string), (yyvsp[(4) - (4)].asVarType)->cVarType, HB_COMP_PARAM ); } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (4)].asExpr), (yyvsp[(3) - (4)].string), (yyvsp[(4) - (4)].asVarType)->cVarType, HB_COMP_PARAM ); } break; case 384: @@ -6149,7 +6149,7 @@ yyreduce: (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; (yyvsp[(2) - (2)].sNumber) = HB_COMP_PARAM->lastLine; hb_compCodeBlockStart( HB_COMP_PARAM, 0 ); - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_EXTBLOCK; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_EXTBLOCK; HB_COMP_PARAM->functions.pLast->fVParams = ( (yyvsp[(1) - (2)].asExpr)->value.asCodeblock.flags & HB_BLOCK_VPARAMS ) != 0; @@ -6161,7 +6161,7 @@ yyreduce: (yyvsp[(1) - (2)].asExpr)->nLength = 0; } - HB_COMP_PARAM->iVarScope = VS_PARAMETER; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER; pVar = (yyvsp[(1) - (2)].asExpr)->value.asCodeblock.pLocals; while( pVar ) { @@ -6217,33 +6217,33 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1103 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_LOCAL; hb_compLinePush( HB_COMP_PARAM ); } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; hb_compLinePush( HB_COMP_PARAM ); } break; case 399: /* Line 1806 of yacc.c */ #line 1105 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_STATIC; hb_compLinePush( HB_COMP_PARAM ); } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_STATIC; hb_compLinePush( HB_COMP_PARAM ); } break; case 401: /* Line 1806 of yacc.c */ #line 1107 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_TH_STATIC; hb_compLinePush( HB_COMP_PARAM ); } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_TH_STATIC; hb_compLinePush( HB_COMP_PARAM ); } break; case 403: /* Line 1806 of yacc.c */ #line 1109 "harbour.y" - { if( HB_COMP_PARAM->functions.pLast->funFlags & FUN_USES_LOCAL_PARAMS ) + { if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_USES_LOCAL_PARAMS ) hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_PARAMETERS_NOT_ALLOWED, NULL, NULL ); else { HB_COMP_PARAM->functions.pLast->wParamNum = 0; - HB_COMP_PARAM->iVarScope = ( VS_PRIVATE | VS_PARAMETER ); + HB_COMP_PARAM->iVarScope = ( HB_VSCOMP_PRIVATE | HB_VSCOMP_PARAMETER ); } } break; @@ -6252,7 +6252,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1116 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_NONE; } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } break; case 405: @@ -6315,17 +6315,17 @@ yyreduce: #line 1147 "harbour.y" { hb_compVariableAdd( HB_COMP_PARAM, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].asVarType) ); - if( HB_COMP_PARAM->iVarScope & VS_STATIC ) + if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_STATIC ) { hb_compStaticDefStart( HB_COMP_PARAM ); /* switch to statics pcode buffer */ hb_compStaticDefEnd( HB_COMP_PARAM, (yyvsp[(1) - (2)].string) ); } - else if( HB_COMP_PARAM->iVarScope == VS_PUBLIC || HB_COMP_PARAM->iVarScope == VS_PRIVATE ) + else if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_PUBLIC || HB_COMP_PARAM->iVarScope == HB_VSCOMP_PRIVATE ) { hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( (yyvsp[(1) - (2)].string), NULL, HB_COMP_PARAM ), HB_FALSE ); } - else if( HB_COMP_PARAM->iVarScope == VS_LOCAL && - ( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) ) + else if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_LOCAL && + ( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) ) { HB_COMP_EXPR_FREE( hb_compExprGenPush( hb_compExprNewNil( HB_COMP_PARAM ), HB_COMP_PARAM ) ); } @@ -6347,19 +6347,19 @@ yyreduce: #line 1168 "harbour.y" { HB_COMP_PARAM->iVarScope = (yyvsp[(3) - (5)].iNumber); - if( HB_COMP_PARAM->iVarScope & VS_STATIC ) + if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_STATIC ) { hb_compStaticDefStart( HB_COMP_PARAM ); /* switch to statics pcode buffer */ HB_COMP_EXPR_FREE( hb_compExprGenStatement( hb_compExprAssignStatic( hb_compExprNewVar( (yyvsp[(1) - (5)].string), HB_COMP_PARAM ), (yyvsp[(5) - (5)].asExpr), HB_COMP_PARAM ), HB_COMP_PARAM ) ); hb_compStaticDefEnd( HB_COMP_PARAM, (yyvsp[(1) - (5)].string) ); } - else if( HB_COMP_PARAM->iVarScope == VS_PUBLIC || HB_COMP_PARAM->iVarScope == VS_PRIVATE ) + else if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_PUBLIC || HB_COMP_PARAM->iVarScope == HB_VSCOMP_PRIVATE ) { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[(5) - (5)].asExpr), HB_COMP_PARAM ) ); hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( (yyvsp[(1) - (5)].string), NULL, HB_COMP_PARAM ), HB_TRUE ); } - else if( HB_COMP_PARAM->iVarScope == VS_LOCAL && - ( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) ) + else if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_LOCAL && + ( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) ) { HB_COMP_EXPR_FREE( hb_compExprGenPush( (yyvsp[(5) - (5)].asExpr), HB_COMP_PARAM ) ); } @@ -6403,7 +6403,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1207 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_FIELD; } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_FIELD; } break; case 422: @@ -6447,7 +6447,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1222 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_MEMVAR; } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_MEMVAR; } break; case 429: @@ -6491,7 +6491,7 @@ yyreduce: } } HB_COMP_PARAM->szDeclaredFun = NULL; - HB_COMP_PARAM->iVarScope = VS_NONE; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } break; @@ -6506,28 +6506,28 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1248 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_NONE; } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } break; case 435: /* Line 1806 of yacc.c */ #line 1249 "harbour.y" - { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, (yyvsp[(2) - (3)].string), NULL ); HB_COMP_PARAM->iVarScope = VS_NONE; } + { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, (yyvsp[(2) - (3)].string), NULL ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } break; case 436: /* Line 1806 of yacc.c */ #line 1250 "harbour.y" - { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].string) ); HB_COMP_PARAM->iVarScope = VS_NONE; } + { HB_COMP_PARAM->pLastClass = hb_compClassAdd( HB_COMP_PARAM, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].string) ); HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } break; case 437: /* Line 1806 of yacc.c */ #line 1251 "harbour.y" - { HB_COMP_PARAM->iVarScope = VS_NONE; } + { HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } break; case 438: @@ -6541,7 +6541,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1252 "harbour.y" - { HB_COMP_PARAM->cDataListType = 0; HB_COMP_PARAM->iVarScope = VS_NONE; } + { HB_COMP_PARAM->cDataListType = 0; HB_COMP_PARAM->iVarScope = HB_VSCOMP_NONE; } break; case 446: @@ -6656,7 +6656,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1362 "harbour.y" - { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(2) - (3)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(3) - (3)].asVarType)->cVarType + VT_OFFSET_BYREF, NULL ) ); } + { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(2) - (3)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(3) - (3)].asVarType)->cVarType + HB_VT_OFFSET_BYREF, NULL ) ); } break; case 466: @@ -6677,7 +6677,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1365 "harbour.y" - { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(4) - (5)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(5) - (5)].asVarType)->cVarType + VT_OFFSET_BYREF, NULL ) ); } + { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(4) - (5)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(5) - (5)].asVarType)->cVarType + HB_VT_OFFSET_BYREF, NULL ) ); } break; case 469: @@ -6691,42 +6691,42 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1369 "harbour.y" - { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(2) - (3)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(3) - (3)].asVarType)->cVarType + VT_OFFSET_OPTIONAL, NULL ) ); } + { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(2) - (3)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(3) - (3)].asVarType)->cVarType + HB_VT_OFFSET_OPTIONAL, NULL ) ); } break; case 471: /* Line 1806 of yacc.c */ #line 1370 "harbour.y" - { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(3) - (4)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(4) - (4)].asVarType)->cVarType + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF, NULL ) ); } + { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(3) - (4)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(4) - (4)].asVarType)->cVarType + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } break; case 472: /* Line 1806 of yacc.c */ #line 1371 "harbour.y" - { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(3) - (6)].string), hb_compVarTypeNew( HB_COMP_PARAM, 'F' + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF, NULL ) ); } + { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(3) - (6)].string), hb_compVarTypeNew( HB_COMP_PARAM, 'F' + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } break; case 473: /* Line 1806 of yacc.c */ #line 1372 "harbour.y" - { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(4) - (5)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(5) - (5)].asVarType)->cVarType + VT_OFFSET_OPTIONAL, NULL ) ); } + { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(4) - (5)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(5) - (5)].asVarType)->cVarType + HB_VT_OFFSET_OPTIONAL, NULL ) ); } break; case 474: /* Line 1806 of yacc.c */ #line 1373 "harbour.y" - { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(5) - (6)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(6) - (6)].asVarType)->cVarType + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF, NULL ) ); } + { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(5) - (6)].string), hb_compVarTypeNew( HB_COMP_PARAM, (yyvsp[(6) - (6)].asVarType)->cVarType + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } break; case 475: /* Line 1806 of yacc.c */ #line 1374 "harbour.y" - { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(5) - (8)].string), hb_compVarTypeNew( HB_COMP_PARAM, 'F' + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF, NULL ) ); } + { hb_compDeclaredParameterAdd( HB_COMP_PARAM, (yyvsp[(5) - (8)].string), hb_compVarTypeNew( HB_COMP_PARAM, 'F' + HB_VT_OFFSET_OPTIONAL + HB_VT_OFFSET_BYREF, NULL ) ); } break; case 484: @@ -6782,14 +6782,14 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1401 "harbour.y" - { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } + { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } break; case 493: /* Line 1806 of yacc.c */ #line 1405 "harbour.y" - { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } + { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } break; case 494: @@ -6814,7 +6814,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1415 "harbour.y" - { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } + { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; hb_compLinePush( HB_COMP_PARAM ); } break; case 497: @@ -6842,7 +6842,7 @@ yyreduce: { if( HB_COMP_PARAM->functions.pLast->wIfCounter ) --HB_COMP_PARAM->functions.pLast->wIfCounter; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } break; @@ -6866,7 +6866,7 @@ yyreduce: #line 1456 "harbour.y" { if( HB_COMP_PARAM->functions.pLast->wCaseCounter ) --HB_COMP_PARAM->functions.pLast->wCaseCounter; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } break; @@ -6911,7 +6911,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1484 "harbour.y" { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; (yyval.pVoid) = hb_compElseIfGen( HB_COMP_PARAM, NULL, hb_compGenJump( 0, HB_COMP_PARAM ) ); hb_compGenJumpHere( (yyvsp[(5) - (6)].sNumber), HB_COMP_PARAM ); } @@ -6939,7 +6939,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1496 "harbour.y" { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; (yyval.pVoid) = hb_compElseIfGen( HB_COMP_PARAM, (yyvsp[(1) - (7)].pVoid), hb_compGenJump( 0, HB_COMP_PARAM ) ); hb_compGenJumpHere( (yyvsp[(6) - (7)].sNumber), HB_COMP_PARAM ); } @@ -6956,7 +6956,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1503 "harbour.y" - { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } + { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } break; case 522: @@ -6995,7 +6995,7 @@ yyreduce: if( HB_COMP_PARAM->functions.pLast->wWhileCounter ) --HB_COMP_PARAM->functions.pLast->wWhileCounter; hb_compLoopEnd( HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_WITH_RETURN; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_WITH_RETURN; } break; @@ -7015,7 +7015,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1539 "harbour.y" - { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } + { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } break; case 531: @@ -7099,7 +7099,7 @@ yyreduce: if( hb_compExprAsSymbol( (yyvsp[(2) - (12)].asExpr) ) ) hb_compForEnd( HB_COMP_PARAM, hb_compExprAsSymbol( (yyvsp[(2) - (12)].asExpr) ) ); HB_COMP_EXPR_FREE( (yyvsp[(5) - (12)].asExpr) ); /* deletes $5, $2, $4 */ - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } break; @@ -7224,7 +7224,7 @@ yyreduce: hb_compGenJumpHere( (yyvsp[(9) - (10)].sNumber), HB_COMP_PARAM ); hb_compLoopEnd( HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); hb_compEnumEnd( HB_COMP_PARAM, (yyvsp[(2) - (10)].asExpr) ); HB_COMP_EXPR_FREE( (yyvsp[(2) - (10)].asExpr) ); HB_COMP_EXPR_FREE( (yyvsp[(4) - (10)].asExpr) ); @@ -7282,7 +7282,7 @@ yyreduce: { if( HB_COMP_PARAM->functions.pLast->wSwitchCounter ) --HB_COMP_PARAM->functions.pLast->wSwitchCounter; - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); } break; @@ -7342,7 +7342,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1756 "harbour.y" - { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } + { HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } break; case 577: @@ -7393,7 +7393,7 @@ yyreduce: #line 1790 "harbour.y" { /* 10 */ long lLoopCount = hb_compLoopCount( HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); if( (yyvsp[(9) - (9)].sNumber) ) { if( (yyvsp[(4) - (9)].lNumber) != lLoopCount ) @@ -7451,7 +7451,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1839 "harbour.y" { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( HB_FUNF_WITH_RETURN | HB_FUNF_BREAK_CODE ); (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; ++HB_COMP_PARAM->functions.pLast->wAlwaysCounter; hb_compSequenceAlways( HB_COMP_PARAM ); @@ -7462,7 +7462,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1847 "harbour.y" - { (yyval.sNumber) = 0; HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; } + { (yyval.sNumber) = 0; HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; } break; case 592: @@ -7470,7 +7470,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1853 "harbour.y" { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; if( HB_COMP_PARAM->functions.pLast->wSeqCounter ) --HB_COMP_PARAM->functions.pLast->wSeqCounter; @@ -7484,7 +7484,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1864 "harbour.y" { - HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CODE; + HB_COMP_PARAM->functions.pLast->funFlags &= ~ HB_FUNF_BREAK_CODE; (yyval.sNumber) = HB_COMP_PARAM->functions.pLast->nPCodePos; if( HB_COMP_PARAM->functions.pLast->wSeqCounter ) --HB_COMP_PARAM->functions.pLast->wSeqCounter; @@ -7867,7 +7867,7 @@ yyreturn: static void hb_compLoopStart( HB_COMP_DECL, HB_BOOL fCanLoop ) { HB_LOOPEXIT_PTR pLoop = ( HB_LOOPEXIT_PTR ) hb_xgrab( sizeof( HB_LOOPEXIT ) ); - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; if( pFunc->pLoops ) { @@ -7896,7 +7896,7 @@ static void hb_compLoopStart( HB_COMP_DECL, HB_BOOL fCanLoop ) static long hb_compLoopCount( HB_COMP_DECL ) { HB_LOOPEXIT_PTR pLastLoop, pLastExit, pLoop; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; long lCount = 0; pLastLoop = pLastExit = NULL; @@ -7935,7 +7935,7 @@ static long hb_compLoopCount( HB_COMP_DECL ) static void hb_compLoopLoop( HB_COMP_DECL ) { HB_LOOPEXIT_PTR pLast = NULL, pLoop; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; pLoop = pFunc->pLoops; while( pLoop ) @@ -7993,7 +7993,7 @@ static void hb_compLoopLoop( HB_COMP_DECL ) */ static void hb_compLoopExit( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; if( ! pFunc->pLoops ) { @@ -8049,7 +8049,7 @@ static void hb_compLoopExit( HB_COMP_DECL ) */ static void hb_compLoopHere( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_LOOPEXIT_PTR pLoop = pFunc->pLoops, pFree, pLast; if( pLoop ) @@ -8075,7 +8075,7 @@ static void hb_compLoopHere( HB_COMP_DECL ) */ static void hb_compLoopEnd( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_LOOPEXIT_PTR pLoop = pFunc->pLoops, pLast = pFunc->pLoops, pExit, pFree; if( pLoop ) @@ -8102,7 +8102,7 @@ static void hb_compLoopEnd( HB_COMP_DECL ) } } -void hb_compLoopKill( PFUNCTION pFunc ) +void hb_compLoopKill( PHB_HFUNC pFunc ) { HB_LOOPEXIT_PTR pLoop, pFree; @@ -8129,7 +8129,7 @@ void hb_compLoopKill( PFUNCTION pFunc ) static void * hb_compElseIfGen( HB_COMP_DECL, void * pFirst, HB_SIZE nOffset ) { HB_ELSEIF_PTR pElseIf = ( HB_ELSEIF_PTR ) hb_xgrab( sizeof( HB_ELSEIF ) ), pLast; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; pElseIf->nOffset = nOffset; pElseIf->pPrev = NULL; @@ -8170,7 +8170,7 @@ static void hb_compElseIfFix( HB_COMP_DECL, void * pFixElseIfs ) } } -void hb_compElseIfKill( PFUNCTION pFunc ) +void hb_compElseIfKill( PHB_HFUNC pFunc ) { HB_ELSEIF_PTR pFix; HB_ELSEIF_PTR pDel; @@ -8191,7 +8191,7 @@ void hb_compElseIfKill( PFUNCTION pFunc ) static void hb_compRTVariableAdd( HB_COMP_DECL, HB_EXPR_PTR pVar, HB_BOOL bPopInitValue ) { HB_RTVAR_PTR pRTvar = ( HB_RTVAR_PTR ) hb_xgrab( sizeof( HB_RTVAR ) ); - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; pRTvar->pVar = pVar; pRTvar->bPopValue = bPopInitValue; @@ -8213,7 +8213,7 @@ static void hb_compRTVariableAdd( HB_COMP_DECL, HB_EXPR_PTR pVar, HB_BOOL bPopIn static void hb_compRTVariableGen( HB_COMP_DECL, const char * szCreateFun ) { HB_USHORT usCount = 0; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_RTVAR_PTR pVar = pFunc->rtvars; HB_RTVAR_PTR pDel; @@ -8250,7 +8250,7 @@ static void hb_compRTVariableGen( HB_COMP_DECL, const char * szCreateFun ) pFunc->rtvars = NULL; } -void hb_compRTVariableKill( HB_COMP_DECL, PFUNCTION pFunc ) +void hb_compRTVariableKill( HB_COMP_DECL, PHB_HFUNC pFunc ) { HB_RTVAR_PTR pVar; @@ -8284,13 +8284,13 @@ static HB_EXPR_PTR hb_compArrayDimPush( HB_EXPR_PTR pInitValue, HB_COMP_DECL ) static void hb_compVariableDim( const char * szName, HB_EXPR_PTR pInitValue, HB_COMP_DECL ) { - if( HB_COMP_PARAM->iVarScope == VS_PUBLIC || HB_COMP_PARAM->iVarScope == VS_PRIVATE ) + if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_PUBLIC || HB_COMP_PARAM->iVarScope == HB_VSCOMP_PRIVATE ) { hb_compVariableAdd( HB_COMP_PARAM, szName, hb_compVarTypeNew( HB_COMP_PARAM, 'A', NULL ) ); HB_COMP_EXPR_FREE( hb_compArrayDimPush( pInitValue, HB_COMP_PARAM ) ); hb_compRTVariableAdd( HB_COMP_PARAM, hb_compExprNewRTVar( szName, NULL, HB_COMP_PARAM ), HB_TRUE ); } - else if( HB_COMP_PARAM->iVarScope & VS_STATIC ) + else if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_STATIC ) { HB_EXPR_PTR pVar = hb_compExprNewVar( szName, HB_COMP_PARAM ); HB_EXPR_PTR pAssign; @@ -8313,8 +8313,8 @@ static void hb_compVariableDim( const char * szName, HB_EXPR_PTR pInitValue, HB_ { hb_compVariableAdd( HB_COMP_PARAM, szName, hb_compVarTypeNew( HB_COMP_PARAM, 'A', NULL ) ); HB_COMP_EXPR_FREE( hb_compArrayDimPush( pInitValue, HB_COMP_PARAM ) ); - if( HB_COMP_PARAM->iVarScope != VS_LOCAL || - !( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) ) + if( HB_COMP_PARAM->iVarScope != HB_VSCOMP_LOCAL || + !( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) ) { HB_COMP_EXPR_FREE( hb_compExprGenPop( hb_compExprNewVar( szName, HB_COMP_PARAM ), HB_COMP_PARAM ) ); } @@ -8462,7 +8462,7 @@ static void hb_compEnumEnd( HB_COMP_DECL, HB_EXPR_PTR pExpr ) static void hb_compSwitchStart( HB_COMP_DECL, HB_EXPR_PTR pExpr ) { HB_SWITCHCMD_PTR pSwitch = (HB_SWITCHCMD_PTR) hb_xgrab( sizeof( HB_SWITCHCMD ) ); - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; pSwitch->pCases = NULL; pSwitch->pLast = NULL; @@ -8476,9 +8476,9 @@ static void hb_compSwitchStart( HB_COMP_DECL, HB_EXPR_PTR pExpr ) static void hb_compSwitchAdd( HB_COMP_DECL, HB_EXPR_PTR pExpr ) { HB_SWITCHCASE_PTR pCase; - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; - pFunc->funFlags &= ~FUN_BREAK_CODE; + pFunc->funFlags &= ~HB_FUNF_BREAK_CODE; if( pExpr ) { @@ -8546,7 +8546,7 @@ static void hb_compSwitchAdd( HB_COMP_DECL, HB_EXPR_PTR pExpr ) static void hb_compSwitchEnd( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_SWITCHCMD_PTR pSwitch = pFunc->pSwitch; HB_EXPR_PTR pExpr = pSwitch->pExpr; HB_SWITCHCASE_PTR pCase, pTmp; @@ -8648,7 +8648,7 @@ static void hb_compSwitchEnd( HB_COMP_DECL ) /* Release all switch statements */ -void hb_compSwitchKill( HB_COMP_DECL, PFUNCTION pFunc ) +void hb_compSwitchKill( HB_COMP_DECL, PHB_HFUNC pFunc ) { HB_SWITCHCASE_PTR pCase; HB_SWITCHCMD_PTR pSwitch; @@ -8729,7 +8729,7 @@ static HB_EXPR_PTR hb_compCheckMethod( HB_COMP_DECL, HB_EXPR_PTR pExpr ) /* ************************************************************************* */ -HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PFUNCTION pFunc ) +HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PHB_HFUNC pFunc ) { HB_BOOL fUnclosed = HB_TRUE; @@ -8768,10 +8768,10 @@ HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PFUNCTION pFunc ) hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_UNCLOSED_STRU, "BEGIN SEQUENCE", NULL ); pFunc->wSeqCounter = 0; } - else if( pFunc->funFlags & FUN_EXTBLOCK ) + else if( pFunc->funFlags & HB_FUNF_EXTBLOCK ) { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_UNCLOSED_STRU, "{||...}", NULL ); - pFunc->funFlags &= ~FUN_EXTBLOCK; + pFunc->funFlags &= ~HB_FUNF_EXTBLOCK; } else fUnclosed = HB_FALSE; diff --git a/harbour/src/compiler/hbdbginf.c b/harbour/src/compiler/hbdbginf.c index c0b83c59da..27c1624c47 100644 --- a/harbour/src/compiler/hbdbginf.c +++ b/harbour/src/compiler/hbdbginf.c @@ -58,13 +58,13 @@ PHB_DEBUGINFO hb_compGetDebugInfo( HB_COMP_DECL ) HB_SIZE nPos, nSkip, nOffset; HB_ULONG ulLine; const char * pszModuleName = "", * ptr; - PFUNCTION pFunc; + PHB_HFUNC pFunc; pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc ) { - if( ( pFunc->funFlags & FUN_FILE_DECL ) == 0 ) + if( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) == 0 ) { nPos = ulLine = 0; while( nPos < pFunc->nPCodePos ) diff --git a/harbour/src/compiler/hbdead.c b/harbour/src/compiler/hbdead.c index 038fbe17c5..7de3983200 100644 --- a/harbour/src/compiler/hbdead.c +++ b/harbour/src/compiler/hbdead.c @@ -545,7 +545,7 @@ static const PHB_CODETRACE_FUNC s_codeTraceFuncTable[] = hb_p_default /* HB_P_PUSHAPARAMS */ }; -void hb_compCodeTraceMarkDead( HB_COMP_DECL, PFUNCTION pFunc ) +void hb_compCodeTraceMarkDead( HB_COMP_DECL, PHB_HFUNC pFunc ) { const PHB_CODETRACE_FUNC * pFuncTable = s_codeTraceFuncTable; HB_CODETRACE_INFO code_info; diff --git a/harbour/src/compiler/hbfix.c b/harbour/src/compiler/hbfix.c index f573153a07..aed97f1b5e 100644 --- a/harbour/src/compiler/hbfix.c +++ b/harbour/src/compiler/hbfix.c @@ -332,7 +332,7 @@ static const HB_FIX_FUNC_PTR s_fixlocals_table[] = NULL /* HB_P_PUSHAPARAMS */ }; -void hb_compFixFuncPCode( HB_COMP_DECL, PFUNCTION pFunc ) +void hb_compFixFuncPCode( HB_COMP_DECL, PHB_HFUNC pFunc ) { const HB_FIX_FUNC_PTR * pFuncTable = s_fixlocals_table; HB_FIX_INFO fix_info; diff --git a/harbour/src/compiler/hbgenerr.c b/harbour/src/compiler/hbgenerr.c index a3d75674e0..324ab884ad 100644 --- a/harbour/src/compiler/hbgenerr.c +++ b/harbour/src/compiler/hbgenerr.c @@ -166,7 +166,7 @@ void hb_compGenError( HB_COMP_DECL, const char * const szErrors[], { if( ! HB_COMP_PARAM->fExit && ( cPrefix == 'F' || ! HB_COMP_PARAM->fError ) ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; hb_compDispMessage( HB_COMP_PARAM, cPrefix, iError, szErrors[ iError - 1 ], szError1, szError2 ); diff --git a/harbour/src/compiler/hblbl.c b/harbour/src/compiler/hblbl.c index 242509c55e..f2cbbf5de3 100644 --- a/harbour/src/compiler/hblbl.c +++ b/harbour/src/compiler/hblbl.c @@ -376,7 +376,7 @@ static const PHB_LABEL_FUNC s_GenLabelFuncTable[] = NULL /* HB_P_PUSHAPARAMS */ }; -void hb_compGenLabelTable( PFUNCTION pFunc, PHB_LABEL_INFO label_info ) +void hb_compGenLabelTable( PHB_HFUNC pFunc, PHB_LABEL_INFO label_info ) { const PHB_LABEL_FUNC * pFuncTable = s_GenLabelFuncTable; HB_SIZE nLabel = 0, n; diff --git a/harbour/src/compiler/hbmain.c b/harbour/src/compiler/hbmain.c index 68b70f8af5..0d1ac52cfd 100644 --- a/harbour/src/compiler/hbmain.c +++ b/harbour/src/compiler/hbmain.c @@ -55,7 +55,7 @@ #include "hbhash.h" static int hb_compCompile( HB_COMP_DECL, const char * szPrg, const char * szBuffer, int iStartLine ); -static HB_BOOL hb_compRegisterFunc( HB_COMP_DECL, PFUNCTION pFunc, HB_BOOL fError ); +static HB_BOOL hb_compRegisterFunc( HB_COMP_DECL, PHB_HFUNC pFunc, HB_BOOL fError ); /* ************************************************************************* */ @@ -345,7 +345,7 @@ const char * hb_compSymbolName( HB_COMP_DECL, HB_USHORT uiSymbol ) return NULL; } -static void hb_compCheckDuplVars( HB_COMP_DECL, PVAR pVar, const char * szVarName ) +static void hb_compCheckDuplVars( HB_COMP_DECL, PHB_HVAR pVar, const char * szVarName ) { while( pVar ) { @@ -359,7 +359,7 @@ static void hb_compCheckDuplVars( HB_COMP_DECL, PVAR pVar, const char * szVarNam } } -static HB_USHORT hb_compVarListAdd( PVAR * pVarLst, PVAR pVar ) +static HB_USHORT hb_compVarListAdd( PHB_HVAR * pVarLst, PHB_HVAR pVar ) { HB_USHORT uiVar = 1; @@ -375,17 +375,17 @@ static HB_USHORT hb_compVarListAdd( PVAR * pVarLst, PVAR pVar ) void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarType ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; - PVAR pVar; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HVAR pVar; HB_BOOL bFreeVar = HB_TRUE; - if( ( pFunc->funFlags & FUN_FILE_DECL ) != 0 && - ( HB_COMP_PARAM->iVarScope == VS_LOCAL || - HB_COMP_PARAM->iVarScope == ( VS_PRIVATE | VS_PARAMETER ) ) ) + if( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) != 0 && + ( HB_COMP_PARAM->iVarScope == HB_VSCOMP_LOCAL || + HB_COMP_PARAM->iVarScope == ( HB_VSCOMP_PRIVATE | HB_VSCOMP_PARAMETER ) ) ) { if( HB_COMP_PARAM->iStartProc == 2 && pFunc->szName[ 0 ] && hb_compRegisterFunc( HB_COMP_PARAM, pFunc, HB_FALSE ) ) - pFunc->funFlags &= ~FUN_FILE_DECL; + pFunc->funFlags &= ~HB_FUNF_FILE_DECL; else { /* Variable declaration is outside of function/procedure body. @@ -398,22 +398,22 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT /* check if we are declaring local/static variable after some * executable statements */ - if( pFunc->funFlags & FUN_STATEMENTS ) + if( pFunc->funFlags & HB_FUNF_STATEMENTS ) { const char * szVarScope; switch( HB_COMP_PARAM->iVarScope ) { - case VS_LOCAL: + case HB_VSCOMP_LOCAL: szVarScope = "LOCAL"; break; - case VS_STATIC: - case VS_TH_STATIC: + case HB_VSCOMP_STATIC: + case HB_VSCOMP_TH_STATIC: szVarScope = "STATIC"; break; - case VS_FIELD: + case HB_VSCOMP_FIELD: szVarScope = "FIELD"; break; - case VS_MEMVAR: + case HB_VSCOMP_MEMVAR: szVarScope = "MEMVAR"; break; default: @@ -435,35 +435,35 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT /* NOTE: Clipper warns if PARAMETER variable duplicates the MEMVAR * declaration */ - if( ! ( HB_COMP_PARAM->iVarScope == VS_PRIVATE || - HB_COMP_PARAM->iVarScope == VS_PUBLIC ) ) + if( ! ( HB_COMP_PARAM->iVarScope == HB_VSCOMP_PRIVATE || + HB_COMP_PARAM->iVarScope == HB_VSCOMP_PUBLIC ) ) hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pMemvars, szVarName ); } - else if( pFunc->funFlags & FUN_EXTBLOCK ) + else if( pFunc->funFlags & HB_FUNF_EXTBLOCK ) { /* variable defined in an extended codeblock */ hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pFields, szVarName ); hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pStatics, szVarName ); } - else if( HB_COMP_PARAM->iVarScope != VS_PARAMETER ) + else if( HB_COMP_PARAM->iVarScope != HB_VSCOMP_PARAMETER ) { char buffer[ 80 ]; hb_snprintf( buffer, sizeof( buffer ), "Wrong type of codeblock parameter, is: %d, should be: %d\n", - HB_COMP_PARAM->iVarScope, VS_PARAMETER ); + HB_COMP_PARAM->iVarScope, HB_VSCOMP_PARAMETER ); hb_compOutErr( HB_COMP_PARAM, buffer ); /* variable defined in a codeblock */ - HB_COMP_PARAM->iVarScope = VS_PARAMETER; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_PARAMETER; } hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pLocals, szVarName ); - pVar = ( PVAR ) hb_xgrab( sizeof( VAR ) ); + pVar = ( PHB_HVAR ) hb_xgrab( sizeof( HB_HVAR ) ); pVar->szName = szVarName; pVar->szAlias = NULL; pVar->uiFlags = 0; pVar->cType = pVarType->cVarType; - pVar->iUsed = VU_NOT_USED; + pVar->iUsed = HB_VU_NOT_USED; pVar->pNext = NULL; pVar->iDeclLine = HB_COMP_PARAM->currLine; @@ -478,15 +478,15 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT } } - if( HB_COMP_PARAM->iVarScope & VS_PARAMETER ) - pVar->iUsed = VU_INITIALIZED; + if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_PARAMETER ) + pVar->iUsed = HB_VU_INITIALIZED; - if( HB_COMP_PARAM->iVarScope & VS_MEMVAR ) + if( HB_COMP_PARAM->iVarScope & HB_VSCOMP_MEMVAR ) { PHB_HSYMBOL pSym; HB_USHORT wPos; - if( HB_COMP_PARAM->fAutoMemvarAssume || HB_COMP_PARAM->iVarScope == VS_MEMVAR ) + if( HB_COMP_PARAM->fAutoMemvarAssume || HB_COMP_PARAM->iVarScope == HB_VSCOMP_MEMVAR ) { /* add this variable to the list of MEMVAR variables */ @@ -499,11 +499,11 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT switch( HB_COMP_PARAM->iVarScope ) { - case VS_MEMVAR: + case HB_VSCOMP_MEMVAR: /* variable declared in MEMVAR statement */ break; - case ( VS_PARAMETER | VS_PRIVATE ): + case ( HB_VSCOMP_PARAMETER | HB_VSCOMP_PRIVATE ): if( ++pFunc->wParamNum > pFunc->wParamCount ) pFunc->wParamCount = pFunc->wParamNum; @@ -516,7 +516,7 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT if( HB_COMP_PARAM->iWarnings >= 3 && bFreeVar ) { - PVAR pMemVar = pFunc->pMemvars; + PHB_HVAR pMemVar = pFunc->pMemvars; while( pMemVar && strcmp( pMemVar->szName, pVar->szName ) != 0 ) pMemVar = pMemVar->pNext; /* Not declared as memvar. */ @@ -531,7 +531,7 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT hb_xfree( pVar ); break; - case VS_PRIVATE: + case HB_VSCOMP_PRIVATE: pSym = hb_compSymbolFind( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR ); /* check if symbol exists already */ if( ! pSym ) pSym = hb_compSymbolAdd( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR ); @@ -539,7 +539,7 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT if( HB_COMP_PARAM->iWarnings >= 3 && bFreeVar ) { - PVAR pMemVar = pFunc->pMemvars; + PHB_HVAR pMemVar = pFunc->pMemvars; while( pMemVar && strcmp( pMemVar->szName, pVar->szName ) != 0 ) pMemVar = pMemVar->pNext; /* Not declared as memvar. */ @@ -554,7 +554,7 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT hb_xfree( pVar ); break; - case VS_PUBLIC: + case HB_VSCOMP_PUBLIC: pSym = hb_compSymbolFind( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR ); /* check if symbol exists already */ if( ! pSym ) pSym = hb_compSymbolAdd( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR ); @@ -568,15 +568,15 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT { switch( HB_COMP_PARAM->iVarScope ) { - case VS_LOCAL: - case VS_PARAMETER: + case HB_VSCOMP_LOCAL: + case HB_VSCOMP_PARAMETER: { HB_USHORT wLocal = hb_compVarListAdd( &pFunc->pLocals, pVar ); - if( HB_COMP_PARAM->iVarScope == VS_PARAMETER ) + if( HB_COMP_PARAM->iVarScope == HB_VSCOMP_PARAMETER ) { ++pFunc->wParamCount; - pFunc->funFlags |= FUN_USES_LOCAL_PARAMS; + pFunc->funFlags |= HB_FUNF_USES_LOCAL_PARAMS; } if( HB_COMP_PARAM->fDebugInfo ) { @@ -585,14 +585,14 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT } break; } - case VS_TH_STATIC: - pVar->uiFlags = VS_THREAD; - case VS_STATIC: + case HB_VSCOMP_TH_STATIC: + pVar->uiFlags = HB_VSCOMP_THREAD; + case HB_VSCOMP_STATIC: ++HB_COMP_PARAM->iStaticCnt; hb_compVarListAdd( &pFunc->pStatics, pVar ); break; - case VS_FIELD: + case HB_VSCOMP_FIELD: hb_compVarListAdd( &pFunc->pFields, pVar ); break; } @@ -606,7 +606,7 @@ void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarT */ void hb_compFieldSetAlias( HB_COMP_DECL, const char * szAlias, int iField ) { - PVAR pVar; + PHB_HVAR pVar; pVar = HB_COMP_PARAM->functions.pLast->pFields; while( iField-- && pVar ) @@ -625,7 +625,7 @@ void hb_compFieldSetAlias( HB_COMP_DECL, const char * szAlias, int iField ) int hb_compFieldsCount( HB_COMP_DECL ) { int iFields = 0; - PVAR pVar = HB_COMP_PARAM->functions.pLast->pFields; + PHB_HVAR pVar = HB_COMP_PARAM->functions.pLast->pFields; while( pVar ) { @@ -636,7 +636,7 @@ int hb_compFieldsCount( HB_COMP_DECL ) return iFields; } -static PVAR hb_compVariableGet( PVAR pVars, const char * szVarName, int * piPos ) +static PHB_HVAR hb_compVariableGet( PHB_HVAR pVars, const char * szVarName, int * piPos ) { int iVar = 1; @@ -644,7 +644,7 @@ static PVAR hb_compVariableGet( PVAR pVars, const char * szVarName, int * piPos { if( pVars->szName && ! strcmp( pVars->szName, szVarName ) ) { - pVars->iUsed |= VU_USED; + pVars->iUsed |= HB_VU_USED; *piPos = iVar; return pVars; } @@ -655,7 +655,7 @@ static PVAR hb_compVariableGet( PVAR pVars, const char * szVarName, int * piPos } /* returns variable pointer if defined or NULL */ -static PVAR hb_compVariableGetVar( PVAR pVars, HB_USHORT wOrder ) +static PHB_HVAR hb_compVariableGetVar( PHB_HVAR pVars, HB_USHORT wOrder ) { while( pVars && --wOrder ) pVars = pVars->pNext; @@ -663,7 +663,7 @@ static PVAR hb_compVariableGetVar( PVAR pVars, HB_USHORT wOrder ) } /* returns the order + 1 of a variable if defined or zero */ -static HB_USHORT hb_compVariableGetPos( PVAR pVars, const char * szVarName ) +static HB_USHORT hb_compVariableGetPos( PHB_HVAR pVars, const char * szVarName ) { HB_USHORT wVar = 1; @@ -671,7 +671,7 @@ static HB_USHORT hb_compVariableGetPos( PVAR pVars, const char * szVarName ) { if( pVars->szName && ! strcmp( pVars->szName, szVarName ) ) { - pVars->iUsed |= VU_USED; + pVars->iUsed |= HB_VU_USED; return wVar; } pVars = pVars->pNext; @@ -680,11 +680,11 @@ static HB_USHORT hb_compVariableGetPos( PVAR pVars, const char * szVarName ) return 0; } -PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int * piScope ) +PHB_HVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int * piScope ) { - PFUNCTION pFunc, pGlobal, pOutBlock = NULL; + PHB_HFUNC pFunc, pGlobal, pOutBlock = NULL; HB_BOOL fStatic = HB_FALSE, fBlock = HB_FALSE, fGlobal = HB_FALSE; - PVAR pVar = NULL; + PHB_HVAR pVar = NULL; int iPos = 0, iScope = 0, iLevel = 0; if( piPos ) @@ -700,7 +700,7 @@ PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int pFunc = HB_COMP_PARAM->functions.pLast; pGlobal = ( HB_COMP_PARAM->pDeclFunc && HB_COMP_PARAM->pDeclFunc != pFunc && - ( HB_COMP_PARAM->pDeclFunc->funFlags & FUN_FILE_DECL ) ) + ( HB_COMP_PARAM->pDeclFunc->funFlags & HB_FUNF_FILE_DECL ) ) ? HB_COMP_PARAM->pDeclFunc : NULL; while( pFunc ) @@ -759,12 +759,12 @@ PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int szVarName = pVar->szName; /* this variable was not referenced yet - add it to the list */ - pVar = ( PVAR ) hb_xgrab( sizeof( VAR ) ); + pVar = ( PHB_HVAR ) hb_xgrab( sizeof( HB_HVAR ) ); pVar->szName = szVarName; pVar->szAlias = NULL; pVar->cType = ' '; - pVar->iUsed = VU_NOT_USED; + pVar->iUsed = HB_VU_NOT_USED; pVar->pNext = NULL; pVar->iDeclLine = HB_COMP_PARAM->currLine; /* Use negative order to signal that we are accessing a local @@ -818,7 +818,7 @@ PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_OUTER_VAR, szVarName, NULL ); } } - else if( pFunc->funFlags & FUN_EXTBLOCK ) + else if( pFunc->funFlags & HB_FUNF_EXTBLOCK ) { /* extended codeblock */ /* check static variables */ @@ -870,11 +870,11 @@ PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int } /* return local variable name using its order after final fixing */ -const char * hb_compLocalVariableName( PFUNCTION pFunc, HB_USHORT wVar ) +const char * hb_compLocalVariableName( PHB_HFUNC pFunc, HB_USHORT wVar ) { - PVAR pVar; + PHB_HVAR pVar; - if( pFunc->wParamCount && ! ( pFunc->funFlags & FUN_USES_LOCAL_PARAMS ) ) + if( pFunc->wParamCount && ! ( pFunc->funFlags & HB_FUNF_USES_LOCAL_PARAMS ) ) wVar -= pFunc->wParamCount; pVar = hb_compVariableGetVar( pFunc->pLocals, wVar ); @@ -883,8 +883,8 @@ const char * hb_compLocalVariableName( PFUNCTION pFunc, HB_USHORT wVar ) const char * hb_compStaticVariableName( HB_COMP_DECL, HB_USHORT wVar ) { - PVAR pVar; - PFUNCTION pTmp = HB_COMP_PARAM->functions.pFirst; + PHB_HVAR pVar; + PHB_HFUNC pTmp = HB_COMP_PARAM->functions.pFirst; while( pTmp->pNext && pTmp->pNext->iStaticsBase < wVar ) pTmp = pTmp->pNext; @@ -1314,7 +1314,7 @@ PHB_VARTYPE hb_compVarTypeNew( HB_COMP_DECL, char cVarType, const char* szFromCl /* - * FUNCTIONS + * Functions */ static int hb_compSort_HB_SIZE( const void * pLeft, const void * pRight ) @@ -1656,7 +1656,7 @@ static void hb_compOptimizeJumps( HB_COMP_DECL ) } } -static void hb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc ) +static void hb_compOptimizeFrames( HB_COMP_DECL, PHB_HFUNC pFunc ) { HB_USHORT w; @@ -1679,7 +1679,7 @@ static void hb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc ) /* NOTE: For some reason this will not work for the static init function, so I'm using an ugly hack instead. [vszakats] */ -/* if( !( pFunc->funFlags & FUN_USES_STATICS ) ) */ +/* if( !( pFunc->funFlags & HB_FUNF_USES_STATICS ) ) */ if( pFunc->pCode[ 8 ] == HB_P_ENDPROC ) { pFunc->nPCodePos -= 3; @@ -1687,18 +1687,18 @@ static void hb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc ) } else /* Check Global Statics. */ { - /* PVAR pVar = pFunc->pStatics; */ - PVAR pVar = HB_COMP_PARAM->functions.pFirst->pStatics; + /* PHB_HVAR pVar = pFunc->pStatics; */ + PHB_HVAR pVar = HB_COMP_PARAM->functions.pFirst->pStatics; while( pVar ) { /*printf( "\nChecking: %s Used: %i\n", pVar->szName, pVar->iUsed );*/ - if( ! ( pVar->iUsed & VU_USED ) && ( pVar->iUsed & VU_INITIALIZED ) ) + if( ! ( pVar->iUsed & HB_VU_USED ) && ( pVar->iUsed & HB_VU_INITIALIZED ) ) hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_VAL_NOT_USED, pVar->szName, NULL ); /* May have been initialized in previous execution of the function. - else if( ( pVar->iUsed & VU_USED ) && ! ( pVar->iUsed & VU_INITIALIZED ) ) + else if( ( pVar->iUsed & HB_VU_USED ) && ! ( pVar->iUsed & HB_VU_INITIALIZED ) ) hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_NOT_INITIALIZED, pVar->szName, NULL ); */ pVar = pVar->pNext; @@ -1708,7 +1708,7 @@ static void hb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc ) } else if( pFunc->pCode[ 0 ] == HB_P_FRAME && pFunc->pCode[ 3 ] == HB_P_SFRAME ) { - PVAR pLocal; + PHB_HVAR pLocal; int iLocals = 0, iOffset = 0; HB_BOOL bSkipFRAME; HB_BOOL bSkipSFRAME; @@ -1721,7 +1721,7 @@ static void hb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc ) iLocals++; } - if( pFunc->funFlags & FUN_USES_STATICS ) + if( pFunc->funFlags & HB_FUNF_USES_STATICS ) { hb_compSymbolFind( HB_COMP_PARAM, HB_COMP_PARAM->pInitFunc->szName, &w, HB_SYM_FUNCNAME ); pFunc->pCode[ 4 ] = HB_LOBYTE( w ); @@ -1736,7 +1736,7 @@ static void hb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc ) /* Parameters declared with PARAMETERS statement are not * placed in the local variable list. */ - if( pFunc->funFlags & FUN_USES_LOCAL_PARAMS ) + if( pFunc->funFlags & HB_FUNF_USES_LOCAL_PARAMS ) iLocals -= pFunc->wParamCount; if( iLocals > 255 ) @@ -1809,11 +1809,11 @@ static void hb_compWarnUnusedVar( HB_COMP_DECL, const char * szFuncName, static void hb_compFinalizeFunction( HB_COMP_DECL ) /* fixes all last defined function returns jumps offsets */ { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; if( pFunc ) { - if( ( pFunc->funFlags & FUN_WITH_RETURN ) == 0 ) + if( ( pFunc->funFlags & HB_FUNF_WITH_RETURN ) == 0 ) { /* The last statement in a function/procedure was not a RETURN * Generate end-of-procedure pcode @@ -1829,14 +1829,14 @@ static void hb_compFinalizeFunction( HB_COMP_DECL ) /* fixes all last defined fu hb_compLoopKill( pFunc ); if( HB_COMP_PARAM->iWarnings && - ( pFunc->funFlags & FUN_FILE_DECL ) == 0 ) + ( pFunc->funFlags & HB_FUNF_FILE_DECL ) == 0 ) { - PVAR pVar; + PHB_HVAR pVar; pVar = pFunc->pLocals; while( pVar ) { - if( pVar->szName && ( pVar->iUsed & VU_USED ) == 0 ) + if( pVar->szName && ( pVar->iUsed & HB_VU_USED ) == 0 ) hb_compWarnUnusedVar( HB_COMP_PARAM, pFunc->szName, pVar->szName, pVar->iDeclLine ); pVar = pVar->pNext; } @@ -1844,22 +1844,22 @@ static void hb_compFinalizeFunction( HB_COMP_DECL ) /* fixes all last defined fu pVar = pFunc->pStatics; while( pVar ) { - if( pVar->szName && ( pVar->iUsed & VU_USED ) == 0 ) + if( pVar->szName && ( pVar->iUsed & HB_VU_USED ) == 0 ) hb_compWarnUnusedVar( HB_COMP_PARAM, pFunc->szName, pVar->szName, pVar->iDeclLine ); pVar = pVar->pNext; } /* Check if the function returned some value */ - if( ( pFunc->funFlags & FUN_WITH_RETURN ) == 0 && - ( pFunc->funFlags & FUN_PROCEDURE ) == 0 ) + if( ( pFunc->funFlags & HB_FUNF_WITH_RETURN ) == 0 && + ( pFunc->funFlags & HB_FUNF_PROCEDURE ) == 0 ) hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_FUN_WITH_NO_RETURN, pFunc->szName, NULL ); } if( ! pFunc->bError ) { - if( pFunc->wParamCount && ( pFunc->funFlags & FUN_USES_LOCAL_PARAMS ) == 0 ) + if( pFunc->wParamCount && ( pFunc->funFlags & HB_FUNF_USES_LOCAL_PARAMS ) == 0 ) { /* There was a PARAMETERS statement used. * NOTE: This fixes local variables references in a case when @@ -1882,14 +1882,14 @@ static void hb_compFinalizeFunction( HB_COMP_DECL ) /* fixes all last defined fu } /* - * This function creates and initialises the _FUNC structure + * This function creates and initialises the HB_HFUNC structure */ -static PFUNCTION hb_compFunctionNew( HB_COMP_DECL, const char * szName, HB_SYMBOLSCOPE cScope ) +static PHB_HFUNC hb_compFunctionNew( HB_COMP_DECL, const char * szName, HB_SYMBOLSCOPE cScope ) { - PFUNCTION pFunc; + PHB_HFUNC pFunc; - pFunc = ( PFUNCTION ) hb_xgrab( sizeof( _FUNC ) ); - memset( pFunc, 0, sizeof( _FUNC ) ); + pFunc = ( PHB_HFUNC ) hb_xgrab( sizeof( HB_HFUNC ) ); + memset( pFunc, 0, sizeof( HB_HFUNC ) ); pFunc->szName = szName; pFunc->cScope = cScope; @@ -1919,11 +1919,11 @@ static PHB_HINLINE hb_compInlineNew( HB_COMP_DECL, const char * szName, int iLin } /* NOTE: Names of variables and functions are released in hbident.c on exit */ -static PFUNCTION hb_compFunctionKill( HB_COMP_DECL, PFUNCTION pFunc ) +static PHB_HFUNC hb_compFunctionKill( HB_COMP_DECL, PHB_HFUNC pFunc ) { - PFUNCTION pNext = pFunc->pNext; + PHB_HFUNC pNext = pFunc->pNext; HB_ENUMERATOR_PTR pEVar; - PVAR pVar; + PHB_HVAR pVar; hb_compRTVariableKill( HB_COMP_PARAM, pFunc ); hb_compSwitchKill( HB_COMP_PARAM, pFunc ); @@ -2002,7 +2002,7 @@ static PFUNCTION hb_compFunctionKill( HB_COMP_DECL, PFUNCTION pFunc ) */ void hb_compExternAdd( HB_COMP_DECL, const char * szExternName, HB_SYMBOLSCOPE cScope ) /* defines a new extern name */ { - PEXTERN * pExtern; + PHB_HEXTERN * pExtern; if( strcmp( "_GET_", szExternName ) == 0 ) { @@ -2022,19 +2022,19 @@ void hb_compExternAdd( HB_COMP_DECL, const char * szExternName, HB_SYMBOLSCOPE c ( *pExtern )->cScope |= cScope; else { - *pExtern = ( PEXTERN ) hb_xgrab( sizeof( _EXTERN ) ); + *pExtern = ( PHB_HEXTERN ) hb_xgrab( sizeof( HB_HEXTERN ) ); ( *pExtern )->szName = szExternName; ( *pExtern )->cScope = cScope; ( *pExtern )->pNext = NULL; } } -static void hb_compAddFunc( HB_COMP_DECL, PFUNCTION pFunc ) +static void hb_compAddFunc( HB_COMP_DECL, PHB_HFUNC pFunc ) { while( HB_COMP_PARAM->functions.pLast && ! HB_COMP_PARAM->functions.pLast->szName ) { - PFUNCTION pBlock = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pBlock = HB_COMP_PARAM->functions.pLast; HB_COMP_PARAM->functions.pLast = pBlock->pOwner; hb_compFunctionKill( HB_COMP_PARAM, pBlock ); } @@ -2047,9 +2047,9 @@ static void hb_compAddFunc( HB_COMP_DECL, PFUNCTION pFunc ) HB_COMP_PARAM->functions.iCount++; } -static PFUNCTION hb_compFunctionFind( HB_COMP_DECL, const char * szName, HB_BOOL fLocal ) +static PHB_HFUNC hb_compFunctionFind( HB_COMP_DECL, const char * szName, HB_BOOL fLocal ) { - PFUNCTION pFunc; + PHB_HFUNC pFunc; if( HB_COMP_PARAM->iModulesCount <= 1 ) { @@ -2064,7 +2064,7 @@ static PFUNCTION hb_compFunctionFind( HB_COMP_DECL, const char * szName, HB_BOOL if( pFunc == HB_COMP_PARAM->pDeclFunc ) fLocal = HB_TRUE; - if( ( pFunc->funFlags & FUN_FILE_DECL ) == 0 && + if( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) == 0 && ( fLocal || ( pFunc->cScope & ( HB_FS_STATIC | HB_FS_INITEXIT ) ) == 0 ) && strcmp( pFunc->szName, szName ) == 0 ) break; @@ -2076,7 +2076,7 @@ static PFUNCTION hb_compFunctionFind( HB_COMP_DECL, const char * szName, HB_BOOL static HB_BOOL hb_compIsModuleFunc( HB_COMP_DECL, const char * szFunctionName ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc ) { @@ -2092,14 +2092,14 @@ static void hb_compUpdateFunctionNames( HB_COMP_DECL ) { if( HB_COMP_PARAM->iModulesCount > 1 ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc ) { if( ( pFunc->cScope & ( HB_FS_STATIC | HB_FS_INITEXIT ) ) != 0 ) { HB_BOOL fGlobal = HB_FALSE; - PFUNCTION pSeek = HB_COMP_PARAM->functions.pFirst; + PHB_HFUNC pSeek = HB_COMP_PARAM->functions.pFirst; while( pSeek ) { @@ -2133,7 +2133,7 @@ static HB_BOOL hb_compCheckReservedNames( HB_COMP_DECL, const char * szFunName, return HB_FALSE; } -static HB_BOOL hb_compRegisterFunc( HB_COMP_DECL, PFUNCTION pFunc, HB_BOOL fError ) +static HB_BOOL hb_compRegisterFunc( HB_COMP_DECL, PHB_HFUNC pFunc, HB_BOOL fError ) { if( hb_compFunctionFind( HB_COMP_PARAM, pFunc->szName, ( pFunc->cScope & HB_FS_STATIC ) != 0 ) ) @@ -2161,11 +2161,11 @@ static HB_BOOL hb_compRegisterFunc( HB_COMP_DECL, PFUNCTION pFunc, HB_BOOL fErro * Stores a Clipper defined function/procedure * szFunName - name of a function * cScope - scope of a function - * iType - FUN_PROCEDURE if a procedure or 0 + * iType - HB_FUNF_PROCEDURE if a procedure or 0 */ void hb_compFunctionAdd( HB_COMP_DECL, const char * szFunName, HB_SYMBOLSCOPE cScope, int iType ) { - PFUNCTION pFunc; + PHB_HFUNC pFunc; hb_compFinalizeFunction( HB_COMP_PARAM ); /* fix all previous function returns offsets */ @@ -2186,10 +2186,10 @@ void hb_compFunctionAdd( HB_COMP_DECL, const char * szFunName, HB_SYMBOLSCOPE cS pFunc = hb_compFunctionNew( HB_COMP_PARAM, szFunName, cScope ); pFunc->funFlags |= iType; - if( ( iType & FUN_FILE_DECL ) == 0 ) + if( ( iType & HB_FUNF_FILE_DECL ) == 0 ) hb_compRegisterFunc( HB_COMP_PARAM, pFunc, HB_TRUE ); - if( ( iType & ( FUN_FILE_DECL | FUN_FILE_FIRST ) ) != 0 ) + if( ( iType & ( HB_FUNF_FILE_DECL | HB_FUNF_FILE_FIRST ) ) != 0 ) HB_COMP_PARAM->pDeclFunc = pFunc; hb_compAddFunc( HB_COMP_PARAM, pFunc ); @@ -2209,7 +2209,7 @@ void hb_compFunctionAdd( HB_COMP_DECL, const char * szFunName, HB_SYMBOLSCOPE cS */ static void hb_compAnnounce( HB_COMP_DECL, const char * szFunName ) { - PFUNCTION pFunc; + PHB_HFUNC pFunc; /* Clipper call this function after compiling .prg module where ANNOUNCE * symbol was deined not after compiling all .prg modules and search for @@ -2238,7 +2238,7 @@ static void hb_compAnnounce( HB_COMP_DECL, const char * szFunName ) /* create a new procedure */ pFunc = hb_compFunctionNew( HB_COMP_PARAM, szFunName, HB_FS_LOCAL ); - pFunc->funFlags |= FUN_PROCEDURE; + pFunc->funFlags |= HB_FUNF_PROCEDURE; pSym = hb_compSymbolFind( HB_COMP_PARAM, szFunName, NULL, HB_SYM_FUNCNAME ); if( ! pSym ) @@ -2303,7 +2303,7 @@ void hb_compGenBreak( HB_COMP_DECL ) /* generates the symbols for the EXTERN names */ static void hb_compExternGen( HB_COMP_DECL ) { - PEXTERN pDelete; + PHB_HEXTERN pDelete; while( HB_COMP_PARAM->externs ) { @@ -2325,7 +2325,7 @@ static void hb_compExternGen( HB_COMP_DECL ) } } -static void hb_compNOOPadd( PFUNCTION pFunc, HB_SIZE nPos ) +static void hb_compNOOPadd( PHB_HFUNC pFunc, HB_SIZE nPos ) { pFunc->pCode[ nPos ] = HB_P_NOOP; @@ -2338,7 +2338,7 @@ static void hb_compNOOPadd( PFUNCTION pFunc, HB_SIZE nPos ) static void hb_compPrepareJumps( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; if( pFunc->nJumps ) pFunc->pJumps = ( HB_SIZE * ) hb_xrealloc( pFunc->pJumps, sizeof( HB_SIZE ) * ( pFunc->nJumps + 1 ) ); @@ -2413,12 +2413,12 @@ void hb_compLinePush( HB_COMP_DECL ) /* generates the pcode with the currently c } } - if( HB_COMP_PARAM->functions.pLast->funFlags & FUN_BREAK_CODE ) + if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_BREAK_CODE ) { /* previous line contained RETURN/BREAK/LOOP/EXIT statement */ hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_UNREACHABLE, NULL, NULL ); /* clear RETURN/BREAK flag */ - HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( /*FUN_WITH_RETURN |*/ FUN_BREAK_CODE ); + HB_COMP_PARAM->functions.pLast->funFlags &= ~ ( /*HB_FUNF_WITH_RETURN |*/ HB_FUNF_BREAK_CODE ); } } @@ -2427,19 +2427,19 @@ void hb_compLinePush( HB_COMP_DECL ) /* generates the pcode with the currently c */ void hb_compStatmentStart( HB_COMP_DECL ) { - if( ( HB_COMP_PARAM->functions.pLast->funFlags & FUN_STATEMENTS ) == 0 ) + if( ( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_STATEMENTS ) == 0 ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; - if( ( pFunc->funFlags & FUN_FILE_DECL ) != 0 ) + if( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) != 0 ) { if( HB_COMP_PARAM->iStartProc == 2 && pFunc->szName[ 0 ] && hb_compRegisterFunc( HB_COMP_PARAM, pFunc, HB_FALSE ) ) - pFunc->funFlags &= ~FUN_FILE_DECL; + pFunc->funFlags &= ~HB_FUNF_FILE_DECL; else hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_OUTSIDE, NULL, NULL ); } - pFunc->funFlags |= FUN_STATEMENTS; + pFunc->funFlags |= HB_FUNF_STATEMENTS; } } @@ -2460,12 +2460,12 @@ void hb_compLinePushIfDebugger( HB_COMP_DECL ) hb_compLinePush( HB_COMP_PARAM ); else { - if( HB_COMP_PARAM->functions.pLast->funFlags & FUN_BREAK_CODE ) + if( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_BREAK_CODE ) { /* previous line contained RETURN/BREAK/LOOP/EXIT statement */ hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_UNREACHABLE, NULL, NULL ); } - HB_COMP_PARAM->functions.pLast->funFlags &= ~( /*FUN_WITH_RETURN |*/ FUN_BREAK_CODE ); /* clear RETURN flag */ + HB_COMP_PARAM->functions.pLast->funFlags &= ~( /*HB_FUNF_WITH_RETURN |*/ HB_FUNF_BREAK_CODE ); /* clear RETURN flag */ } } @@ -2490,10 +2490,10 @@ void hb_compGenStaticName( const char * szVarName, HB_COMP_DECL ) if( HB_COMP_PARAM->fDebugInfo ) { HB_BYTE bGlobal = 0; - PFUNCTION pFunc; + PHB_HFUNC pFunc; int iVar; - if( ( HB_COMP_PARAM->functions.pLast->funFlags & FUN_FILE_DECL ) != 0 ) + if( ( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_FILE_DECL ) != 0 ) { /* Variable declaration is outside of function/procedure body. File-wide static variable @@ -2576,7 +2576,7 @@ static void hb_compGenVariablePCode( HB_COMP_DECL, HB_BYTE bPCode, const char * /* Generate a pcode for a field variable */ -static void hb_compGenFieldPCode( HB_COMP_DECL, HB_BYTE bPCode, PVAR pField ) +static void hb_compGenFieldPCode( HB_COMP_DECL, HB_BYTE bPCode, PHB_HVAR pField ) { if( pField->szAlias ) { @@ -2669,7 +2669,7 @@ static void hb_compCheckEarlyMacroEval( HB_COMP_DECL, const char * szVarName, in void hb_compGenPopVar( const char * szVarName, HB_COMP_DECL ) /* generates the pcode to pop a value from the virtual machine stack onto a variable */ { int iVar, iScope; - PVAR pVar; + PHB_HVAR pVar; pVar = hb_compVariableFind( HB_COMP_PARAM, szVarName, &iVar, &iScope ); if( pVar ) @@ -2687,7 +2687,7 @@ void hb_compGenPopVar( const char * szVarName, HB_COMP_DECL ) /* generates the p * use 2 bytes for LOCALNEAR */ if( HB_LIM_INT8( iVar ) && ! HB_COMP_PARAM->functions.pLast->szName && - !( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) ) + !( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) ) hb_compGenPCode2( HB_P_POPLOCALNEAR, ( HB_BYTE ) iVar, HB_COMP_PARAM ); else hb_compGenPCode3( HB_P_POPLOCAL, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM ); @@ -2698,7 +2698,7 @@ void hb_compGenPopVar( const char * szVarName, HB_COMP_DECL ) /* generates the p /* Static variable */ hb_compGenPCode3( HB_P_POPSTATIC, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM ); { - PFUNCTION pFunc; + PHB_HFUNC pFunc; /* Check if we are generating a pop code for static variable * initialization function - if YES then we have to switch to a function * where the static variable was declared @@ -2706,7 +2706,7 @@ void hb_compGenPopVar( const char * szVarName, HB_COMP_DECL ) /* generates the p pFunc = HB_COMP_PARAM->functions.pLast; if( ( HB_COMP_PARAM->functions.pLast->cScope & HB_FS_INITEXIT ) == HB_FS_INITEXIT ) pFunc = pFunc->pOwner; - pFunc->funFlags |= FUN_USES_STATICS; + pFunc->funFlags |= HB_FUNF_USES_STATICS; } break; @@ -2749,7 +2749,7 @@ void hb_compGenPopMemvar( const char * szVarName, HB_COMP_DECL ) void hb_compGenPushVar( const char * szVarName, HB_COMP_DECL ) { int iVar, iScope; - PVAR pVar; + PHB_HVAR pVar; pVar = hb_compVariableFind( HB_COMP_PARAM, szVarName, &iVar, &iScope ); if( pVar ) @@ -2767,7 +2767,7 @@ void hb_compGenPushVar( const char * szVarName, HB_COMP_DECL ) * use 2 bytes for LOCALNEAR */ if( HB_LIM_INT8( iVar ) && ! HB_COMP_PARAM->functions.pLast->szName && - !( HB_COMP_PARAM->functions.pLast->funFlags & FUN_EXTBLOCK ) ) + !( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_EXTBLOCK ) ) hb_compGenPCode2( HB_P_PUSHLOCALNEAR, ( HB_BYTE ) iVar, HB_COMP_PARAM ); else hb_compGenPCode3( HB_P_PUSHLOCAL, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM ); @@ -2777,7 +2777,7 @@ void hb_compGenPushVar( const char * szVarName, HB_COMP_DECL ) case HB_VS_GLOBAL_STATIC: /* Static variable */ hb_compGenPCode3( HB_P_PUSHSTATIC, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_USES_STATICS; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_USES_STATICS; break; case HB_VS_LOCAL_FIELD: @@ -2807,7 +2807,7 @@ void hb_compGenPushVar( const char * szVarName, HB_COMP_DECL ) void hb_compGenPushVarRef( const char * szVarName, HB_COMP_DECL ) /* generates the pcode to push a variable by reference to the virtual machine stack */ { int iVar, iScope; - PVAR pVar; + PHB_HVAR pVar; pVar = hb_compVariableFind( HB_COMP_PARAM, szVarName, &iVar, &iScope ); if( pVar ) @@ -2827,7 +2827,7 @@ void hb_compGenPushVarRef( const char * szVarName, HB_COMP_DECL ) /* generates t case HB_VS_GLOBAL_STATIC: /* Static variable */ hb_compGenPCode3( HB_P_PUSHSTATICREF, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM ); - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_USES_STATICS; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_USES_STATICS; break; case HB_VS_LOCAL_FIELD: @@ -3132,7 +3132,7 @@ void hb_compGenPushString( const char * szText, HB_SIZE nStrLen, HB_COMP_DECL ) } } -void hb_compNOOPfill( PFUNCTION pFunc, HB_SIZE nFrom, HB_ISIZ nCount, HB_BOOL fPop, HB_BOOL fCheck ) +void hb_compNOOPfill( PHB_HFUNC pFunc, HB_SIZE nFrom, HB_ISIZ nCount, HB_BOOL fPop, HB_BOOL fCheck ) { HB_SIZE n; @@ -3167,7 +3167,7 @@ void hb_compNOOPfill( PFUNCTION pFunc, HB_SIZE nFrom, HB_ISIZ nCount, HB_BOOL fP static void hb_compRemovePCODE( HB_COMP_DECL, HB_SIZE nPos, HB_SIZE nCount, HB_BOOL fCanMove ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_SIZE n; if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_OPTJUMP ) || ! fCanMove ) @@ -3204,7 +3204,7 @@ static void hb_compRemovePCODE( HB_COMP_DECL, HB_SIZE nPos, HB_SIZE nCount, } } -HB_BOOL hb_compHasJump( PFUNCTION pFunc, HB_SIZE nPos ) +HB_BOOL hb_compHasJump( PHB_HFUNC pFunc, HB_SIZE nPos ) { HB_SIZE nJump; @@ -3352,14 +3352,14 @@ void hb_compSequenceFinish( HB_COMP_DECL, HB_SIZE nStartPos, HB_SIZE nEndPos, */ void hb_compStaticDefStart( HB_COMP_DECL ) { - HB_COMP_PARAM->functions.pLast->funFlags |= FUN_USES_STATICS; + HB_COMP_PARAM->functions.pLast->funFlags |= HB_FUNF_USES_STATICS; if( ! HB_COMP_PARAM->pInitFunc ) { HB_BYTE pBuffer[ 5 ]; HB_COMP_PARAM->pInitFunc = hb_compFunctionNew( HB_COMP_PARAM, "(_INITSTATICS)", HB_FS_INITEXIT | HB_FS_LOCAL ); HB_COMP_PARAM->pInitFunc->pOwner = HB_COMP_PARAM->functions.pLast; - HB_COMP_PARAM->pInitFunc->funFlags = FUN_USES_STATICS | FUN_PROCEDURE; + HB_COMP_PARAM->pInitFunc->funFlags = HB_FUNF_USES_STATICS | HB_FUNF_PROCEDURE; HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pInitFunc; pBuffer[ 0 ] = HB_P_STATICS; @@ -3400,7 +3400,7 @@ void hb_compStaticDefEnd( HB_COMP_DECL, const char * szVarName ) HB_BYTE bGlobal = 0; int iVar; - if( ( HB_COMP_PARAM->functions.pLast->funFlags & FUN_FILE_DECL ) != 0 ) + if( ( HB_COMP_PARAM->functions.pLast->funFlags & HB_FUNF_FILE_DECL ) != 0 ) { /* Variable declaration is outside of function/procedure body. * File-wide static variable @@ -3429,8 +3429,8 @@ static void hb_compStaticDefThreadSet( HB_COMP_DECL ) if( HB_COMP_PARAM->pInitFunc ) { HB_USHORT uiCount = 0, uiVar = 0; - PFUNCTION pFunc; - PVAR pVar; + PHB_HFUNC pFunc; + PHB_HVAR pVar; pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc ) @@ -3438,7 +3438,7 @@ static void hb_compStaticDefThreadSet( HB_COMP_DECL ) pVar = pFunc->pStatics; while( pVar ) { - if( pVar->uiFlags & VS_THREAD ) + if( pVar->uiFlags & HB_VSCOMP_THREAD ) ++uiCount; pVar = pVar->pNext; } @@ -3459,7 +3459,7 @@ static void hb_compStaticDefThreadSet( HB_COMP_DECL ) while( pVar && uiCount ) { ++uiVar; - if( pVar->uiFlags & VS_THREAD ) + if( pVar->uiFlags & HB_VSCOMP_THREAD ) { HB_PUT_LE_UINT16( ptr, uiVar ); ptr += 2; @@ -3524,7 +3524,7 @@ static void hb_compLineNumberDefEnd( HB_COMP_DECL ) */ void hb_compCodeBlockStart( HB_COMP_DECL, int iEarlyEvalPass ) { - PFUNCTION pBlock; + PHB_HFUNC pBlock; pBlock = hb_compFunctionNew( HB_COMP_PARAM, NULL, HB_FS_STATIC | HB_FS_LOCAL ); pBlock->pOwner = HB_COMP_PARAM->functions.pLast; @@ -3535,22 +3535,22 @@ void hb_compCodeBlockStart( HB_COMP_DECL, int iEarlyEvalPass ) void hb_compCodeBlockEnd( HB_COMP_DECL ) { - PFUNCTION pCodeblock; /* pointer to the current codeblock */ - PFUNCTION pFunc; /* pointer to a function that owns a codeblock */ + PHB_HFUNC pCodeblock; /* pointer to the current codeblock */ + PHB_HFUNC pFunc; /* pointer to a function that owns a codeblock */ const char * pFuncName; HB_SIZE nSize; HB_USHORT wLocals = 0; /* number of referenced local variables */ HB_USHORT wLocalsCnt, wLocalsLen; HB_USHORT wPos; int iLocalPos; - PVAR pVar; + PHB_HVAR pVar; pCodeblock = HB_COMP_PARAM->functions.pLast; /* Check if the extended codeblock has return statement */ - if( ( pCodeblock->funFlags & FUN_EXTBLOCK ) ) + if( ( pCodeblock->funFlags & HB_FUNF_EXTBLOCK ) ) { - if( !( pCodeblock->funFlags & FUN_WITH_RETURN ) ) + if( !( pCodeblock->funFlags & HB_FUNF_WITH_RETURN ) ) { if( HB_COMP_PARAM->iWarnings >= 1 ) hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_FUN_WITH_NO_RETURN, @@ -3564,7 +3564,7 @@ void hb_compCodeBlockEnd( HB_COMP_DECL ) if( ! pCodeblock->bError ) { - if( pCodeblock->wParamCount && !( pCodeblock->funFlags & FUN_USES_LOCAL_PARAMS ) ) + if( pCodeblock->wParamCount && !( pCodeblock->funFlags & HB_FUNF_USES_LOCAL_PARAMS ) ) /* PARAMETERs were used after LOCALs in extended codeblock * fix generated local indexes */ @@ -3588,7 +3588,7 @@ void hb_compCodeBlockEnd( HB_COMP_DECL ) } if( *pFuncName == 0 ) pFuncName = "(_INITSTATICS)"; - pFunc->funFlags |= ( pCodeblock->funFlags & FUN_USES_STATICS ); + pFunc->funFlags |= ( pCodeblock->funFlags & HB_FUNF_USES_STATICS ); /* generate a proper codeblock frame with a codeblock size and with * a number of expected parameters @@ -3671,14 +3671,14 @@ void hb_compCodeBlockEnd( HB_COMP_DECL ) pVar = pCodeblock->pLocals; while( pVar ) { - if( HB_COMP_PARAM->iWarnings && pVar->szName && ! ( pVar->iUsed & VU_USED ) ) + if( HB_COMP_PARAM->iWarnings && pVar->szName && ! ( pVar->iUsed & HB_VU_USED ) ) hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_BLOCKVAR_NOT_USED, pVar->szName, pFuncName ); pVar = pVar->pNext; } pVar = pCodeblock->pStatics; while( pVar ) { - if( HB_COMP_PARAM->iWarnings && pVar->szName && ! ( pVar->iUsed & VU_USED ) ) + if( HB_COMP_PARAM->iWarnings && pVar->szName && ! ( pVar->iUsed & HB_VU_USED ) ) hb_compWarnUnusedVar( HB_COMP_PARAM, "{||...}", pVar->szName, pVar->iDeclLine ); pVar = pVar->pNext; } @@ -3710,7 +3710,7 @@ void hb_compCodeBlockEnd( HB_COMP_DECL ) void hb_compCodeBlockStop( HB_COMP_DECL ) { - PFUNCTION pCodeblock; /* pointer to the current codeblock */ + PHB_HFUNC pCodeblock; /* pointer to the current codeblock */ pCodeblock = HB_COMP_PARAM->functions.pLast; @@ -3722,14 +3722,14 @@ void hb_compCodeBlockStop( HB_COMP_DECL ) if( HB_COMP_PARAM->iWarnings ) { - PVAR pVar = pCodeblock->pLocals; + PHB_HVAR pVar = pCodeblock->pLocals; /* find the function that owns the codeblock */ - PFUNCTION pFunc = pCodeblock->pOwner; + PHB_HFUNC pFunc = pCodeblock->pOwner; while( pFunc->pOwner ) pFunc = pFunc->pOwner; while( pVar ) { - if( pFunc->szName && pVar->szName && ! ( pVar->iUsed & VU_USED ) ) + if( pFunc->szName && pVar->szName && ! ( pVar->iUsed & HB_VU_USED ) ) hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_BLOCKVAR_NOT_USED, pVar->szName, pFunc->szName ); pVar = pVar->pNext; } @@ -3740,7 +3740,7 @@ void hb_compCodeBlockStop( HB_COMP_DECL ) void hb_compCodeBlockRewind( HB_COMP_DECL ) { - PFUNCTION pCodeblock; /* pointer to the current codeblock */ + PHB_HFUNC pCodeblock; /* pointer to the current codeblock */ pCodeblock = HB_COMP_PARAM->functions.pLast; pCodeblock->nPCodePos = 0; @@ -3761,13 +3761,13 @@ void hb_compCodeBlockRewind( HB_COMP_DECL ) } while( pCodeblock->pDetached ) { - PVAR pVar = pCodeblock->pDetached; + PHB_HVAR pVar = pCodeblock->pDetached; pCodeblock->pDetached = pVar->pNext; hb_xfree( pVar ); } while( pCodeblock->pLocals ) { - PVAR pVar = pCodeblock->pLocals; + PHB_HVAR pVar = pCodeblock->pLocals; pCodeblock->pLocals = pVar->pNext; hb_xfree( pVar ); } @@ -3795,7 +3795,7 @@ static void hb_compInitVars( HB_COMP_DECL ) HB_COMP_PARAM->pDeclFunc = NULL; HB_COMP_PARAM->iStaticCnt = 0; - HB_COMP_PARAM->iVarScope = VS_LOCAL; + HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; HB_COMP_PARAM->inlines.iCount = 0; HB_COMP_PARAM->inlines.pFirst = NULL; @@ -3869,13 +3869,13 @@ static void hb_compOutputFile( HB_COMP_DECL ) } } -static void hb_compAddInitFunc( HB_COMP_DECL, PFUNCTION pFunc ) +static void hb_compAddInitFunc( HB_COMP_DECL, PHB_HFUNC pFunc ) { PHB_HSYMBOL pSym = hb_compSymbolAdd( HB_COMP_PARAM, pFunc->szName, NULL, HB_SYM_FUNCNAME ); pSym->cScope |= pFunc->cScope; pSym->pFunc = pFunc; - pFunc->funFlags |= FUN_ATTACHED; + pFunc->funFlags |= HB_FUNF_ATTACHED; hb_compAddFunc( HB_COMP_PARAM, pFunc ); hb_compGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM ); } @@ -3913,14 +3913,14 @@ void hb_compCompileEnd( HB_COMP_DECL ) while( HB_COMP_PARAM->functions.pLast && ! HB_COMP_PARAM->functions.pLast->szName ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; HB_COMP_PARAM->functions.pLast = pFunc->pOwner; hb_compFunctionKill( HB_COMP_PARAM, pFunc ); } HB_COMP_PARAM->functions.pLast = NULL; if( HB_COMP_PARAM->pInitFunc && - ( HB_COMP_PARAM->pInitFunc->funFlags & FUN_ATTACHED ) == 0 ) + ( HB_COMP_PARAM->pInitFunc->funFlags & HB_FUNF_ATTACHED ) == 0 ) { hb_compFunctionKill( HB_COMP_PARAM, HB_COMP_PARAM->pInitFunc ); } @@ -3928,7 +3928,7 @@ void hb_compCompileEnd( HB_COMP_DECL ) if( HB_COMP_PARAM->functions.pFirst ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pFirst; while( pFunc ) pFunc = hb_compFunctionKill( HB_COMP_PARAM, pFunc ); @@ -3937,7 +3937,7 @@ void hb_compCompileEnd( HB_COMP_DECL ) while( HB_COMP_PARAM->externs ) { - PEXTERN pExtern = HB_COMP_PARAM->externs; + PHB_HEXTERN pExtern = HB_COMP_PARAM->externs; HB_COMP_PARAM->externs = pExtern->pNext; hb_xfree( pExtern ); @@ -4258,7 +4258,7 @@ static int hb_compCompile( HB_COMP_DECL, const char * szPrg, const char * szBuff * is used and we compile code not encapsulated in function. */ hb_compFunctionAdd( HB_COMP_PARAM, "__hbInit", HB_FS_STATIC, - FUN_PROCEDURE | FUN_FILE_FIRST | FUN_FILE_DECL ); + HB_FUNF_PROCEDURE | HB_FUNF_FILE_FIRST | HB_FUNF_FILE_DECL ); else { if( ! HB_COMP_PARAM->fQuiet ) @@ -4276,7 +4276,7 @@ static int hb_compCompile( HB_COMP_DECL, const char * szPrg, const char * szBuff /* Generate the starting procedure frame */ hb_compFunctionAdd( HB_COMP_PARAM, hb_compIdentifierNew( HB_COMP_PARAM, hb_strupr( hb_strdup( pFileName->szName ) ), HB_IDENT_FREE ), - HB_FS_PUBLIC, FUN_PROCEDURE | FUN_FILE_FIRST | ( HB_COMP_PARAM->iStartProc == 0 ? 0 : FUN_FILE_DECL ) ); + HB_FS_PUBLIC, HB_FUNF_PROCEDURE | HB_FUNF_FILE_FIRST | ( HB_COMP_PARAM->iStartProc == 0 ? 0 : HB_FUNF_FILE_DECL ) ); } if( ! HB_COMP_PARAM->fExit ) @@ -4410,7 +4410,7 @@ static int hb_compCompile( HB_COMP_DECL, const char * szPrg, const char * szBuff { const char * szFirstFunction = NULL; int iFunctionCount = 0; - PFUNCTION pFunc; + PHB_HFUNC pFunc; pFunc = HB_COMP_PARAM->functions.pFirst; @@ -4419,7 +4419,7 @@ static int hb_compCompile( HB_COMP_DECL, const char * szPrg, const char * szBuff { /* skip pseudo function frames used in automatically included files for file wide declarations */ - if( ( pFunc->funFlags & FUN_FILE_DECL ) == 0 ) + if( ( pFunc->funFlags & HB_FUNF_FILE_DECL ) == 0 ) { hb_compOptimizeFrames( HB_COMP_PARAM, pFunc ); diff --git a/harbour/src/compiler/hbopt.c b/harbour/src/compiler/hbopt.c index 6dfbeebf09..f375736618 100644 --- a/harbour/src/compiler/hbopt.c +++ b/harbour/src/compiler/hbopt.c @@ -927,7 +927,7 @@ static const HB_OPT_FUNC_PTR s_opt_table[] = NULL /* HB_P_PUSHAPARAMS */ }; -void hb_compOptimizePCode( HB_COMP_DECL, PFUNCTION pFunc ) +void hb_compOptimizePCode( HB_COMP_DECL, PHB_HFUNC pFunc ) { const HB_OPT_FUNC_PTR * pFuncTable = s_opt_table; @@ -1052,7 +1052,7 @@ static HB_ISIZ hb_compJumpGetOffset( HB_BYTE * pCode ) } -static void hb_compPCodeEnumScanLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLocals ) +static void hb_compPCodeEnumScanLocals( PHB_HFUNC pFunc, PHB_OPT_LOCAL pLocals ) { HB_SIZE nPos = 0, nLastPos = 0; HB_SHORT isVar = 0; @@ -1208,7 +1208,7 @@ static void hb_compPCodeEnumScanLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLocals ) } -static void hb_compPCodeEnumSelfifyLocal( PFUNCTION pFunc, HB_SHORT isLocal ) +static void hb_compPCodeEnumSelfifyLocal( PHB_HFUNC pFunc, HB_SHORT isLocal ) { HB_SIZE nPos = 0, nLastPos = 0; @@ -1260,7 +1260,7 @@ static void hb_compPCodeEnumSelfifyLocal( PFUNCTION pFunc, HB_SHORT isLocal ) } -static int hb_compPCodeTraceAssignedUnused( PFUNCTION pFunc, HB_SIZE nPos, HB_BYTE * pMap, HB_SHORT isLocal ) +static int hb_compPCodeTraceAssignedUnused( PHB_HFUNC pFunc, HB_SIZE nPos, HB_BYTE * pMap, HB_SHORT isLocal ) { for( ;; ) { @@ -1333,7 +1333,7 @@ static int hb_compPCodeTraceAssignedUnused( PFUNCTION pFunc, HB_SIZE nPos, HB_BY } -static void hb_compPCodeEnumAssignedUnused( HB_COMP_DECL, PFUNCTION pFunc, PHB_OPT_LOCAL pLocals ) +static void hb_compPCodeEnumAssignedUnused( HB_COMP_DECL, PHB_HFUNC pFunc, PHB_OPT_LOCAL pLocals ) { HB_BYTE * pMap; HB_SIZE nPos = 0, nLastPos = 0; @@ -1410,7 +1410,7 @@ static void hb_compPCodeEnumAssignedUnused( HB_COMP_DECL, PFUNCTION pFunc, PHB_O if( fCheck && ( isLocal = hb_compLocalGetNumber( &pFunc->pCode[ nPos ] ) ) > ( HB_SHORT ) pFunc->wParamCount ) { - PVAR pVar = pFunc->pLocals; + PHB_HVAR pVar = pFunc->pLocals; HB_SHORT is; for( is = 1; is < isLocal; is++ ) @@ -1455,7 +1455,7 @@ static void hb_compPCodeEnumAssignedUnused( HB_COMP_DECL, PFUNCTION pFunc, PHB_O } -static void hb_compPCodeEnumRenumberLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLocals ) +static void hb_compPCodeEnumRenumberLocals( PHB_HFUNC pFunc, PHB_OPT_LOCAL pLocals ) { HB_SIZE nPos = 0; @@ -1550,11 +1550,11 @@ static void hb_compPCodeEnumRenumberLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLoca void hb_compPCodeTraceOptimizer( HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; - PHB_OPT_LOCAL pLocals; - PVAR pVar, * ppVar; - HB_USHORT usLocalCount, usIndex; - HB_BOOL fBool; + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; + PHB_OPT_LOCAL pLocals; + PHB_HVAR pVar, * ppVar; + HB_USHORT usLocalCount, usIndex; + HB_BOOL fBool; /* Many (perhaps ALL) functions of pcode trace optimization dependes on pcodes. Please, check these functions if new pcode is added, or existing changed. @@ -1610,8 +1610,8 @@ void hb_compPCodeTraceOptimizer( HB_COMP_DECL ) * [druzus] */ #if 0 - assert( ( ! ( pVar->iUsed & VU_USED ) && pLocals[ usIndex ].bFlags == 0 ) || - ( ( pVar->iUsed & VU_USED ) && pLocals[ usIndex ].bFlags != 0 ) ); + assert( ( ! ( pVar->iUsed & HB_VU_USED ) && pLocals[ usIndex ].bFlags == 0 ) || + ( ( pVar->iUsed & HB_VU_USED ) && pLocals[ usIndex ].bFlags != 0 ) ); #endif if( usIndex >= pFunc->wParamCount && pLocals[ usIndex ].bFlags == OPT_LOCAL_FLAG_PUSH ) diff --git a/harbour/src/compiler/hbpcode.c b/harbour/src/compiler/hbpcode.c index ad77acd51b..539f7760a0 100644 --- a/harbour/src/compiler/hbpcode.c +++ b/harbour/src/compiler/hbpcode.c @@ -498,7 +498,7 @@ static HB_PCODE_FUNC_PTR s_psize_table[] = NULL /* HB_P_PUSHAPARAMS */ }; -HB_ISIZ hb_compPCodeSize( PFUNCTION pFunc, HB_SIZE nOffset ) +HB_ISIZ hb_compPCodeSize( PHB_HFUNC pFunc, HB_SIZE nOffset ) { HB_ISIZ nSize = 0; HB_BYTE opcode = pFunc->pCode[ nOffset ]; @@ -518,7 +518,7 @@ HB_ISIZ hb_compPCodeSize( PFUNCTION pFunc, HB_SIZE nOffset ) return nSize; } -void hb_compPCodeEval( PFUNCTION pFunc, const HB_PCODE_FUNC_PTR * pFunctions, void * cargo ) +void hb_compPCodeEval( PHB_HFUNC pFunc, const HB_PCODE_FUNC_PTR * pFunctions, void * cargo ) { HB_SIZE nPos = 0; HB_SIZE nSkip; @@ -578,7 +578,7 @@ void hb_compPCodeEval( PFUNCTION pFunc, const HB_PCODE_FUNC_PTR * pFunctions, vo } } -void hb_compPCodeTrace( PFUNCTION pFunc, const HB_PCODE_FUNC_PTR * pFunctions, void * cargo ) +void hb_compPCodeTrace( PHB_HFUNC pFunc, const HB_PCODE_FUNC_PTR * pFunctions, void * cargo ) { HB_SIZE nPos = 0; @@ -608,7 +608,7 @@ void hb_compPCodeTrace( PFUNCTION pFunc, const HB_PCODE_FUNC_PTR * pFunctions, v void hb_compGenPCode1( HB_BYTE byte, HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ if( ! pFunc->pCode ) /* has been created the memory block to hold the pcode ? */ { @@ -624,7 +624,7 @@ void hb_compGenPCode1( HB_BYTE byte, HB_COMP_DECL ) void hb_compGenPCode2( HB_BYTE byte1, HB_BYTE byte2, HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ if( ! pFunc->pCode ) /* has been created the memory block to hold the pcode ? */ { @@ -641,7 +641,7 @@ void hb_compGenPCode2( HB_BYTE byte1, HB_BYTE byte2, HB_COMP_DECL ) void hb_compGenPCode3( HB_BYTE byte1, HB_BYTE byte2, HB_BYTE byte3, HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ if( ! pFunc->pCode ) /* has been created the memory block to hold the pcode ? */ { @@ -659,7 +659,7 @@ void hb_compGenPCode3( HB_BYTE byte1, HB_BYTE byte2, HB_BYTE byte3, HB_COMP_DECL void hb_compGenPCode4( HB_BYTE byte1, HB_BYTE byte2, HB_BYTE byte3, HB_BYTE byte4, HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ if( ! pFunc->pCode ) /* has been created the memory block to hold the pcode ? */ { @@ -678,7 +678,7 @@ void hb_compGenPCode4( HB_BYTE byte1, HB_BYTE byte2, HB_BYTE byte3, HB_BYTE byte void hb_compGenPCodeN( const HB_BYTE * pBuffer, HB_SIZE nSize, HB_COMP_DECL ) { - PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ + PHB_HFUNC pFunc = HB_COMP_PARAM->functions.pLast; /* get the currently defined Clipper function */ if( ! pFunc->pCode ) /* has been created the memory block to hold the pcode ? */ { diff --git a/harbour/src/compiler/hbstripl.c b/harbour/src/compiler/hbstripl.c index 68808b2aa6..5668358691 100644 --- a/harbour/src/compiler/hbstripl.c +++ b/harbour/src/compiler/hbstripl.c @@ -287,7 +287,7 @@ static const PHB_STRIP_FUNC s_stripLines_table[] = NULL /* HB_P_PUSHAPARAMS */ }; -void hb_compStripFuncLines( HB_COMP_DECL, PFUNCTION pFunc ) +void hb_compStripFuncLines( HB_COMP_DECL, PHB_HFUNC pFunc ) { assert( HB_P_LAST_PCODE == sizeof( s_stripLines_table ) / sizeof( PHB_STRIP_FUNC ) ); diff --git a/harbour/src/vm/memvars.c b/harbour/src/vm/memvars.c index bdfb38a767..d5f04fb073 100644 --- a/harbour/src/vm/memvars.c +++ b/harbour/src/vm/memvars.c @@ -69,7 +69,7 @@ #include "hbapierr.h" #include "hbapifs.h" /* for __MVSAVE()/__MVRESTORE() */ #include "hbdate.h" /* for __MVSAVE()/__MVRESTORE() */ -#include "hbcomp.h" /* for VS_* macros */ +#include "hbcomp.h" /* for HB_VSCOMP_* macros */ #include "error.ch" #include "hbmemvar.ch" #include "hbset.h" @@ -387,7 +387,7 @@ void hb_memvarSetValue( PHB_SYMB pMemvarSymb, PHB_ITEM pItem ) else { /* assignment to undeclared memvar - PRIVATE is assumed */ - hb_memvarCreateFromDynSymbol( pDyn, VS_PRIVATE, pItem ); + hb_memvarCreateFromDynSymbol( pDyn, HB_VSCOMP_PRIVATE, pItem ); } } else @@ -537,7 +537,7 @@ void hb_memvarNewParameter( PHB_SYMB pSymbol, PHB_ITEM pValue ) { HB_TRACE( HB_TR_DEBUG, ( "hb_memvarNewParameter(%p, %p)", pSymbol, pValue ) ); - hb_memvarCreateFromDynSymbol( pSymbol->pDynSym, VS_PRIVATE, pValue ); + hb_memvarCreateFromDynSymbol( pSymbol->pDynSym, HB_VSCOMP_PRIVATE, pValue ); } static PHB_DYNS hb_memvarFindSymbol( const char * szArg, HB_SIZE nLen ) @@ -648,7 +648,7 @@ static void hb_memvarCreateFromDynSymbol( PHB_DYNS pDynVar, int iScope, PHB_ITEM { HB_TRACE( HB_TR_DEBUG, ( "hb_memvarCreateFromDynSymbol(%p, %d, %p)", pDynVar, iScope, pValue ) ); - if( iScope & VS_PUBLIC ) + if( iScope & HB_VSCOMP_PUBLIC ) { /* If the variable with the same name exists already * then the current value have to be unchanged @@ -1092,10 +1092,10 @@ HB_FUNC( __MVPUBLIC ) HB_SIZE n, nLen = hb_arrayLen( pMemvar ); for( n = 1; n <= nLen; n++ ) - hb_memvarCreateFromItem( hb_arrayGetItemPtr( pMemvar, n ), VS_PUBLIC, NULL ); + hb_memvarCreateFromItem( hb_arrayGetItemPtr( pMemvar, n ), HB_VSCOMP_PUBLIC, NULL ); } else - hb_memvarCreateFromItem( pMemvar, VS_PUBLIC, NULL ); + hb_memvarCreateFromItem( pMemvar, HB_VSCOMP_PUBLIC, NULL ); } } } @@ -1124,10 +1124,10 @@ HB_FUNC( __MVPRIVATE ) HB_SIZE n, nLen = hb_arrayLen( pMemvar ); for( n = 1; n <= nLen; n++ ) - hb_memvarCreateFromItem( hb_arrayGetItemPtr( pMemvar, n ), VS_PRIVATE, NULL ); + hb_memvarCreateFromItem( hb_arrayGetItemPtr( pMemvar, n ), HB_VSCOMP_PRIVATE, NULL ); } else - hb_memvarCreateFromItem( pMemvar, VS_PRIVATE, NULL ); + hb_memvarCreateFromItem( pMemvar, HB_VSCOMP_PRIVATE, NULL ); } } hb_memvarUpdatePrivatesBase(); @@ -1318,7 +1318,7 @@ HB_FUNC( __MVPUT ) /* attempt to assign a value to undeclared variable * create the PRIVATE one */ - hb_memvarCreateFromDynSymbol( hb_dynsymGet( pName->item.asString.value ), VS_PRIVATE, pValue ); + hb_memvarCreateFromDynSymbol( hb_dynsymGet( pName->item.asString.value ), HB_VSCOMP_PRIVATE, pValue ); } hb_memvarUpdatePrivatesBase(); hb_itemReturn( pValue ); @@ -1696,7 +1696,7 @@ HB_FUNC( __MVRESTORE ) hb_memvarSetValue( pDynVar->pSymbol, pItem ); else /* attempt to assign a value to undeclared variable create the PRIVATE one */ - hb_memvarCreateFromDynSymbol( hb_dynsymGet( szName ), VS_PRIVATE, pItem ); + hb_memvarCreateFromDynSymbol( hb_dynsymGet( szName ), HB_VSCOMP_PRIVATE, pItem ); } } }