2001-08-20 22:20 GMT +1 JFL (mafact) <jfl@mafact.com>

This commit is contained in:
Jean-Francois Lefebvre
2001-08-20 20:16:25 +00:00
parent 966f240041
commit d5c355a81e
3 changed files with 17 additions and 32 deletions

View File

@@ -1,5 +1,10 @@
2001-08-20 17:45 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
2001-08-20 22:20 GMT +1 JFL (mafact) <jfl@mafact.com>
harbour/source/vm/hvm.c
* reversed my previous modif till I have it working :-(
harbour/source/vm/classes.c
* reversed my previous modif till I have it working :-(
2001-08-20 17:45 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
*include/hbexprb.c
*source/compiler/exproptb.c
*source/compiler/genc.c

View File

@@ -2132,23 +2132,11 @@ static HARBOUR hb___msgEval( void )
static HARBOUR hb___msgSuper( void )
{
PHB_ITEM pObject = hb_stackSelfItem();
ULONG ulLen = pObject->item.asArray.value->ulLen;
PHB_ITEM pCopy = hb_itemArrayNew(ulLen+1); /* hb_arrayClone(pObject, NULL); */
/* Now creating a copy wich will share all value with the original */
for( ; ulLen > 0 ; ulLen--)
hb_itemCopy( pCopy->item.asArray.value->pItems + ulLen, pObject->item.asArray.value->pItems + ulLen );
pObject->item.asArray.value->uiPrevCls = pObject->item.asArray.value->uiClass; /* backup of actual handel */
pObject->item.asArray.value->uiClass = s_pMethod->uiSprClass; /* superclass handel casting */
pCopy->item.asArray.value->uiPrevCls = pObject->item.asArray.value->uiClass; /* backup of actual handel */
pCopy->item.asArray.value->uiClass = s_pMethod->uiSprClass; /* superclass handel casting */
pCopy->item.asArray.value->puiClsTree = ( USHORT * ) hb_xgrab( sizeof( USHORT ) );
pCopy->item.asArray.value->puiClsTree[0] = 0 ;
/* Now save the Self object as the last elem. */
hb_itemArrayPut( pCopy, pCopy->item.asArray.value->ulLen , pObject );
hb_itemRelease(hb_itemReturn( pCopy ));
hb_itemReturn( pObject );
}
/*

View File

@@ -3001,7 +3001,6 @@ void hb_vmDo( USHORT uiParams )
BOOL lPopSuper = FALSE ;
PHB_BASEARRAY pSelfBase = NULL;
PHB_ITEM pRealSelf=NULL;
USHORT uiClass;
if( pSym == &( hb_symEval ) && HB_IS_BLOCK( pSelf ) )
@@ -3019,13 +3018,9 @@ void hb_vmDo( USHORT uiParams )
printf( "\n VmDo Method: %s \n", pSym->szName );
*/
uiClass=pSelfBase->uiClass;
/*pSelfBase->uiClass = pSelfBase->uiPrevCls;*/
/*pSelfBase->uiPrevCls = 0 ; */
/* take care this is a fake object */
/* take back the real Self */
pRealSelf = hb_arrayGetItemPtr(pSelf,pSelfBase->ulLen) ;
/* and take back the good pSelfBase */
pSelfBase = pRealSelf->item.asArray.value;
pSelfBase->uiClass = pSelfBase->uiPrevCls;
pSelfBase->uiPrevCls = 0 ;
/* Push current SuperClass handle */
lPopSuper = TRUE ;
@@ -3053,6 +3048,7 @@ void hb_vmDo( USHORT uiParams )
/* POP SuperClass handle */
pSelfBase->puiClsTree = ( USHORT * ) hb_xrealloc( pSelfBase->puiClsTree, sizeof( USHORT ) * (nPos + 1) );
pSelfBase->puiClsTree[0]=nPos;
}
if( bProfiler )
@@ -3152,7 +3148,6 @@ void hb_vmSend( USHORT uiParams )
BOOL lPopSuper = FALSE ;
PHB_BASEARRAY pSelfBase = NULL;
PHB_ITEM pRealSelf=NULL;
USHORT uiClass;
if( ! ( pSym == &( hb_symEval ) && HB_IS_BLOCK( pSelf ) ) )
@@ -3169,13 +3164,10 @@ void hb_vmSend( USHORT uiParams )
printf( "\n VmSend Method: %s \n", pSym->szName );
*/
uiClass=pSelfBase->uiClass;
/*pSelfBase->uiClass = pSelfBase->uiPrevCls;*/
/*pSelfBase->uiPrevCls = 0 ; */
/* take care this is a fake object */
/* take back the real Self */
pRealSelf = hb_arrayGetItemPtr(pSelf,pSelfBase->ulLen) ;
/* and take back the good pSelfBase */
pSelfBase = pRealSelf->item.asArray.value;
pSelfBase->uiClass = pSelfBase->uiPrevCls;
pSelfBase->uiPrevCls = 0 ;
/* Push current SuperClass handle */
lPopSuper = TRUE ;
nPos=pSelfBase->puiClsTree[0]+1;