* source/vm/macro.c
* include/hbcomp.h
* include/hbexprb.c
* include/hbexprc.c
* include/hbmacro.h
* include/hbmsetup.h
* include/set.ch
* source/compiler/cmdcheck.c
* source/compiler/genc.c
* source/compiler/harbour.c
* source/compiler/hbpcode.c
* source/rdd/dblist.prg
* source/vm/hvm.c
- Removed support for syncing of macro setting with main module.
- Removed support for -ks which is replaced with -kr.
+ Added default logic to auto symchronize all macro activations with the compile time switches of each respective module.
+ Added -kr to disable auto synching, thus allowing Run-Time setting by means of HB_SETMACRO().
* include/hbcomp.h
* Changed order of COMDECLARED elements to be more intuitive for static initialization.
* source/compiler/harbour.c
* source/compiler/hbpcode.c
! Added type casting needed for C++ compilers.
* source/compiler/hbgenerr.c
* Corrected spelling for suspicious.
* source/compiler/hbpcode.c
* Commented one debung printf()
* include/hbcomp.h
+ Added extern PCOMCLASS hb_comp_pReleaseClass
* source/compiler/genc.c
+ Added logic to release declared classes after compilation.
* source/compiler/harbour.c
+ Added logic for standard classes declaration to hb_compDeclaredInit()
+ Added ERROR class declaration and started GET class declaration
* include/hbcomp.h
* source/compiler/harbour.c
+ Added members szFileName and iLine to structure INLINE, set to originating PRG name and line number.
* source/compiler/genc.c
+ Added #line directive to INLINE generations, so C compile warnings/errors will report source file and line number in PRG.
* source/compiler/harbour.l
* source/compiler/harbour.slx
+ Added Error message if inline C is used with non C output.
+ Added support for {} on same line
* Minor optimization
* include/hberrors.h
* source/compiler/hbgenerr.c
+ Added: "Inline C requires C output generartion, use -gc[n]"
* include/hberrors.h
* source/compiler/hbgenerr.c
+ Added: "Unterminated inline block in function: \'%s\'" and "Too many inline blocks"
* include/hbcomp.h
* source/compiler/harbour.c
+ Added hb_compInlineNew(), hb_compInlineAdd(), and hb_compInlineFind()
* source/pp/ppcomp.c
* source/compiler/harbour.slx
* source/compiler/genc.c
+ Added support for inline C code blocks.
+ tests/inline_c.prg
+ Added new test to demonstrate new inline C support.
* include/hbcomp.h
* source/compiler/harbour.c
+ Added: char hb_comp_cCastType
* source/compiler/harbour.y
! Optimized AsType
+ Added: support for type casting like: Var := FunCal() AS ... and, return Var AS ...
/* Todo: add support for Array[n] := ... AS ..., and oVar:Data := ... AS ... */
* source/compiler/hbpcode.c
+ Added type casting support to:
HB_P_POPLOCAL
HB_P_POPLOCALNEAR
HB_P_POPMEMVAR
HB_P_POPSTATIC
HB_P_RETVALUE
* include/hbclass.ch
+ Added type casting to resolve Strong Type warnings:
return s_oClass:Instance() AS CLASS _CLASS_NAME_
local Self AS CLASS <ClassName> := QSelf() AS CLASS <ClassName>
/* Note: Strong Type code, and Class code, should compile with upto -w4, without [invalid] Strong Type warnings. */
* hb_slex.bc
* Synchronized with makefile.bc
* include/hbclass.ch
+ Added: [AS <type>] optional clause to all Methods/Messages syntax.
+ Added directives to generate class declaration from same class creation code.
* include/hbcomp.h
* source/compiler/harbour.c
+ Added: char hb_comp_cDataListType;
* source/compiler/harbour.l
+ Added support for new _HB_CLASS and _HB_MEMBER alternate class declaration syntax.
* source/macro/macro.slx
! Moved .T., .Y., .F., and, .N. from self contained words to words.
* source/compiler/harbour.slx
! Moved .T., .Y., .F., and, .N. from self contained words to words.
+ Added support for new _HB_CLASS and _HB_MEMBER alternate class declaration syntax.
* source/compiler/harbour.y
! Improved definition of formal and optional paramter lists.
+ Added support for alternate class declaration syntax:
_HB_CLASS ClassName
_HB_MEMBER { [AS ...] Var1, VarN }
_HB_MEMBER MethodName( [ [OPTIONAL] [@]FormalParam [AS ...] | @FunPointer() ] ) [ AS ... ]
/* This syntax allows the class declaration to be on multiple seperated lines (needed to allow utilization of class creation code.)
Tokens _HB_CLASS & _HB_MEMBER are not final, until some discussion with Ryszard. */
* source/compiler/hbpcode.c
* Completed classes strong type support for adaptive type variable.
* source/rtl/tlabel.prg
* source/rtl/treport.prg
! Corrected typos: AS {} -> INIT {} AS ARRAY, AS .T. -> INIT .T. AS LOGICAL etc..
* tests/testdecl.prg
* Changed to demonstrate class creation used as declaration.
* utils/hbtest/hbtest.prg
* Changed DBFNTX -> DBFCDX (was not working because DBFNTX is disabled.
* include/hbcomp.h
+ Added: external BOOL hb_comp_bSimpLex
* source/compiler/harbour.c
+ Added: BOOL hb_comp_bSimpLex
+ Added: if( hb_comp_bSimpLex ) tests before releasing name strings of vars, and symbols.
+ Added: call to hb_compReleaseStrings(), if hb_comp_SimpLes is TRUE, after code generation.
* source/compiler/harbour.slx
+ Added: logic to resuse same allocated strings when string for identifier was perviously allocated.
+ Added: INIT_ACTION macro to set hb_comp_bSimpLex to TRUE.
+ Added: Function hb_compReleaseStrings()
* source/compiler/harbour.l
+ Added: empty Function hb_compReleaseStrings() to avoid link error.
* source/compiler/hbslex.c
* source/compiler/simplex.c
* Moved standard #includes from simplex to hbslex.
* include/hbclass.ch
- Uncommented the VO #xtranslate as they do work correctly.
* source/pp/pplib.c
- Removed int hb_comp_iIncLine
* include/hbcomp.h
- Removed int hb_comp_iIncLine
+ Added int hb_comp_iCompiled
+ Added char* hb_comp_szFile
+ Added BOOL hb_comp_bError
* source/compiler/harbour.c
! Fixed Compile Time Line Numbers
! Fixed Run Time Line Numbers
* source/compiler/harbour.l
! Rewrote rules for STRING1 STRING2 STRING3 INDEX, were severly broken with regard to unterminated support.
/* When working on errors, I founf major problems, with unterminated Array Index and Unterminated Strings
I'm surprised no one reported. This mass was a nightmere to fix. it seems to be working great now. */
* source/compiler/harbour.y
! Many fixes to support correct line numbers.
* source/compiler/hbgenerr.c
! Fixed Error System to never report more than 1 error per source line.
* source/pp/ppcomp.c
- Removed code for hb_comp_iIncLine
* source/pp/ppcore.c
* Minor formating.
* include/hbcomp.h
* Enclosed declarations of functions to support in-line nested compilation within #ifdef HB_NESTED_COMPILE
source/compiler/harbour.y
* Enclosed functions to support in-line nested compilation within #ifdef HB_NESTED_COMPILE
* Changed rules for DO ... to add name of module to hb_comp_pAutoOpen linked list.
+ Added hb_compAutoOpen() - Parses the needed externals when -m not specified
- Defed out hb_compYACCMAIN() (#if 0) - no longer needed, moved logic into hb_compCompile() and hb_compAutoOpen()
source/compiler/harbour.l
+ Added #define YY_USER_ACTION ... to fix Flex problem with ^ (BOL RegExp)
* Enclosed functions to support in-line nested compilation within #ifdef HB_NESTED_COMPILE
source/compiler/harbour.c
* Enclosed functions to support in-line nested compilation within #ifdef HB_NESTED_COMPILE
* Modified hb_compCompile() to support future in-line nested compilation, and defed it out.
* Changed hb_compCompile() to call hb_compAutoOpen() for modules called in DO ... that are not defined in main prg.
! Completed -m support, by default directives in external opened modules will be avialable to subsequent externals.
this feature is defed out if strict compatibilty ise selected.
* source/compiler/cmdcheck.c
+ Implemented support for -m
* include/hbcomp.h
+ Added structure _HARBVARS to hold Harbour Session Variables
+ Added structure +AUTOOPEN to hold names of external modules already compiled.
* source/compiler/harbour.c
+ Moved the parsing/compiling logic into new hb_compCompile()
+ Added:
static void hb_compAutoOpenAdd( char * szName );
static BOOL hb_compAutoOpenFind( char * szName );
static void hb_compSaveVars( PHARBVARS, int );
static void hb_compRestoreVars( PHARBVARS, int );
* source/compiler/harbour.l
+ Added:
void * hb_compGet_YY_CURRENT_BUFFER()
void hb_compSet_YY_CURRENT_BUFFER( void * pBuffer )
int hb_compGet_yy_init( void )
void hb_compSet_yy_init( int i )
int hb_compGet_yy_start( void )
void hb_compSet_yy_start( int i )
int hb_compGet_yy_did_buffer_switch_on_eof( void )
void hb_compSet_yy_did_buffer_switch_on_eof( int i )
* source/compiler/harbour.y
+ Added logic to call hb_compCompile() when DO ... or DO ... WITH
+ Added:
void * hb_compGet_pLoops( void )
void hb_compSet_pLoops( void * pLoops )
void * hb_compGet_rtvars( void )
void hb_compSet_rtvars( void * rtvars )
* source/compiler/hbusage.c
+ Added display of -m compiler switch
Please note:
1. Implementation is practicaly completed, but there is one known issue to be resolved: Once we open and compile
an external module, the very next prg line in the parent prg is not processed, I would love to get some assistance
with this - Ryszard, Antonio, Victor, Paul? as I am seriously limited with time over this week.
It seems I am not saving one of Bison/Flex vars, so my restore of the previous session is not complete :-(
2. Clipper seem to have a bug, on the following code:
DO WHILE WITH ...
Clipper will attempt to compile external "WITH.PRG" instead of "WHILE.PRG", can any one advise if I am missing something here...
In our implementation the above line will attemp to compile "WHILE.PRG"
* include/hbcomp.h
+ Added: extern char * hb_pp_STD_CH;
* include/hbpp.h
+ Added: extern void hb_pp_SetRules( BOOL (*hb_compInclude)(char *, PATHNAMES * ) );
* source/compiler/hbusage.c
* source/compiler/harbour.c
* source/compiler/cmdcheck.c
+ Added support for -u[FileName]
- Removed TODO for -u
* source/pp/ppcomp.c
+ Added hb_pp_ReadRules() - Logic to process directives from user supplied command defs.
* source/pp/ppcore.c
+ Added hb_pp_SetRules() - Logic to use predefined rules, none, or user defined.
* source/pp/pptable.c
+ Added hb_pp_Table() - Moved predefined rules into this function, to allow for conditional use.
* include/hbcomp.h
+ Added member pParamClasses to COMDECLARED
* Changed hb_comp_szClass to hb_comp_szFromClass
* source/compiler/harbour.y
* Changed hb_comp_szClass to hb_comp_szFromClass
* source/compiler/harbour.c
+ Added support for declared parameters of Functions/Methods AS Object FROM CLASS ...
* source/compiler/hbpcode.c
+ Added Strong Type checking for declared parameters of Functions/Methods AS Object FROM CLASS ...
* tests/testwarn.prg
+ Added code to demonstrate warnings for declared parameters of Functions/Methods AS Object FROM CLASS ...
* include/hbcomp.h
! Consoldated COMDECLARED and COMMETHOD into COMDECLARED
+ Added member pClass to COMDECLARED
+ Added member pLast to COMCLASS
* source/compiler/harbour.y
+ Added support for Methods/Datas of type Object of a declared Class.
* source/compiler/harbour.c
! Fixed bug in hb_compMethodAdd()
* source/compiler/hbpcode.c
+ Added Strong Type Checking to Objects syntax.
* include/hberrors.h
+ Added : "HB_COMP_WARN_MESSAGE_NOT_FOUND"
* source/compiler/hbgenerr.c
+ Added : "3Message \'%s\' not known in Class \'%s\'"
* tests/testwarn.prg
+ Added code to demonstrate syntax and warnings for OO Strong Type Checking.
* include/hbcomp.h
+ Added new structures COMCLASS and COMMETHOD
+ Added new element pClass to structure VAR
+ Added:
extern PCOMCLASS hb_compClassAdd( char * );
extern PCOMCLASS hb_compClassFind( char * );
extern PCOMMETHOD hb_compMethodAdd( PCOMCLASS pClass, char * );
extern PCOMMETHOD hb_compMethodFind( PCOMCLASS pClass, char * );
* source/compiler/harbour.c
+ Added:
PCOMCLASS hb_compClassAdd( char * );
PCOMCLASS hb_compClassFind( char * );
PCOMMETHOD hb_compMethodAdd( PCOMCLASS pClass, char * );
PCOMMETHOD hb_compMethodFind( PCOMCLASS pClass, char * );
* Modified hb_compVariableAdd() to process params of declared class methods.
* source/compiler/harbour.l
+ Added tokens CLASSMETHOD CLASSDATA and FROMCLASS
* source/compiler/harbour.y
+ Added support for class declaration syntax:
DECLARE CLASS ClassName HAS Method MethodName( ... ) As ... HAS Data PropertyName ...
+ Added support for declaration of Object of a sdeclared class sysntax:
DECLARE oObjectVar AS Object FROM ClassName
* source/compiler/hbpcode.c
+ Started support for object methods and properties type checking.
* tests/testwarn.prg
+ Added code to demonstrate declarion of classes and objects of a declared class.
* source/compiler/harbour.l
- Removed un used token DECLARE_
* source/compiler/harbour.y
! Fixed warning about conflict
! Verified all calls to hb_compVariableAdd() to use hb_comp_cVarType (and VT_OFFSET_* constants) as 2nd parameter
+ Added rules to support syntax of declartion of variable by reference parameter.
* include/hbcomp.h
+ Added :
#define VT_OFFSET_BYREF 60
#define VT_OFFSET_VARIANT 90
#define VT_OFFSET_OPTIONAL 90
* source/compiler/harbour.c
* Minor cleanup in hb_compVariableAdd()
* source/compiler/hbpcode.c
* Modified hb_compStrongType() to use VT_OFFSET_* constants.
* source/compiler/hbgenerr.c
* Changed "number" to "#" in HB_COMP_WARN_PARAM_TYPE message.
* tests/testwarn.prg
+ Added code to demonstrate new "Declared Refernced Paramater" syntax:
DECLARE FRead( nHandle As Num, @cBufferVar As Char, nBytes As Num ) AS Num
* include/hbpcomp.c
+ Added pPrivates to structure FUNCTION.
* source/compiler/harbour.c
+ Added logic to maintain linked list pPrivates of pFunc.
* source/compiler/harbour.y
+ Added support for MEMVAR AS ... syntax.
* source/compiler/hbpcode.c
+ Added support for FIELD AS ... and MEMVAR AS both local and global.
! More refinments
* tests/testwarn.prg
+ Added code to demonstrate "Adaptive Type Checking".
* include/hbcomp.h
+ Added #define VS_NONE 0
* source/compiler/harbour.c
! Fixed bug in hb_compVariableAdd() was never adding new var to pFunc->pMemvars because
hb_comp_iVarScope was tested with == rather & VS_MEMVAR
* source/compiler/harbour.y
+ Added hb_comp_iVarScope = VS_NONE to reset it after PRIVATE PUBLIC and PARAMETERS statements.
* source/compiler/hbpcode.c
+ Added logic to reset type of privates (need to check publics) after calls to functions or procedures which might affect them.
! Many fixes and consolodiations
* source/compiler/harbour.c
- Removed static qualifier from hb_compVariableGetPos() so it can be called from hb_compStrongType()
* source/compiler/hbpcode.c
+ Added logic to hb_compStrongType() to allow assigment of NIL to any type variable.
+ Added "Adaptive Type Checking" to control type mismatch in undeclared variables.
* include/hberrors.h
! Added #define HB_COMP_ARRAY_ASSIGN_TYPE to HB_COMP_WARN_ARRAY_ASSIGN_TYPE
* source/compiler/hbgenerr.c
* Added : Moved "Suspecious ..." to level w4
* tests/testwarn.prg
+ Added code to demonstrate "Adaptive Type Checking".
* include/hbcomp.h
+ Added:
#define VU_NOT_USED 0
#define VU_INITIALIZED 1
#define VU_USED 2
* source/compiler/harbour.c
* Modified refrences to pVar->iUsed to use new VU_* constants.
* source/compiler/hbpcode.c
* Enhanced hb_compStrongType() to check and set pVar->iUsed with new VU_*constants.
* include/hbcomp.h
- Removed members cParamTypes and iParamCount from COMSYMBOL
+ Added member USHORT iStackSize to FUNCTION structure
* Modified member pStack of FUNCTION to not pre allocate any memory.
+ Added new structure COMDECLARED
+ Added: extern PCOMDECLARED hb_compDeclaredAdd( char * ) and extern PCOMDECLARED hb_compDeclaredFind( char * );
+ Adede: extern PCOMDECLARED hb_comp_pFirstDeclared and extern PCOMDECLARED hb_comp_pLastDeclared
* include/hberrors.h
+ Added:
#define HB_COMP_DUP_DECLARATION 17
#define HB_COMP_DECLARATION_CONFLICT 18
* source/compiler/genc.c
* Modified hb_compGenCCode() to free the Declared Function linked list.
* source/compiler/harbour.c
+ Added: PCOMDECLARED hb_compDeclaredAdd( char * ) and PCOMDECLARED hb_compDeclaredFind( char * );
+ Adede: PCOMDECLARED hb_comp_pFirstDeclared and PCOMDECLARED hb_comp_pLastDeclared
* source/compiler/harbour.y
* Modified parsing of DECLARE FUNCTION to use new PCOMDECLARED rather than PCOMSYMBOL
* source/compiler/hbgenerr.c
+ Added:
"3Duplicate Declaration of Function %s"
"3Function \'%s\' conflicting with its declaration"
* source/compiler/hbpcode.c
* Modifief hb_compStrongType() to utilize PCOMDECLARED rather than PCOMSYMBOL
* Modifief hb_compStrongType() to increase the pFunc->pStack as needed.
* tests/testwarn.prg
+ Added code to demonstrate more warnings.