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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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; $<asExpr>0->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; }
|
||||
;
|
||||
|
||||
BlockVarList : IdentName AsType { HB_COMP_PARAM->iVarScope = VS_LOCAL; $$ = hb_compExprCBVarAdd( $<asExpr>0, $1, $2->cVarType, HB_COMP_PARAM ); }
|
||||
| BlockVarList ',' IdentName AsType { HB_COMP_PARAM->iVarScope = VS_LOCAL; $$ = hb_compExprCBVarAdd( $<asExpr>0, $3, $4->cVarType, HB_COMP_PARAM ); }
|
||||
BlockVarList : IdentName AsType { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; $$ = hb_compExprCBVarAdd( $<asExpr>0, $1, $2->cVarType, HB_COMP_PARAM ); }
|
||||
| BlockVarList ',' IdentName AsType { HB_COMP_PARAM->iVarScope = HB_VSCOMP_LOCAL; $$ = hb_compExprCBVarAdd( $<asExpr>0, $3, $4->cVarType, HB_COMP_PARAM ); }
|
||||
;
|
||||
|
||||
BlockExpList : Expression { $$ = hb_compExprAddCodeblockExpr( $<asExpr>-1, $1 ); }
|
||||
@@ -1049,7 +1049,7 @@ CodeBlock : BlockHead
|
||||
$<sNumber>$ = HB_COMP_PARAM->functions.pLast->nPCodePos;
|
||||
$<sNumber>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 = $<iNumber>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( $<sNumber>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 ) );
|
||||
$<sNumber>$ = hb_compGenJumpFalse( 0, HB_COMP_PARAM );
|
||||
@@ -1414,7 +1414,7 @@ IfElseIf : ELSEIF { HB_COMP_PARAM->functions.pLast->funFlags &= ~ FUN_BREAK_CO
|
||||
hb_compGenJumpHere( $<sNumber>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 ) );
|
||||
$<sNumber>$ = 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( $<sNumber>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( $<sNumber>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( $<asExpr>2 ) )
|
||||
hb_compForEnd( HB_COMP_PARAM, hb_compExprAsSymbol( $<asExpr>2 ) );
|
||||
HB_COMP_EXPR_FREE( $<asExpr>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( $<sNumber>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( $<lNumber>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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 )
|
||||
|
||||
@@ -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 ? */
|
||||
{
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user