eb214d1e4b7f5665ce46ba1e85594de5027af488
86 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
06f159c990 |
2009-02-24 18:49 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/vm/fm.c
! Fixed compilation error in dlmalloc with pocc64.
* config/win/pocc64.cf
* config/win/msvc64.cf
* Cleanup.
* config/win/gcc.cf
! Added gdi32 to system lib list.
* config/win/mingw.cf
* config/win/mingwce.cf
* Minor sync with each other.
% Two duplicated lines removed from mingwce. I hope these
weren't intentional.
---
AR = $(CCPREFIX)ar
ARFLAGS = $(HB_USER_AFLAGS)
---
|
||
|
|
87cfa641b7 |
2009-02-24 13:49 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsetup.h
* minor modifications in macros
* disabled some GCC function attributes when ICC is used
* harbour/source/pp/ppcore.c
* casting
* harbour/source/vm/fm.c
* destroy dlmalloc mspace in hb_xexit() when USE_DL_PREFIX is used
otherwise call malloc_trim(0) to at least reduce allocated memory
|
||
|
|
fc28614cee |
2009-02-11 09:46 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* source/rtl/gtwvt/gtwvt.c
* BYTE -> CHAR (Windows) - UNDONE.
* include/hbdefs.h
+ Added (commented) new types. Work in progress, incomplete.
* contrib/hbssl/ssl.c
- Temporary disabled SSL_GET_READ_AHEAD() as a workaround for
BCC linking problem with SSL_get_read_ahead() OpenSSL
library function (symbol is unresolved due to missing
leading underscore in implib generated ssleay32.lib file).
* source/vm/set.c
% hb_fsFile() -> hb_fsFileExists()
* source/rtl/hbffind.c
* HB_WIN_32_MATCH -> HB_WIN_MATCH
* doc/whatsnew.txt
* include/hbsetup.h
* source/vm/fm.c
* #define HB_FM_WIN32_ALLOC renamed to HB_FM_WIN_ALLOC.
; INCOMPATIBLE: For those who are using this switch, please
update your make files.
* source/rtl/tpopup.prg
! Fixed to draw separator lines with BOX GT attributes,
so that they appear properly.
|
||
|
|
a8598c6299 |
2009-02-04 23:23 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* include/hbwince.h
* include/hb_io.h
* include/hbwmain.c
* include/hbthread.h
* include/hbsetup.h
* include/hbmath.h
* include/hbassert.h
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/gtwvg.h
* contrib/gtwvg/wvggui.c
* contrib/gtwvg/wvggui.h
* contrib/gtwvg/wvgutils.c
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_dll.c
* contrib/hbwin/win_prn1.c
* contrib/examples/pp/pp.c
* contrib/examples/pp/hbppcore.c
* source/pp/hbpp.c
* source/vm/fm.c
* source/vm/extrap.c
* source/main/harbour.c
* source/common/hbver.c
* source/common/hbwince.c
* source/rtl/diskspac.c
* source/rtl/hbgtcore.c
* source/rtl/gtclip.c
* source/rtl/gtstd/gtstd.c
* source/rtl/disksphb.c
* source/rtl/gtpca/gtpca.c
* source/rtl/seconds.c
* source/rtl/filebuf.c
* source/rtl/hbproces.c
* source/rtl/gtwvt/gtwvt.h
* source/rtl/gtwvt/gtwvt.c
* source/rtl/fssize.c
* source/rtl/hbinet.c
* source/rtl/gtsys.c
* source/rtl/filesys.c
* HB_WINCE -> HB_OS_WIN_CE.
Now all OS branching #defines are in the HB_OS_* namespace.
Please use the new name from now on.
|
||
|
|
1d13959a7b |
2009-02-04 01:09 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* include/extend.api
* include/hbgtcore.h
* include/hbwince.h
* include/hbthread.h
* include/hbdefs.h
* include/hbsetup.h
* include/hbapi.h
* include/clipdefs.h
* include/hbatomic.h
* contrib/hbmysql/mysql.c
* contrib/hbct/ctnet.c
* contrib/hbct/files.c
* contrib/hbct/dattime3.c
* contrib/hbct/disk.c
* contrib/hbodbc/odbc.c
* contrib/xhb/hboutdbg.c
* contrib/xhb/hbsyslog.c
* contrib/xhb/filestat.c
* contrib/hbmsql/msql.c
* contrib/hbole/ole2.c
* contrib/hbmzip/hbmzip.c
* contrib/hbapollo/apollo.c
* contrib/hbfbird/firebird.c
* contrib/hbnf/descendn.c
* contrib/hbnf/getenvrn.c
* contrib/rddsql/sqlmix.c
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvggui.c
* contrib/gtwvg/wvgwin.c
* contrib/gtwvg/wvgutils.c
* contrib/gtwvg/wvgcore.c
* contrib/rddads/adsx.c
* contrib/rddads/rddads.h
* contrib/rddads/adsmgmnt.c
* contrib/rddads/adsfunc.c
* contrib/rddads/ads1.c
* contrib/hbfimage/fi_winfu.c
* contrib/hbfimage/fi_wrp.c
* contrib/hbgd/gd.ch
* contrib/hbgd/gdwrp.c
* contrib/hbgf/hbgfwin/winapi.c
* contrib/hbtip/utils.c
* contrib/hbtip/ChangeLog
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_osc.c
* contrib/hbwin/win_misc.c
* contrib/hbwin/win_prt.c
* contrib/hbwin/win_dll.c
* contrib/hbwin/win_ole.c
* contrib/hbwin/win_prn1.c
* contrib/hbwin/win_regc.c
* contrib/hbssl/sslsess.c
* contrib/hbssl/sslrand.c
* contrib/hbwhat/whtdate.c
* contrib/hbwhat/whtini.c
* contrib/hbwhat/whtcret.c
* contrib/hbwhat/whthead.c
* contrib/hbwhat/whtilst.c
* contrib/hbwhat/whtreg.c
* contrib/hbwhat/whtclpb.c
* contrib/hbwhat/whtmous.c
* contrib/hbwhat/whtrgn.c
* contrib/hbwhat/whtmeta.c
* contrib/hbwhat/whttbar.c
* contrib/hbwhat/whtrect.c
* contrib/hbwhat/whtbrsh.c
* contrib/hbwhat/whtgdi.c
* contrib/hbwhat/whtdlg.c
* contrib/hbwhat/whtview.c
* contrib/hbwhat/whtsys.c
* contrib/hbwhat/whtmain.c
* contrib/hbwhat/whtwnd.c
* contrib/hbwhat/whtmmcap.c
* contrib/hbwhat/whtfont.c
* contrib/hbwhat/whtdir.c
* contrib/hbwhat/whtbmp.c
* contrib/hbwhat/whtkbrd.c
* contrib/hbwhat/whtpen.c
* contrib/hbwhat/whttext.c
* contrib/hbwhat/whtdc.c
* contrib/hbwhat/whtdraw.c
* contrib/examples/uhttpd/socket.c
* contrib/examples/uhttpd/uhttpdc.c
* source/vm/mainwin.c
* source/vm/maindll.c
* source/vm/maindllh.c
* source/vm/hvm.c
* source/vm/cmdarg.c
* source/vm/maindllp.c
* source/vm/fm.c
* source/vm/extrap.c
* source/vm/thread.c
* source/vm/dynlibhb.c
* source/vm/set.c
* source/common/hbgete.c
* source/common/hbver.c
* source/common/hbfsapi.c
* source/common/hbwince.c
* source/common/hbdate.c
* source/rtl/diskspac.c
* source/rtl/console.c
* source/rtl/gtwin/gtwin.c
* source/rtl/fserror.c
* source/rtl/hbgtcore.c
* source/rtl/gtclip.c
* source/rtl/fstemp.c
* source/rtl/idle.c
* source/rtl/oemansi.c
* source/rtl/disksphb.c
* source/rtl/net.c
* source/rtl/gtgui/gtgui.c
* source/rtl/seconds.c
* source/rtl/gttone.c
* source/rtl/hbproces.c
* source/rtl/gtkeycod.c
* source/rtl/version.c
* source/rtl/gtwvt/gtwvt.c
* source/rtl/hbrandom.c
* source/rtl/hbinet.c
* source/rtl/hbffind.c
* source/rtl/gtsys.c
* source/rtl/filesys.c
* source/rtl/gtkbstat.c
* source/rtl/isprint.c
* source/compiler/cmdcheck.c
* utils/hbmake/hbmlang.c
* #defines renamed to be bitwidth-independent.
- HB_OS_WIN_32_USED -> HB_OS_WIN_USED
- HB_OS_WIN_32 -> HB_OS_WIN
; Please modify your code accordingly.
* include/hbdefs.h
* include/hbsetup.h
+ Added compatibility to still understand HB_OS_WIN_32_USED,
and to #define HB_OS_WIN_32 in addition to HB_OS_WIN.
This means that old code will still work, but these
compatibility features will be removed in the future,
so it's recommended to change the code as above.
|
||
|
|
77df7fd78f |
2009-02-02 11:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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.
|
||
|
|
14a0be1f2d |
2009-01-15 20:52 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/hvm.c
* register default RT symbols after setting exception handler
* harbour/source/vm/fm.c
% keep process heap address in static variable when HeapAlloc()
is used.
* harbour/source/vm/extrap.c
* casting to pacify warnings
|
||
|
|
2f67d77856 |
2009-01-12 15:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/fm.c
* harbour/include/hbwmain.c
* use HeapAlloc( GetProcessHeap(), ... ) instead of LocalAlloc()
when HB_FM_WIN32_ALLOC macro is set - Toninho's tests show that
it's a little bit more efficient - thanks.
|
||
|
|
1624a58420 |
2008-12-29 19:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
* harbour/include/hbmacro.ch
* harbour/source/compiler/ppcomp.c
* harbour/source/compiler/hbusage.c
* harbour/source/compiler/cmdcheck.c
+ added -ko (allow operator optimizations) compiler switch
It's disabled by default.
* harbour/include/hbexprb.c
* removed HB_ADD_SUB_ONE_OPT macro and enable optimizations covered
by it when -ko switch is used.
* harbour/source/common/expropt2.c
* disabled <exp> + 0 => <exp>, <exp> + "" => <exp>, - - <exp> => <exp>
optimizations for default compiler settings. They can be enabled by
-ko compiler switch
+ added optimizations for numeric values and + operator which uses
standard mathematical + behavior for real numbers:
a + b + c == a + ( b + c )
a + b == b + a
It's disabled by default and can be enabled by -ko compiler switch.
There are also other similar optimizations which can be added in
this way.
* harbour/include/hbapi.h
* harbour/source/vm/itemapi.c
* harbour/source/vm/fm.c
! fixed redundant call to hb_xrealloc() in string resize operation.
Thanks to Mindaugas for locating it.
|
||
|
|
f5a6a8112f |
2008-11-18 02:53 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/gtwvt/gtwvt.c
! Fix to previous fix to maximize the window when the initial
size would be too big to fit on screen (stupid omission).
Now the previously cited sizing problem is alright.
* source/vm/fm.c
+ Replaced HB_NO_FM_STAT and HB_FM_STAT envvars
with HB_FM_STAT=yes|no (maybe 0|1 or on|off woud be
better or could be accepted as alternatives or
replacement). This is to avoid ambiguity when both
envvars were set or the app default is not known.
+ Added HB_FM_STATISTICS_DYN_OFF to turn off mem tracking
by default when stat module is linked in.
* source/common/hbverdsp.c
* Minor cosmetic.
|
||
|
|
3e2a8a9fc6 |
2008-11-12 23:16 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/fm.c
+ added support for enabling/disabling memory statistic when
application starts. To enable memory statistic it's enough
to set HB_FM_STAT environment variable to non empty value.
To disable memory statistic it's enough to set HB_NO_FM_STAT
envvar. The default setting may depend on build time option.
Now is enabled when memory statistic is compiled when harbour
is created. It may not work if C compiler does not allow to
check environment variables from startup code. F.e. functions
to access environment can be also part of dynamic library
registered after harbour.dll or harbour core code startup
functions.
Viktor I would like to ask you only about one thing.
Please do not remove current support for HB_FM_STATISTICS_OFF
from GNU make builds so Harbour user can still create binaries
without any memory statistic code using -[no]fmstat switch in
hb* scripts. The above feature is only for users who need support
for enabling/disabling memory statistic to test application
if foreign environment, f.e. at client computers. Of course if
it will work with given C compiler and/or type of application
(linked dynamically or statically). Please check.
|
||
|
|
8aeaaac8eb |
2008-11-10 03:35 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/vm/fm.c
! Fixed missing abort() on WinCE. (for Pelles C only, but
the fix should work for any WinCE compilers).
; TOFIX: Now the only remaining showstopper for PellesC5 WinCE
support is:
../../math.c(652): error #3120: [asm] Symbol 'inf' is undefined.
|
||
|
|
8be149614c |
2008-11-09 17:15 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/vm/arrays.c
* source/vm/classes.c
* source/vm/cmdarg.c
* source/vm/codebloc.c
* source/vm/debug.c
* source/vm/dynsym.c
* source/vm/extend.c
* source/vm/fm.c
* source/vm/hashes.c
* source/vm/hvm.c
* source/vm/itemapi.c
* source/vm/maindll.c
* source/vm/maindllh.c
* source/vm/maindllp.c
* source/vm/mainstd.c
* source/vm/mainwin.c
* source/vm/set.c
* source/vm/vm.c
% Removed HB_EXPORT from remaining function definitions.
|
||
|
|
c1318e95cd |
2008-11-05 03:01 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/source/vm/hashes.c
* harbour/source/vm/hashfunc.c
* changed hb_hSort() to execute sorting when hash is marked as needed
resorting instead of marking hash for resorting
* harbour/source/vm/fm.c
* formatting
* harbour/contrib/hbdbgfx/dbgfxc.c
! fixed casting in ASCII build
+ added support for UNICODE builds
* harbour/contrib/gtwvg/gtwvg.c
* cover LWA_ALPHA usage by #if ( _WIN32_WINNT >= 0x0500 )
to keep at least compile time compatibility with older systems
|
||
|
|
62b0ae14a0 |
2008-11-04 15:54 UTC-0600 Teo Fonrouge (teo/at/windtelsoft/dot/com)
* source/vm/fm.c
* removed unneeded HB_FUNC( MEMORY ), now in fmhb.c
|
||
|
|
388ee24995 |
2008-11-04 23:03 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* common.mak
* source/vm/Makefile
* source/vm/vmmt/Makefile
* source/vm/fm.c
+ source/vm/fmhb.c
+ source/vm/hbmem.c
+ Moved functions not depending on FM_STATISTICS setting,
to separate files.
; NOTE: MEMORY() function should IMO move to rtl, and
hb_xmem*() functions to common lib.
|
||
|
|
c4636942ec |
2008-10-27 21:43 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/Makefile
* contrib/make_vc_all.bat
* contrib/make_b32_all.bat
* contrib/make_gcc_all.sh
+ Added rddsql to default builds.
Please test.
* contrib/hbdbgfx/dbgfxc.c
* Added TODO. (multiplatform support in one the functions)
* include/hbsetup.h
* include/hbexprb.c
* contrib/hbct/ctnet.c
* contrib/hbct/color.c
* contrib/hbct/dattime2.c
* contrib/xhb/hboutdbg.c
* contrib/hbtpathy/tpwin32.c
* contrib/hbmzip/hbmzip.c
* contrib/hbsqlit3/hbsqlit3.c
* contrib/hbfbird/firebird.c
* contrib/hbziparc/hbzipcpp.old
* contrib/hbnf/getver.c
* contrib/hbpgsql/postgres.c
* contrib/hbclipsm/gauge.c
* contrib/rddads/adsfunc.c
* contrib/rddads/ads1.c
* contrib/hbgd/gdwrp.c
* contrib/hbmisc/spd.c
* contrib/hbtip/utils.c
* contrib/hbwin/win_prt.c
* contrib/examples/pp/hbppcore.c
* contrib/examples/pp/hbppcomp.c
* source/pp/pplib.c
* source/pp/ppcore.c
* source/pp/hbpp.c
* source/vm/estack.c
* source/vm/debug.c
* source/vm/itemapi.c
* source/vm/hvm.c
* source/vm/cmdarg.c
* source/vm/fm.c
* source/vm/extrap.c
* source/vm/classes.c
* source/main/harbour.c
* source/common/hbver.c
* source/common/hbverdsp.c
* source/common/hbstr.c
* source/common/hbdate.c
* source/rtl/gtxwc/gtxwc.c
* source/rtl/hbgtcore.c
* source/rtl/gtcrs/gtcrs.c
* source/rtl/errorint.c
* source/rtl/gtsln/gtsln.c
* source/rtl/gttrm/gttrm.c
* source/rtl/gtpca/gtpca.c
* source/rtl/fkmax.c
* source/rtl/langapi.c
* source/rtl/hbffind.c
* source/rdd/workarea.c
* source/rdd/sdf1.c
* source/rdd/delim1.c
* source/rdd/dbf1.c
* source/rdd/wafunc.c
* source/compiler/hbmain.c
* source/compiler/cmdcheck.c
* source/compiler/hbpcode.c
* source/compiler/genhrb.c
* source/compiler/gencobj.c
* source/compiler/genobj32.c
* source/compiler/genc.c
* source/compiler/hbusage.c
* source/compiler/hbfunchk.c
* source/compiler/hbgenerr.c
* utils/hbmake/hbmgauge.c
* Changed snprintf() calls to hb_snprintf().
; TODO: Finish the mappings in headers.
* tests/wvtext.prg
* include/inkey.ch
* source/rtl/gtwvt/gtwvt.c
* Changed K_HB_RESIZE to HB_K_RESIZE. The reason is
that we already got a HB_K_MULTICODE code (few lines
below, I didn't know about it before), and it's better
to keep consistency with that.
|
||
|
|
f51b6c2f24 |
2008-10-10 21:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/garbage.c
* unblock HVM before executing destructors and releasing blocks
* harbour/source/vm/fm.c
! do not call internal error with active lock when FM statistic
is enabled
* harbour/source/vm/thread.c
! stop other threads in hb_threadOnce() if the 1-st one
executes bAction block to be sure that it will be completed
before thread leave hb_threadOnce() function
* harbour/source/vm/set.c
! do not call hb_inkeyReset() in set release. It's not necessary
and it could change keyboard buffer size for other threads using
the same GT driver.
* harbour/source/vm/hvm.c
% allocate new thread stack without lock
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtapi.c
* moved clipboard resetting from hbgtcore.c to gtapi.c
* harbour/source/rtl/filesys.c
! do not use read/write operations with given file offset in Win9X
which seems to not support such functionality
|
||
|
|
e1ea6f3cec |
2008-10-07 02:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
+ harbour/include/hbatomic.h
* harbour/include/hbthread.h
* harbour/source/vm/garbage.c
* harbour/source/vm/fm.c
* moved atomic and spinlock functions into hbatomic.h
* harbour/include/hbatomic.h
+ added atomic inc/dec for GCC and x86@64 and PPC@32
+ use OSAtomic*() and OSSpin*() functions for atomic inc/dec and
spinlocks in Darwin builds
+ added spinlocks to MS-Win builds
|
||
|
|
628b9840f1 |
2008-10-04 21:23 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/fm.c
! do not build DL-MM when HB_FM_WIN32_ALLOC is set
* harbour/tests/speedtst.prg
+ added support for --exclude=<tests,...> option to exclude some tests,
f.e.:
./speetest --exclude=029.030.023.025.027.040.041.043.052.053.019.022.031.032
disables all tests which allocates memory. The same tests can be also
excluded by --exclude=mem
|
||
|
|
cb7b1a831c |
2008-09-24 16:18 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/vm/fm.c
+ Enabled dlmalloc (HB_FM_DL_ALLOC) for MSVC, BCC and MINGW builds.
; It's possible to disable dlmalloc with HB_FM_STD_ALLOC
for testing purposes.
|
||
|
|
2db644f214 |
2008-09-23 18:56 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/rddads/adsmgmnt.c
! Blind fix to ADSMGGETWORKERTHREADACTIVITY() where the
first element in list wasn't returned.
Please test, I couldn't.
* source/vm/fm.c
! Stupid typo. (I guess I'm completely confused by separated
"#" and preprocessor command :/ Second typo in two lines.)
|
||
|
|
ebaa3ee424 |
2008-09-23 11:27 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/vm/fm.c
! Enabled USE_DL_PREFIX for _MSC_VER compilers.
This may be refined, but without this setting MSVS 2008
would give an error on exit and GPF.
|
||
|
|
57707cd31e |
2008-09-18 22:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/vm/fm.c
! Suppressing warnings for foreign dmalloc.c code for BCC.
|
||
|
|
5ec4b754b9 |
2008-09-18 01:17 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/fm.c
+ harbour/source/vm/dlmalloc.c
+ added alternative memory manager written by Doug Lea
It can be activated by recompiling Harbour with HB_FM_DL_ALLOC macro.
Please make test on different platforms with different C compilers.
Linux users will not benefit from it because the default GLIBC MM
is derived from a version of code.
NOTE: the results may strongly depend on total memory allocation
and will be different then in simple memory tests.
|
||
|
|
36ed679f92 |
2008-09-15 17:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
+ added assembler MT version of HB_ATOM_INC/HB_ATOM_DEC operation
for x86@32
* harbour/source/vm/fm.c
! removed #undef HB_ATOM_INC/HB_ATOM_DEC I left by mistake
|
||
|
|
ca21165e4b |
2008-09-14 22:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsetup.h
* accept both settings: HB_FM_STATISTICS and HB_FM_STATISTICS_OFF
without errors
* harbour/bin/postinst.sh
* added small trick to make HBFM lib compilation not dependent on
default HB_FM_STATISTIC settings
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
+ added C function hb_vmIsMt()
* harbour/source/vm/cmdarg.c
* report MT HVM status when program is executed with //INFO
parameter
* harbour/source/vm/fm.c
! fixed memory statistic MT protection in hb_xrealloc() operation
* harbour/config/w32/owatcom.cf
* use echo instead of echo. for non empty output.
* harbour/include/hbextern.ch
* harbour/source/vm/thread.c
+ added .prg function hb_threadTerminateAll() - it sends QUIT request
to each HVM thread and waits for their termination. Can be executed
only by main HVM thread.
|
||
|
|
64f97582d9 |
2008-09-13 18:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
* harbour/include/hbvm.h
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbtrace.h
* harbour/include/hbapilng.h
* harbour/include/hbinit.h
* harbour/source/rtl/langapi.c
* harbour/source/pp/ppcore.c
* harbour/source/pp/hbpp.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/hvm.c
* harbour/source/common/hbver.c
* harbour/source/common/hbtrace.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/hbident.c
* harbour/source/compiler/hbfunchk.c
* changed some declarations from 'char *' to 'const char *' and
fixed casting for some more pedantic compilers
* harbour/source/pp/ppcore.c
! fixed one typo which could cause memory leak and even GPF
* harbour/common.mak
* harbour/source/vm/Makefile
* harbour/source/rtl/Makefile
- harbour/source/rtl/set.c
+ harbour/source/vm/set.c
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* moved from RTL to HVM
* eliminated hb_set global structure
* moved set structure to HVM stack
+ added internal function hb_setClone() which is used to create
copy of SET structure for child threads
* hidden HB_SET_STRUCT declaration - 3-rd part code must not access it
directly. Dedicated hb_set*() functions should be used instead.
+ added new function:
BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem )
which allow to change some set by 3-rd party code.
TODO: not all SETs can be changed yet - if someone have a while
then please add code for missing ones.
* harbour/include/set.ch
* harbour/include/hbset.h
+ added _SET_CODEPAGE which works like _SET_LANGUAGE giving common
interface
* harbour/include/hbsetup.h
+ added HB_CODEPAGE_DEFAULT which works like HB_LANG_DEFAULT
* harbour/source/vm/hvm.c
! fixed builds which uses non EN lang or code page modules
by forcing linking the chosen ones
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/include/hbapicdp.h
* harbour/source/rtl/cdpapi.c
- removed global code page variable: hb_cdp_page and moved
code page settings to HVM stack
+ added new function hb_cdpID() which returns current code page
character ID
+ added new functions hb_vmCDP() and hb_vmSetCDP() to get/set
active for given thread code page structure
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/include/hbapilng.h
* harbour/source/rtl/langapi.c
+ moved lang setting to HVM stack
+ added new functions hb_vmLang() and hb_vmSetLang() to get/set
active for given thread language module
* harbour/include/hbvmpub.h
* harbour/include/hbstack.h
* harbour/include/hbapi.h
* harbour/source/vm/estack.c
* harbour/source/vm/dynsym.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/memvars.c
* changed memvar handles for HB_HANDLE to void * which is directly
casted to PHB_ITEM - new memvar references
* changed HB_DYNS declarations for MT mode. In MT mode HB_DYNS does
not contain area and memvar handles which are moved to thread
local HVM stack
+ added array for thread local memvar and area handles to HVM stack
% eliminated global continues array with all memvars and detached locals
% changed HB_IT_MEMVAR to use pointers to HB_ITEM directly - it resolve
synchronization problems in MT mode and should also improve the speed
and reduce memory usage. It should be well visible in applications which
uses lot of detached locals.
- removed hb_memvarsInit() and hb_memvarsFree() - they are not necessary
now because we do not longer use array with all allocated memvars
and detached local and private stack initialization is made
automatically
+ added internal functions hb_dynsymGetMemvar()/hb_dynsymSetMemvar()
+ added hb_memvarGetValueBySym() for debugger
* moved PRIVATE variable stack to HVM stack
* eliminated all static variables in memvars module
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/rtl/fserror.c
* moved IO errors to HVM stack
+ added special IO error handling which works without HVM stack
It allows to use hb_fs*() functions without allocated stack
by 3-rd party threads.
* harbour/source/rtl/filesys.c
* moved hb_fsCurDir() to HVM stack with special handling to work
with HVM stack like IO errors
* harbour/source/rdd/workarea.c
* allocated RDD node array in bigger peaces to reduce later RT
reallocations in MT mode. If user want to add dynamically more
then 64 RDDs then it should synchronize this operation himself.
* harbour/source/rdd/wacore.c
* moved WA list, current WA, default RDD and neteer() flag to HVM stack
* harbour/include/hbdefs.h
- removed HB_HANDLE declaration
* harbour/include/hbapi.h
- removed HB_VALUE structure - it's not longer used due to different
memvar handling
* updated hb_struMemvar to new memvar handling
* replaced hb_vmIsLocalRef() and hb_memvarsIsMemvarRef() with
hb_vmIsStackRef() which respect multiple stack and new memvar
and static structures and location in GC mark pass.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
+ added support for thread specific data located on HVM stack
Now it's possible to allocate static variables which are
local to thread. Such variables are allocated on HVM stack
and automatically destroyed. To declare new TSD variable use:
HB_TSD_NEW( <name>, <size>, <init>, <destruct> )
<name> - name of variable which holds TSD handler
<size> - size of TSD are which has to be allocated
<init> - init function, executed when new TSD is allocated by thread
(thread access given TSD 1-st time). This function receives
void * pointer to allocated area.
<destruct> - destructor function executed when HVM stack is destroyed
f.e.:
static HB_TSD_NEW( s_scrData, sizeof( HB_SCRDATA ),
NULL, hb_xSaveRestRelease );
To initialize dynamically allocated TSD variable use:
HB_TSD_INIT( <name>, <size>, <init>, <destruct> )
Pointer to TSD can be accessed using hb_stackGetTSD( &<name> )
where <name> is name of variable which holds TSD handler, f.e.:
PHB_SCRDATA pScrData = ( PHB_SCRDATA ) hb_stackGetTSD( &s_scrData );
See source/rtl/xsavescr.c as an example
It's also possible to test if data has been already allocated for
current thread by:
hb_stackTestTSD( &<name> ) => pData
it works like hb_stackGetTSD() but return NULL if current thread data
has not been allocated yet.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* changed hb_stack location to thread local storage in MT mode
+ added functions and macros to access/assign new HVM stack members
+ changed garbage collection mark functions to work with multiple
stacks, thread local static and memvar variables
* harbour/source/rtl/xsavescr.c
* use TSD data for screen buffer to make __XSAVESCREEN()/__XRESTSCREEN()
thread independent
* harbour/source/rtl/idle.c
* use TSD data for idle task settings and codeblocks
- removed hb_idleShutDown() - it's not longer necessary
* harbour/source/rtl/setkey.c
* use TSD data for allocated keys to make SETKEY() thread independent
* harbour/source/rtl/math.c
* moved math error handler, math error block, math error mode and
math error structure to TSD
* harbour/source/rtl/errorapi.c
* moved error handler, error block, error launch counter and DOS error
value to TSD
* harbour/source/rtl/inkey.c
* moved inkey "before" and "after" blocks to TSD
* harbour/source/rdd/hsx/hsx.c
* moved HSX handles array to TSD
* harbour/include/hbapigt.h
* harbour/source/rtl/console.c
- removed hb_setkeyInit() and hb_setkeyExit() - they are not longer
necessary, allocated resources will be freed by TSD destructor
function
* harbour/include/hbapi.h
* harbour/source/rtl/console.c
* removed hb_conXSaveRestRelease() - it's not longer necessary,
allocated resources will be freed by TSD destructor function
* harbour/source/vm/macro.c
* moved s_macroFlags to TSD
* harbour/source/rtl/accept.c
* moved accept buffer to TSD
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbxvm.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbstripl.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/vm/hvm.c
+ added new PCODE HB_P_THREADSTATICS
+ added support for static variables which are local to thread:
THREAD STATIC <varname [:= <exp>], ...>
They work like normal static variables but each thread operates
on its own copy.
* added protection against possible double call to hb_xfree()
It can happen due to wrong marking expressions as used by bison
and executing destructors after our free code when syntax error
appear.
* harbour/source/rtl/perfuncs.prg
* harbour/source/rtl/menuto.prg
* harbour/source/rtl/getlist.prg
* harbour/source/rtl/readvar.prg
* harbour/source/rtl/text.prg
* use THREAD STATIC variables to make above code MT safe
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
+ added hb_gt_BaseFree() which will release current GT pointer
locked by hb_gt_Base() function. This function will be used
to optional automatic GT access synchronization when threads
share the same GT.
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/inkeyapi.c
* harbour/source/rtl/mouseapi.c
* harbour/contrib/hbct/ctwin.c
* free GT pointer by hb_gt_BaseFree()
TODO: CTWIN is not MT safe yet - it will be updated together
with core GT when we add multi window interface for
thread with own console window.
* harbour/bin/hb-func.sh
* harbour/config/linux/gcc.cf
+ added rt lib to Linux builds
* harbour/bin/postinst.sh
* create MT safe version of FM stat library: fmmt
* harbour/bin/pack_src.sh
+ added support for ZIP packing
* harbour/include/hbapi.h
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
+ added hb_vmThreadInit()/hb_vmThreadQuit() functions - they initialize
HVM for calling thread so it can execute .prg code and call HVM
functions. They can be used by 3-rd party code threads.
+ added hb_vmUnlock()/hb_vmLock() functions which informs that
thread will not operate on HVM structures for some time allowing
to execute single thread only processes like GC.
+ added hb_vmThreadQuitRequest() which sends stop request to given
thread
+ added hb_vmWaitForThreads() which stops main thread execution waiting
for other threads
+ added hb_vmSuspendThreads() and hb_vmResumeThreads() used be GC
to stop all HVM threads before mark/swap scan
+ added linked list of HVM stacks
+ added hb_vmTerminateThreads() used by main HVM thread in QUIT state
* moved EXIT procedures execution from QUIT request to HVM QUIT state
in MT mode. It may effects some non structural code which tries to
access private variables in EXIT functions but it's much cleaner
and understandable for user. Please remember that we guaranties
that ALWAYS code in BEGIN SEQUENCE is _always_ executed even after
HVM QUIT request just like destructs. Personally I think that we
should move EXIT procedures execution also in ST mode.
* changed startup and cleanup code for new internal structures
* changes startup and cleanup code for MT mode
% removed some redundant HB_ITEM type settings
! eliminated non MT safe code which was using reference counters
without protection
* harbour/common.mak
* harbour/source/vm/Makefile
+ harbour/include/hbthread.h
+ harbour/source/vm/thread.c
+ added C level functions to manage threads and synchronization objects
See hbthread.h for detail description. They are based on PTHREAD API
and PTHREAD documentation can be used as reference. I intentionally
keep this list small for easier multiplatform porting.
Now they have been implemented for PTHREADS (POSIX threads supported by
many different OSes), MS-Win32/64 and OS2. The OS2 version is not tested
at all. I do not even know if it can be compiled so please make tests.
I used Internet resources and some part of xHarbour code as documentation
for OS2 MT API. It should be quite easy to add other platforms if necessary.
Harbour core code needs non recursive mutexes, conditional variables and
TLS for one pointer. If platforms does not support conditional variables
(f.e. MS-Win or OS2) then they can be emulated using multistate semaphores.
+ added .prg functions to manage threads and synchronization objects:
hb_threadStart( <@sStart()> | <bStart> [, <params,...> ] ) -> <pThID>
hb_threadJoin( <pThID> [, @<xRetCode> ] ) -> <lOK>
hb_threadDetach( <pThID> ) -> <lOK>
hb_threadQuitRequest( <pThID> ) -> <lOK>
hb_threadWaitForAll() -> NIL
hb_mutexCreate() -> <pMtx>
hb_mutexLock( <pMtx> [, <nTimeOut> ] ) -> <lLocked>
hb_mutexUnlock( <pMtx> ) -> <lOK>
hb_mutexNotify( <pMtx> [, <xVal>] ) -> NIL
hb_mutexNotifyAll( <pMtx> [, <xVal>] ) -> NIL
hb_mutexSubscribe( <pMtx>, [ <nTimeOut> ] [, @<xSubscribed> ] ) -> <lSubscribed>
hb_mutexSubscribeNow( <pMtx>, [ <nTimeOut> ] [, @<xSubscribed> ] ) -> <lSubscribed>
The function list should give similar to xHarbour API but they are not exactly
the same and except of hb_mutex*() functions which should replicate xHarbour behavior.
+ harbour/source/vm/vmmt
+ harbour/source/vm/vmmt/Makefile
+ added hbvmmt library to GNU make builds.
Non GNU make builds should be updated.
* harbour/contrib/hbct/pos1.c
* harbour/contrib/gtwvg/gtwvg.c
* harbour/contrib/rddads/ads1.c
* harbour/contrib/hbmisc/spd.c
* harbour/contrib/hbbmcdx/bmdbfcdx.c
* harbour/contrib/examples/rdddbt/dbfdbt1.c
* harbour/source/vm/runner.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/hvm.c
* harbour/source/rtl/console.c
* harbour/source/rtl/strcase.c
* harbour/source/rtl/spfiles.c
* harbour/source/rtl/defpath.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/dateshb.c
* harbour/source/rtl/mlcfunc.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/is.c
* harbour/source/rtl/setcolor.c
* harbour/source/rtl/errorint.c
* harbour/source/rtl/transfrm.c
* harbour/source/rtl/dates.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtwin/gtwin.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/rtl/gttrm/gttrm.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtcgi/gtcgi.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtsln/gtsln.h
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/sdf1.c
* harbour/source/rdd/delim1.c
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/hbdbsort.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/hsx/hsx.c
* harbour/source/rdd/hbsix/sxfname.c
* use API functions instead of direct accessing to hb_cdp_page or hb_set
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/filesys.c
* encapsulate potentially slow IO operation inside
hb_vmUnlock()/hb_vmLock() calls to allow other thread GC
activation
* harbour/contrib/hbnf/fttext.c
! fixed casting
* harbour/contrib/gtwvg/gtwvg.h
- removed #include <comctl32.h> - my MinGW and MinGW/CE instalations do
not have them. If it exists in some newer ones then it has to be
covered by #if version checking.
* harbour/source/vm/dynsym.c
- removed hb_dynsymLog() and hb_dynsymMemvarHandle()
* modified code to be MT safe and improved speed of some operations
* added MUEXT protection for global dynamic table access
* harbour/include/hbapi.h
* harbour/source/vm/garbage.c
* changed to work with MT HVM
* changed to work with new memvar structures and thread local static and
memvar variables
* added MUEXT protection for linked block lists
+ added parameter to hb_gcCollectAll() which will force GC activation
in MT mode by temporary suspending all executed threads.
+ added logical parameter to HB_GCALL() functions which is passed to
hb_gcCollectAll()
* harbour/source/vm/fm.c
* added MUEXT protection for FM statistic module
* added MT protection for reference counters. For platforms
which supports atomic incrmenetation/decrementation (f.e.
Interlocked*() functions in MS-Win) such operations are
used. For other it's MUTEX protection. It gives MT safe
readonly access for HVM complex variables without user
synchronization. The MUTEX protection can cause some speed
overhead so it's good to define MT safe version of
HB_ATOM_INC()/HB_ATOM_DEC() in hbthread.h if given platform
has them. Now they are defined only for Windows. For other
platforms We can define can define them in assembler for some
most popular CPUs in the future.
* harbour/source/vm/classes.c
* changed class definition array. Now it keeps pointers to class
structures.
* In MT mode allocated at HVM startup big enough array for class
definitions to avoid later RT reallocations. It effectively eliminates
MUTEX synchronization for class structure access.
* protect by MUTEX code for new class creation
* harbour/source/debug/dbgentry.c
* eliminated hbvmopt.h and direct accessing to HVM structures
* harbour/source/rtl/gtclip.c
* protect with MUTEX access to internal clipboard data
* harbour/source/rdd/nulsys/nulsys.c
+ added hb_rddCloseAll()
+ harbour/tests/mt
+ harbour/tests/mt/mttest01.prg
+ harbour/tests/mt/mttest02.prg
+ harbour/tests/mt/mttest03.prg
+ harbour/tests/mt/mttest04.prg
+ harbour/tests/mt/mttest05.prg
+ harbour/tests/mt/mttest06.prg
+ harbour/tests/mt/mttest07.prg
+ added some demonstration/test small MT programs written
using Harbour language. Some of them can be also compiled
by xHarbour but xHarbour does not pass any of my tests in
real multi-CPU machine so do not expect they will work
correctly.
Harbour threads needs OS threads support. Each Harbour thread is directly
mapped to OS thread. It's not very efficient on some older system where
cost of thread creation and/or task switching is very expensive but it
should not be bigger problem for modern OS-es which can support threads
in practice nearly in user space only.
I haven't touched Harbour function calling convention which comes from
Clipper. It means that we do not pass pointer to VM to each functions
like CLIP or xBase++. To resolve the problem I have to use thread local
storage (TLS) where such pointer is kept. If platform does not support
TLS then it can be emulated by us. Anyhow the speed of accessing TLS
data and extracting HB_STACK poitner is critical for performance.
Some compilers depending on used hardware and OS give native support
for TLS (f.e. __thread keyword in GCC/BCC or __declspec( thread ) in MSVC).
This should give optimal performance. On other Harbour uses TLS functions
like TlsGetValue() (MS-WIN) or pthread_getspecific() (PTHREAD) are used.
OS2 gives quite interesting TLS functionality which seems to be quite fast
though it will be interesting to know how it is iplemented internally for
real multi CPU machines (if it depends on CPU exception then the
performance will be bad). We need TLS only for one pointer to HB_STACK
structure.
I haven't added any tricks like HB_THREAD_STUB in xHarbour to reduce
the cost of TLS access. If it will be necessary for some platform the we
can add it.
Except TLS Harbour threads needs OS support for non recursive mutexes or
critical sections and conditional variables. If platforms does not support
conditional variables (f.e. MS-Win or OS2) then they can be emulated using
multistate semaphores. I intentionally didn't create code which may need
recursive mutexes. The non recursive ones are often faster and some
platforms may not support recursive mutexes so they will have to be
emulated by us.
Harbour uses reference counters for complex variables. It means that even
readonly access to complex item causes internal write operations necessary
to increment/decrement its reference counter. To make such readonly access
MT safe we have to make incrementation and decrementation with result
checking atomic. By default it's done by mutex inside vm/fm.c but some
platforms have native support for atomic inc/dec operations, f.e.
Interlocked*() functions in MS-Win. If they are available then such
functions should be used to not reduce the performance by mutex call
very often used functions. For many CPUs it should be quite easy to
implement such atomic inc/dec functionality in assembler. F.e. for
GCC and x86@32 it may looks like:
static __inline__ void hb_atomic_inc32( volatile int * p )
{
__asm__ __volatile__(
"lock incl %0"
:"=m" (*p) :"m" (*p)
);
}
static __inline__ int hb_atomic_dec32( volatile int * p )
{
unsigned char c;
__asm__ __volatile__(
"lock decl %0"
"sete %1"
:"=m" (*p), "=qm" (c) :"m" (*p) : "memory"
);
return c == 0;
}
and then it's enough to define in hbthreads.h:
#define HB_ATOM_INC( p ) hb_atomic_inc32( ( volatile int * ) p )
#define HB_ATOM_DEC( p ) hb_atomic_dec32( ( volatile int * ) p )
Probably I'll make it for some most popular CPUs in the future.
In Harbour each thread which wants to call HVM functions have to allocate
it's own HVM stack. It's done hb_vmThreadInit(). The HVM stack is freed
by calling hb_vmThreadQuit(). This functions can be called also by 3-rd
party threads if they want to call HVM functions or execute .prg code.
Calling HVM functions without allocated stack will cause GPF.
I moved most of static variables to HVM stack to make them thread
local. But some of them like FS errors have their own alternative
copy which is used when thread does not allocate HVM stack. It allows
to use hb_fs*() functions without HVM stack but programmer have to
know that error codes return by hb_fs*Error() functions can be
overwritten by other threads which also didn't allocated HVM stack.
To execute garbage collector scan and mark pass it's necessary to
stop other HVM threads. Otherwise the scan may give false results.
It's also possible to not stop threads but protect with mutex all
operations on GC items but it will probably cause performance reduction
and will force some other modifications. Maybe I'll implement it
in the future.
I didn't use any OS level thread KILL or CANCEL calls. All HVM threads
have to be cleanly removed without any resource leaks.
QUIT command terminate only calling thread. If main (startup) HVM
thread call QUIT then it sends QUIT request to all existing threads.
In QUIT state ALWAYS statements and destructors are executed.
New thread is created by:
hb_threadStart( <@sStart()> | <bStart> [, <params,...> ] ) -> <pThID>
The returned value is a pointer to internal thread structure which
can be used in JOIN or DETACH operations. Each thread should be Joined
or DETACHED to avoid resource leaks. If programmer does not store
<pThID> or all instances of <pThID> are destroyed then thread is
automatically detached. I do not know clear method of thread detaching
in OS2. If some OS2 users knows it then plase update vm/hbthread.c.
When thread terminates then all locked by this thread mutexes are
released.
Each thread uses its own memvars (PRIVATEs and PUBLICs) and work areas.
When new thread is created then it inherits from parent thread:
- code page
- language
- SETs
- default RDD
error block is initialized to default value by calling ERRORSYS()
and PUBLIC variable GetList := {} is created.
The following objects are initialized to default value:
- error block
- math error handler and math error block
- macro compiler features setting (hb_setMacro())
or move them to SETs.
We can think about inheriting them. It's also possible to add
inheriting of all visible memvars but I do not know it's good
idea.
Compilation and linking:
For MT mode HVM library should be compiled with HB_MT_VM macro.
GNU make automatically creates hbvmmt library which should be
linked with Harbour MT programs instead of hbvm.
Non GNU make files should be updated.
If given compiler support TLS then you can try to set HB_USE_TLS
to force using native compiler TLS support. Now it's enabled by
default only for BCC. For Linux and GCC builds it may depend also
on used GLIBC version. In older system there is no TLS support
at all or TLS works only for shared binaries so I haven't enabled
it. If you will test some other compiler then please add default
native TLS support for them in hbthread.h
Users using hb* scripts can simply use -mt switch when they want
to create MT program, f.e.:
hbmk -n -w3 -es2 -mt mttest01.prg
There are still some minor things which should be done but I'll
do them later. Current state seems to be fully functional.
The most important and still missing is our own file lock server
for RDD synchronization in POSIX systems. Kernel internally
recognize POSIX locks by PID and file i-node - not PID and file
handle. It means that the same file open more then once by one
process shares locks. Because POSIX locks can be overwritten
then we do not have any synchronization between aliased workareas
or threads using the same table in *nixes. We have to make
synchronization ourselves. I'll create such lock server ASAP.
Please test and enjoy using Harbour threads.
|
||
|
|
55ae11bfcd |
2008-08-24 13:15 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/vm/runner.c
* source/vm/fm.c
* source/common/hbver.c
* source/rtl/hbgtcore.c
* source/rtl/gtwvt/gtwvt.c
* source/rdd/dbfntx/dbfntx1.c
* source/rdd/workarea.c
* source/rdd/wacore.c
* source/rdd/sdf1.c
* source/rdd/dbfcdx/dbfcdx1.c
* source/rdd/delim1.c
* source/rdd/dbf1.c
* source/rdd/wafunc.c
* source/rdd/dbffpt/dbffpt1.c
* source/compiler/hbmain.c
* source/compiler/fixflex.c
* source/compiler/gencobj.c
* source/compiler/genc.c
* source/compiler/harbour.yyc
* source/compiler/harbour.y
* contrib/hbct/disk.c
* contrib/hbwhat32/whtcdlg.c
* contrib/gtwvg/gtwvg.c
* contrib/rddads/adsfunc.c
* contrib/rddads/ads1.c
* contrib/hbbmcdx/bmdbfcdx.c
* contrib/examples/pp/hbppcomp.c
* hb_strncpy()/hb_strncat() size parameter changed from
CONSTANT to 'sizeof( dest ) - 1', where applicable.
! hbct/VOLUME() buffer overrun fixed.
; NOTE: dbfntx1.c has a couple of places where I wasn't
sure of the intention, so I left them unchanged.
|
||
|
|
29b52145d1 |
2008-08-01 03:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
* harbour/include/hbexprb.c
* harbour/source/pp/ppcore.c
* harbour/source/vm/evalhb.c
* harbour/source/vm/runner.c
* harbour/source/vm/hvm.c
* harbour/source/vm/fm.c
* harbour/source/vm/eval.c
* harbour/source/vm/dynlibhb.c
* harbour/source/vm/classes.c
* harbour/source/rdd/hbsix/sxord.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/harbour.y
* pacified warnings
|
||
|
|
130d897627 |
2008-07-09 11:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbdate.h
* harbour/source/common/hbdate.c
+ added hb_timeStampEncode()
* harbour/include/hbapifs.h
* harbour/source/rtl/filesys.c
+ added hb_fsSetFileTime()
+ added POSIX file attributes with some macros to convert Harbour
definitions into OS ones.
+ added initial version of hb_fsSetAttr() - work in progress, I should
finish it in the evening.
* harbour/contrib/hbmzip/hbmzip.c
* added setting file attribute in DJGPP builds
! fixed some small typos in OS2 builds reported by David
* harbour/source/vm/fm.c
* changed hb_xrealloc() to be ANSI-C realloc() compatible
|
||
|
|
b1118f3481 |
2008-06-30 11:16 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbapi.h
* source/rtl/set.c
* source/vm/fm.c
! Fixed _SET_HBOUTLOG, _SET_HBOUTLOGINFO handling in fm.c.
hb_setget*() functions cannot be used here as the set
system is deinited at this point. So local buffers are
holding the values.
|
||
|
|
e7f78f1985 |
2008-06-28 08:53 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/set.ch
* include/hbset.h
* source/rtl/set.c
* source/vm/fm.c
* source/vm/extrap.c
+ Added: Set( _SET_HBOUTLOGINFO[, <cValue>] ) -> <cOldValue>
Default value: ""
This user defined text will be included in each hb_out.log
messages. This way it's possible to include custom information
in these entries to help identify and locate them.
! Fixed a few string not marked with HB_I_() translation
marker.
|
||
|
|
66ffe8d97e |
2008-06-20 21:16 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/gtwvt/gtwvt.c
+ Refreshing whole screen after palette change.
This replaces the previous method which had some
side effects.
* source/vm/fm.c
* source/vm/extrap.c
* Changed "Harbour" to "Application" in user visible
screen/log messages.
* contrib/hbwhat32/_winfont.c
! Fixed typo in previous commit.
|
||
|
|
9f76180566 |
2008-06-16 01:47 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/set.ch
* include/hbset.h
* source/rtl/set.c
* source/vm/fm.c
* source/vm/extrap.c
+ Added: Set( _SET_HBOUTLOG[, <cFileName>] ) -> <cOldFileName>
Default value: "hb_out.log"
This replaces hb_fm.log and hb_ex.log, and makes it possible
for the applications to control the filename where these
internal Harbour outputs are written to.
* source/rtl/gtwvt/gtwvt.c
% Minor redundancy removed.
|
||
|
|
bd6e69b714 |
2008-06-04 15:48 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/hbbit.c
+ Added important NOTE about hb_bit*() functions'
relation to the compiler optimization engine.
* source/vm/fm.c
* source/vm/extrap.c
* Log filenames converted to static variables. With the
intent that they'll be converted to Set()s or similar
user settable values in the future, since it's useful
and more elegant to redirect these to the app's normal
logfile.
* contrib/hbsqlit3/hbsqlit3.c
* Minor formatting.
|
||
|
|
8b06380b17 |
2008-05-27 03:10 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* bin/bld.bat
+ MSVC now sets the lib dir globally, so lib names don't
need to contain the path anymore.
* source/vm/fm.c
* Minor cleanup.
- contrib/hbgd/tests/bldtest.sh
+ contrib/hbgd/tests/bld.sh
* Update, cleanup, SVN header.
|
||
|
|
24ec421a42 |
2008-05-21 17:45 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* harbour.spec
+ Added HU translation (cpwin).
* source/rtl/gtfunc.c
% Minor opt.
* source/rtl/console.c
* source/rtl/fserror.c
* source/rtl/strmatch.c
* source/rtl/padr.c
* source/rtl/hbhex.c
* source/rtl/at.c
* source/rtl/abs.c
* source/rtl/dates.c
* source/rtl/padc.c
* source/rtl/mod.c
* source/rtl/hbrandom.c
* source/rtl/filesys.c
* source/rtl/padl.c
* source/rtl/val.c
* source/rtl/hbregex.c
* source/vm/runner.c
* source/vm/hashes.c
* source/vm/itemapi.c
* source/vm/hvm.c
* source/vm/maindllp.c
* source/vm/fm.c
* source/vm/arrayshb.c
* source/vm/classes.c
* source/common/hbtrace.c
* Formatting (whitespace only)
|
||
|
|
53030631bf |
2008-05-07 11:21 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/rddads/make_b32.bat
* contrib/rddads/make_vc.bat
* contrib/rddads/ads.ch
* contrib/rddads/rddads.h
* contrib/rddads/ads1.c
* contrib/rddads/adsfunc.c
* contrib/rddads/adsmgmnt.c
+ Added ACE version autodetection.
You can override with: -DADS_LIB_VERSION=700 (and similar)
(ADS_REQUIRE_VERSION still accepted for compatibility)
! Fixed a few lib version related problems.
! hMgmtHandle global renamed to ads_g_hMgmtHandle.
* Formatting.
* contrib/rddads/rddads.h
+ QUESTION: added about ADS_MAX_KEY_LENGTH redefinition.
Is it needed?
* source/compiler/hbmain.c
* Changed output device (hb_compOutStd() -> hb_compOutErr())
for following texts:
"Compiling..."
"No code generated"
"Lines x, Functions/Procedures x"
This is to replicate CA-Cl*pper behaviour a bit more.
* include/hbextern.ch
* common.mak
* source/rtl/Makefile
* source/rtl/maxrow.c
+ source/rtl/scrrow.c
* contrib/xhb/hbcompat.ch
+ Added hb_ScrMaxRow(), hb_ScrMaxCol()
These will return the screen dimensions regardless
of the size of an active window (when using CT
windows for example). Functionality is the same
as MaxRow(.T.) and MaxCol(.T.) previously.
! MaxRow()/MaxCol() extended parameters removed.
+ Added MaxRow(.T.)/MaxCol(.T.) conversions for
xhb lib (hbcompat.ch) in both directions.
; XBase++ doesn't have any extended parameters
for Max*() function. Flagship has two of them,
both of them doing something different. CAVO doesn't
have these functions at all.
* contrib/xhb/hbcompat.ch
! GTI_* macros updated to HB_GTI_*.
* source/vm/memvclip.c
% Minor opt in __QQPUB().
* source/vm/extend.c
* 0 -> NULL
* source/vm/estack.c
- QUESTION removed.
* source/lang/msgbgmik.c
* source/rtl/console.c
* source/rtl/philes.c
* source/rtl/adir.prg
* source/rtl/getsys53.prg
* source/rtl/getsys.prg
* source/rtl/tget.prg
* source/rtl/ttopbar.prg
* source/rtl/pushbtn.prg
* source/rtl/mod.c
* source/rtl/memofile.c
* source/rtl/radiobtn.prg
* source/rtl/filesys.c
* source/rtl/tbrowse.prg
* source/vm/estack.c
* source/vm/itemapi.c
* source/vm/hvm.c
* source/vm/cmdarg.c
* source/vm/fm.c
* source/vm/eval.c
* source/common/hbver.c
* source/common/expropt2.c
* utils/hbtest/hbtest.prg
* utils/hbtest/rt_misc.prg
* utils/hbtest/rt_str.prg
! Comment fixes and minor formatting.
|
||
|
|
63c9ed7c80 |
2008-05-05 11:31 UTC+0100 Miguel Angel Marchuet Frutos <miguelangel@marchuet.net>
* include/hbmemory.ch
* source/vm/fm.c
+ Added Memory( HB_MEM_BLOCKS )
|
||
|
|
a4e9e72943 |
2008-02-04 16:40 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/source/vm/fm.c
! fixed hex dump of fm.log. The previous "hex" dump contained
characters: ( ) . , + - / *
|
||
|
|
13427dd60a |
2007-11-03 02:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/bmdbfcdx/bmdbfcdx1.c
* replaced all direct access to hb_set structure with functions
Now it's possible to link bmdbfcdx with harbour.dll but because
it still access hb_cdp_page then only if linker supports auto
import conversions
* harbour/source/common/hbfsapi.c
* harbour/source/main/harbour.c
* harbour/source/pp/hbppgen.c
* harbour/utils/hbpp/hbpp.c
* added filename conversion (hb_fsNameConv()) to hb_fsFileExists()
function
* harbour/include/hbapifs.h
+ harbour/source/common/hbfopen.c
* harbour/source/common/Makefile
* harbour/common.mak
+ added hb_fopen() function - it's a wrapper to fopen() function but
calls internally hb_fsNameConv()
* harbour/source/pp/hbppgen.c
* harbour/source/pp/ppcore.c
* harbour/source/common/hbtrace.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/genc.c
* harbour/source/rtl/gtchrmap.c
* harbour/source/vm/fm.c
* use hb_fopen() instead of fopen()
|
||
|
|
1c11bc25db |
2007-04-23 23:28 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* harbour/source/rtl/diskspac.c
! Fixed to return free space instead of disk size under Unix OSes.
* harbour/source/rtl/tget.prg
! Fixed checking for invalid GET var types.
! More C5x compatible behaviour for invalid types.
! ::UnTransform() fixed when not in focus.
- ::UnTransform() cBuffer incompatible parameter removed.
! ::Reform() probably made more compatible.
+ ::PosInBuffer() XBase++ compatible method implemented.
(but not tested or compared with XBase++)
! ::Minus assignment fixed.
! ::Clear assignment fixed.
! ::Changed assignment fixed.
! ::Buffer assignment fixed.
! ::Block assignment fixed.
! ::Name assignment fixed.
! ::UnTransform() extra parameter removed.
! ::UpdateBuffer() minor fix when not in focus.
! ::Reform() made more compatible.
% ::SetFocus() some superfluous stuff removed.
% ::SetFocus() some fixes, cleanups.
! ::KillFocus() now sets ::TypeOut properly.
! ::VarPut(), ::VarGet() fixed for invalid ::Subscript contents.
! ::VarPut(), ::VarGet() fixed for invalid ::Block content.
! ::Pos rewritten to be fully compatible.
! ::ColorSpec made fully compatible.
! ::UnTransform() fixed when not in focus.
! ::UnTransform() fixed handling "YL" in string pictures.
% ::UnTransform() minor optimization.
% ::PutMask() some hacks removed.
! ::PutMask() invalid types handling.
! ::BackSpace() fixed when not in focus.
! ::Delete() fixed when not in focus.
! ::DeleteAll() fixed when not in focus.
! ::IsEditable() fixes.
! ::Picture fixes for invalid types, assignment behaviour.
! ::Picture hacks removed.
! Non-assignable vars made READONLY. (will generate
different RTEs than in CA-Cl*pper due to the more
refined oo engine in Harbour.)
! ::BadDate changed to be a METHOD.
! ::ToDecPos fixes.
! ::Row assigment and behaviour fixes.
! ::Col assigment and behaviour fixes.
+ Several comments and NOTEs added.
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/setcolor.c
+ hb_gtColorsToString() public API added.
+ hb_NToColor() function added to convert a single color
value (returned by hb_ColorToN()) back to a string.
Used in TGet():ColorSpec implementation.
* harbour/source/vm/fm.c
* "Blocks" -> "Block(s)"
* harbour/tests/rto_get.prg
+ Added many test cases.
* harbour/source/vm/cmdarg.c
+ Added support to use "--" instead of "//" for internal
command line options.
* harbour/source/rtl/tbcolumn.prg
+ Formatting.
* harbour/source/rtl/tbrowse.prg
+ Added Harbour (undocumented) extension NOTE.
* harbour/include/Makefile
- harbour/include/usrrdd.ch
+ harbour/include/hbusrrdd.ch
* harbour/source/rdd/usrrdd/usrrdd.c
* harbour/source/rdd/usrrdd/rdds/dbtcdx.prg
* harbour/source/rdd/usrrdd/rdds/fcomma.prg
* harbour/source/rdd/usrrdd/rdds/fptcdx.prg
* harbour/source/rdd/usrrdd/rdds/hscdx.prg
* harbour/source/rdd/usrrdd/rdds/rlcdx.prg
* harbour/source/rdd/usrrdd/rdds/smtcdx.prg
* harbour/contrib/pgsql/pgrdd.prg
! Changed public header filename to comply with the "hb*.ch" rule.
(namespace protection)
|
||
|
|
49b4fc91e3 |
2007-04-04 10:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/tip/Makefile
- harbour/contrib/tip/atokens.c
* removed HB_ATOKENS()
- harbour/source/rtl/teditorl.c
- removed __STRTOKEN(), __STRTKPTR()
* harbour/common.mak
* harbour/source/rtl/Makefile
* harbour/include/hbextern.ch
+ harbour/source/rtl/hbtoken.c
+ added set of functions to manipulate string tokens:
HB_TOKENCOUNT( <cString>, [ <cDelim> ], [ <lSkipStrings> ],
[ <lDoubleQuoteOnly> ] ) -> <nTokens>
HB_TOKENGET( <cString>, <nToken>, [ <cDelim> ], [ <lSkipStrings> ],
[ <lDoubleQuoteOnly> ] ) -> <cToken>
HB_TOKENPTR( <cString>, @<nSkip>, [ <cDelim> ], [ <lSkipStrings> ],
[ <lDoubleQuoteOnly> ] ) -> <cToken>
HB_ATOKENS( <cString>, [ <cDelim> ], [ <lSkipStrings> ],
[ <lDoubleQuoteOnly> ] ) -> <aTokens>
All these functions use the same method of tokenization. They can
accept as delimiters string longer then one character. By default
they are using " " as delimiter. " " delimiter has special mening
Unlike other delimiters repeted ' ' characters does not create empty
tokens, f.e.: HB_ATOKENS( " 1 2 3 " ) returns array { "1", "2" }
Any other delimiters are restrictly counted, f.e. HB_ATOKENS( ",,1,,2,")
return array: { "", "", "1", "", "2", "" }.
+ added emulation for old __STRTOKEN(), __STRTKPTR() and xHarbour's
__STRTOKENCOUNT() by HB_TOKEN*() functions. They do not return
exactly the same result as __STRT*() functions which in some cases
ignored some delimiters and return wrong results.
* harbour/source/rdd/Makefile
+ harbour/source/rdd/dbsql.c
+ added __DBSQL() function
* harbour/include/hbsetup.h
* harbour/source/vm/fm.c
+ added support for native Windows memory allocation functions
It can be enabled by HB_FM_WIN32_ALLOC macro and disable C-RTL
memory manager.
* harbour/tests/mousetst.prg
* touch screen output before MPRESENT() to work with GTXWC
|
||
|
|
b86b5a8fe7 |
2006-12-08 05:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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.
|
||
|
|
9cd2098d6d |
2006-11-23 20:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/include/hbcomp.h
+ harbour/include/hbcompdf.h
* harbour/include/hberrors.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbexprop.h
* harbour/include/hbmacro.h
* harbour/include/hbpp.h
* harbour/include/hbvm.h
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/genjava.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbfunchk.c
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hbident.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/ppcomp.c
* harbour/source/macro/macro.y
* harbour/source/pp/ppcore.c
* harbour/source/pp/ppgen.c
* harbour/source/pp/pplib.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
* harbour/source/vm/macro.c
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbpp.h
* harbour/utils/hbpp/hbppcomp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbpplib.c
* harbour/utils/hbpp/pragma.c
* changed the internal compiler API to be MT safe.
All global and static non constant variables replaced by
HB_COMP structure which have all compiler context settings.
It's possible to allocate simultaneously many compiler contexts
and compile code. Only constant/read only variables are shared.
In macro compiler HB_COMP is replaced by HB_MACRO.
In source code I everywhere used to macros: HB_COMP_DECL and
HB_COMP_PARAM which are equivalents of old HB_MACRO_DECL and
HB_MACRO_PARAM definitions.
We will only have to change compiler FATAL errors support to
not execute exit() for non batch systems.
* make macro compiler fully MT safe
* removed not longer used definitions and variables
! add direct accessing to PP line number information - it fixes missing
line numbers reported recently
! added generating .ppo files when tokens are teken directly by compiler
- it fixes empty .ppo file problem
! clear hb_stack internall variables after removing hb_stack to avoid
possible GPF if application still works and try to access unexsiting
hb_stack
! do not allocate new memory block when final FM statistic report is
generated - it fixes problem with GPF when application compiled with
FM statistic exits and CLIPPER envvar is set.
! fixed memory leak hb_cmdargCheck()
! added to harbour.y symbol destructors - it should fixes memory leaks
in syntax errors but it uses quite new bison feature which is not
fully supported yet. Unfortunately it's also not MT safe and the
destructors implementation in 1.875c does not respect %parse-param.
Bison documentation says that it should so I hope it will be fixed
soon (or maybe even already is in the newest bison versions) before
I'll add multi context compilation support. If not then I will have
to add some workaround. I can pass compiler context pointer inside
YYSTYPE using hack in a lexer but it will force really huge number
modifications in existing bison rules so probably it will be much
easier to fix bison or write a small tool to update generated parser.
* other modifications - the total size of patch is nearly 1MB and
detail description will have to take me few days.
|
||
|
|
66695f622d |
2006-11-09 09:45 UTC+0100 Marek Paliwoda (mpaliwoda at interia pl)
* harbour/makefile.bc
* Adapted to the new Preprocessor utility ppgen.exe
* Cleaned hbpp.exe dependecies due to recent changes
* harbour/makefile.vc
* harbour/common.mak
* Cleaned hbpp.exe dependecies due to recent changes
* harbour/include/hbapi.h
* Added HB_EXPORT to hb_gcAlloc()
* harbour/include/hbstack.h
* Added HB_EXPORT to hb_stackSelfItem()
* harbour/source/vm/fm.c
* Added dipslaying contents of unreleased blocks at
program exit, together with logging unreleased memory
blocks report to fm.log file. Borrowed from xharbour.
|
||
|
|
95732edd48 |
2006-09-06 14:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/itemapi.c
* modified hb_itemClear() to be reentrant safe - the new version
can be also better optimized by C compiler so should be also faster
* harbour/source/rdd/dbcmd.c
! initialize lpdbOrdCondInfo in DBORDERINFO structure before
passing to ORDCREATE()
* harbour/source/vm/fm.c
! fixed typo in memset() when HB_PARANOID_MEM_CHECK enabled
* harbour/source/vm/hvm.c
! fixed item type used for iterator
|
||
|
|
5cbcaa09f0 |
2006-06-27 10:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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.
|
||
|
|
917c8057e6 |
2006-06-14 13:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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.
|