2006-09-01 23:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ harbour/source/codepage/uckam.c
+ added missing in my previous commit file
* harbour/include/hbvmpub.h
* harbour/source/vm/dynsym.c
+ added USHORT uiSymNum to HB_DYNS structure - I will need it for MT
as index for thread local HB_DYNSYM values for MT version in the
future but now I use it as perfectly efficient continuous hash
value for all symbols. Of course PHB_DYNS address is also perfectly
good hash value and in classes code can be used but it does not
guaranties that all messages will cover well whole 16bit area used
as message pool without dynamic bucket size modification.
* harbour/source/vm/classes.c
* changed hashing method. Now it uses really unique base hash key
values which can cover whole 16 bit area so mathematically it's
not be possible to break it by any combination of method names
as long as our dynamic symbol table will be limited to 2^16 symbols.
It still consumes more memory then necessary and I'll change it in
the future but it's much less then before.
The BUCKET size is smaller (4) and all calculations are done only
with bit shifts so it should be also faster.
* use ULONG instead of USHORT to calculate maximum number of methods
to avoid possible overflow problems if it reach 2^16 (rather
impossible in normal application - it will have to create more then
2^15 symbols)
! some other fixes and code cleanup
* harbour/source/vm/hvm.c
* minor modifications
This commit is contained in:
@@ -8,6 +8,38 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2006-09-01 23:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
+ harbour/source/codepage/uckam.c
|
||||
+ added missing in my previous commit file
|
||||
|
||||
* harbour/include/hbvmpub.h
|
||||
* harbour/source/vm/dynsym.c
|
||||
+ added USHORT uiSymNum to HB_DYNS structure - I will need it for MT
|
||||
as index for thread local HB_DYNSYM values for MT version in the
|
||||
future but now I use it as perfectly efficient continuous hash
|
||||
value for all symbols. Of course PHB_DYNS address is also perfectly
|
||||
good hash value and in classes code can be used but it does not
|
||||
guaranties that all messages will cover well whole 16bit area used
|
||||
as message pool without dynamic bucket size modification.
|
||||
|
||||
* harbour/source/vm/classes.c
|
||||
* changed hashing method. Now it uses really unique base hash key
|
||||
values which can cover whole 16 bit area so mathematically it's
|
||||
not be possible to break it by any combination of method names
|
||||
as long as our dynamic symbol table will be limited to 2^16 symbols.
|
||||
It still consumes more memory then necessary and I'll change it in
|
||||
the future but it's much less then before.
|
||||
The BUCKET size is smaller (4) and all calculations are done only
|
||||
with bit shifts so it should be also faster.
|
||||
* use ULONG instead of USHORT to calculate maximum number of methods
|
||||
to avoid possible overflow problems if it reach 2^16 (rather
|
||||
impossible in normal application - it will have to create more then
|
||||
2^15 symbols)
|
||||
! some other fixes and code cleanup
|
||||
|
||||
* harbour/source/vm/hvm.c
|
||||
* minor modifications
|
||||
|
||||
2006-09-01 10:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/lang/msgcs852.c
|
||||
* harbour/source/lang/msgcsiso.c
|
||||
|
||||
@@ -97,6 +97,7 @@ struct _HB_SYMB;
|
||||
struct _HB_SYMB * pSymbol; /* pointer to its relative local symbol */
|
||||
HB_HANDLE hArea; /* Workarea number */
|
||||
HB_HANDLE hMemvar; /* Index number into memvars ( publics & privates ) array */
|
||||
USHORT uiSymNum; /* dynamic symbol number */
|
||||
#ifndef HB_NO_PROFILER
|
||||
ULONG ulCalls; /* profiler support */
|
||||
ULONG ulTime; /* profiler support */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -154,9 +154,10 @@ HB_EXPORT PHB_DYNS hb_dynsymNew( PHB_SYMB pSymbol ) /* creates a new dynamic
|
||||
}
|
||||
|
||||
s_uiDynSymbols++; /* Got one more symbol */
|
||||
pDynSym->pSymbol = pSymbol;
|
||||
pDynSym->hMemvar = 0;
|
||||
pDynSym->hArea = 0;
|
||||
pDynSym->pSymbol = pSymbol;
|
||||
pDynSym->hMemvar = 0;
|
||||
pDynSym->hArea = 0;
|
||||
pDynSym->uiSymNum = s_uiDynSymbols;
|
||||
#ifndef HB_NO_PROFILER
|
||||
pDynSym->ulCalls = 0; /* profiler support */
|
||||
pDynSym->ulTime = 0; /* profiler support */
|
||||
|
||||
@@ -1764,16 +1764,12 @@ HB_EXPORT void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols )
|
||||
}
|
||||
|
||||
case HB_P_LOCALNEARADDINT:
|
||||
{
|
||||
PHB_ITEM pLocal = hb_stackItemFromBase( pCode[ w + 1 ] );
|
||||
int iAdd = HB_PCODE_MKSHORT( &( pCode[ w + 2 ] ) );
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, ("HB_P_LOCALNEARADDINT") );
|
||||
|
||||
hb_vmAddInt( pLocal, iAdd );
|
||||
hb_vmAddInt( hb_stackItemFromBase( pCode[ w + 1 ] ),
|
||||
HB_PCODE_MKSHORT( &( pCode[ w + 2 ] ) ) );
|
||||
w += 4;
|
||||
break;
|
||||
}
|
||||
|
||||
/* WITH OBJECT */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user