2006-09-03 16:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hboo.ch
+ added HB_OO_CLSTP_PERSIST and HB_OO_MSG_INITIALIZED
* harbour/include/hbapi.h
* harbour/include/hbvmpub.h
* harbour/source/vm/dynsym.c
% changed HB_HANDLE hArea to USHORT uiArea to reduce HB_DYNS size.
RDD code internally uses USHORT as area number so it's not
necessary to keep it as HB_HANDLE value.
* harbour/source/vm/arrays.c
* modified internal static function name
* harbour/source/vm/itemapi.c
+ added missing HB_TRACE in hb_itemClone()
* harbour/source/vm/classes.c
! moved initialization values to separate structure not bound with
methods. We can inherit the same method names from more then one
object so we will store only the first one but we are inheriting
whole instance area which is accessible with super casting (last
fixes) so we have to properly initialize it even if methods does
not exist. This modification also fixes some possible memory leaks.
% replaced bIsPersistent by HB_OO_CLSTP_PERSIST in uiScope in method
definition
! added basic parameter validation to __CLSADDMSG() to avoid some
possible strange behavior at runtime when broken messages are
defined.
* updated __OBJHASMSG() and __OBJSENDMSG() to accept SYMBOL items
too (@funcName()). Using symbol items it faster then strings.
Also added support to use non array parametes. F.e. now
__OBJHASMSG( {||NIL}, "EVAL" )
returns TRUE
* some other fixes, reduced memory consumption and speed optimizations
This commit is contained in:
@@ -8,6 +8,77 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2006-09-03 16:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hboo.ch
|
||||
+ added HB_OO_CLSTP_PERSIST and HB_OO_MSG_INITIALIZED
|
||||
|
||||
* harbour/include/hbapi.h
|
||||
* harbour/include/hbvmpub.h
|
||||
* harbour/source/vm/dynsym.c
|
||||
% changed HB_HANDLE hArea to USHORT uiArea to reduce HB_DYNS size.
|
||||
RDD code internally uses USHORT as area number so it's not
|
||||
necessary to keep it as HB_HANDLE value.
|
||||
|
||||
* harbour/source/vm/arrays.c
|
||||
* modified internal static function name
|
||||
|
||||
* harbour/source/vm/itemapi.c
|
||||
+ added missing HB_TRACE in hb_itemClone()
|
||||
|
||||
* harbour/source/vm/classes.c
|
||||
! moved initialization values to separate structure not bound with
|
||||
methods. We can inherit the same method names from more then one
|
||||
object so we will store only the first one but we are inheriting
|
||||
whole instance area which is accessible with super casting (last
|
||||
fixes) so we have to properly initialize it even if methods does
|
||||
not exist. This modification also fixes some possible memory leaks.
|
||||
% replaced bIsPersistent by HB_OO_CLSTP_PERSIST in uiScope in method
|
||||
definition
|
||||
! added basic parameter validation to __CLSADDMSG() to avoid some
|
||||
possible strange behavior at runtime when broken messages are
|
||||
defined.
|
||||
* updated __OBJHASMSG() and __OBJSENDMSG() to accept SYMBOL items
|
||||
too (@funcName()). Using symbol items it faster then strings.
|
||||
Also added support to use non array parametes. F.e. now
|
||||
__OBJHASMSG( {||NIL}, "EVAL" )
|
||||
returns TRUE
|
||||
* some other fixes, reduced memory consumption and speed optimizations
|
||||
|
||||
2006-09-03 16:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hboo.ch
|
||||
+ added HB_OO_CLSTP_PERSIST and HB_OO_MSG_INITIALIZED
|
||||
|
||||
* harbour/include/hbvmpub.h
|
||||
* harbour/source/vm/dynsym.c
|
||||
% changed HB_HANDLE hArea to USHORT uiArea to reduce HB_DYNS size.
|
||||
RDD code internally uses USHORT as area number so it's not
|
||||
necessary to keep it as HB_HANDLE value.
|
||||
|
||||
* harbour/source/vm/arrays.c
|
||||
* modified internal static function name
|
||||
|
||||
* harbour/source/vm/itemapi.c
|
||||
+ added missing HB_TRACE in hb_itemClone()
|
||||
|
||||
* harbour/source/vm/classes.c
|
||||
! moved initialization values to separate structure not bound with
|
||||
methods. We can inherit the same method names from more then one
|
||||
object so we will store only the first one but we are inheriting
|
||||
whole instance area which is accessible with super casting (last
|
||||
fixes) so we have to properly initialize it even if methods does
|
||||
not exist. This modification also fixes some possible memory leaks.
|
||||
% replaced bIsPersistent by HB_OO_CLSTP_PERSIST in uiScope in method
|
||||
definition
|
||||
! added basic parameter validation to __CLSADDMSG() to avoid some
|
||||
possible strange behavior at runtime when broken messages are
|
||||
defined.
|
||||
* updated __OBJHASMSG() and __OBJSENDMSG() to accept SYMBOL items
|
||||
too (@funcName()). Using symbol items it faster then strings.
|
||||
Also added support to use non array parametes. F.e. now
|
||||
__OBJHASMSG( {||NIL}, "EVAL" )
|
||||
returns TRUE
|
||||
* some other fixes, reduced memory consumption and speed optimizations
|
||||
|
||||
2006-09-03 16:37 UTC+0300 Chen Kedem <niki@actcom.co.il>
|
||||
* doc/en/lang.txt
|
||||
+ Update supported codepage list for HB_SETCODEPAGE()
|
||||
|
||||
@@ -699,7 +699,7 @@ extern HB_EXPORT PHB_SYMB hb_dynsymFindSymbol( char * szName ); /* finds a dyna
|
||||
extern HB_EXPORT PHB_SYMB hb_dynsymSymbol( PHB_DYNS pDynSym );
|
||||
extern HB_EXPORT char * hb_dynsymName( PHB_DYNS pDynSym ); /* return dynamic symbol name */
|
||||
extern HB_EXPORT HB_HANDLE hb_dynsymMemvarHandle( PHB_DYNS pDynSym ); /* return memvar handle number bound with given dynamic symbol */
|
||||
extern HB_EXPORT HB_HANDLE hb_dynsymAreaHandle( PHB_DYNS pDynSym ); /* return work area number bound with given dynamic symbol */
|
||||
extern HB_EXPORT int hb_dynsymAreaHandle( PHB_DYNS pDynSym ); /* return work area number bound with given dynamic symbol */
|
||||
extern HB_EXPORT void hb_dynsymSetAreaHandle( PHB_DYNS pDynSym, int iArea ); /* set work area number for a given dynamic symbol */
|
||||
|
||||
/* Symbol management */
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
#define HB_OO_CLSTP_CLASS 64 /* The related message is a superobject call, uidata is the superclass handle
|
||||
pInitValue contain one superclass object instance (absolutely needed for Inline msg and class data) */
|
||||
#define HB_OO_CLSTP_SUPER 128 /* The related message is inherited from a superclass */
|
||||
#define HB_OO_CLSTP_PERSIST 256 /* Message is persistent (PROPERTY) */
|
||||
|
||||
/* Message types */
|
||||
#define HB_OO_MSG_METHOD 0
|
||||
@@ -92,7 +93,7 @@
|
||||
#define HB_OO_MSG_SUPER 5
|
||||
#define HB_OO_MSG_ONERROR 6
|
||||
#define HB_OO_MSG_CLSMTHD 7 /* for the future */
|
||||
|
||||
#define HB_OO_MSG_INITIALIZED 8
|
||||
/* Data */
|
||||
#define HB_OO_DATA_SYMBOL 1
|
||||
#define HB_OO_DATA_VALUE 2
|
||||
|
||||
@@ -95,8 +95,8 @@ struct _HB_SYMB;
|
||||
typedef struct _HB_DYNS
|
||||
{
|
||||
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 uiArea; /* Workarea number */
|
||||
USHORT uiSymNum; /* dynamic symbol number */
|
||||
#ifndef HB_NO_PROFILER
|
||||
ULONG ulCalls; /* profiler support */
|
||||
|
||||
@@ -801,12 +801,12 @@ BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, ULONG * pulStart,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void hb_arrayCloneTo( PHB_BASEARRAY pSrcBaseArray, PHB_BASEARRAY pDstBaseArray, PHB_NESTED_CLONED pClonedList )
|
||||
static void hb_arrayCloneBody( PHB_BASEARRAY pSrcBaseArray, PHB_BASEARRAY pDstBaseArray, PHB_NESTED_CLONED pClonedList )
|
||||
{
|
||||
PHB_ITEM pSrcItem, pDstItem;
|
||||
ULONG ulLen;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_arrayCloneTo(%p, %p, %p)", pSrcBaseArray, pDstBaseArray, pClonedList));
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_arrayCloneBody(%p, %p, %p)", pSrcBaseArray, pDstBaseArray, pClonedList));
|
||||
|
||||
pSrcItem = pSrcBaseArray->pItems;
|
||||
pDstItem = pDstBaseArray->pItems;
|
||||
@@ -843,7 +843,7 @@ static void hb_arrayCloneTo( PHB_BASEARRAY pSrcBaseArray, PHB_BASEARRAY pDstBase
|
||||
pCloned->pNext = pClonedList->pNext;
|
||||
pClonedList->pNext = pCloned;
|
||||
|
||||
hb_arrayCloneTo( pBaseArray, pDstItem->item.asArray.value, pClonedList );
|
||||
hb_arrayCloneBody( pBaseArray, pDstItem->item.asArray.value, pClonedList );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -871,7 +871,7 @@ HB_EXPORT PHB_ITEM hb_arrayClone( PHB_ITEM pSrcArray )
|
||||
pClonedList->pDest = pDstArray;
|
||||
pClonedList->pNext = NULL;
|
||||
|
||||
hb_arrayCloneTo( pSrcBaseArray, pDstArray->item.asArray.value, pClonedList );
|
||||
hb_arrayCloneBody( pSrcBaseArray, pDstArray->item.asArray.value, pClonedList );
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -156,7 +156,7 @@ 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->uiArea = 0;
|
||||
pDynSym->uiSymNum = s_uiDynSymbols;
|
||||
#ifndef HB_NO_PROFILER
|
||||
pDynSym->ulCalls = 0; /* profiler support */
|
||||
@@ -369,18 +369,18 @@ HB_EXPORT HB_HANDLE hb_dynsymMemvarHandle( PHB_DYNS pDynSym )
|
||||
return pDynSym->hMemvar;
|
||||
}
|
||||
|
||||
HB_EXPORT HB_HANDLE hb_dynsymAreaHandle( PHB_DYNS pDynSym )
|
||||
HB_EXPORT int hb_dynsymAreaHandle( PHB_DYNS pDynSym )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dynsymAreaHandle(%p)", pDynSym));
|
||||
|
||||
return pDynSym->hArea;
|
||||
return pDynSym->uiArea;
|
||||
}
|
||||
|
||||
HB_EXPORT void hb_dynsymSetAreaHandle( PHB_DYNS pDynSym, int iArea )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dynsymSetAreaHandle(%p,%d)", pDynSym, iArea));
|
||||
|
||||
pDynSym->hArea = iArea;
|
||||
pDynSym->uiArea = ( USHORT ) iArea;
|
||||
}
|
||||
|
||||
void hb_dynsymEval( PHB_DYNS_FUNC pFunction, void * Cargo )
|
||||
|
||||
@@ -1570,6 +1570,8 @@ PHB_ITEM hb_itemUnShare( PHB_ITEM pItem )
|
||||
/* clone the given item */
|
||||
HB_EXPORT PHB_ITEM hb_itemClone( PHB_ITEM pItem )
|
||||
{
|
||||
HB_TRACE_STEALTH(HB_TR_DEBUG, ("hb_itemClone(%p)", pItem));
|
||||
|
||||
if( HB_IS_ARRAY( pItem ) )
|
||||
{
|
||||
return hb_arrayClone( pItem );
|
||||
|
||||
Reference in New Issue
Block a user