void SbiExprNode::GenElement( SbiCodeGen& rGen, SbiOpcode eOp )
{ #ifdef DBG_UTIL if ((eOp < SbiOpcode::RTL_ || eOp > SbiOpcode::CALLC_) && eOp != SbiOpcode::FIND_G_ && eOp != SbiOpcode::FIND_CM_ && eOp != SbiOpcode::FIND_STATIC_)
rGen.GetParser()->Error( ERRCODE_BASIC_INTERNAL_ERROR, u"Opcode"_ustr ); #endif
SbiSymDef* pDef = aVar.pDef; // The ID is either the position or the String-ID // If the bit Bit 0x8000 is set, the variable have // a parameter list.
sal_uInt16 nId = ( eOp == SbiOpcode::PARAM_ ) ? pDef->GetPos() : pDef->GetId(); // Build a parameter list if( aVar.pPar && aVar.pPar->GetSize() )
{
nId |= 0x8000;
aVar.pPar->Gen(rGen);
}
/* TODO: Check after Declare concept change // From 1996-01-10: Type adjustment at named -> search suitable parameter if(pProc) { // For the present: trigger an error pParser->Error(ERRCODE_BASIC_NO_NAMED_ARGS);
// Later, if Named Args at DECLARE is possible //for( sal_uInt16 i = 1 ; i < nParAnz ; i++ ) //{ // SbiSymDef* pDef = pPool->Get( i ); // const String& rName = pDef->GetName(); // if( rName.Len() ) // { // if( pExpr->GetName().ICompare( rName ) // == COMPARE_EQUAL ) // { // pParser->aGen.Gen( ARGTYP_, pDef->GetType() ); // break; // } // } //} }
*/
} else
{
rGen.Gen( SbiOpcode::ARGV_ );
}
}
}
void SbiExpression::Gen( RecursiveMode eRecMode )
{ // special treatment for WITH // If pExpr == .-term in With, approximately Gen for Basis-Object
pExpr->Gen( pParser->aGen, eRecMode ); if( bByVal )
{
pParser->aGen.Gen( SbiOpcode::BYVAL_ );
} if( bBased )
{
sal_uInt16 uBase = pParser->nBase; if( pParser->IsCompatible() )
{
uBase |= 0x8000; // #109275 Flag compatibility
}
pParser->aGen.Gen( SbiOpcode::BASED_, uBase );
pParser->aGen.Gen( SbiOpcode::ARGV_ );
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.