diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b3b90a5d59..4ae9da3f8b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,5 +1,10 @@ -2001-08-20 17:45 UTC+0100 Ryszard Glab +2001-08-20 22:20 GMT +1 JFL (mafact) + 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 *include/hbexprb.c *source/compiler/exproptb.c *source/compiler/genc.c diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index 0e55b46cb6..2654d5db8a 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -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 ); } /* diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 2d6139d69b..83d8a106bd 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -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;