* harbour/contrib/hbw32/dllcall.c
* minor cleanup in return values
* harbour/contrib/hbole/ole2.c
* cleaned casting in UNICODE conversions
* harbour/source/common/expropt2.c
* replicate CA-Cl*pper compile time optimization bugs:
"" $ <literString> => .T.
AT( "", <literString> ) => 1
CHR( 256 ) => ""
only when Harbour extensions (-kh) are not enabled, f.e.
in strict Clipper compatibility mode (-kc)
* harbour/utils/hbtest/rt_hvma.prg
* harbour/utils/hbtest/rt_str.prg
* updated to test Clipper and Harbour compile time modes in
the above situations
* harbour/common.mak
* harbour/source/rtl/Makefile
- harbour/source/rtl/strings.c
* harbour/source/common/hbstr.c
* moved hb_strEmpty() from RTL to COMMON library
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/source/common/expropt2.c
+ added compile time optimization for EMPTY() function
; removed 'TODO: empty optimization' note
* harbour/source/rtl/itemseri.c
% compress trailing spaces during string item serialization
* harbour/include/hbapi.h
* harbour/source/vm/hashes.c
+ added hb_hashAddNew() - works like hb_hashAdd() but it adds item
only if new key is used
* harbour/source/vm/hvm.c
* use hb_hashAddNew() instead of hb_hashAdd() for HB_P_HASHGEN
I cannot revert the order of hash item during compilation because
it will also change the order of user expression evaluation.
* harbour/source/common/hbwince.c
! fixed typo in GetDriveTypeA()
* temporary disabled GetDriveTypeW() call because not all CRTLs for
WinCE support it
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* added full expression list stripping - it enables optimizations
in few additional places
! fixed code to always refresh expression address after direct or
indirect reduction - seems that we have some memory leaks and
possible GPFs not located so far
Please make tests with your code.
* harbour/include/hbexprb.c
! do not optimize HB_BIAND(), HB_BITOR() and HB_BITXOR() when only
one parameter is passed to keep RT error compatibility
* use hb_compExprListStrip() to optimize function calls also when
parameters are passed in parenthesis, f.e.:
? CHR(65), CHR((65))
It's not Clipper compatible and disabled by -kc switch.
Viktor it will interact with some hbtest tests when compile time
optimization used by Clipper gives different results then RT function
f.e. CHR( ( 256 ) ). Please think if we should keep it.
It's important optimization if someone uses constant values or
expressions defined in parentheses.
* harbour/include/hbexprop.h
* harbour/include/hbexprb.c
* harbour/source/common/expropt2.c
+ added hb_compExprReducePower() and compile time optimization for:
<NumConst1> ^ <NumConst2>
+ added compile time optimization for:
<NumConst1> % <NumConst2>
when <NumConst1> or <NumConst2> is not integer value
NOTE: both optimizations are not Clipper compatible and disabled
when -kc compiler switch is used
* harbour/include/hbclass.ch
! removed:
MESSAGE <msgName> IS <mthName>
used as synonym of:
MESSAGE <msgName> METHOD <mthName>
If someone was using the removed version then please update the
code to MESSAGE ... METHOD ...
The removed command has special meaning in Class(y) and it allow
to define alternate names for existing messages. I'll add support
for them in the future.
* harbour/contrib/hbct/ctwin.c
* added disabled code which is a workaround for some possible
bad side effect caused by online shadow showing by CTWIN.
* harbour/source/rtl/errorint.c
! fixed displaying internal error message
* harbour/source/common/hbver.c
* added "Rev." prefix to shown revision number
* harbour/include/hbexprop.h
* harbour/include/hbexprb.c
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
+ added hb_compExprReduceNegate()
! fixed wrong negate optimizations for platforms where HB_LONG_MAX
is smaller then -HB_LONG_MIN, f.e. all x86 based CPUs.
! fixed setting the size in optimized negative numbers
! fixed some math optimizations to not use casting to double value
when it's not necessary - when double precision is smaller then HB_LONG
(f.e. on x86 it's 53 bits and HB_LONG has 64bit) such casting can damage
up to 11 less significant bits in big 64 bit numbers.
* harbour/source/rtl/hbinet.c
* replaced MAKEWORD() macro with HB_MKWORD() to pacify BCC58 warnings
* harbour/include/hbdefs.h
+ added #include <limits.h>
It should hide some warnings related to redefined integer size constants
Viktor if it will not help for BCC58 warnings then you will have to add
#include <stdint.h>
few lines below but please remember that older BCC version does not
have it so check for the exact compiler version.
! changed macros which setting default numeric item size for more strict
Clipper compatible mode. I'm not a fun of some Clipper behavior in
calculating number size and I left some notes about it in hbdefs.h
Anyhow this and some other modifications below should cover the
differences you've found recently. Some things are not addressed by
me intentionally, f.e. _itemPutNL() in Clipper always set size to 10
without checking the maximum size so it's too small for values less
then -999999999. Harbour compiler makes more compile time optimizations
then Clipper. The formatting rules used by compiler are a little bit
different then by VM so this can be source of some other differences
to Clipper. I can easy create some examples. Harbour supports 64bit
signed integers and Clipper doesn't. This is yet another situation
when we may have different results then Clipper. Most of them can
be hidden if we add new PCODE(s) for integer number with explicit
size but I do not think it's such important to increase PCODE list.
In few cases it will be necessary to disable some optimizations at
all and I do not like it. In the future when I will be adding some
new optimizations I also add compiler switch to disable/enable
optimizations which can have such side effects for people who need
strict formatting.
* harbour/include/hbvmpub.h
* harbour/source/common/hbstr.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* harbour/source/rtl/round.c
* updated for more Clipper compatible number formating using new macros
* harbour/include/hbcomp.h
* harbour/include/hbmacro.h
* harbour/include/hbexprb.c
* harbour/source/vm/macro.c
* harbour/source/compiler/hbmain.c
! fixed name conflict in privates/publics declaration.
Harbour allows to declare memvars with the same name as file
wide statics or fields but this extensions was not working well
in some cases and can cause unexpected results in variable
declaration, f.e. try this code:
static v:="static"
proc main()
public v:="public"
? v, M->v
return
compiled with -n -w switches and also with -n -w -a before
this fix.
! fixed some compile time warnings in memvars declaration to be
more Clipper compatible
! fixed compiling external modules (DO <procname> [WITH <params,...>])
when function <procname> is already declared but with different
letter case. Harbour does not convert <procname> in DO statement
to upper case to play well with case sensitive file systems and
it could cause confusing warning message:
Cannot open <procname>.prg, assumed external
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
! added protection against bug in bison destructors which might cause
multiple free the same memory block on syntax error due to
* harbour/source/rdd/dbf1.c
! added missing binary flag for daytime fields
* harbour/source/rdd/dbfntx/dbfntx1.c
! fixed possible memory leak during accessing corrupted NTX files
! fixed possible GPF during accessing corrupted NTX files
* harbour/source/compiler/genc.c
* minor cleanup
* harbour/config/os2/global.cf
! use FOR command to delete group of files
* harbour/harbour.spec
* harbour/harbour-ce-spec
* harbour/harbour-w32-spec
* updated for new library names
* harbour/ChangeLog
* harbour/include/hbexprb.c
* formatting
* harbour/source/rtl/net.c
! fixed casting
* harbour/harbour.spec
* harbour/harbour-ce-spec
* harbour/harbour-w32-spec
* harbour/contrib/Makefile
* removed hbzlib - it cannot be longer part of default build
because Viktor removed zlib header files. Viktor sorry but
IMHO you should revert it and also restore ace.h - it creates
serious problems without any valuable addition. Now we will
have to rebuild Harbour on many different platforms and often
it will not be possible to install some libraries. We cannot
force installing additional libs by people who will create
binaries for incoming releases so it's important to revert
it. Please do it.
* harbour/config/bsd/install.cf
* harbour/config/darwin/install.cf
* harbour/config/hpux/install.cf
* harbour/config/linux/install.cf
* harbour/config/sunos/install.cf
* harbour/config/dos/install.cf
* harbour/config/os2/install.cf
* harbour/config/w32/install.cf
* redirected echo error messages to stderr when *sh shell is used
* harbour/config/lib.cf
* harbour/config/bin.cf
* harbour/config/global.cf
* harbour/config/hpux/gcc.cf
* harbour/config/hpux/global.cf
* harbour/config/darwin/gcc.cf
* harbour/config/darwin/global.cf
* harbour/config/dos/owatcom.cf
* harbour/config/dos/global.cf
* harbour/config/dos/rsx32.cf
* harbour/config/global.cf
* harbour/config/linux/owatcom.cf
* harbour/config/linux/global.cf
* harbour/config/os2/gcc.cf
* harbour/config/os2/global.cf
* harbour/config/sunos/gcc.cf
* harbour/config/sunos/global.cf
* harbour/config/bsd/global.cf
* harbour/config/w32/owatcom.cf
* harbour/config/w32/bcc32.cf
* harbour/config/w32/gcc.cf
* harbour/config/w32/rsxnt.cf
* harbour/config/w32/global.cf
! fixed build process. DOS and WINDOWS users should make tests for
different compilers. I tested only DOS-OpenWatcom, DOS-DJGPP,
W32-BCC32, W32-OpenWatcom, W32-POCC, W32-XCC and corss builds
W32-MinGW, W32-MinGW-CE. OS2 version not testes at all - I hope
it will work. LINUX-GCC, LINUX-G++, LINUX-OpenWatcom, BSD-GCC,
HPUX-GCC tested and they are working. I hope that SunOS version
also works though I do not have any solaris installation where
I can make real tests.
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
+ added new functions:
BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem )
BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem )
They copy/move pItem body to parameter passed by reference and
return TRUE when operation was done successfully (uiParam was passed
by reference)
+ added new functions for string manipulation:
char * hb_itemLockReadCPtr( PHB_ITEM pItem, ULONG * pulLen );
char * hb_itemLockWriteCPtr( PHB_ITEM pItem, ULONG * pulLen );
void hb_itemUnLockCPtr( char * pszString );
It's recommended to use them instead of hb_itemGetCPtr().
Pointer to string buffer returned by hb_itemLockReadCPtr() will
be always valid even if source item will be cleared, destroyed or
overwritten until hb_itemUnLockCPtr() is called. Each locked string
has to be unlocked to avoid memory leaks. After unlocking the string
pointer cannot be longer used.
hb_itemLockWriteCPtr() works like hb_itemLockReadCPtr() but string
pointer returned by this function is writable so user can change
the body of string item. It's the _ONLY_ one way when it's possible.
Modifying string items using pointers returned by hb_parc() or
hb_itemGetCPtr() or extracted directly from HB_ITEM body is _FORBIDDEN_
and can cause unpredictable results (GPF when constant/readonly memory
pages are changed, changing many different items which share the same
memory buffer, etc.).
This is code illustrates how to use hb_itemLockReadCPtr()/
hb_itemUnLockCPtr() and it's also good example why hb_itemGetCPtr()
is very danger function and cannot be used in such case - if you
replace hb_itemLockReadCPtr() with hb_itemGetCPtr() and remove
hb_itemUnLockCPtr() then you will have buggy code.
HB_FUNC( MYFUNC )
{
PHB_ITEM pObject = hb_param( 1, HB_IT_OBJECT )
if( pObject )
{
char * pszName1, * pszName2;
PHB_ITEM pResult;
pResult = hb_objSendMsg( pObject, "POP", 0 );
pszName1 = hb_itemLockReadCPtr( pResult, NULL );
pResult = hb_objSendMsg( pObject, "POP", 0 );
pszName2 = hb_itemLockReadCPtr( pResult, NULL );
if( pszName1 && pszName2 )
hb_retc_buffer( hb_xstrcpy( NULL,
"[", pszName1, "]-[", pszName2, "]", NULL ) );
hb_itemUnLockCPtr( pszName1 );
hb_itemUnLockCPtr( pszName2 );
}
}
This code shows how to use hb_itemLockWriteCPtr():
proc main()
local cVal, cVal2
cVal := cVal2 := "ABC"
STRPUT( @cVal2, 2, 42 )
? cVal, cVal2
return
#pragma begindump
#include "hbapiitm.h"
HB_FUNC( STRPUT )
{
PHB_ITEM pString = hb_param( 1, HB_IT_STRING );
ULONG ulAt = hb_parnl( 2 );
if( pString && ulAt && ISNUM( 3 ) )
{
ULONG ulLen;
char * pszValue;
pszValue = hb_itemLockWriteCPtr( pString, &ulLen );
if( pszValue )
{
if( ulAt <= ulLen )
pszValue[ ulAt - 1 ] = ( char ) hb_parni( 3 );
hb_itemUnLockCPtr( pszValue );
}
}
}
#pragma enddump
* harbour/include/hbcompdf.h
* harbour/include/hbexprop.h
* harbour/include/hbexprb.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbusage.c
* removed HB_I18N_SUPPORT macro and enabled I18N code in default build
* harbour/include/hbexprb.c
* harbour/source/compiler/hbmain.c
! added string escaping before to i18n .pot files
+ added hb_i18n_gettext_strict() support for compiler. This function
generates warning if argument is not literal string. See discussion
on mailing list from 2007-11-23 to 2007-11-29, for details.
* harbour/doc/man/harbour.1
* harbour/source/compiler/hbusage.c
+ added description for -j switch
* harbour/include/hbexprb.c
* replaced // comments by /* */
* accept <cContext> (domain) parameters of HB_i18nGettext() when
number of parameters is two or more
Should we generate compile time warning when wrong number of
parameters is passed to this function or they are not literal
strings? Maybe only after -j+ or sth like that?
* harbour/include/hbclass.ch
* harbour/include/tbrowse.ch
* harbour/include/hbpers.ch
* harbour/include/getexit.ch
* replaced // comments by /* */
* harbour/source/include/hbcompdf.h
* harbour/source/include/hbexprop.h
* harbour/source/include/hbexprb.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbmain.c
+ added i18n support
Implemented -j[filename] switch to indicate output filename. Default
filename is <sourcefilename>.pot. If switch -o is used, this file
is created in speficied output path.
Output file format is compatible with 'gettext' utils, but not all
available features are implemented.
Harbour level function HB_i18nGettext( cText [, cContext ] ) sould be
used to indicate translatable strings.
All this commit is commented using #ifdef HB_I18N_SUPPORT and is in
development stage. Please, do not use it yet.
* harbour/include/hbwince.h
* put functions declarations inside HB_EXTERN_BEGIN / HB_EXTERN_END
+ harbour/include/hbwmain.c
+ added WinMain() to main() wrapper
* harbour/include/hbexprb.c
* harbour/source/common/expropt1.c
! fixed typo reported by Chen
* harbour/source/pp/hbppgen.c
* harbour/source/main/harbour.c
* harbour/utils/hbpp/hbpp.c
* use hbwmain.c when main() is not supported by C compiler/platform
* harbour/source/rtl/gtwin/gtwin.c
* include wincon.h in all builds except LCC
* harbour/source/rtl/fserror.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/filesys.c
* use HB_OS_WIN_32_USED as in other files (still on TOFIX list)
* harbour/source/rtl/seconds.c
+ added HB_OS_WIN_32_USED
* harbour/source/compiler/hbcomp.c
! fixed typo: stderr was used instead of stdout
* 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
* harbour/source/rtl/errorapi.c
+ added protection against possible GPF when some assign methods
were called without parameters
* harbour/source/rdd/workarea.c
* initialize uiFalgs also when DBS_FLAGS is not set
* harbour/contrib/bmdbfcdx/bmdbfcdx1.c
* fixed hb_cdxSkipFilter() declaration - it should be 'static' function
* harbour/source/pp/ppcore.c
* harbour/source/compiler/ppcomp.c
+ added support for changing all -k? switches by #pragma, f.e.;
#pragma -ks+
#pragma -kM-
#pragma -kx1
#pragma -kJ0
* harbour/source/compiler/hbusage.c
* changed -ks description
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* do not generate error message for negative indexes and
[] operators are used for simple types when -ks option
is used
* harbour/include/hbvmpub.h
* harbour/include/hbapi.h
* harbour/source/vm/hvm.c
* harbour/source/vm/extend.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/memvars.c
+ added HB_IT_DEFAULT flags - it allows to check if item was changed
* harbour/source/vm/memvars.c
* harbour/include/hbvm.h
! fixed HB_IT_MEMOFLAG updating to be Clipper compatible. Here we are
not Clipper compatible in one place: in clodeblock local parameters
with memo values are marked as MEMO but if you leave function where
codeblock were created then Clipper during detaching removes MEMO
flag. In Harbour memo flag is kept.
* harbour/include/hbvm.h
* harbour/source/vm/classes.c
* harbour/source/vm/hvm.c
% improved speed of extended references used for SETGET methods
and overloaded [] operators
* harbour/include/hbapi.h
* harbour/include/hbsetup.ch
* harbour/source/compiler/hbcomp.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* harbour/source/vm/cmdarg.c
* removed HB_COMPAT_XHB flags - only one HB_COMPAT_XHB still exist
in HVM in hashes.c - it will be removed soon.
* harbour/source/common/hbverdsp.c
* removed information about xHarbour compatibility mode - it's not
longer used. We are emulating xHarbour behavior using external
XHB library and standard compiler/HVM features
* harbour/contrib/xhb/xhb.ch
* harbour/contrib/xhb/xhbfunc.c
* harbour/source/vm/arrayshb.c
* moved XHB_AINS(), XHB_ADEL() from XHB lib to HVM as HB_AINS(), HB_ADEL()
* harbour/contrib/xhb/xhb.ch
+ added #pragma -ks+
+ added transaltion for hb_enumindex( <enumvar> )
+ harbour/contrib/xhb/xhbenum.c
+ added emulation for HB_EUMMINDEX()
* harbour/contrib/xhb/xhbfunc.c
* do not add INET*() function wrappers for DOS builds or when
HB_NO_DEFAULT_INET macro is set
* harbour/contrib/xhb/xhbmsgs.c
* added comment
* harbour/contrib/Makefile
+ added TIP and XHB
* harbour/make_rpm.sh
* harbour/harbour.spec
* removed HB_COMPAT_XHB, --with tip, --with xhb
they are not longer necessary
* harbour/include/hbexprb.c
* respect -ks in macrovars and array item references
* harbour/source/vm/memvars.c
* do not detach array items during detaching enumerator variable
also in standard (without HB_COMPAT_XHB) build
* harbour/include/hbapi.h
* harbour/source/vm/itemapi.c
* harbour/source/vm/garbage.c
+ added extended item references - it's universal reference which
can be used by HVM for many different things without introducing
new item types
* harbour/include/hbexprb.c
* respect -ks compiler also with <op>=, --, ++ operators
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
* harbour/source/vm/classes.c
+ added extended references for SETGET methods used as object
item references
* use extended references to respect overloaded [] operator in
object item references
+ added support for passing indexes to string item characters
( @cValue[n] ) by reference using extended references - extension
enabled by -ks compiler switch and //flags:s RT switch.
+ added hb_vmPushItemRef()
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/usrrdd/usrrdd.c
* use hb_vmPushItemRef()
* harbour/contrib/xhb/xhbcomp.prg
* harbour/contrib/xhb/xhbmsgs.c
* overload +, -, *, %, ^, ++, -- in string and numeric scalar
classes to emulated xHarbour behavior when 1 byte string is
used as numeric value.
Note: <nun> + <char1> in XHB lib gives numeric value when in
xHarbour character. But because <nun> <anyOtherOper> <char1>
in xHarbour gives numeric value then I guess that it's
xHarbour bug and I should not replicate it, f.e.:
proc main()
? 1+"A", 131-"A", 33 * 2, 132 / chr(2), 133 % "C"
return
* overload +, - in hash scalar class to emulated xHarbour behavior
for <hash> + <hash> and <hash> - <hash>
Seems that now we can remove HB_COMPAT_XHB flag from HVM and keep
Harbour compatibility only with -ks compile time switch and XHB
library. Please make some tests with Harbour compiled without
HB_COMPAT_XHB and xHarbour code using REQUEST XHB_LIB. It's possible
that I missed sth but some basic test shows that our emulation is
better then original and addresses places where xHarbour does not
work at all or gives strange results, f.e.:
#ifndef __XHARBOUR__
request XHB_LIB
#endif
proc main()
local h:={"ABC"=>123.45}
? h:abc
h:abc+=1000 ; ? h:abc
h["ABC"]+=1000; ? h:abc
p(@h:abc) ; ? h:abc
p(@h["ABC"]) ; ? h:abc
return
proc p(x)
x+=1000
return
or:
#ifndef __XHARBOUR__
request XHB_LIB
#endif
#include "hbclass.ch"
proc main()
local o:=myClass():new()
o:setget:="ABC"; ? o:setget
o:setget[2]:=42; ? o:setget
o:setget[2]+=42; ? o:setget
? o:setget[2]+=42; ? o:setget
?
o:var:="ABC"; ? o:var
o:var[2]:=42; ? o:var
o:var[2]+=42; ? o:var
? o:var[2]+=42; ? o:var
return
CREATE CLASS myClass
VAR var
METHOD setget SETGET
END CLASS
METHOD setget( xNewVal ) CLASS myClass
IF pcount() > 0
::var := xNewVal
ENDIF
RETURN ::var
* harbour/include/hbapirdd.h
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfdbt/dbfdbt1.c
* harbour/source/rdd/usrrdd/usrrdd.c
* harbour/contrib/rdd_ads/ads1.c
* changed second parameter in RELTEXT() method to PHB_ITEM
Now RELTEXT() works like FILTERTEXT() and the size of
expression is not limited. It's a modification I wanted
to make for a long time and I think that now is a good
moment to make it together with HB_FT_* modifications
- rmoved not longer necessary HARBOUR_MAX_RDD_RELTEXT_LENGTH
* harbour/source/rtl/gttrm/gttrm.c
* small cleanup
* harbour/include/hbexprb.c
* do not generate error for QSELF()[...] - Clipper allows such
operation and because some valid Clipper code needs it then
I disabled error message.
* harbour/common.mak
* harbour/source/rtl/Makefile
+ harbour/source/rtl/einstvar.prg
+ added undocumented CA-Cl*pper function _eInstVar() used to validate
variable type in assign messages.
* harbour/include/hbapi.h
* harbour/source/vm/arrays.c
* changed 'char *' to 'const char *' in hb_arraySetC() and hb_arraySetCL()
* harbour/source/rdd/dbcmd.c
* cleaned DBSKIPPER() code
* harbour/source/rtl/browdb.prg
* use written in C DBSKIPPER() function instead of static .prg Skipped()
when HB_COMPAT_XPP macro is enabled
* harbour/source/rtl/browse.prg
! fixes in BROWSE() function:
! displaying box characters
+ added CL53 compatible mouse actions
+ added mouse wheel actions
+ added support for deleting records (K_DEL)
+ added support for edit mode
+ added support for append mode
* harbour/include/hbexprb.c
* disable CTOD("") optimization when -kc switch is used
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.y
* fixed typo reported by Mindaugas
* harbour/source/vm/classes.c
* fixed typo reported by Lost
* harbour/contrib/hbzlib/include/stdafx.h
* harbour/contrib/hbzlib/include/ziparchive.h
* cleaned some warnings
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/source/common/expropt2.c
* restored Mindaugas code for UPPER optimization and added logic to
optimize UPPER for strings with only Latin letters, digit and spaces
just like in Clipper. Now code like:
? Upper( chr(65)+chr(66)+chr(67)+"0123 QWE asd " ) + "ZXC"
is fully optimized at compile time to single string expression.
% optimized hb_compExprReduceCHR() by eliminating memory allocation
for new string
! fixed typo in my previous commit
* harbour/include/hbexprop.h
* harbour/include/hbexprb.c
* harbour/source/common/expropt2.c
* added UPPER("") optimisation. The side effect of this modification
is that Harbour becomes Clipper bug compatible in calculation of
AT(UPPER(""), "test"). Though this optimisation does not introduce
any buggy behaviour itself.
* harbour/include/hbcompdf.h
* harbour/include/hbexprb.c
* harbour/source/common/expropt1.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
! fixed bug in operator precedence - seems that it existed from
beginning and partially were fixed in xHarbour. This code exploits
the problem:
#define EOL chr(13)+chr(10)
#command ? [<x,...>] => [outstd( <x> );]outstd(EOL)
#command TEST <exp> => BEGIN SEQUENCE ;
; ? <exp> ;
; RECOVER USING oErr ;
; ? "Error:", oErr:subCode, ;
oErr:description, oErr:operation ;
; END
proc main()
local oErr, s1:="X", s2:="Y", t:=.T.
errorBlock({|oErr|break(oErr)})
TEST t != s1 $ s2
TEST t == s1 $ s2
TEST t = s1 $ s2
TEST t < s1 $ s2
TEST t <= s1 $ s2
TEST t > s1 $ s2
TEST t >= s1 $ s2
TEST s1 $ s2 != t
TEST s1 $ s2 == t
TEST s1 $ s2 = t
TEST s1 $ s2 > t
TEST s1 $ s2 < t
TEST s1 $ s2 >= t
TEST s1 $ s2 <= t
return
* harbour/include/hbcomp.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/include/hbpp.h
* harbour/source/compiler/complex.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/compiler/hbmain.c
* harbour/source/pp/ppcore.c
+ added support for extended multiline codeblocks:
{ |<params,...>| <EOL>
<statement1>
...
<statementN>
return <val>
}
Such codeblocks allow nested definitions. They can also have their
own variable declarations (local, static, field, memvar, parameters,
private, public) and visibility of declared variables is similar to
nested function in Pascal but please note that there is one limitation
which exists also for normal codeblocks (Clipper compatible behavior):
internal codeblock local parameters and local variables cannot be
used in nested codeblocks, f.e. such code:
eval( { |p| eval( {|| qout( p + 1 ) } ) } )
is illegal in Clipper and Harbour. This limitation also can be
eliminated but but it will be necessary to make deeper modifications
in code for local detaching changing the method of generating
codeblocks local variables in nested blocks so unlike the above
also some modifications in HVM will be necessary.
Please test.
* 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)
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/source/common/expropt1.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbopt.c
! reverted fix for unnecessary -W2 warning:
Function '...' does not end with RETURN statement
in code like:
func f(v)
if v
return "TRUE"
else
return "FALSE"
endif
Sorry but I had to make it because this fix was wrong and causes
that code like:
func f(v)
if v
? v
else
return "FALSE"
endif
was compiled without any warnings but wrong PCODE was generated.
In some spare time I'll try to implement valid RETURN detection,
now simply add RETURN NIL at the end of such functions - it will
be removed by dead code eliminator.
! fixed memory leak when more then one .prg file was given as compiler
parameter
+ cleaned some code for future modifications
* harbour/source/macro/macro.y
+ added small hack for two BCC/OW warnings
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.yyh
* regenerated with modified Bison version which should give code
without BCC warnings - I cannot promise I'll keep it in the
future but I will try.
* harbour/source/rdd/dbcmd.c
! use default RDD instead of current one in COPY TO and APPEND FROM
* harbour/source/vm/classes.c
* added support for (@func()):eval(...)
* 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)
* harbour/include/hbexpra.c
* emulate xHarbour HB_ENUMINDEX() inside FOR EACH loop when
HB_COMPAT_XHB macro is set
It's only for compatibility - I strongly suggest to use
<unumvar>:__enumIndex()
which is more flexible and allow to chose the enumerator
variable not only the one from last loop
* harbour/include/hbexprb.c
* added comment removed from hbexpra.c
* harbour/source/compiler/hbmain.c
! fixed GPF which can appear when -b option is used in line numbering
inside codeblocks
* harbour/common.mak
* harbour/makefile.bc
* harbour/makefile.vc
* harbour/bin/hb-func.sh
* harbour/config/global.cf
* harbour/include/error.ch
* 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/hbmacro.h
* harbour/source/Makefile
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/Makefile
- harbour/source/compiler/exproptc.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/hbmain.c
* harbour/source/compiler/hbpcode.c
* harbour/source/macro/Makefile
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
- harbour/source/macro/macroc.c
+ harbour/source/main/Makefile
+ harbour/source/main/harbour.c
* harbour/source/vm/macro.c
* resolved name conflicts between compiler and macro compiler.
Now new compiler library is created.
There are some things which can be improved and cleaned yet
but it's enough to create single binaries with compiler+HVM+RTLs.
I updated non GNU make files but I cannot tested the modifications
- please check and fix me if necessary
* harbour/include/hbcomp.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbmacro.h
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/common/hbdate.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/hblbl.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/rtl/abs.c
* harbour/source/rtl/at.c
* harbour/source/rtl/chrasc.c
* harbour/source/rtl/datec.c
* harbour/source/rtl/dateshb.c
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/disksphb.c
* harbour/source/rtl/gtfunc.c
* harbour/source/rtl/left.c
* harbour/source/rtl/len.c
* harbour/source/rtl/math.c
* harbour/source/rtl/minmax.c
* harbour/source/rtl/mod.c
* harbour/source/rtl/philes.c
* harbour/source/rtl/philesx.c
* harbour/source/rtl/replic.c
* harbour/source/rtl/round.c
* harbour/source/rtl/set.c
* harbour/source/rtl/space.c
* harbour/source/rtl/strcase.c
* harbour/source/rtl/strpeek.c
* harbour/source/rtl/transfrm.c
* harbour/source/rtl/trim.c
* harbour/source/rtl/type.c
* harbour/source/rtl/val.c
* harbour/source/rtl/word.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* added some PCODEs to cover all possible combination of ++, --, <op>=
operations in the same way and keep Clipper compatible RT errors.
* added some other PCODEs to optimize some commonly used expressions/
statements
* use HB_ERR_ARGS_BASEPARAMS instead of hb_paramError()
* some other cleanups and minor optimizations
* harbour/utils/hbtest/rt_math.prg
* update expected result for MOD() - it was not Clipper compatible and
it will be hard to make it compatible without introducing some Clipper's
side effects
* harbour/contrib/libct/ctc.c
* harbour/contrib/libct/files.c
* harbour/contrib/libnf/ftattr.c
* harbour/contrib/libnf/n2color.c
* cleaned some BCC warnings
* harbour/include/hbapi.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbsetup.ch
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/common/hbver.c
* harbour/source/common/hbverdsp.c
* harbour/source/compiler/hbcomp.c
* harbour/source/vm/arrays.c
* harbour/source/vm/arrayshb.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/hvm.c
! fixed Harbour support for accessing string characters with array
index operators []
+ added support for #define HB_COMPAT_XHB - it's disabled by default.
When set it enables some of xHarbour features like negative array
indexes calculated from tail, accessing string characters with []
operators (warning it's not compatible with default Harbour version
enabled by -ks during compilation and //flags:s at runtime - in
xHarbour compatibility mode "ABC"[2] returns "B" when in Harbour 66)
and some other minor features.
* harbour/source/compiler/cmdcheck.c
* added support for optional setting C output type in -go switch
Now it accepts optional digit [0123] after -go in the same way
as -gc, f.e.: -go3
* harbour/source/compiler/harbour.c
* call hb_compExprLstDealloc() only when errors appeared during
compilation - it disable automatic freeing all allocated expressions
in clean compilation. I make it intentionally for easier detecting
problems one some expressions are not freed. So far the final cleanup
code always deallocated expressions what can hide some real bugs.
* harbour/source/vm/hvm.c
! fixed very serious bug in HVM closing. The s_uiActionRequest flag
was not cleared before hb_rddShutDown() so when RDD buffers were
hot and flushing required some PCODE evaluation (f.e. index KEY
or FOR expression) then they were not properly evaluated.
* harbour/source/vm/macro.c
* minor improvement
* harbour/utils/hbtest/rt_misc.prg
! fixed one of expected result, it was neither Harbour nor Clipper
result (I've just made some test with Clipper), I do not know why
it existed
* 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
* harbour/include/hbcomp.h
* 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/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbusage.c
* harbour/source/compiler/ppcomp.c
* harbour/source/macro/Makefile
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.yyh
* harbour/source/vm/macro.c
* harbour/source/vm/memvars.c
* harbour/source/vm/memvclip.c
* keep prefix definition for bison public symbols in *.y files instead
of passing them as bison arguments to avoid possible mistakes during
*.yy[hc] file generation
! fixed iif() reduction when used as single function parameter
+ add -kM compiler switch - turn off macrotext substitution
* updated <string> + <string> optimization and other macrotext usage
to keep more Clipper compatible behavior
! fixed typo in expression type checking in IIF() reduction - it was
working because wrongly used macros has the same values as the valid
ones
- removed compiler switches and macros for old HB_INLINE() syntax - it
was not supported after last months modifications. Only:
HB_INLINE([params,...]) { C code }
is supported.
! fixed passing parameters by reference in IIF() statement and macro
compiler. The following valid Clipper code:
&("myfunc(<exp>, @var1, @var2)")
was not supported
! do not allow to use references or empty expressions in expression list
AFAIK it's Clipper compatible. If I'm wrong then please fix me but
Clipper allows to use references only as function arguments, 2-nd and
3-rd IIF() argument and as directly created array items ( {...@var...} )
DO ... WITH ... is a special case of function call.
! Changed grammar rules to accept only Clipper compatible parameters.
! fixed typo in macro name in hb_memvarNewParameter() function.
* use HB_FUNC_EXEC(...) instead of HB_FUNCNAME(...)()
* harbour/include/hbexprb.c
* make function call optimizations only when hb_compFunCallCheck()
do not report errors
* harbour/source/common/reserved.c
+ added VALTYPE to list of reserved words and shortcuts (Clipper
compatible)
* harbour/source/compiler/hbfunchk.c
* checking for number of parameters in FILE() function call is Harbour
extension - do not enable it when HB_C52_STRICT macro is set
* harbour/source/rtl/filehb.c
* formatting
* 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