* harbour/contrib/hbqt/Makefile
* added /usr/include to list of directories scanned for QT header files
* harbour/contrib/hbole/olecore.c
! added missing return
* formatting and minor cleanup
* harbour/source/vm/arrays.c
* formatting
* harbour/source/vm/asort.c
! minor CA-Cl*pper compatibility fix - if sort codeblock returns
numeric value then it should be used as logical one (0 means FALSE)
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
+ added macro to force static hb_stack declaration even if
HB_STACK_MACROS is internally used
* harbour/source/vm/initsymb.c
* harbour/source/vm/hashfunc.c
* harbour/source/vm/evalhb.c
* harbour/source/vm/pcount.c
* harbour/source/vm/runner.c
* harbour/source/vm/debug.c
* harbour/source/vm/pvalue.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/proc.c
* harbour/source/vm/eval.c
* harbour/source/vm/dynlibhb.c
* do not use hbvmopt.h if it's not necessary or use hbvmint.h instead
to clean all direct references to hb_stack variable
* harbour/source/vm/fm.c
! fixed typo in default FM module setting/
* harbour/include/hbapicls.h
* harbour/source/vm/classes.c
* harbour/source/debug/dbgentry.c
* renamed hb_dbgObjSendMessage() to hb_dbg_objSendMessage() to keep
naming convention used for other C debugger functions
* harbour/source/vm/debug.c
* added information about existing debugger functions and where they
are used.
* harbour/include/hbvm.h
* harbour/include/hbapidbg.h
* harbour/include/hbvmpub.h
* harbour/include/hbstack.h
* harbour/include/hbapi.h
* harbour/source/vm/codebloc.c
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
* harbour/source/debug/dbgentry.c
* changed the method of static variable handling. Now we do not
have centralized array of all statics used by application (s_aStatics)
but each module uses it's own array to keep statics. The old
s_aStatics has been removed. It means that loading new PCODE module
from .hrb file or shared/dynamic library does not cause any static
table reallocation so it does not creates potential GPF trap for MT
code which may operate on static vars.
This modification changed a little bit the debugger interface.
I also updated some unused by us debug functions like __DBGVMVARSLIST()
or __DBGVMVARSLEN() anyhow any 3-rd party debuggers should be
updated for new API and modified hb_dbgEntry() syntax.
* common.mak
* source/vm/debug.c
* source/vm/hvm.c
* source/vm/Makefile
+ source/vm/debugold.c
+ Added some HB_DBG_*() functions for compatibility
with certain 3rd party libs. They are marked with
HB_LEGACY_LEVEL, and will be removed (pbly at 1.1.0),
so everyone is encouraged to use __DBG*() version
for Harbour versions above 0x010000 (or not use
them at all, if this is possible). If these functions
are indeed needed for some functionality, it'd be
good to hear about it, maybe there is a solution
which doesn't require internals.
* utils/hbdoc/ft_funcs.prg
* utils/hbmake/ft_funcs.prg
* Using FS_* manifest constants.
* harbour/source/vm/estack.c
* added missing static to s_initSymbol declaration
* harbour/include/hbgtinfo.ch
* harbour/source/rtl/scroll.c
* formatting
* harbour/common.mak
* added empty line necessary for some make systems (f.e. wmake)
* harbour/bin/hb-func.sh
* changed system libs order to avoid problems on some platforms
* harbour/bin/pack_src.sh
* collect information about repository files using 'svn status -v'
command instead of scanning .svn/entries files to avoid problems
with different formats used by SVN
* harbour/include/hbchksum.h
* harbour/include/hbset.h
! added missing extern in few function prototypes
* harbour/include/hbclass.ch
* use HB_CLS_PARAM_LIST macro instead of ... for strict C52 mode
* harbour/source/common/hbfsapi.c
+ added missing const to one declaration
* harbour/source/common/hbstr.c
* minor cleanup in hb_stricmp()
* harbour/source/rtl/inkey.c
! casting to avoid negative values during char to int translation
* harbour/source/rtl/mouse53.c
* added one internal definition
* harbour/source/rtl/philes.c
* removed unnecessary #include(s)
* added missing const to one declaration
* harbour/source/rtl/valtype.c
* harbour/source/vm/hashfunc.c
* cleanup RT error call to eliminate hb_paramError() function
* harbour/source/pp/pplib.c
* harbour/source/vm/runner.c
* harbour/source/vm/debug.c
* harbour/source/vm/arrayshb.c
* harbour/source/vm/classes.c
* harbour/source/vm/hvm.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtfunc.c
* harbour/source/rtl/hbinet.c
* harbour/source/rtl/hbregex.c
* harbour/source/rtl/idle.c
* harbour/source/rtl/errorapi.c
* harbour/source/rtl/hbtoken.c
* harbour/source/rtl/direct.c
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbcmd53.c
* harbour/source/rdd/fieldhb.c
* harbour/source/rdd/hbsix/sxcompr.c
* harbour/source/rdd/hbsix/sxcrypt.c
* harbour/source/compiler/hbcmplib.c
* harbour/contrib/hbrddads/adsfunc.c
* harbour/contrib/hbrddads/adsmgmnt.c
- removed unnecessary calls to hb_ret()
% replaced hb_itemRelease( hb_itemReturn( pItem ) ) with
hb_itemReturnRelease( pItem )
% replaced hb_itemPut*( hb_arrayGetItemPtr( pArray, ... ), ... ) with
hb_arraySetNI( pArray, ... )
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/contrib/xhb/cstructc.c
* harbour/contrib/hbw32/w32_ole.c
* harbour/contrib/hbgtwvg/wvtcore.c
* cleaned typos with double ;;
* harbour/source/vm/extend.c
* harbour/source/rtl/math.c
* cleaned HB_EXPORT usage
* harbour/source/pp/ppcore.c
! fixed Harbour extension which allows to use match marker
at the beginning of rule definition
* harbour/source/main/harbour.c
! fixed hex conversion in FM log module - fix done by Phil Krylov
in xHarbour
* harbour/source/rdd/nulsys/nulsys.c
+ added dummy version of DBEVAL() and DBFILTER() - these functions
are used in RTL
* harbour/contrib/hbct/bitnum.c
+ added INTNEG(), INTPOS()
+ harbour/contrib/hbct/ctrand.prg
+ added RANDOM(), RAND() - borrowd from xHarbour by Pavel Tsarenko
+ harbour/contrib/hbct/setrc.c
+ added SETRC()
* harbour/contrib/hbct/getinput.prg
% minor optimization
* harbour/contrib/hbct/Makefile
* harbour/contrib/hbct/common.mak
* updated for new files
* harbour/contrib/hbnf/tempfile.prg
* use HB_FTempCreate() - modification borrowed from xHarbour
TOFIX this function uses hb_isbyref() which does not exist
in Harbour
* harbour/config/w32/msvc.cf
+ added -nologo flag for cl.exe (Phil Krylov's modification borrowed
from xHarbour
* harbour/config/w32/mingw32.cf
- removed repeated definitions
* harbour/config/w32/install.cf
! added alternative install rule for command.com with max line size limit
* harbour/contrib/gd/gdwrp.c
* harbour/contrib/libmisc/hb_f.c
* harbour/contrib/samples/dbf.c
* harbour/contrib/samples/time.c
* harbour/doc/es/hb_apiln.txt
* harbour/include/hbapicdp.h
* harbour/include/hbapilng.h
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbnubs.c
* harbour/source/rdd/hsx/cftsfunc.c
* harbour/source/rtl/accept.c
* harbour/source/rtl/defpath.c
* harbour/source/rtl/oemansi.c
* harbour/source/rtl/pad.c
* harbour/source/rtl/shadow.c
* harbour/source/rtl/trim.c
* harbour/source/vm/debug.c
* changed HB_FUNCNAME( <name> )() to HB_FUNC_EXEC( <name> )
* harbour/utils/hbrun/Makefile
* changed order of linked libraries
* harbour/source/rtl/empty.c
* changed EMPTY( <symboItem> ) - not it returns .T. when <symboItem>
is not a function symbol
* harbour/source/rtl/errorapi.c
% replaced all hb_dynsym{Find,Get}*() by static variables initialized
at HVM startup variables - it reduce the cost of creating and
initializing error object about 50%
* harbour/include/hbapifs.h
* harbour/source/rtl/fssize.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/hbffind.c
* changed to use 64bit file API
+ harbour/contrib/libct/ctextern.ch
+ added list with EXTERN requests for our CT3 function. List generated
automatically from final binary CT lib created on Linux.
* harbour/include/hbapi.h
+ harbour/include/hbapidbg.h
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbdebug.ch
* harbour/include/hbdefs.h
* harbour/source/compiler/Makefile
* harbour/source/compiler/genc.c
+ harbour/source/compiler/hbdbginf.c
* harbour/source/compiler/hbmain.c
* harbour/source/debug/debugger.prg
* harbour/source/rtl/altd.prg
* harbour/source/vm/Makefile
+ harbour/source/vm/dbgentry.c
* harbour/source/vm/debug.c
* harbour/source/vm/hvm.c
+ added xHarbour compatible low level debugger code
Without some small exceptions like my hbdbginf.c most of
the code created by Phil Krylov <phil a t newstar.rinet.ru>
and borrowed from xHarbour with some small modifications.
* harbour/source/rtl/gete.c
! fixed memory leak in GETENV()
* harbour/source/compiler/hbmain.c
! fixed memory leak when -build or -credit switches were used
* 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/bin/hb-func.sh
* harbour/bin/hb-mkslib.sh
* harbour/bin/postinst.sh
* harbour/config/bsd/gcc.cf
* harbour/config/darwin/gcc.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/watcom.cf
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/include/hbapifs.h
* harbour/include/hbexprc.c
* harbour/include/hbsetup.h
* harbour/source/common/expropt2.c
* harbour/source/common/hbdate.c
* harbour/source/common/hbgete.c
* harbour/source/common/hbstr.c
* harbour/source/common/hbver.c
* harbour/source/common/hbverdsp.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/fixflex.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbfunchk.c
* harbour/source/pp/ppcore.c
* harbour/source/pp/ppgen.c
* harbour/source/pp/pplib.c
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/hsx/hsx.c
* harbour/source/rtl/accept.c
* harbour/source/rtl/ampm.c
* harbour/source/rtl/console.c
* harbour/source/rtl/defpath.c
* harbour/source/rtl/errorint.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/fkmax.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/langapi.c
* harbour/source/rtl/seconds.c
* harbour/source/rtl/set.c
* harbour/source/rtl/tobject.prg
* harbour/source/rtl/transfrm.c
* harbour/source/rtl/gtcrs/chrmap.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtcrs/gtcrs.h
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/vm/classes.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/debug.c
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* harbour/source/vm/proc.c
* harbour/source/vm/runner.c
* harbour/utils/hbmake/hbmlang.c
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbppcomp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbpplib.c
* harbour/utils/hbpp/pragma.c
* harbour/utils/hbver/hbverfix.c
* general code cleanup: all strcpy() and strcat() replaced hb strn*()
and hb_strn*(), sprintf() by snprintf(), etc.
It fixed some possible buffer overflow but it's also possible that
it will exploit some some hidden so far problems but I strongly
prefer to know about them ASAP to fix them before final 1.0 release.
! fixed bug I introduce in codeblock falgs which disabled early macro
evaluation in codeblocks.
! added missing protection against execution by bison destructor for
used CBSTART token on syntax error.
% use PP stringify logik added for FLEX support to remove all redundant
spaces in stringified for early macro evaluation codeblocks and add
spaces between operators if after preprocessing they were removed.
Now we are supporting also some code which cannot be compiled by
Clipper.
% cleaned and improved the speed of printer redirecting in console code.
Chen please check if CG still reports problems and if not ubdate
TODO/TOFIX or inform me about them.
* some cleanups in building process for different *nixes: MacOSX, SunOS,
*BSD, etc.
* removed not longer necessary (I hope) compiler flag to force default
'char' type as signed. Now Harbour should work with signed and unsigned
char without any problems. To other developers: please remember that
when you are using 'char' as 8 bytes signed integer then it's a bug.
Always explicitly use: 'signed char' in such case. On some platforms
it's not possible to set default type for 'char' so if you hardcode
that 'char' is signed or unsigned somewhere then code will not be
portable. Chen if you will find a while to also rebuild Harbour with
BCC and -K switch to make some tests with CG then I'll be thankful.
* harbour/make_rpm.sh
* check for rpmbuild also when BUGGY_RPM is set
* harbour/make_tgz.sh
* removed rebuild hbpptest with shared libraries
* harbour/include/hbapicls.h
+ added definitions for hb_clsCreate(), hb_clsAdd(), hb_clsAssociate()
* harbour/include/hbapierr.h
* harbour/source/rtl/errorapi.c
+ added hb_errFuncName - pseudo function name which can be used as
operation description in new error object. It should help to simplify
some code and fix function names when RT error is generated from C
function which can be executed from different .prg functions.
* harbour/include/hbclass.ch
+ added some missing Classy(y) compatible object variable type
descriptions: Int, Integer, Block
* harbour/source/rdd/dbfcdx/dbfcdx1.c
! disabled early retrieving from the cache key position and key count
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
+ added: void hb_vmPushEvalSym( void ) for the code which do not
want to access any [P]HB_SYMB structures
* changed symbol name in hb_symEval from __EVAL to EVAL and modified
hb_symEval registration method to not register hb_vmDoBlock as global
function. Having PHB_DYNS address for "EVAL" in hb_symEval.pDynSym
allows to eliminate some strcmp() when we are looking for EVAL public
symbol.
! fixed symbol table updating in PCODE functions for future multi module
.hrb files
* harbour/source/vm/proc.c
* use hb_symEval.pDynSym instead of strcmp()
* harbour/source/vm/arrays.c
* harbour/source/vm/debug.c
* minor code cleanup
* harbour/source/rtl/tclass.prg
* harbour/source/vm/classes.c
% separate message hash table from methods table - it will cause farther
reduction of allocated memory - many thanks to all people who send
me statistics about number of used classes and symbols from their code.
% use hb_symEval.pDynSym
+ added support for object variable type scope checking like in Class(y).
! fixed typo in pushing object class variables by reference
% s_pClasses is now indexed directly by class handle
% some other optimiztions
! make hidden and non virtual invisible in child classes if it overloaded
some other non hidden method. In such case the overloaded method is used
and can be accessed.
! make friend functions real method class oriented not (super)object for
hidden messages
* harbour/ChangeLog
+ harbour/ChangeLog.016
! added ChangeLog.016 and updated number - mistake in my previous commit
* harbour/source/vm/classes.c
* stronger parameters validation and fixed some possible problems
in hb_objGetMethod()
+ added support for assigning enumerator value by:
<enum>:__enumValue(<newVal>)
and enumerator index by:
<enum>:__enumIndex(<newIndex>)
It's a work in progress - please do not create any code which may
need such functionality yet
* harbour/source/vm/debug.c
* harbour/source/vm/hvm.c
* minor code cleanup
* harbour/include/hbapi.h
* moved HB_STACK_STATE declaration from hbstack.h to hbapi.h
it's covered by _HB_API_INTERNAL_ macro so it should not
effect 3-rd party code
* modified hb_struSymbol structure:
LONG stackbase
replaced by:
PHB_STACK_STATE stackstate
this modification allows to keepadditional information bound with
function call stack accessible from different HVM modules.
Now it's used by memvars code to keep/update PRIVATE variables
stack pointers. I plan to store in HB_STACK_STATE structure
information additional information for classes code like super
casting or instance variables offsets in new OOP model I'm working on.
It can be also used by debugger code to retrieve some informations
about executed functions without active updating by main HVM loop.
+ added hb_memvarsClear() - cleanly clears all PRIVATE and PUBLIC
variables
+ added hb_memvarUpdatePrivatesBase() - updates PRIVATE stack base
offset so PRIVATE variables created in current function/procedure
will not be removed when it returns
- removed hb_memvarsRelease() and hb_memvarValueNew()
* harbour/include/hbstack.h
+ added hb_stackClearMevarsBase() - helper function for hb_memvarsClear()
clears PRIVATE stack offsets in executed functions
* changed to static offset from int to long - in different places we
were using int or long in HVM so I cleaned the HVM code to always
operate on the same type
* harbour/source/vm/estack.c
* set/restore PRIVATE stack base offset in hb_stackNewFrame()/
hb_stackOldFrame()
* updated for new HB_IT_SYMBOL structure
* harbour/source/vm/hvm.c
! removed setting/restoring PRIVATE stack base offset in hb_vmExecute()
It make code like:
eval(&("{||VAR:=1}"))
Clipper compatible
* updated for new HB_IT_SYMBOL structure
* changed order of execution exit procedures for clean memvars removing
and future destructors execution. I'll describe it better when I'll
add destructors.
* harbour/source/vm/memvars.c
! fixed CLEAR MEMORY - now this function should be safe in Harbour
It's not exactly compatible with Clipper because I intentionally
didn't replicated some Clipper bugs like possible memory corruption.
+ added hb_memvarsClear() - cleanly clears all PRIVATE and PUBLIC
variables
+ added hb_memvarUpdatePrivatesBase() - updates PRIVATE stack base
offset so PRIVATE variables created in current function/procedure
will not be removed when it returns
! fixed releasing PUBLIC and PRIVATE variables which were passed by
reference and are still active on HVM stack or in codeblocks as
detached locals (see: hb_memvarDetachDynSym())
* modified hb_memvarFindSymbol() to be more Clipper compatible
% optimized hb_memvarRelease() to operate or PHB_DYNS instead of
string comparison and not make linear dynamic symbol scan for
PUBLIC or not existing symbols
- removed hb_memvarReleasePublic()
* harbour/include/hbvmpub.h
* harbour/include/hbxvm.h
* harbour/source/compiler/gencc.c
* harbour/source/vm/classes.c
* harbour/source/vm/debug.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/pcount.c
* harbour/source/vm/proc.c
* harbour/source/vm/pvalue.c
* updated for the above modifications
* harbour/source/rtl/memvarbl.prg
* harbour/source/rtl/menuto.prg
* use __mvEXIST( cMemvar ) instead of __mvSCOPE( cMemvar ) > HB_MV_ERROR
__mvEXIST() is much faster function
* harbour/source/rtl/type.c
* execute hb_memvarUpdatePrivatesBase() after macro type checking.
This should not be necessary but we are not Clipper compatible here
and this is work around for difference in our TYPE() implementation.
Clipper for:
? TYPE("VAR:=1")
create PUBLIC variable VAR when [x]Harbour PRIVATE one.
Should we try to make it Clipper compatible?
The above should fix problems reported with memvars. We are not 100%
Clipper compatible but unlike in Clipper we cannot break VM internals
using some operation on references to memvars and detached locals
and/or RELEASE.../ CLEAR MEMORY. This modifications should be intensively
tested. If you will find any problems with current code please inform me.
I'd like to hear your opinions about memvars created by TYPE() (see above).
Should we change it? It may not be very easy operation - we will have to
change macro compiler and add new PCODE for that.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
- removed hb_stackTopItem()
+ added hb_stackItemBasePtr(), hb_stackAllocItem()
* changed the item initialization/clearing in push/pop operation
Now only complex item are cleared and it's not guaranteed that
the top item will be set to NIL. In fact it was not guarantied
even before my modifications. You coule be sure only that the
allocated item will not be complex one and you can safely pass
pointer to it to any other functions. It allow to clean a little
bit some code and remove redundant and repeated setting HB_IT_NIL
for allocated items.
Now using hb_stackPush() can be necessary only in some very seldom
cases. hb_stackAllocItem() allocates new item and returns pointer
to this item. After some code cleaning hb_stackPush() is not used
by core Harbour code at all so if you have it in your sources then
please check if you should not update them.
* harbour/source/rdd/usrrdd/usrrdd.c
* use hb_vmPushNil() instead of hb_stackPush()
* harbour/source/vm/arrays.c
* changed hb_arrayNew() to be safe for automatic GC activation
* some minor speed improvement
* harbour/source/vm/codebloc.c
* changed hb_codeblockNew() and hb_codeblockMacroNew() to be safe
for automatic GC activation
* harbour/source/vm/debug.c
* use only stack function/macros instead of direct accessing hb_stack
I hope that I haven't break anything.
* harbour/source/vm/hvm.c
! use hb_stackAllocItem() instead of hb_stackTopItem() to make our
HVM reentrant safe. This modifications also fixed some possible
bugs which could be exploited by other modules which have to execute
.prg code - f.e. in RDD when relation codeblock has to be executed
to position record in fieldget/fieldput operations.
* harbour/source/vm/itemapi.c
* harbour/source/vm/memvars.c
* use hb_stackAllocItem()
The above modifications finish stack usage and making our HVM reentrant
safe. There is only one thing which have to be fixed yet. It's HVM
support for xbase++ syntax in things like:
func(&<paramList>), aVal[&<indexList>], {&<itemList>}
To fix it we will have to change PCODE generated by compiler and
replace some PCODEs used for current code by the new one. I will
wait with this modifications for Ryszard.
With the above exception now we are ready to implement destructors,
add automatic GC and begin to work on MT though before that I'd like
to clean the RT error support.
Please carefully check if all is correct. It was modification in core
code and even small typo can break whole application.
* harbour/include/hbapi.h
* harbour/source/vm/proc.c
+ added BOOL hb_procinfo( int iLevel, char * szName,
USHORT * puiLine, char * szFile )
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
+ added hb_stackTotalItems(), hb_stackDateBuffer(),
hb_stackGetStaticsBase(), hb_stackSetStaticsBase(),
hb_stackBaseProcInfo()
* harbour/source/vm/garbage.c
* indenting
* harbour/source/vm/classes.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/extend.c
* harbour/source/vm/fm.c
* harbour/source/vm/hvm.c
* replaced direct stack access by stack functions/macros
* harbour/source/vm/debug.c
* removed hb_stackLenGlobal() and replace it by hb_stackTopOffset()
Warning!!! hb_stackTopOffset() returnes results smaller by 1.
The TOP stack item is undefined and should not be accessed by
debuger.
* changed HB_DBG_VMSTKGLIST() to operate on functions/macros.
It's possible that the above will badly interact with core debugger
code so I stop farther modifications leaving them for someone who
knows debugger core code.
* harbour/config/linux/dir.cf
* harbour/config/linux/gcc.cf
* formatting
* harbour/config/linux/global.cf
* harbour/config/linux/install.cf
* added -ldl to linked library list and RANLIB executing after library
creation
* harbour/contrib/ole/ole2.c
* added #include "hbapicls.h"
+ harbour/include/hbapicls.h
* harbour/include/hbapi.h
+ added HB_IT_ENUM item
+ added collect member to HB_IT_POINTER structure for POINTER items
inspected by GC
* changed the order of HB_CODEBLOCK members to safe few bytes on
alignment
* removed counters from HB_CODEBLOCK and HB_BASEARRAY structure
+ added hb_xRefInc(), hb_xRefDec(), hb_xRefFree(), hb_xRefCount(),
hb_xRefResize() functions. They are internal Harbour VM functions
and covered by internal API macro. Should not be used by 3-rd
party code because we may change them in the future or even remove.
+ added hb_gcRefInc(), hb_gcRefDec(), hb_gcRefFree(), hb_gcRefCount()
functions. These are also internal function which corresponds to the
above hb_x*() ones.
- removed hb_arrayRelease() function. This function is not longer
necessary and it should never be public function - it was implemented
in very dangerous way.
- removed hb_codeblockDelete() function.
- removed hb_memvarValueDecGarbageRef()
+ added USHORT usLen parameter to hb_codeblockMacroNew() - when sets
to non 0 value it informs that PCODE should be copied to dynamically
allocated buffer.
* moved all classes/object functions to separate file: hbapicls.h
+ added hb_retptrGC()
+ added internal function hb_memvarGetItem()
* harbour/include/hbapiitm.h
- removed hb_itemForwardValue() and added macro which translates
hb_itemForwardValue() to hb_itemMove()
+ added hb_itemUnShareString() and hb_itemReSizeString() functions
+ added hb_itemSetNil() macro
* harbour/include/hbdefs.h
* some cleanups in macro definitions
* harbour/include/hbexprb.c
* indenting
* harbour/include/hbvm.h
* harbour/include/hbinit.h
+ added hb_vmProcessSymbolsExt(), hb_vmRegisterSymbols(),
hb_vmFreeSymbols(), hb_vmBeginSymbolGroup(),
hb_vmInitSymbolGroup(), hb_vmExitSymbolGroup()
* changed hb_vmProcessSymbols() to return address of register symbol
table. For normal code it's the same address as given in parameter
so it does not break backward binary compatibility.
* changed symbol init macros to work correctly with modified address
of symbol table
* harbour/include/hbsetup.h
* added support for HB_USE_PROFILER macro. Now profiler code is
is disable in HVM by default
* commented out HB_ASORT_OPT_ITEMCOPY - it's not longer used - see note.
* harbour/include/hbstack.h
* added missing parenthesis in hb_stackItem() macro
* harbour/include/hbtypes.h
* updated VM_PROCESS_DLL_SYMBOLS definition
+ added VM_PROCESS_SYMBOLS_EXT
- removed HB_ARRAYRELEASE
* harbour/include/hbver.h
* changed revision number to 2
* harbour/include/hbvmpub.h
- remove pFunPtr from HB_DYNS and cover profiler member by
#ifndef HB_NO_PROFILER
+ added HB_PCODEFUNC structure
+ added HB_FS_PCODEFUNC, HB_FS_DYNCODE and HB_FS_LOCAL - the last one
is not used yet.
* harbour/include/hbxvm.h
* added some multipcode functions for some speed optimization in -gc3
output
* harbour/include/hbapicdp.h
* harbour/source/codepage/cpbg866.c
* harbour/source/codepage/cpbgiso.c
* harbour/source/codepage/cpbgwin.c
* harbour/source/codepage/cpeldos.c
* harbour/source/codepage/cpelwin.c
* harbour/source/codepage/cpesdos.c
* harbour/source/codepage/cpesmwi.c
* harbour/source/codepage/cpeswin.c
* harbour/source/codepage/cpgedos.c
* harbour/source/codepage/cpgewin.c
* harbour/source/codepage/cphu852.c
* harbour/source/codepage/cphuiso.c
* harbour/source/codepage/cphuwin.c
* harbour/source/codepage/cppl852.c
* harbour/source/codepage/cppliso.c
* harbour/source/codepage/cpplmaz.c
* harbour/source/codepage/cpplwin.c
* harbour/source/codepage/cppt850.c
* harbour/source/codepage/cpptiso.c
* harbour/source/codepage/cpru866.c
* harbour/source/codepage/cprukoi.c
* harbour/source/codepage/cpruwin.c
* harbour/source/codepage/cpsl437.c
* harbour/source/codepage/cpsl852.c
* harbour/source/codepage/cpsliso.c
* harbour/source/codepage/cpslwin.c
* harbour/source/codepage/cpsrwin.c
* harbour/source/common/hbfhnd.c
* harbour/source/common/hbstr.c
* harbour/source/common/hbver.c
* harbour/source/compiler/gencli.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/langapi.c
* harbour/source/rtl/gtalleg/gtalleg.c
* harbour/source/rtl/gtalleg/ssf.h
* harbour/source/rtl/gtcgi/gtcgi.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
* cleaned the code to avoid warnings for some non ANSI C constructions
* harbour/source/compiler/cmdcheck.c
* formatting
* harbour/source/compiler/gencc.c
* added some multipcode optimizations
* harbour/source/compiler/genc.c
* keep function name set by compiler for static initstatics
* harbour/source/compiler/harbour.c
* extend init statics name with the number of used static variables
* formatting
* harbour/source/compiler/hbusage.c
+ added my name to developers list - I hope that there is enough
of my code in Harbour (BTW for quite long time) ;-)
* harbour/source/rdd/dbcmd.c
- removed DBF2TEXT() function
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* generate RT error when someone tries to create DBF with memo fields
without MEMO RDD linked.
* harbour/source/rtl/errorapi.c
* replace all hb_vmDo() with hb_vmSend()
* harbour/source/rtl/math.c
* use hb_errPutArgs() to pass parameters to error object
* harbour/source/rtl/philes.c
* harbour/source/rtl/space.c
* harbour/source/rtl/strpeek.c
* some minor optimizations
* harbour/source/vm/arrays.c
- removed hb_arrayRelease() function.
* changed hb_arrayReleaseGarbage() to be safe for recursive call
* updated to use GC counters
* harbour/source/vm/arrayshb.c
* use stack function/macros instead of direct accessing HB_STACK members
* harbour/source/vm/asort.c
* removed unused HB_ASORT_OPT_ITEMCOPY
* harbour/source/vm/classes.c
* added class code from HVM
% added fast overloaded operator detection and execution
+ added hb_objHasOperator(), hb_objOperatorCall()
+ added separated overloading of "=" and "==" operators
* operate on PHB_SYMB not PHB_FUNC - support for pure PCODE function
without any machine code
* use stack function/macros instead of direct accessing HB_STACK members
* separated profiler code
* some code cleaning
* harbour/source/vm/codebloc.c
+ added USHORT usLen parameter to hb_codeblockMacroNew() - when sets
to non 0 value it informs that PCODE should be copied to dynamically
allocated buffer.
* updated to use GC counters
- removed hb_codeblockDelete() function.
* changed hb_codeblockDeleteGarbage() to be safe for recursive call
- removed restoring statics base in hb_codeblockEvaluate()
* harbour/source/vm/debug.c
* cleaned and optimized some code
* harbour/source/vm/dynlibhb.c
+ added support for loading and unloading dynamic libraries with PCODE
+ added support for dynamic libraries in Linux (.so)
+ added HB_LIBERROR() - returns error string with last error in
HB_LIBLOAD() - now works only in Linux
* harbour/source/vm/dynsym.c
* separated profiler code
+ use pDynSym->pSymbol->value.pFunPtr instead of pDynSym->pFunPtr
* harbour/source/vm/estack.c
+ added #include "hbapicls.h"
+ added hb_stackPushReturn(), hb_stackPopReturn()
* harbour/source/vm/eval.c
* harbour/source/vm/extend.c
* use stack function/macros instead of direct accessing HB_STACK members
+ added hb_retptrGC()
* harbour/source/vm/fm.c
+ added hb_xRefInc(), hb_xRefDec(), hb_xRefFree(), hb_xRefCount(),
hb_xRefResize() functions. They are internal Harbour VM functions
and covered by internal API macro. Should not be used by 3-rd
party code because we may change them in the future or even remove.
* harbour/source/vm/garbage.c
+ added hb_gcRefInc(), hb_gcRefDec(), hb_gcRefFree(), hb_gcRefCount()
functions. These are also internal function which corresponds to the
above hb_x*() ones.
* changed Step 3 of GC pass and execution of clean-up function to be
safe for recursive calls and additional activity.
Ryszard see my note and s_pDeletedBlock
+ added GC inspected HB_IT_POINTER items.
* harbour/source/vm/hvm.c
* separated profiler code
* separated class code from HVM
+ added support for loading and unloading libraries with PCODE modules
+ added support for pure PCODE functions
+ added support for string item resizing and preallocating string buffer
+ added some new multipcode functions for -gc3 optimization
+ added hb_vmProcessSymbolsExt(), hb_vmRegisterSymbols(),
hb_vmFreeSymbols(), hb_vmBeginSymbolGroup(),
hb_vmInitSymbolGroup(), hb_vmExitSymbolGroup()
* changed hb_vmProcessSymbols() to return address of register symbol
table. For normal code it's the same address as given in parameter
so it does not break backward binary compatibility.
+ use new code for operator overloading
* changed FOR EACH to dynamically check iteration scope in
hb_vmEnumNext()/hb_vmEnumPrev() and remove max number of iteration
stored on HVM stack
* temporary use hb_itemUnRefOnce() instead of hb_itemUnRefRefer() as
workaround for possible GPF. I'd like Ryszard will chose the final
version
* harbour/source/vm/itemapi.c
+ added support for preallocating string buffer size
+ added hb_itemUnShareString() and hb_itemReSizeString()
* updated string items to use counters allocated with each
memory block by xh_xgrab()/hb_xalloc()
* updated codeblock and array items to use GC reference counters
+ added GC inspected HB_IT_POINTER items.
* generate RT error in hb_itemUnreOnce() for enumerator items
out of scope
+ added hb_itemPutPtrGC()
* harbour/source/vm/macro.c
* use pDynSym->pSymbol->value.pFunPtr instead of pDynSym->pFunPtr
* harbour/source/vm/maindllp.c
* updated usage of hb_vmProcessSymbols()
* added hb_vmProcessSymbolsExt()
* harbour/source/vm/memvars.c
+ added hb_memvarGetItem()
- removed hb_memvarValueDecGarbageRef()
* harbour/source/vm/proc.c
+ added #include "hbapicls.h"
* harbour/source/vm/pvalue.c
* do not access stack structure directly but use hb_stack*()
functions (macros)
* harbour/source/vm/runner.c
* synced with xHarbour
* harbour/utils/hbtest/rt_misc.prg
* added overloading "=" operator. Now "==" and "=" can be overloaded
with different methods
All names I used for new functions/macros can be changed. Please look at
it and if you will some better propositions then we can use it.
hb_vmProcessSymbolsExt() is added but not used yet.
* include/hbapi.h
* source/vm/codebloc.c
* source/vm/itemapi.c
* source/vm/memvars.c
* fixed memvars and detached locals handling related to reallocation
of memvar's buffer and detaching of locals in a loop
- thanks to Przemek
* source/vm/debug.c
*removed diagnostic hb_dbgstop()
* source/compiler/harbour.c
*fixed generation of codeblock's pcode with debugging info
* source/debug/dbgmenu.prg
* source/debug/dbgtmenu.prg
* source/debug/dbgtmitm.prg
* source/debug/dbgtwin.prg
* source/debug/debugger.prg
* source/debug/tbrwtext.prg
*added Tracepoint support
*added support for PPO files
*added monitoring of local variables used in a codeblock
*local variables are displayed correctly when the
callstack window is browsed
*other minor fixes
* source/vm/debug.c
*renamed '__vm*' functions to 'hb_dbg_*'
*fixed support for local variables inside of codeblock
* source/vm/hvm.c
*added 'hb_dbg_ProcLevel' function which return the
size of procedure stack calls (the debugger support)