Commit Graph

28 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
469f81397a 2008-05-20 02:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/complex.c
    ! fixed typo in last modification - I chose wrong token
2008-05-20 00:19:24 +00:00
Przemyslaw Czerpak
9e6486912e 2008-05-19 23:01 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_rpm.sh
  * harbour/harbour.spec
    * changed --without gpl to --without gpllib

  * harbour/source/compiler/complex.c
    * changed END terminal symbol used for END SEQUENCE to ENDSEQ
      for better error reporting in wrong .prg code
2008-05-19 21:01:53 +00:00
Przemyslaw Czerpak
a95ca6ab8b 2008-05-16 19:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    ! moved function related variables and structures from HB_COMP to
      PFUNCTION - it fixes many different problems which can appear in
      some code, also the recent Mindaugas' example
    ! initialize statement value in error action to avoid valgrind/CodeGuard
      warning reports when syntax error appear in some complex statements

  * harbour/source/rtl/scrollbr.prg
    * repalced TAB with SPACEs
2008-05-16 17:27:20 +00:00
Przemyslaw Czerpak
01ac9cd6f1 2008-05-14 00:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/complex.c
    ! added casting to unsigned char to force syntax error when
      some unknown tokens appear. Negative values bison recognizes
      as end of input.

  * harbour/contrib/rddads/adsmgmnt.c
    ! cleaned one warning
2008-05-13 22:27:36 +00:00
Przemyslaw Czerpak
c374d6f243 2007-10-13 02:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/doc/destruct.txt
    * update description for multiple inherited destructors

  * harbour/source/compiler/complex.c
    * _HB_CLASS and _HB_MEMBER are not longer reserved words

  * harbour/include/hbclass.ch
  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/macro/macro.y
  * harbour/source/compiler/harbour.y
    * formatting and minor code cleanup

  * harbour/source/compiler/hbusage.c
    * added missing information about -undef:<id> switch to usage
      description

  * harbour/source/compiler/gencc.c
    ! fixed bug reported by Teo in code generated for SWITCH statement
2007-10-13 00:12:25 +00:00
Przemyslaw Czerpak
ce51877db3 2007-10-10 00:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/complex.c
    * cleanup: removed unused variable, some extension to datetime
      decoding, etc.
2007-10-09 22:05:51 +00:00
Przemyslaw Czerpak
4803d0e558 2007-10-09 09:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/runner.c
  * harbour/source/compiler/genhrb.c
    ! added support for functions marked as DYNAMIC in .hrb format

  * harbour/source/compiler/complex.c
    + finished code (stil disabled) to decode datetime in
       VFP strict date form
2007-10-09 07:05:39 +00:00
Przemyslaw Czerpak
c5c1113387 2007-10-08 23:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/hvm.c
    * do not clear references to public functions in symbol tables used
      by unloaded modules

  * harbour/source/compiler/complex.c
    + added disabled yet code to decode datetime in VFP strict date form
         {^YYYY/MM/DD[,][HH[:MM[:SS[.CCC]]][A|P]]}
      It's for future datetime implementation.
2007-10-08 21:06:12 +00:00
Przemyslaw Czerpak
72eca3d3e9 2007-09-18 00:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicls.h
  * harbour/source/vm/hvm.c
    + added hb_clsDoInit() function to initialize classy .prg functions

  * harbour/source/compiler/complex.c
    * allow to use NIL as class name

  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyh
    % optimize automatically var[0] declaration and generate the same
      PCODE as for var:={}

  * harbour/source/rtl/tscalar.prg
    + added HASH, POINTER and SYMBOL scalar classes
    * changed NIL class to not use any instance variables

  * harbour/source/vm/classes.c
    + added support for scalar classes. Now at startup classy code looks
      for hb<TYPENAME> functions and try to execute them to register
      scalar classes. It's Class(y) compatible behavior and only the prefix
      of scalar ceases class function is different: 'CSY' in class(y) and
      'HB' in Harbour, f.e.: hbNumeric()
      If you prefer xHarbour like not automatic scalar class registration
      with some PP commands:
         ASSOCIATE CLASS <ClassName> WITH TYPE
                           ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                           NUMERIC|POINTER|SYMBOL
         ENABLE CLASS TYPE ALL
         ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                           NUMERIC|POINTER|SYMBOL
         EXTEND [TYPE] ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                       NUMERIC|POINTER|SYMBOL WITH METHOD <SomeFunc>
      Then I can replace current code with it. If not then we should
      divide scalar cases definitions into separated files to allow
      easier overloading. I'm interesting in your opinions.
2007-09-17 22:45:30 +00:00
Przemyslaw Czerpak
08a3551742 2007-09-12 02:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/std.ch
    * cover ENDSEQUENCE translation with HB_C52_STRICT macro
    + added translations for END SWITCH, END WITH, END OBJECT

  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
    + added support for ENDSEQ[UENCE], ENDSW[ITCH] and ENDW[ITH]

  * harbour/source/rtl/hbgtcore.c
    ! changed string to color number translation to be fully Clipper
      compatible. Now I do not know any examples which we translate
      differently - if someone will find any them then please inform me.
      The only one intentional difference between Harbour and Clipper
      is in color number to string translation and background highlighting
      attribute "*", Clipper put it just before "/" as part of foreground
      color (f.e.: 248 => "N*+/W") but Harbour as part background color
      (f.e.: 248 => "N+/W*") - Clipper compatible behavior is enabled when
      Harbour is compiled with HB_C52_STRICT macro

  * harbour/utils/hbtest/rt_misc.prg
    * control the position of background highlighting attribute (*) in
      expected results depending on HB_C52_STRICT. Harbour passes correctly
      all included color translation tests.
2007-09-12 00:10:09 +00:00
Przemyslaw Czerpak
ad2ab41638 2007-06-14 00:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompat.ch
    + added translation rules for extended code blocks

  * harbour/source/compiler/gencc.c
    * cleaned C compiler warnings in -gc3 output and SWITCH <exp>
      statement

  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    * allow to use 0d0 and 0d00000000 as empty date value

  * harbour/source/pp/Makefile
    * workaround for problems with some GNU make  versions,
      f.e. 3.76.1 on OS2
2007-06-13 22:06:19 +00:00
Przemyslaw Czerpak
91ec7b23a5 2007-05-11 22:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbmain.c
    * changed code used for variable scoping - now it's much more
      simple (only one function) and allows to use declarations in
      nested functions/codeblocks with visibility similar to Pascal
    ! fixed parsing FILED <fields,...> IN <alias>
      we were accepting code like:
         FIELD f1, f2 IN db1, f3 IN db2 IN db3
      and for all fields the last alias (db2 in this example) was used
    ! fixed calculating number of static variables with -b (debugger)
      compilation (number of file wide statics were doubled)
    ! fixed generation of static variable names for debugger when declared
      with array dimensions, f.e.:
         static sVar[3]

  * harbour/source/rtl/hbffind.c
    * minor cleanup *nix version

  * harbour/contrib/bmdbfcdx/bmdbfcdx1.c
    ! fixed casting for C++ compilation

  * harbour/source/rdd/dbfdbt/dbfdbt1.c
    * updated for some old API modifications (this library is not used now
      but if we keep it in CVS then I think it should be updated)
2007-05-11 20:51:04 +00:00
Przemyslaw Czerpak
88cda3200d 2007-03-22 12:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
    * updated for new files - please check

  * harbour/harbour.spec
    * added compiler library

  * harbour/bin/pack_src.sh
  * harbour/bin/hb-func.sh
    * updated for new files and libraries

  * harbour/config/w32/mingw32.cf
  * harbour/config/w32/watcom.cf
  * harbour/config/w32/xcc.cf
    * added winsock libraries

  * harbour/include/hbapicdp.h
  * harbour/source/rtl/cdpapi.c
    + added hb_cdpicmp() - not case sensitive version of hb_cdpcmp()

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + hb_itemStrICmp(), hb_itemCopyFromRef(), hb_itemMoveFromRef()

  * harbour/include/hbapi.h
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/include/hbmacro.h
  * harbour/include/hbpcode.h
  * harbour/include/hbvmpub.h
  * harbour/include/hbxvm.h
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/genhrb.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/hbopt.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.yyh
  * harbour/source/macro/macrolex.c
  * harbour/source/vm/Makefile
  * harbour/source/vm/arrays.c
  * harbour/source/vm/asort.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/garbage.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/macro.c
  + harbour/source/vm/hashes.c
  + harbour/source/vm/hashfunc.c
    + added hash items, f.e.:
         local h1 := {=>}, h2 := { "a"=>1.234, "b"=>2.345 }
         ? h2[ "a" ], h2[ "b ]
    + added support for DYNAMIC function declaration - it allow to define
      functions which are lately bound at runtime, f.e.:
         /*** t01.prg ***/
         dynamic func1
         proc main()
         local h:=__hrbload("t02.hrb")
         ? func1()
         return

         /*** t02.prg ***/
         func func1
         return "Hello!!!"

    % use new FUNCALL structure to hold EXTERNAL and DYNAMIC functions,
      it reduce memory usage, FUNCALL is much smaller then FUNCTION
    % use symbol scope bits when possible instead of making some linear scan
    + added new enumarator message: __ENUMKEY - it allow to access
      key value when hash item is base enumerator value, f.e.:
         proc main()
         local v, h:={"a"=>1.000,"b"=>2.000,"c"=>3.000}
         heval( h, { |k,v,i| qout( k, v, i ) } ); ?
         for each v in h
            ? v, "=>", v:__enumKey(), v:__enumValue(), v:__enumIndex(), ;
                       valtype(v:__enumBase())
            v += 0.123
         next
         ? ;heval( h, { |k,v,i| qout( k, v, i ) } )
         return
    + added C level hb_hash*() functions
    + added support for full HASH item cloning and updated array cloning
      to also clone nested hashes - please note that xHarbour does not do
      that, in xHarbour ACLONE() clones _ONLY_ nested arrays and HCLONE()
      _DOES_NOT_ clone _ANY_ nested items.

  * harbour/include/hbextern.ch
    + added hash functions HB_H*()
    * changed INET*() functions to HB_INET*()
    + added hash functions H*() and socket functions INET*() when
      HB_COMPAT_XHB is set

  * harbour/include/hbtypes.h
    + added missing HB_EXTERN_BEGIN / HB_EXTERN_END

  * harbour/include/hbpp.h
  * harbour/source/pp/ppcore.c
    ! added protection against automatic word concatenation in some cases
    ! fixed preprocessing expressions when match marker matches ';' token

  * harbour/source/rtl/Makefile
  + harbour/source/rtl/itemseri.c
    + added functions for item serialization: HB_SERIALIZE() and
      HB_DESERIALIZE() - these function are not binary compatible
      with xHarbour functions with the same names but make very
      similar job with the exception to serialization of codeblock
      and object variables - Harbour does not allow to serialize
      codeblocks and serialize objects as arrays.
      In most cases these functions can replace the xHarbour ones
    + added HB_DESERIALBEGIN() and HB_DESERIALIZE() functions covered
      by HB_COMPAT_XHB macro - this functions are only for compatibility
      with existing xHarbour code, In Harbour HB_DESERIALBEGIN() is
      dummy function which returns first parameter and HB_DESERIALNEXT()
      is a simple wrapper to HB_DESERIALIZE() so it's not necessary to
      use them.

  * harbour/source/rtl/hbinet.c
    * changed INET*() functions to HB_INET*() and enable them for default
      build
    + added INET*() functions wrappers covered by HB_COMPAT_XHB macro

  * harbour/source/rtl/hbrandom.c
    + added HB_RANDOMINT() - xHarbour compatible

  * harbour/source/rtl/len.c
    + added support for HASHes

  * harbour/source/rtl/valtype.c
    + added support for HASHes
    + added set of HB_IS*() functions - they are a little bit faster then
      calling VALTYPE( v ) == <cVal>
    - removed HB_ISBYREF() - this function cannot longer work, it was using
      a Clipper incompatible anomalies in passing variables by reference I
      fixed so it has to stop to work. If it will be realy necessary to
      implement HB_ISBYREF() function then please inform me - it will have
      to be done at compiler level or with some much deeper HVM stack
      checking.

  * harbour/source/vm/extend.c
    ! fixed hb_extIsArray() and hb_extIsObject() to work well with
      parameters passed by reference.
      Please note that now hb_extIsArray() return TRUE only for pure arrays
      not object values.

  * harbour/contrib/Makefile
  + harbour/contrib/tip/Changelog
  + harbour/contrib/tip/Makefile
  + harbour/contrib/tip/atokens.c
  + harbour/contrib/tip/base64x.c
  + harbour/contrib/tip/cgi.prg
  + harbour/contrib/tip/client.prg
  + harbour/contrib/tip/credent.prg
  + harbour/contrib/tip/cstr.prg
  + harbour/contrib/tip/encb64.prg
  + harbour/contrib/tip/encmthd.c
  + harbour/contrib/tip/encoder.prg
  + harbour/contrib/tip/encqp.prg
  + harbour/contrib/tip/encurl.prg
  + harbour/contrib/tip/ftpcln.prg
  + harbour/contrib/tip/hbhex2n.c
  + harbour/contrib/tip/httpcln.prg
  + harbour/contrib/tip/mail.prg
  + harbour/contrib/tip/popcln.prg
  + harbour/contrib/tip/smtpcln.prg
  + harbour/contrib/tip/tip.ch
  + harbour/contrib/tip/url.prg
  + harbour/contrib/tip/utils.c
    + added TIP library - code borrowed from xHarbour



   Please test - a lot of above code is not well tested, also some peaces
   were written over year ago for different things (f.e. serialization for
   NETRDD) and now I collected them and committed.
   The TIP library was not tested at all. It can be compiled but I cannot
   say if it works - I hope that people familiar with it can make necessary
   test and fixes.
   It's also not the final version of low level HASH item code. I'm working
   on more efficient structure which uses binary tries but I cannot say when
   I'll finish it (maybe in this weekend or maybe in next year) so I committed
   working version now even if I'm not happy with overall performance (BTW
   not worser then in xHarbour)
2007-03-22 12:28:14 +00:00
Przemyslaw Czerpak
1cba971155 2007-02-28 08:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/pp/ppcore.c
    * updated lexer to recognize IF(<exp1>,<exp2>,<exp3>) in expressions like
      IF(<exp,...>) - it allow to make some grammar rules much more simple.
2007-02-28 07:11:17 +00:00
Przemyslaw Czerpak
26617b2472 2007-02-18 12:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/hbfix.c
  + harbour/source/compiler/hbopt.c
    * divided hbfix.c into two separated functions:
      - hb_compFixFuncPCode() which only fix generated PCODE updating
        local parameters numbers when PARAMETERS is used
      - hb_compOptimizePCode() which makes PCODE optimization
      It allows to not execute hb_compFixFuncPCode() when PARAMETERS
      is not use and execute hb_compOptimizePCode() more then once in
      optimization process.

  * harbour/hbgtmk.sh
    * updated CVS server name

  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/hbident.c
    * changed code for generating in PCODE line numbers and module names
      there was serious problem with line numbers and module names in old
      code - in many cases line numbers were not generated at all or
      generated in wrong places. Also file module name was not updated
      when inside of function some code was included with #include
      For such situation now modified version of HB_P_MODULE is generated
      with module name only but without function name, f.e.:
         HB_P_MODULE    "test.prg:"
      exactly the same form of HB_P_MODULE is used in xHarbour.
      Debugger code should be updated to recognize such HB_P_MODULE version
      Ryszard any chance that you can look at it?
      And what about syncing with xHarbour debugger?
      I can add some missing functions to compiler and HVM but I do not
      want to update next peace of code myself. Sorry but I do not have
      enough time. I'd prefer to finish some other things I'm working.
      If Ryszard is busy can someone else try to port xHarbour debugger
      to Harbour?
2007-02-18 11:40:22 +00:00
Przemyslaw Czerpak
48f8dba263 2007-02-08 23:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbgtinfo.ch
  * harbour/contrib/libct/ctwin.c
  * harbour/source/rtl/gtalleg/gtalleg.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/gtos2/gtos2.c
  * harbour/source/rtl/gtpca/gtpca.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtstd/gtstd.c
  * harbour/source/rtl/gtwin/gtwin.c
  * harbour/source/rtl/gtwvt/gtwvt.c
  * harbour/source/rtl/gtxwc/gtxwc.c
    + added support for GTI_FULLSCREEN, GTI_KBDSUPPORT, GTI_ISCTWIN

  * harbour/source/rtl/hbgtcore.c
    ! fixed line and box drawing when the coordinates are out of screen size

  * harbour/include/hbapi.h
  * harbour/include/hbcomp.h
  * harbour/include/hbpcode.h
  * harbour/include/hbstack.h
  * harbour/include/hbvm.h
  * harbour/include/hbxvm.h
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/itemapi.c
    ! added protection against cyclic references in arrays
    * eliminated action parameter from hb_vmRequestReenter() /
      hb_vmRequestRestore()
    * moved s_lRecoverBase and s_uiActionRequest to HB_STACK structure
      for future MT HVM version
    + added internal item structure hb_struRecover - it's not real item
      but this structure is used to keep information about BEGIN SEQUENCE
      data - it reduce HB_STACK usage
    + added support for ALWAYS clause in BEGIN SEQUENCE
      The syntax is:
         BEGIN SEQUENCE
            <code>
         [ RECOVER [ USING oErr ] ]
            <recoverCode>
         [ ALWAYS ]
            <alwaysCode>
         END [ SEQUENCE ]
      It's guaranteed that <alwaysCode> is _ALWAYS_ executed even if
      inside <code> or <recoverCode> some new exceptions like RETURN,
      BREAK or QUIT will appear.
      Please note that when the following code is executed:
         BEGIN SEQUENCE
            <code>
         ALWAYS
            <alwaysCode>
         END
      (without RECOVER clause) then BREAK exception inside <code> is not
      recovered, <alwaysCode> is executed and then BREAK exception is
      passed to outer BEGIN SEQUENCE. This is the same semantic as
      used in TRY / [ CATCH ] / FINALLY / END
      Those of you who prefer to use TRY / CATCH / FINALLY / END instead
      of BEGIN SEQUENCE / RECOVER / ALWAYS / END can simply add to your
      source code:
         #command TRY               => BEGIN SEQUENCE
         #command CATCH [ oErr ]    => RECOVER [ USING <oErr> ]
      and:
         errorBlock( {|oErr| break( oErr ) } )
      Though instead of 'break( oErr )' I suggest to use some small function
      which will support some basic recovery/substitute operations like in
      default errorsys() and LockErrHandler() to not break existing code
      which may depends on the default behavior.
      If you want I can add direct support for TRY / CATCH / FINALLY / END
      but I'm not sure it's really necessary.
      Please note also that in Harbour ALWAYS code is execute even for QUIT
      excpetion.
      When <alwaysCode> is executed current exception is stored and restored
      when is finished. If new exception appears inside <alwaysCode> then
      restored exception depends on the priority in the following order:
         QUIT     // highest priority
         BREAK
         RETURN
      If both exceptions have the same priority and contain additional value
      (error object in BREAK or return value in RETURN) then the recently set
      one is restored. It's similar behavior to destructor code.

  * harbour/source/common/hbstr.c
    * moved one character length string table (hb_szAscii) from hvm.c
      to use it also in compiler and preprocessor

  * harbour/source/compiler/ppcomp.c
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/pplib.c
    * tuned error messages to be more Clipper compatible
    % use static strings from hb_szAscii

  * harbour/source/rtl/alert.prg
    * use hb_gtInfo( GTI_FULLSCREEN ) to detect type of GT driver
    ! some minor fixes
      TOFIX: we have to also use GTI_ISCTWIN or add window allocation
             to standard GT drivers to be Clipper compatible when CTWIN
	     is used - In Clipper Tools ALERT() works in differ way then
	     the standard one. It creates separate window box to display
	     data, supports SETKEY(), etc. I'll think about adding some
	     extended support for ALERT() and similar operations (f.e.
	     separate debugger windows) to GT API so it will be also
	     possible to overload standard alert() command by GUI message
	     box in GTGUI and similar GT drivers.

  * harbour/source/rtl/binnumx.c
    ! fixed U2BIN() - wrong casting
2007-02-08 22:56:31 +00:00
Przemyslaw Czerpak
071fef7612 2007-01-13 14:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rdd_ads/adsfunc.c
  * harbour/source/rdd/workarea.c
    * formatting

  * harbour/include/hbapi.h
  * harbour/source/vm/extend.c
    + added missing hb_storptrGC()

  * harbour/include/hbapicdp.h
  * harbour/source/rtl/cdpapi.c
    + added parameter to unicode translation function to protect control
      code translation
    * formatting

  * harbour/source/rtl/gtsln/kbsln.c
  * harbour/source/rtl/gtxwc/gtxwc.c
    * use new unicode translation function format. It also fixes problem
      with space translation in GTLSN used in UTF8 mode

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + added hb_itemCopyToRef(), hb_itemMoveToRef(), hb_itemMoveRef(),
      hb_itemUnRefWrite()

  * harbour/include/hbexprb.c
    ! use HB_P_DUPLUNREF instead of HB_P_DUPLICATE when assign is used in
      push context - Clipper compatible behavior, see:
         x:=10
         f(y:=iif(.t.,@x,))
         ? x, y
         func f(x)
         x+=100
         return nil

  * harbour/include/hbver.h
  * harbour/source/common/hbver.c
    * changed status to "devel"

  * harbour/source/common/expropt2.c
    * disabled setting NIL when iif(.t.,,sth()) is optimized to avoid
      warning when iif() is used as statement - to fix number of parameters
      passed to function in code like f(iif(.t.,,sth())) we will need a
      little bit deeper modification

  * harbour/source/compiler/complex.c
    * added hack for potential problems caused by WITH OBJECT syntax, f.e.
      in code like:
         proc p(obj,x)
         case:=myCaseClass():new()
         retu:=myCaseClass():new()
         WITH OBJECT obj
            do case
               case x==nil
               case:value()
               case:action()
                  retu:sth()
            end
         END
         case:action()
         retu:sth()
         return
      case:action(), case:value(), retu:sth() can means two different things
      and compiler cannot guess which one should use. It cannot be fixed
      because it's caused by bad WITH OBJECT syntax. In xHarbour constractions
      like case:value() or retu:sth() are always used as in  WITH OBJECT
      context what is not Clipper compatible. I do not want to introduce
      such limitations. We have two choices: change WITH OBJECT syntax or
      add some hack to "hide" the problem a little bit. Now I intorduce
      ugly hack which check number of spaces between ':' so
         case :action()
      is compiled as case condition using WITH OBJECT message and
      case:action() as sending message to object in case variable

  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    + added support for passing base value to FOR EACH by reference.

  * harbour/source/vm/arrays.c
    * use hb_itemMoveRef() in AINS()/ADEL() to avoid creation of cyclic
      reference chains

  * harbour/source/vm/debug.c
  * harbour/source/vm/memvars.c
    * use hb_itemCopyToRef() to avoid creation of cyclic reference chains

  * harbour/source/vm/classes.c
  * harbour/source/vm/hvm.c
    * use hb_itemMoveToRef() to avoid creation of cyclic reference chains
    + added support for for writable string enumerators, f.e.:
         proc main()
         local s, c
         s:="abcdefghijklmnopqrst"
         for each c in @s
            if c$"aeio"
               c:="*"
            endif
         next
         ? s // "*bcd*fgh*jklmn*pqrst"
         return
2007-01-13 13:18:35 +00:00
Przemyslaw Czerpak
9d263b1141 2007-01-05 08:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
     + added comment

  * harbour/include/hbexpra.c
     * change expression type for <exp> = <exp> from HB_EO_EQUAL
       to HB_EO_ASSIGN in hb_compExprGenStatement() function so
       later we can safely make all optimization in hb_compExprUseEqual()
       during reduce process - optimization only when PCODE is generated
       is too late and causes that expressions like:
         iif( 1 = 1, <exp>, <exp> )
       are not reduces (Clipper reduce them)
     * do not execute hb_compFunCallCheck() in hb_compExprNewFunCall()
       to avoid repeating the same error message in hb_compExprUseFunCall()

  * harbour/include/hbexprb.c
     * enabled reduction for hb_compExprUseEqual() and generate errors
       when it's used as statement

  * harbour/source/common/expropt2.c
     * added some missing reductions for expressions like: NIL == NIL

  * harbour/source/common/reserved.c
     % very basic optimization: use binary search instead of linear
       scanning for reserved words and shortcuts - it gives noticeable
       speed improvement in macro compiler

  * harbour/source/compiler/complex.c
     * changed the order of special keywords to keep alphabetic sorting

  * harbour/source/compiler/harbour.c
     % some minor optimizations in aliased expressions
     ! added protection in hb_compIsJump() to avoid possible problems
       when this function is executed after replacing some code with
       jumps by series of NOOPs in optimizations process

  * harbour/source/compiler/hbfix.c
     * better optimization of PCODE generated for logical expressions

  * harbour/source/compiler/hbfunchk.c
     % use binary search instead of linear scan

  * harbour/source/rtl/minmax.c
     ! fixed GPF when MIN() or MAX() function is called with less then
       two parameters

  * harbour/source/vm/itemapi.c
     * minor optimization and formatting
2007-01-05 07:41:20 +00:00
Przemyslaw Czerpak
7a13cae5e3 2006-12-27 15:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hberrors.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbpcode.h
  * harbour/include/hbxvm.h
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/vm/hvm.c
    + added support for passing optional parameters to called function, f.e.:
         proc p( a, b, ... )
         qout( a, b, "X", ... )
    * forbid creating function pointer when function is used with parameters,
      f.e.: x:=@f1(1,2,3)

  * harbour/source/compiler/complex.c
    * cleaned all restrictions on reserved words I've found - if I missed
      sth then please inform me. The previous behavior and some error
      messages are used with -kc compiler switch

  * harbour/source/rtl/symbol.prg
  * harbour/source/rtl/tobject.prg
    ! eliminated limitations in number of constructor parameters
      (new syntax with passing optional parameters used)
2006-12-27 14:01:52 +00:00
Przemyslaw Czerpak
f63975287b 2006-12-18 19:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/w32/bcc32.cf
    * cleanup
  + harbour/config/w32/xcc.cf
    + added XCC support

  * harbour/contrib/btree/hb_btree.c
    * use hb_vmAtInit()/hb_vmAtExit() instead of INIT/EXIT functions defined
      from C code

  * harbour/contrib/libct/tab.c
    * casting

  * harbour/contrib/odbc/odbc.c
    ! removed #include <malloc.h> - it should not be used with new C
      compilers
      I think that we should replace this library with hbodbc from xHarbour.

  * harbour/contrib/ole/ole2.c
    * updated for XCC

  * harbour/include/hbdefs.h
    * include stdint.h if available

  * harbour/source/compiler/complex.c
    ! fixed yet another stupid mistake in WITHOBJECT token

  * harbour/include/hbpcode.h
  * harbour/include/hbxvm.h
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/vm/hvm.c
    + added HB_P_SWAP <n> PCODE

  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
    ! fixed GPF during compilation of @:var, @:&var, @o:&var
    + added support for @o:&var and @:var, @:&var inside WITH OBJECT
      statement
    * changed PCODE generated of ++,--,+=,-=,...
      Now left side expression is evaluated _ONLY_ once and when object
      messages are used it's guarantied that exactly the same object
      variable will be used. It also fixes some problems which exists
      in Clipper. This optimization is enabled by -kh flag (by default)
      and can be disabled with -kc.
    % optimize ald macros in ++,--,+=,-=,... operations
    * add automatically "_" prefix when macro message is used in assignment
      context, f.e.:
         s:="osCode"
         o:=errorNew()
         ? o:&s
         o:&s := 100
         ? ++o:&s
         ? o:&s *= 5

  * harbour/include/hblang.ch
    - removed #xtranslate - this file is included by C code and some C
      compiler do not like unknown directives

  * harbour/utils/hbtest/rt_math.prg
    + added test code for <op>assign and (pre/post)(inc/dec)rementation,
      macro messages and WITH OBJECT

  * harbour/source/compiler/harbour.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rtl/errorapi.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/gtos2/gtos2.c
  * harbour/source/rtl/gtpca/gtpca.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtstd/gtstd.c
  * harbour/source/rtl/gtwin/gtwin.c
    * casting and warning cleanup

  * harbour/utils/Makefile
    + added $(HB_UTILS)

  - harbour/utils/hbpp/hbpp.h
  + harbour/utils/hbpp/hbppdef.h
  * harbour/utils/hbpp/hbpp.c
  * harbour/utils/hbpp/hbppcomp.c
  * harbour/utils/hbpp/hbppcore.c
  * harbour/utils/hbpp/hbpplib.c
  * harbour/utils/hbpp/hbpptbl.c
  * harbour/utils/hbpp/pragma.c
    * renamed hbpp.h to hbppdef.h to avoid possible conflict with hbpp.h
      in include directory
    * casting and warning cleanup
2006-12-18 18:34:44 +00:00
Przemyslaw Czerpak
93e0db5a23 2006-12-09 17:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/bsd/gcc.cf
  * harbour/config/darwin/gcc.cf
  * harbour/config/dos/bcc16.cf
  * harbour/config/dos/djgpp.cf
  * harbour/config/dos/owatcom.cf
  * harbour/config/dos/rsx32.cf
  * harbour/config/hpux/gcc.cf
  * harbour/config/linux/gcc.cf
  * harbour/config/linux/owatcom.cf
  * harbour/config/os2/gcc.cf
  * harbour/config/os2/icc.cf
  * harbour/config/sunos/gcc.cf
  * harbour/config/w32/bcc32.cf
  * harbour/config/w32/gcc.cf
  * harbour/config/w32/mingw32.cf
  * harbour/config/w32/msvc.cf
  * harbour/config/w32/rsxnt.cf
  * harbour/config/w32/watcom.cf
    * added respecting HB_GT_DEFAULT, though it's quite possible that I'll
      remove it at all soon.
    * some other cleanup

  * harbour/source/compiler/complex.c
    ! fixed wrongly replicated from FLEX lexer condition used to DECLARE.
      Now they should be the same as in FLEX lexer but IMHO they are not
      Clipper compatible.

  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/gencobj.c
  * harbour/source/compiler/genhrb.c
  * harbour/source/compiler/genjava.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.c
  * harbour/source/rtl/hbffind.c
  * harbour/source/pp/ppcore.c
  * harbour/source/rdd/workarea.c
    ! fixed sizes of some C stack buffers and strncpy() parameters
    * use hb_strn*() instead of strn*() in few places to be sure that 0
      is always stored in destination buffer

  * harbour/source/rtl/gtcgi/gtcgi.c
    * change reported GT name from "Standard stream console" to
      "Raw stream console" to make it differ then GTSTD one.
2006-12-09 16:11:10 +00:00
Przemyslaw Czerpak
4dfc616250 2006-12-01 18:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/pack_src.sh
    + added packing *.yy[ch] files

  * harbour/makefile.bc
  * harbour/makefile.vc
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
  * harbour/include/hbpp.h
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.l
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  * harbour/source/pp/ppcore.c
    + added hb_comp prefix to grammar/lexer compiler public functions to
      reduce possible conflict with 3-rd party code which may use default
      yy prefix.
    ! do not use bison destructors for expressions. Internal bison logic
      cannot properly detect if expression was used or not in some of our
      grammar rules and it's possible that some expressions will not be freed
      and some other freed twice.
    ! added protection against multiple destructors execution for CBSTART
      and LITERAL tokens
    * added small garbage collector for deallocating expressions which were
      not freed (such situation can happen in syntax errors)
    % some optimizations in used structures to reduce their sizes
    + added protection against execution PCODE optimizations for functions
      which were not cleanly compiled.

  * harbour/source/rtl/idle.c
    * use const in nanosec() timeout declaration
2006-12-01 18:00:53 +00:00
Przemyslaw Czerpak
33ccad6661 2006-11-27 02:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/tests/codebl.prg
  * harbour/tests/langmsg.prg
  * harbour/utils/hbpptest/pp_test.prg
  * harbour/utils/hbpptest/pretest.prg
  * harbour/samples/pe/license.txt
    * removed carriage return (\r) characters

  * harbour/include/hbcomp.h
  * harbour/include/hbapi.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/source/vm/macro.c
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.l
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/genjava.c
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/hbident.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/ppcomp.c
    * separated HB_COMP and HB_MACRO definitions and added HB_COMMON
      structure used when HB_COMMON_SUPPORT macro is set
    * hide HB_MACRO internal definitions in hbapi.h when HB_MACRO_SUPPORT
      is not set
    These modifications should help in future compiler and macro compiler
    integration into single binary.

    + added clipper compatible error message in unclosed structures
      In general we should cleanup rules to make error reporting more
      user friendly and Clipper compatible
    % eliminated unnecessary allocations
    + added int mode member to common part of HB_COMP and HB_MACRO
      structure. It's initialized to HB_MODE_MACRO or HB_MODE_COMPILER
    + add TOFIX note about memory leaks in cParamTypes and pParamClasses
      members of COMDECLARED structure. It's a part of unfinished strong
      typing code. I do not know what Ryszard plan to do with it so I'm
      leaving it as is. The part of strong typing which were operating
      on emulated HVM stack has been removed.
    * removed static variables from genjava.c. Also gencli.c and genobj32.c
      should be fixed but this will not make this code working so I haven't
      touched it.
    * changed 3-rd parameter of hb_compIdentifierNew() from BOOL to int.
      Now it can have the following values: HB_IDENT_STATIC, HB_IDENT_FREE,
      HB_IDENT_COPY. This modification will allow in the future using common
      for static and dynamic symbol hash table without additional source code
      changes. I also plan to use identifier hash table in PP the reduce
      number of memory allocations and speed-up preprocessing by using
      second level hashing for hash keys.

  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
    * changed HB_MACRO_SUPPORT to HB_COMMON_SUPPORT to automatically detect
      possible conflicts between compiler and macro compiler
    ! removed first detected conflict which existed for long time
    + added hb_compExprMacroAsAlias() function to convert HB_ET_VARIABLE
      expression to HB_ET_ALIAS.

  * harbour/source/macro/macro.y
    ! fixed using prefix&macro-> and &macro.sufix-> when macro cannot be
      substituted by compiler, f.e.:
         M->v := NIL
         x := "&v.1->fld"
         M->v := "v"
         M->v1:= "data"
         ? &x
    ! fixed memory leak in macro substituted expression compilation

  * harbour/source/vm/macro.c
    ! fixed initialization of some HB_MACRO members
    ! fixed value returned for type("&V->F") when alias does not exist
    - removed not longer used hb_comp_bShortCuts global variable
2006-11-28 01:10:34 +00:00
Przemyslaw Czerpak
74deff4644 2006-11-25 19:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/macro/macro.y
    + added support for strings with with ASCII NUL character
      Strings with ASCII NUL character are not stored with hash table
      but dynamically allocated/deallocated
    ! fixed compilation of strings with ASCII NUL character which
      can appear in escaped strings e"..." or after compiler chr(0)
      optimization
    % removed some not longer necessary memory allocations

  * harbour/source/vm/macro.c
    ! fixed GPF caused by HB_MACRO structure double freeing
    - removed some code which was added as workaround for the old
      behavior of HVM QUIT and false FM stat memory leak reports.
      It's not longer necessary in current HVM.

  * harbour/source/common/hbstr.c
    ! fixed final string size calculation in extended strings

  * harbour/source/compiler/gencli.c
    * cleaned BCC warning
2006-11-25 18:33:28 +00:00
Przemyslaw Czerpak
e6a3baea64 2006-11-24 19:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/bsd/gcc.cf
  * harbour/config/darwin/gcc.cf
  * harbour/config/dos/djgpp.cf
  * harbour/config/dos/owatcom.cf
  * harbour/config/hpux/gcc.cf
  * harbour/config/linux/gcc.cf
  * harbour/config/linux/owatcom.cf
  * harbour/config/os2/gcc.cf
  * harbour/config/sunos/gcc.cf
  * harbour/config/w32/bcc32.cf
  * harbour/config/w32/gcc.cf
  * harbour/config/w32/mingw32.cf
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hberrors.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbver.h
  * harbour/source/common/hbstr.c
  * harbour/source/common/hbver.c
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/genjava.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.c
  - harbour/source/compiler/harbour.simple
  - harbour/source/compiler/harbour.slx
  - harbour/source/compiler/harbour.sly
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/hbgenerr.c
  - harbour/source/compiler/hbslex.c
  - harbour/source/compiler/hbstrong.c
  * harbour/source/compiler/hbusage.c
  - harbour/source/compiler/simplex.c
  * harbour/source/macro/Makefile
  - harbour/source/macro/macro.slx
  - harbour/source/macro/macroslx.c
  * harbour/source/pp/ppcore.c
  * harbour/utils/hbpp/hbppcomp.c
    - removed SIMPLEX references
    ! fixed memory leak in request _GET_
    * use hb_compIdentifiersNew() in INLINE and AUTOOPEN structures
      members
    * eliminated all internal exit() calls. Now hb_compGenError() with
      fatal errors does not interrupt application but only sets
         HB_COMP_PARAM->fExit = TRUE;
      What should cause silent clean application close.
      Please keep it in mind making future modifications and do not
      introduce and exit() function call.
    + added support for \x<hex> and \<oct> quoting in extended strings
      (just like in C). Warning !!!. Embedded 0 bytes are supported by
      PP, lexer and expression optimizer but not by bison. To make them
      working it will be necessary to change Literal terminal symbol
      holder and add length field in bison rules and also change the hash
      table used to hold identifiers, literals and macros to store and use
      real string length. If someone will try to use strings with embedded
      0 now then they will be cut but nothing worser should happen.
2006-11-24 18:10:07 +00:00
Przemyslaw Czerpak
9cd2098d6d 2006-11-23 20:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbcomp.h
  + harbour/include/hbcompdf.h
  * harbour/include/hberrors.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
  * harbour/include/hbmacro.h
  * harbour/include/hbpp.h
  * harbour/include/hbvm.h
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/gencobj.c
  * harbour/source/compiler/genhrb.c
  * harbour/source/compiler/genjava.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.l
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbfunchk.c
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/hbident.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/ppcomp.c
  * harbour/source/macro/macro.y
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/ppgen.c
  * harbour/source/pp/pplib.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/fm.c
  * harbour/source/vm/macro.c
  * harbour/utils/hbpp/hbpp.c
  * harbour/utils/hbpp/hbpp.h
  * harbour/utils/hbpp/hbppcomp.c
  * harbour/utils/hbpp/hbppcore.c
  * harbour/utils/hbpp/hbpplib.c
  * harbour/utils/hbpp/pragma.c
    * changed the internal compiler API to be MT safe.
      All global and static non constant variables replaced by
      HB_COMP structure which have all compiler context settings.
      It's possible to allocate simultaneously many compiler contexts
      and compile code. Only constant/read only variables are shared.
      In macro compiler HB_COMP is replaced by HB_MACRO.
      In source code I everywhere used to macros: HB_COMP_DECL and
      HB_COMP_PARAM which are equivalents of old HB_MACRO_DECL and
      HB_MACRO_PARAM definitions.
      We will only have to change compiler FATAL errors support to
      not execute exit() for non batch systems.
    * make macro compiler fully MT safe
    * removed not longer used definitions and variables
    ! add direct accessing to PP line number information - it fixes missing
      line numbers reported recently
    ! added generating .ppo files when tokens are teken directly by compiler
      - it fixes empty .ppo file problem
    ! clear hb_stack internall variables after removing hb_stack to avoid
      possible GPF if application still works and try to access unexsiting
      hb_stack
    ! do not allocate new memory block when final FM statistic report is
      generated - it fixes problem with GPF when application compiled with
      FM statistic exits and CLIPPER envvar is set.
    ! fixed memory leak hb_cmdargCheck()
    ! added to harbour.y symbol destructors - it should fixes memory leaks
      in syntax errors but it uses quite new bison feature which is not
      fully supported yet. Unfortunately it's also not MT safe and the
      destructors implementation in 1.875c does not respect %parse-param.
      Bison documentation says that it should so I hope it will be fixed
      soon (or maybe even already is in the newest bison versions) before
      I'll add multi context compilation support. If not then I will have
      to add some workaround. I can pass compiler context pointer inside
      YYSTYPE using hack in a lexer but it will force really huge number
      modifications in existing bison rules so probably it will be much
      easier to fix bison or write a small tool to update generated parser.
    * other modifications - the total size of patch is nearly 1MB and
      detail description will have to take me few days.
2006-11-23 18:57:54 +00:00
Przemyslaw Czerpak
b78cf8e34b 2006-11-21 05:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/complex.c
  + harbour/source/compiler/hbcomp.c
    * added missing header and file in my previous commit
2006-11-21 04:06:19 +00:00
Przemyslaw Czerpak
0cada37011 2006-11-21 03:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
  * harbour/source/compiler/Makefile
  * harbour/include/hbcomp.h
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.l
  * harbour/source/compiler/harbour.slx
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/hbident.c
  * harbour/source/compiler/ppcomp.c
  + harbour/source/compiler/complex.c
    + added new PP based compiler lexer - it's smaller, MT safe and a
      little bit faster then then the FLEX version.
    + added HB_COMP structure to hold compiler data in future MT version
    + added global variable HB_COMP_PTR hb_comp_data to make conversion
      to MT easier - now it holds only PP and lexer data.
    * update PP related code in compiler to be MT safe
    + added %pure-parser, %parse-param and %lex-param for bison to generate
      MT safe grammar parser.
    * updated FLEX to work with recent compiler modifications and pure-parser
      bison API

  * harbour/makefile.bc
  * harbour/makefile.vc
  * harbour/source/macro/Makefile
  * harbour/source/macro/macro.l
  * harbour/source/macro/macro.y
  * harbour/source/macro/macrolex.c
    * use hb_macro prefix instead of hb_comp in bison/flex parser/lexer
      used in macro compiler to avoid possible conflicts in the future
    * separated lexer data

  * harbour/include/hbapi.h
  * harbour/include/hbpp.h
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/ppgen.c
  * harbour/source/pp/pplib.c
  * harbour/source/vm/macro.c
    * removed not used members from HB_MACRO structure to make it
      cleaner before creating common to compiler and macro compiler
      structure
    + added new token HB_PP_TOKEN_EPSILON
    + added void * cargo parameters passed to executed user functions
    + hb_pp_tokenGet(), hb_pp_tokenToString(), hb_pp_tokenBlockString()
      functions for new PP based compiler lexer

  * harbour/utils/hbpp/hbpp.c
  * harbour/utils/hbpp/hbpp.h
  * harbour/utils/hbpp/hbppcomp.c
  * harbour/utils/hbpp/hbppcore.c
  * harbour/utils/hbpp/hbpplib.c
  * harbour/utils/hbpp/pragma.c
    * updated to compile with recent compiler header file modifications


    PP, new lexer and most of grammar parser should be MT safe. Now we should
    update all compiler functions to pass pointer to HB_COMP data structure
    where we should all current global variables. This structure as first
    member should have HB_CMPCOMMON structure which will hold common to
    compiler and macro compiler data. Ryszard I think you are the best person
    to define this structure.

    We have new lexer which is MT safe but please note that it has to be
    extensively tested so I would like to ask everybody to compile as much
    as possible different code and check if the final programs work as
    expected. Working on new code I removed some limitations existing in
    FLEX though not all. At the beginning I tried to replicate the exact
    FLEX behavior but I've found that in few places it does not work as
    it should so I begin to encode rules in a way which remove some
    limitations. In fact now it's much easier to control some things.
    I kept the FLEX code working and made all necessary modifications
    so it still can be used but keeping FLEX working cost us IMHO too
    much. It's not possible to introduce some improvements to grammar
    parser. All identifiers, keyword and macros returned by new lexer
    are converted to upper letters, do not have to be freed by hb_xfree()
    and is guarantied that will be always accessible. So from grammar file
    we can remove all hb_compIdentifierNew( hb_strupr($1), TRUE ) what
    should give noticeable speed improvement but will break the FLEX code.
    Ryszard and other you will have to decide if we will support FLEX in
    the future. We can also clean the code and remove most of other
    redundant hb_strupr() and hb_strdup() used in many places. BTW only
    one terminal symbol can be returned with lower letters: DOIDENT
    and I make it intentionally so it's possible to use:
         DO prog1 WITH "sth"
    on case sensitive file systems so this symbol should be cloned in
    upper cases as function symbol but used without modification as
    file name. It's current behavior but I'm not sure you will want
    to keep it. Maybe compiler switch to always convert file names
    created from
         DO <id> [WITH <params,...>]
    to lower cases will be better. Please think about it.
2006-11-21 02:29:33 +00:00