688bec195aec39a5b3110485f97ff185f63dddad
* 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.
Description
Harbour Core — Reference source for Five development
Languages
C
80.3%
xBase
17.8%
Makefile
0.6%
C++
0.4%
Harbour
0.4%
Other
0.3%