* 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)