2000-08-28 17:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.y
- Removed 1 un-needed hb_comp_szDeclaredFun = NULL
* source/compiler/hbpcode.c
! Completed declared parameter checking, for method applied to Adapted Type Variable.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2000-08-28 17:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
|
||||
* source/compiler/harbour.y
|
||||
- Removed 1 un-needed hb_comp_szDeclaredFun = NULL
|
||||
|
||||
* source/compiler/hbpcode.c
|
||||
! Completed declared parameter checking, for method applied to Adapted Type Variable.
|
||||
|
||||
2000-08-28 15:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
|
||||
* include/hbcomp.h
|
||||
+ Added: extern void hb_compDeclaredParameterAdd( char * szVarName, BYTE cValueType );
|
||||
|
||||
@@ -1190,7 +1190,7 @@ Declaration: DECLARE IdentName '(' { hb_compDeclaredAdd( $2 ); hb_comp_szDeclare
|
||||
hb_comp_cVarType = ' ';
|
||||
hb_comp_iVarScope = VS_NONE;
|
||||
}
|
||||
| DECLARE IdentName { hb_comp_pLastClass = hb_compClassAdd( $2 ); } ClassInfo Crlf { hb_comp_iVarScope = VS_NONE; hb_comp_szDeclaredFun == NULL }
|
||||
| DECLARE IdentName { hb_comp_pLastClass = hb_compClassAdd( $2 ); } ClassInfo Crlf { hb_comp_iVarScope = VS_NONE; }
|
||||
;
|
||||
|
||||
ClassInfo : DecMethod
|
||||
|
||||
@@ -525,13 +525,16 @@ void hb_compStrongType( int iSize )
|
||||
if( pFunc->iStackIndex < ( wVar + 1 ) )
|
||||
break;
|
||||
|
||||
if( pFunc->pStack[ pFunc->iStackIndex - ( wVar + 1 ) ] == 'S' &&
|
||||
pFunc->iStackFunctions > 0 && pFunc->pStackFunctions[ --pFunc->iStackFunctions ] )
|
||||
cType = pFunc->pStack[ pFunc->iStackIndex - ( wVar + 1 ) ];
|
||||
if( cType >= ( 'A' + VT_OFFSET_VARIANT ) )
|
||||
cType -= VT_OFFSET_VARIANT;
|
||||
|
||||
if( cType == 'S' && pFunc->iStackFunctions > 0 && pFunc->pStackFunctions[ pFunc->iStackFunctions - 1 ] )
|
||||
{
|
||||
int hb_comp_iParamCount, iParamCount, iOptionals = 0;
|
||||
BYTE * hb_comp_cParamTypes;
|
||||
|
||||
hb_comp_cParamTypes = pFunc->pStackFunctions[ pFunc->iStackFunctions ]->cParamTypes;
|
||||
hb_comp_cParamTypes = pFunc->pStackFunctions[ --pFunc->iStackFunctions ]->cParamTypes;
|
||||
hb_comp_iParamCount = pFunc->pStackFunctions[ pFunc->iStackFunctions ]->iParamCount;
|
||||
|
||||
iParamCount = hb_comp_iParamCount;
|
||||
@@ -635,11 +638,15 @@ void hb_compStrongType( int iSize )
|
||||
hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_PARAM_COUNT, ( char * ) szType1, ( char * ) szType2 );
|
||||
}
|
||||
}
|
||||
else if( pFunc->iStackFunctions )
|
||||
{
|
||||
pFunc->pStackFunctions[ --pFunc->iStackFunctions ] = NULL;
|
||||
}
|
||||
|
||||
/* Removing all the parameters.*/
|
||||
pFunc->iStackIndex -= wVar;
|
||||
|
||||
if( pFunc->pStack[ pFunc->iStackIndex - 1 ] == 'S' && pFunc->pStackFunctions[ pFunc->iStackFunctions ] )
|
||||
if( cType == 'S' && pFunc->pStackFunctions[ pFunc->iStackFunctions ] )
|
||||
{
|
||||
pFunc->pStack[ pFunc->iStackIndex - 1 ] = pFunc->pStackFunctions[ pFunc->iStackFunctions ]->cType;
|
||||
|
||||
@@ -652,7 +659,9 @@ void hb_compStrongType( int iSize )
|
||||
}
|
||||
}
|
||||
else
|
||||
pFunc->pStack[ pFunc->iStackIndex - 1 ] = ' ';
|
||||
{
|
||||
pFunc->pStack[ pFunc->iStackIndex - 1 ] = ' ';
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user