Commit Graph

69 Commits

Author SHA1 Message Date
Ron Pinkas
8abc351c51 2001-07-17 18:25 UTC-0800 Ron Pinkas <ron@profit-master.com>
* 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..
2001-07-18 01:29:53 +00:00
David G. Holm
dd47ba76df See ChangeLog entry 2001-06-15 13:40 UTC-0400 David G. Holm <dholm@jsd-llc.com> 2001-06-15 17:44:14 +00:00
Ron Pinkas
88d6d4ea34 2001-05-10 14:40 UTC-0800 Ron Pinkas <ron@profit-master.com> 2001-05-10 22:05:54 +00:00
Ron Pinkas
196044b21f 2001-05-07 11:40 UTC-0800 Ron Pinkas <ron@profit-master.com>
* 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. */
2001-05-07 18:45:55 +00:00
Ron Pinkas
5018447cf3 2001-04-10 16:20 UTC-0800 Ron Pinkas <ron@profit-master.com>
* 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.
2001-04-10 23:18:33 +00:00
Ron Pinkas
fc1f6778a8 2001-04-09 22:40 UTC-0800 Ron Pinkas <ron@profit-master.com>
* 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
2001-04-10 03:42:27 +00:00
Ron Pinkas
bf9fd1abba 2001-04-09 11:50 UTC-0800 Ron Pinkas <ron@profit-master.com>
* include/hberrors.h
   * source/compiler/hbgenerr.c
     + Added #define HB_COMP_WARN_PARAM_SUSPECT 18 -> "4Suspecious parameter: %s expected: \'%s\'"

   * include/hbcomp.h
     + Added extern PCOMDECLARED  hb_comp_pReleaseDeclared;

   * source/compiler/harbour.c
     + Added static void hb_compDeclaredInit( void ) initializes decalaration of standard functions;

   * source/compiler/genc.c
     * Changed release code from hb_comp_pFirstDeclared to hb_comp_pReleaseDeclared.

   * source/compiler/hbpcode.c
     * Many refinments.
2001-04-09 19:02:59 +00:00
Ron Pinkas
274cba392f 2001-04-08 16:15 UTC-0800 Ron Pinkas <ron@profit-master.com>
* include/hberrors.h
     ! Corrected typo.

   * source/compiler/harbour.sly
   * source/compiler/harbour.y
     ! Corrected few incorrect "Unreachable code warnings".
     ! Corrected hb_compPushLine() in RECOVER and RECOVERUSING

   * source/compiler/harbour.c
   * source/compiler/hbpcode.c
     ! Improved StrongType logic.
2001-04-08 23:16:24 +00:00
Ron Pinkas
bb7e6f1111 2001-03-24 02:20 UTC-0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/hbpcode.c
     ! Fixed some StrongType logic.

   * source/compiler/genc.c
   * source/rdd/dbf1.c
   * source/rtl/gtapi.c
   * source/vm/hvm.c
     ! Corrected Compiler warnings.

   * source/compiler/harbour.c
   * include/hbcomp.h
     * Minor formatting.
2001-04-07 20:27:26 +00:00
Antonio Linares
5095f34175 HB_P_STATICNAME support. 2001-02-05 09:41:40 +00:00
Ron Pinkas
90dd4a548c 2000-10-02 13:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/hbpcode.c
     * Corrected 1 compiler warning.

   * source/pp/ppcomp.c
     * Cleaned-up and corrected bug when rules files had an #include directive.
     + Added CloseInclude() and moved relevant logic into it.

   * source/pp/ppcore.c
     - Removed unused s_iIncludes, and hb_pp_nEmptyStrings

   * utils/hbpp/hbpp.c
     + Added local hb_pp_nEmptyStrings to hb_pp_Parse()
2000-10-02 20:02:42 +00:00
Ron Pinkas
b1658bda6d 2000-09-07 00:10 UTC+0800 Ron Pinkas <ron@profit-master.com>
* 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. */
2000-09-07 07:31:31 +00:00
Ron Pinkas
2d1a852803 2000-09-02 09:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* 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.
2000-09-02 16:30:36 +00:00
Ron Pinkas
26c63dfa4e 2000-08-28 17:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.y
     - Removed 1 un-needed hb_comp_szDeclaredFun = NULL

   * source/compiler/hbpcode.c
     ! Completed declared parameter checking, for method applied to Adapted Type Variable.
2000-08-29 00:09:35 +00:00
Ron Pinkas
dfde3317a5 2000-08-28 15:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* include/hbcomp.h
     + Added: extern void hb_compDeclaredParameterAdd( char * szVarName, BYTE cValueType );

   * source/compiler/harbour.y
     ! Changed hb_compVariableAdd() to hb_compDeclaredParameterAdd() for Declaration Rules.

   * source/compiler/harbour.c
     ! Moved logic from hb_compVariableAdd() to new hb_compDeclaredParameterAdd() for "dummy" variables (Declaration Parameters).

   * source/compiler/hbpcode.c
     ! Minor corrections.
2000-08-28 22:10:20 +00:00
Ron Pinkas
da1d815d4d 2000-08-28 10:35 UTC+0800 Ron Pinkas <ron@profit-master.com>
* 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.
2000-08-28 17:55:49 +00:00
Ron Pinkas
52ad519676 2000-08-02 14:05 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
     * Changed VARIANT to ANYTYPE as it appear to be the prefered choice.

   * source/compiler/hbpcode.c
     * Changed \[ to [ to correct compiler warnings.
     * Changed Usual. to AnyType.
2000-08-02 21:07:29 +00:00
Viktor Szakats
d8ee9cee66 2000-07-30 14:32 UTC+0100 Victor Szakats <info@szelvesz.hu> 2000-07-30 12:50:35 +00:00
Ron Pinkas
9f05928bd2 20000522-10:40 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hbpcode.c
     ! Fixed ambigious else in hb_StrongType()

   * source/pp/pptable.c
     ! Fixed STRUCTURE rule to allow nesting of structures.

   * tests/teststru.prg
     * Enhanced to demonstrate Structure as element of other structure and self reference capabilities.
2000-05-23 01:31:34 +00:00
Ron Pinkas
eb2d8afdb4 20000522-06:15 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
     + Added "as structure", "as stru", "as array of structure", "as array of stru"

   * source/compiler/hbpcode.c
     * Improved some logic in hb_StrongType()

   * source/vm/hvm.c
     ! Corrected startup symbol when having to use Main() as per Ryszard.

   * source/pp/pptable.c
     + Added the equivalent of:
        #COMMANDS STRUCTURE <StruName> <Var1> AS <Type1> [, <VarN> AS <TypeN> ] => ;
                  STATIC __<StruName> := {|| IF( __<StruName> == NIL, , ) , HB_Structure( <"StruName">, { <"Var1"> [, <"VarN">] } )} ;;
                  DECLARE <StruName> <Var1> AS <Type1> [ <VarN> AS <TypeN> ] ;;
                  #TRANSLATE AS NEW <ClassName> => AS CLASS <StruName> := ( Eval( __<StruName> ), HB_Structure( <StruName> ) )

	#TRANSLATE AS NEW <ClassName> => AS CLASS <ClassName> := <ClassName>():New()

   * source/rtl/tclass.prg
     + Added Function HB_Structure() ( Fully Declared! ) This function is used internally, but may be freely called from Clipper level.
       It Aceepts Parameter 1 Structure Name, and optional parameter 2, as array of structure variable names.
       If called with 2nd parameter, returns NIL (just creates the new Structure), if called with just parameter 1, it returns
       new instance of defined structure.

   + tests\teststru.prg
     + Added demo for new structure syntax
2000-05-22 13:53:14 +00:00
Ron Pinkas
9339186a1b 20000519-15:40 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hbpcode.c
     + Minor correction in hb_compStrongType()
2000-05-19 22:41:06 +00:00
Ron Pinkas
9f3912cbd9 20000519-15:28 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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 ...
2000-05-19 22:31:19 +00:00
Ron Pinkas
7c2cac0386 20000519-10:17 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
   * source/compiler/harbour.c
   * source/compiler/hbpcode.c
     + Added support for AS Array Of Objects FROM CLASS ClassName syntax and type checking.

   * tests/testwarn.prg
     + Added code to demonstrate syntax and warnings for AS Array Of Objects FROM CLASS ClassName syntax and type checking.
2000-05-19 17:19:58 +00:00
Ron Pinkas
59501e617d 20000519-02:05 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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.
2000-05-19 09:25:06 +00:00
Ron Pinkas
4d80141da2 20000515-18:00 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.c
    - Removed: warning of unitialized static variable.

  * source/compiler/hbpcode.c
    - Removed: warning of unitialized static variable.
    ! Minor correction to hb_compStrongType()
2000-05-16 01:02:26 +00:00
Ron Pinkas
30cc98a20d 20000510-03:00 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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.
2000-05-10 10:13:16 +00:00
Paul Tucker
d0fd162828 Added casts 2000-05-10 06:47:38 +00:00
Ron Pinkas
cca893bb9d 20000509-00:15 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hbpcode.c
     ! Corrcted HB_P_NOT and minor fixes.
2000-05-09 07:16:21 +00:00
Ron Pinkas
d3cba77156 20000508-22:50 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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
2000-05-09 06:08:45 +00:00
Ron Pinkas
0d504bfd5c 20000507-21:20 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
     + Added token "optional"

   * source/compiler/harbour.y
     + Added token "optional", DecParam, DecParamList, OptParams.
     + Added support for optional parameters syntax in declared functions.

   * source/compiler/harbour.c
     + Added logic in hb_compVariableAdd() to deal with optional parameters of declared functions.

   * source/compiler/hbpcode.c
     + Added logic in hb_compStrongType() to deal with optional parameters of declared functions.

   * tests/testwarn.prg
     + Added code to demonstrate usage and warnings of optional parameters in declared functions.
2000-05-08 04:28:21 +00:00
Ron Pinkas
8d68c4da51 20000507-13:35 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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.
2000-05-07 20:36:33 +00:00
Ron Pinkas
3e7718e76e 20000507-05:20 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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".
2000-05-07 12:27:18 +00:00
Ron Pinkas
83015ce56c 20000506-22:45 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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
2000-05-07 05:55:07 +00:00
Ron Pinkas
6cc426a0b8 20000506-16:35 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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\'"
2000-05-06 23:39:13 +00:00
Ron Pinkas
81ac286072 20000504-22:40 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hbpcode.c
     + Added logic to allow PLUS an MINUS to accept any type as long as same.
     ! Fixed compiler warning about pVar
     * Minor optimizations
2000-05-06 19:18:02 +00:00
Ryszard Glab
44f903550e ChangeLog 20000505-17:53 2000-05-05 15:47:37 +00:00
Ron Pinkas
2583f6096d 20000504-22:40 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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".
2000-05-05 05:43:21 +00:00
Ron Pinkas
7b648ebc7e 20000504-04:05 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hbpcode.c
     ! Fixed GPF when Array of 0 elements created.
2000-05-04 11:05:09 +00:00
Ron Pinkas
86e2384686 20000504-03:10 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
     + Added:
	"as bool array"      { return AS_LOGICAL_ARRAY; }
	"as boolean array"   { return AS_LOGICAL_ARRAY; }
	"as var"             { return AS_VARIANT; }
	"as variant"         { return AS_VARIANT; }
	"as num array"       { return AS_NUMERIC_ARRAY; }
	"as numeric array"   { return AS_NUMERIC_ARRAY; }
	"as char array"      { return AS_CHARACTER_ARRAY; }
	"as character array" { return AS_CHARACTER_ARRAY; }
	"as string array"    { return AS_CHARACTER_ARRAY; }
	"as logical array"   { return AS_LOGICAL_ARRAY; }
	"as bool array"      { return AS_LOGICAL_ARRAY; }
	"as boolean array"   { return AS_LOGICAL_ARRAY; }
	"as date array"      { return AS_DATE_ARRAY; }
	"as array array"     { return AS_ARRAY_ARRAY; }
	"as block array"     { return AS_BLOCK_ARRAY; }
	"as object array"    { return AS_OBJECT_ARRAY; }
	"as var array"       { return AS_VARIANT; }
	"as variant array"   { return AS_VARIANT; }

   * source/compiler/harbour.y
     + Added AsArray
     + Added : %token AS_NUMERIC_ARRAY AS_CHARACTER_ARRAY AS_LOGICAL_ARRAY AS_DATE_ARRAY AS_ARRAY_ARRAY AS_BLOCK_ARRAY AS_OBJECT_ARRAY AS_VARIANT_ARRAY
     + Added rules to support declarion of array elements type

   * source/compiler/harbour.c
     ! Minor fix to hb_compVariableGetPos() to signify var usage if warning level lower than 3

   * source/compiler/hbpcode.c
     + Added logic to hb_compStrongType() to support type checking of array elements declared type.

   * include/hberrors.h
     + Added #define HB_COMP_ARRAY_ASSIGN_TYPE

   * source/compiler/hbgenerr.c
     + Added : "3Incompatible type in assignment to declared array element expected: \'%s\'"

   * tests/testwarn.prg
     + Added code to demonstrate more warnings.

   * contrib/hbclip/hbclip.ch
     + Added additional strong typing compatibility translations
2000-05-04 10:26:57 +00:00
Viktor Szakats
bba60d9c11 20000504-09:12 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-04 07:10:29 +00:00
Ron Pinkas
eec5c93ec1 20000503-21:30 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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.
2000-05-04 04:35:54 +00:00
Ron Pinkas
7da8b5fc2a 20000503-01:45 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* include/hberrors.h
     + Added:
        #define HB_COMP_NOT_INITIALIZED

   * source/compiler/hbgenerr.c
     + Added: "3Variable \'%s\' used but never initialized"

   * source/compiler/hbpcode.c
     * Enhanced hb_compStrongType() to warn against un-initialized varaiable usage.
2000-05-03 08:45:45 +00:00
Ron Pinkas
78a4a8e84f 20000503-01:00 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hbpcode.c
     * Fixed hb_compStrongType() to difrentiate between a MEMVAR and a DECLARED FUNCTION with the same name.
     + Added support for HB_P_ARRAYPUSH

   * source/compiler/hbgenerr.c
     * Minor correction to "Incompatibe return type"

   * tests/testwarn.prg
     + Added code to demonstrate more warnings.
2000-05-03 08:00:23 +00:00
Ron Pinkas
d4b1d4c1fd 20000502-23:15 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* 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.
2000-05-03 06:32:02 +00:00
Ryszard Glab
975a6bfc7f ChangeLog 20000502-16:07 GMT+1 2000-05-02 14:02:48 +00:00
Viktor Szakats
4f4de292f3 20000502-10:41 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-02 08:41:18 +00:00
Ron Pinkas
d9583b3651 20000502-01:30 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.c
      * Correction compiler warning about piShifts in hb_compOptimizeJumps().

    * source/compiler/hbpcode.c
      * Correction compiler warning about pSym in hb_compStrongType().
2000-05-02 08:30:27 +00:00
Viktor Szakats
382f8da021 20000502-01:14 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-01 23:11:11 +00:00
Ron Pinkas
f14599541d 20000501-14:15 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.c
      * Minor correction to hb_compVariableAdd().

    * source/compiler/hbpcode.c
      * Enhancements to hb_compStrongType() to support new PUSH/POPALIASEDFIELDNEAR.

    * tests/testwarn.prg
      + Added code to demonstrate more warnings.
2000-05-01 21:14:35 +00:00
Viktor Szakats
d2baf5dbfc 20000501-18:48 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-01 16:49:56 +00:00