* 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.
* source/compiler/harbour.c
* Exported: hb_compFieldGetPos() and hb_compMemvarGetPos()
* source/compiler/harbour.sly
! Changed __GET() support to be parameter compatible with Clipper
* include/hberrors.h
* source/compiler/hbgenerr.c
+ Added Error: "GET contains complex macro"
* source/pp/pptable.c
- Removed bSetGet from rule of GET, PP output now Clipper compatible.
* source/vm/memvars.c
+ Added HB_FUNC( __ISMV ) // Return .T. if passed string as a Memory Variable.
* source/rtl/tgetint.prg
! Fixed __GET() to be 100% parameter compatible with Clipper.
! When 1st parameter (bSetGet) is NIL the bSetGet will be built internaly,
not using macro in most cases, even if the Get Variable itslef is a macro :-)
/* Ryszard, this will further break Flex support for GET, but makes __GET() 100% Clipper compatible as you suggested.
Please note, that Clipper does *NOT* pass a bSetGet *only* when the Get Var is a *simple* *non* declared Variable.
Declared Variables in this context are: MEMVAR, FIELD, LOCAL, and STATIC. For all of those, bSetGet *is* generated!
Clipper also generates bSetGet for "Complex Variables", i.e. Aliased Variables, Object Data, etc.! */
* include/hberrors.h
+ Added: #define HB_COMP_ERR_BLOCK 47
* source/compiler/hbgenerr.c
+ Added Error: "Code block contains both macro and declared symbol references"
* source/compiler/harbour.c
* Made public: hb_compLocalGetPos() and hb_compStaticGetPos()
* source/compiler/harbour.slx
+ Added: char * hb_comp_SLX_LastBlock( BOOL bReset )
* source/compiler/harbour.sly
+ Added logic to support Early Expansions of Macro within CodeBlock unless parenthesized.
+ tests/tstblock.prg
+ New test of Early/Late expansion of Macros within CodeBlocks.
* source/compiler/harbour.c
* source/compiler/harbour.y
+ Added support for DECLARE FunName(...) AS CLASS ClassName
+ Added support for DECLARE FunName( ... @SomeFun() ... ) - Function Pointer declared parameter.
* source/compiler/simplex.c
* Corrected some compiler warnings.
* source/compiler/harbour.slx
* Reenabled support for ID_ON_HOLD.
* include/hberror.h
+ Added: #define HB_COMP_WARN_RETURN_SUSPECT 28
* source/compiler/hbgenerr.c
+ Added: "4Suspecious return type: \'%s\' expected: \'%s\'"
* source/compiler/hbpcode.c
+ Completed support for Strong Typed variables as declared classes, as well as Adaptive Typed usage with declared classes.
* Few other corrections and enhancements.
* include/hbclass.ch
+ Added TClass declaration:
DECLARE TClass ;
New( cName AS STRING, OPTIONAL SuperParams ) AS CLASS TClass ;
Create() AS OBJECT;
Instance() AS OBJECT ;
AddClsMthds( cName AS STRING, @Method(), nScope AS NUMERIC, n2 AS NUMERIC, n3 AS NUMERIC );
AddMultiClsData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING );
AddMultiData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING );
AddMethod( cName AS STRING, @Method(), nScope AS NUMERIC );
AddInLine( cName AS STRING, bBlock AS CODEBLOCK, nScope AS NUMERIC );
AddVirtual( cName AS STRING )
+ Added declaration to s_oClass AS CLASS TClass
* tests/testdecl.prg
* Minor refinement.
* include/hberrors.h
* Changed #define HB_PP_ERR_INCLUDE_SELF to HB_PP_ERR_INCLUDE_CYCLIC
* source/pp/ppcore.c
* Changed "Can\'t #include self \'%s\'" to "Cyclic #include not allowed: \'%s\'"
* Changed self refernce #include detection, to detect any #include of an already opened file.
* source/pp/ppcore.c
* Changed hb_pp_SetRules() to only always default to .CH extension, if file name supplied without extension.
! Converted some printf() messages to standard warnnings and errors.
* include/hberrors.h
+ Added:
#define HB_PP_ERR_CANNOT_OPEN_RULES 15
#define HB_COMP_ERR_BAD_RULES_FILE_NAME 16
#define HB_PP_WARN_NO_DIRECTIVES 2
* 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/hberrors.h
+ Added : #define HB_COMP_WARN_VAL_NOT_USED 20
* source/compiler/harbour.c
+ Added logic to hb_compOptimizeFrames() to warn about invalid statics usage.
* source/compiler/hbgenerr.c
+ Added: "3Value of Variable \'%s\' never used"
* source/compiler/hbpcode.c
* Enhanced support for statics
* tests/testwarn.prg
+ Added more code to demonstrate more warnings.
* source/compiler/hbpcode.c
+ Added logic to hb_compStrongType() to support object methods and properties.
* Enhanced logic of array checks.
* include/hberrors.h
! Added #define HB_COMP_WARN_ARRAY_ASSIGN_SUSPECT
* source/compiler/hbgenerr.c
* Added : 4Suspicious type in assignment to declared array element expected: \'%s\'"
* 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
- 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.
* include/hbcomp.h
+ Added to COMSYMBOL :
BYTE * cParamTypes;
int iParamCount;
+ Added :
extern char * hb_comp_szDeclaredFun
* source/compiler/harbour.y
* Enhanced DECLARE FUNCTION parsing to properly maintain number and type of declared function parameters.
* source/compiler/harbour.c
+ Added char * hb_comp_szDeclaredFun
* Modified hb_compVariableAdd() to support dummy parameter vars in Function Decleration.
* source/compiler/hbpcode.c
* Enhancements to hb_compStrongType() to support parameter checks of declared function.
* tests/testwarn.prg
+ Added code to demonstrate more warnings.
* include/hberrors.h
+ Added :
#define HB_COMP_PARAM_COUNT 15
#define HB_COMP_PARAM_TYPE 16
* source/compiler/hbgenerr.c
+ added :
"3Invalid number of parameters: \'%s\' expected: \'%s\'"
"3Incompatible parameter # %s expected: \'%s\'"
* source/compiler/hvm.c
+ Added PCodes HB_P_JAMPSHORT, HB_P_JAMPSHORTFALSE and HB_P_JAMPSHORTTRUE
* source/compiler/harbour.c
+ Added hb_compOptimizeJumps() - Jumps Optimizer.
+ Added hb_compSort_ULONG() Call back function for qsort - used in the Jump Optimizer.
+ Added support for new elements of _FUNC.
* Modified hb_compGen*Jump*() to support Short Normal and Far Jumps.
* source/include/hbexprb.c
* Reverted handling of .OR. .AND. and IIF() to use default (FAR) JUMPs - note the use of (0) when calling hb_compGenJump*().
* source/compiler/genc.c
+ Added support for HB_P_JAMPSHORT, HB_P_JAMPSHORTFALSE and HB_P_JAMPSHORTTRUE
* source/compiler/cmdcheck.c
+ Added support for new switch -J[0|1] default is J1 which enables the Jump Optimizer - Use -J0 to disable.
* source/compiler/hbgenerr.c
- Removed following errors:
"Jump offset too long for HB_P_JUMP needed HB_P_JUMPFAR",
"Jump offset too long for HB_P_JUMPTRUE needed HB_P_JUMPFARTRUE",
"Jump offset too long for HB_P_JUMPFALSE needed HB_P_JUMPFARFALSE",
* Changed "HB_P_JUMPx not found when fixing offset" to "Jump PCode not found"
* source/include/hberrors.h
- Removed following defines:
#define HB_COMP_ERR_INVALID_JUMPTRUE 46
#define HB_COMP_ERR_INVALID_JUMPFALSE 47
#define HB_COMP_ERR_JUMP_NOT_FOUND 48
* source/include/hberrors.h
+ Added following to __FUNC
ULONG * pNOOPs; /* pointer to the NOOP array */
ULONG * pJumps; /* pointer to the Jumps array */
int iNOOPs; /* NOOPs Counter */
int iJumps; /* Jumps Counter */
* source/include/hbpcode.h
+ Added HB_P_JAMPSHORT, HB_P_JAMPSHORTFALSE and HB_P_JAMPSHORTTRUE
* source/compiler/hvm.c
* Added FAR support to HB_P_SEQBEGIN and HB_P_SEQEND
* source/compiler/harbour.c
* Modified hb_compGenJumpThere() to revert back to "short" JUMPs when fixing the jumps, it will than use HB_P_NOOP for the unused 3rd byte.
* It now supports all variations of JUMP including SEQBEGIN and SEQEND as well as the logig to not interfere with "short" JUMPs.
+ Added more error handling to hb_compGenJumpThere()
* source/include/hbexprb.c
* Modified handling of .OR. .AND. and IIF() to use "short" JUMPs - note the use of -1 when calling hb_compGenJumpXXX().
* source/compiler/genc.c
+ Added support for HB_P_NOOP (was missing!)
* Modified HB_P_SEQBEGIN and HB_P_SEQEND to support FAR jumps
* source/compiler/hbgenerr.c
+ Added following errors:
"Jump offset too long for HB_P_JUMP needed HB_P_JUMPFAR",
"Jump offset too long for HB_P_JUMPTRUE needed HB_P_JUMPFARTRUE",
"Jump offset too long for HB_P_JUMPFALSE needed HB_P_JUMPFARFALSE",
"HB_P_JUMPx not found when fixing offset"
* source/include/hbexprb.c
+ Added following defines:
#define HB_COMP_ERR_INVALID_JUMP 45
#define HB_COMP_ERR_INVALID_JUMPTRUE 46
#define HB_COMP_ERR_INVALID_JUMPFALSE 47
#define HB_COMP_ERR_JUMP_NOT_FOUND 48
* harbour.y
+ added support for _FIELD->Expression and _FIELD->ALIAS->Expression
"REPLACE Field WITH Exp" and "REPLACE ALIAS->Field WITH Exp" are supported
"REPLACE 1->Field WITH Exp" will compile but requires some more work by Ryszard.
+ added support for Aliased Variables in Push/Pop support.
+ added "Invalid alias expression" error to _szCERRORS.
- Removed Todo # 9 support for _FIELD->Alias->Field.
* harbour.l
+ added {Integer} definition - used by _Field->Area#-> rule
+ added MEMV->& and MEMVA&-> to MACROOP defeinition.
+ added rules for _FIELD->"{Integer}"->", _FIELD->"{Number}"->" (Error condition), _FIELD->"{Integer}"->" and _FIELD->"{Identifier}"->"
* Hberror.h
+ added #define ERR_ALIASEXP 38
+ /Tests/TstAlias.prg
added new test to demonstrate support for aliased expression.