* source/vm/macro.c
* source/vm/hvm.c
% Simplified logic for suppoting macro lists. Removed global variables:
int hb_vm_iFunCalls = 0, *hb_vm_aiMacroListParameters = NULL, hb_vm_iMacroListAllocated
which are no longer needed. No longer using any logic in any PCODE case, other than HB_P_PUSHMACROARG.
No longer using any arrays, or memory allocations.
* include/hbexpra.c
* include/hbexprb.c
* HB_P_PUSHMACROARG will now be followed with a push symbol sequence, indicating its parrent function call.
* include/hbpcode.h
* Added decimal values into the description comments for readability.
* source/rtl/tbrowse.prg
+ activated scoping
* include/hbapierr.h
include/hbapiitm.h
include/hbvm.h
source/rtl/errorapi.c
source/vm/hvm.c
source/vm/itemapi.c
! fixed va_start() use or, better, changed it to be compatible with OS/2 EMX GCC
compiler which REQUIRES that va_start() calls use a type which cannot be promoted
to something bigger. That is, this call is correct:
va_start(valist, ulUnsignedLongType)
while this one is not:
va_start(valist, usUnsignedShortType)
Using a type which can be promoted to a bigger one leads to memory corruption.
I think this requirement could exist even on other ANSI C compilers.
! Removed workaround inside hb_itemDo() and hb_itemDoC() to prevent this corruption.
* utils/hbpp/hbpp.c
* Commented an exit() call in hb_compGenError() to continue processing after an error just like Harbour does.
* include/hbapi.h
+ Added 2nd parameter BOOL bArg to hb_macroGetValue()
* include/hbexpra.c
+ Added global BOOL hb_exp_bArgList = FALSE;
* include/hbexprb.c
+ Added logic to generate HB_P_MACROPUSHARG rather than HB_MACROPUSH when pushed macro is a function call argument.
* include/hbpcode.h
* source/compiler/genc.c
* source/compiler/hbfix.c
* source/compiler/hbpcode.c
+ Added new HB_P_MACROPUSHARG
* source/macro/macro.y
+ Added logic to generate an error if macro expression is list, unless servicing an HB_MACROPUSHARG.
* source/vm/hvm.c
+ Added support for new HB_P_MACROPUSHARG calling hb_macroGetValue() with TRUE for bArg.
* source/vm/macro.c
+ Added 2nd parameter BOOL bArg to hb_macroGetValue() to signify servicing of HB_P_MACROPUSHARG.
* contrib/dot/pp.prg
+ Added bSplit 4th paramater to PP_PreProLine() defaulting to .T.. - Calls from PP_PreProFile() set it to .F..
* include/hbapi.h
+ Added member iListElements to HB_MACRO structure.
* source/macro/macro.y
+ Added rules to support a macro of a comma seperated list.
* source/vm/hvm.c
+ Added: int hb_vm_iFunCalls = 0, *hb_vm_aiMacroListParameters = NULL, hb_vm_iMacroListAllocated
to support new logic to track number of extra parameters introduced by means of a macro expanded to a list.
* source/vm/macro.c
+ Added logic to track number of extra parameters introduced by means of a macro expanded to a list.
* source/pp/ppcore.c
+ Added logic for new Idenitifier Match Marker <!AnyId!> which will only match Identifiers.
+ Added static BOOL IsIdentifier( char *szProspect )
* include/hbclass.ch
! Changed <name> to <!name!> in 3 VO OO compatibility rules, where regular match marker was TOO generic.
! Reinstated default #define HB_CLS_VO
* contrib/dot/pp.prg
* Added support fort '|' as a continuation token (as in Clipper).
* include/hbclass.ch
- Commented out 3 rules used for VO OO compatibility that are TOO generic, and match unexpected input.
* source/pp/ppcore.c
- Recommented out test for continuation token at the end of an Expression in isExpres() (after correcting cause for prior reinstatment).
* contrib/dot/pp.prg
+ PP_RunArray( asLines, aParams )
+ PP_Exec( aProcedures, aInitExit, nProcId, aParams )
* Modified all PP_RunXXXX() to use PP_Exec()
* RP_Comp_Err() now repports source line and line number with the sysntax error.
* contrib/dot/pp_harb.ch
+ Added Tinterpreter() class
METHOD New()
METHOD AddLine( cLine )
METHOD SetScript( cText )
METHOD Compile()
METHOD Run()
METHOD RunFile( cFile, aParams, cPPOExt, bBlanks ) INLINE PP_Run( cFile, aParams, cPPOExt, bBlanks )
METHOD ClearRules()
METHOD InitStdRules()
METHOD LoadClass()
METHOD LoadFiveWin()
* contrib/dot/prgscrpt.prg
* Modified to demonstrate TInterpreter() syntax.
* include/hbapi.h
* source/vm/arrays.c
* Fixed bug, in hb_stackArrayFromParams() and modified to accept a frame base parameter.
* source/vm/arrayshb.c
+ Added HB_APARAMS() PRG wrapper to hb_stackArrayFromParams() returning array with passed parameter of the function calling HB_APARAMS()
* source/rtl/do.c
* Added required frams base parameter in calls to hb_stackArrayFromParams(). This fix population of oErr:Args if error occurs.
* include/hbclass.ch
! Corrected few minor typos.
* source/compiler/harbour.slx
* source/macro/macro.slx
- Commented few unused lines.
* contrib/dot/pp.prg
% Rewrote NextToken() and NextExp().
+ Added NextIdentifier()
! Found that Clipper PP is not processing tokens read by NextToken() and NextExp() so removed recursive support,
and changed logic in ProcessLine() to linear process:
#defines against all valid Identifiers - Expansion forces a resacn from top.
#[x]translates against all tokens - Expansion forces a resacn from top of #defines.
#[x]command agains the first token - Expansion forces a resacn from top of #defines.
! Corrected and refined many aspects of Interpreter mode.
+ Added ExecuteMethod() and support for OO syntax.
+ Added support for -I<includepaths...> command line switch.
* contrib/dot/rp_run.ch
+ Added support for OO syntax.
* contrib/dot/pp.txt
* Updated documentation.
* include/hbclass.ch
% Removed many redundant rules (recently added for OO integrity checks).
/* Found the PP problem that stopped me from implementing this optimized form before.
It seems the PP has a problem with "[" follwing a an identifier without a space prefix like:
#command TEST[([<param,...>])]
It seems to work OK like this:
#command TEST [([<param,...>])]
*/
* include/hbclass.ch
! Fixed declaration support for OnError() METHODS
! Fixed support for Methods having space prefixing the "( ... )" in the method implementation.
+ Refined #error messages to report the Class Name .
* source/pp/ppcore.c
* Removed recently added but not required support of #define expansion in #error directive.
* include/hbclass.ch
+ Added logic for NO Checking of OO Syntax (#ifdef NO_OO_ERR) - Use /dNO_OO_ERR to disable OO Syntax Checking.
* source/pp/ppcore.c
* Temporarily disabled support of #define expansion in #error directive.
* include/hbclass.ch
% Removed numerous redundant rules.
+ Added logic to detect and raise #error on implementation of NON Declared method.
* source/rtl/tclass.prg
+ Added logic to dispose of posibble "(...)" suffix to Method Name in AddVirtual(), AddMethod(), and AddClsMethod().
* include/hbclass.ch
! Added missing parameter to declaration of AddMultiData()
* source/compiler/harbour.c
! Corrected broken Linked-List links in hb_compDeclaredInit()
* source/compiler/hbpcode.c
* Minor correction declared parameters checking.
* source/vm/hvm.c
+ Added complete call stack display to hb_vmRequestCancel()
/* Cancelling will now show the complete call stack, rather than the not very helpful just current procedure. */
* contrib/dot/pp.prg
* contrib/dot/rp_run.ch
! Few corrections to Pre Processor, and Interpreter.
* include/hbclass.ch
+ Added support for METHOD implementations without requiring the CLASS Clause.
+ Added support for METHOD implementations without requiring the "()" if no parameters needed.
* include/hbapi.h
* Changed HB_NESTED_CLONED to record BaseArray instead of first item.
* Reverted declaration of hb_arrayClone to use 2nd paramater ( pClonedList ) for futute Thread Safety.
* source/vm/arrays.c
* Corrected handling of nested (shared) empty array in hb_arrayClone().
* Reverted definition of hb_arrayClone() to use 2nd parameter ( pClonedList ) for future Thread Safety.
* source/vm/arrayshb.c
* source/vm/classes.c
* source/vm/hvm.c
* Added required 2nd parameter ( NULL ) to calls to hb_arrayClone()