LibreOffice Module basic (master) 1
|
#include <codegen.hxx>
Public Member Functions | |
SbiCodeGen (SbModule &, SbiParser *) | |
SbiParser * | GetParser () |
SbModule & | GetModule () |
sal_uInt32 | Gen (SbiOpcode) |
sal_uInt32 | Gen (SbiOpcode, sal_uInt32) |
sal_uInt32 | Gen (SbiOpcode, sal_uInt32, sal_uInt32) |
void | Patch (sal_uInt32 o, sal_uInt32 v) |
void | BackChain (sal_uInt32 off) |
void | Statement () |
void | GenStmnt () |
sal_uInt32 | GetPC () const |
sal_uInt32 | GetOffset () const |
void | Save () |
void | IncForLevel () |
void | DecForLevel () |
Static Public Member Functions | |
static sal_uInt32 | calcNewOffSet (sal_uInt8 const *pCode, sal_uInt16 nOffset) |
static sal_uInt16 | calcLegacyOffSet (sal_uInt8 const *pCode, sal_uInt32 nOffset) |
Private Attributes | |
SbiParser * | pParser |
SbModule & | rMod |
SbiBuffer | aCode |
short | nLine |
short | nCol |
short | nForLevel |
bool | bStmnt |
Definition at line 28 of file codegen.hxx.
Definition at line 39 of file codegen.cxx.
References p.
|
inline |
Definition at line 44 of file codegen.hxx.
References aCode, and SbiBuffer::Chain().
Referenced by SbiParser::CloseBlock(), SbiParser::DefEnum(), SbiSymDef::Define(), SbiParser::DefVar(), SbiParser::DoLoop(), SbiParser::For(), SbiParser::HasGlobalCode(), SbiParser::If(), SbiParser::Select(), and SbiParser::While().
|
static |
Definition at line 566 of file codegen.cxx.
Referenced by SbiImage::CalcLegacyOffset().
|
static |
Definition at line 560 of file codegen.cxx.
Referenced by SbiImage::CalcNewOffset().
|
inline |
Definition at line 53 of file codegen.hxx.
References nForLevel.
Referenced by SbiParser::CloseBlock().
sal_uInt32 SbiCodeGen::Gen | ( | SbiOpcode | eOpcode | ) |
Definition at line 88 of file codegen.cxx.
References aCode, ERRCODE_BASIC_INTERNAL_ERROR, SbiTokenizer::Error(), GenStmnt(), GetPC(), SbiParser::IsCodeCompleting(), pParser, and SbOP0_END.
Referenced by SbiParser::Assign(), SbiParser::Call(), SbiParser::Channel(), SbiParser::Close(), SbiParser::DefDeclare(), SbiParser::DefEnum(), SbiParser::DefProc(), SbiParser::DefStatic(), SbiParser::DefVar(), SbiParser::DoLoop(), SbiParser::Erase(), SbiParser::ErrorStmnt(), SbiParser::Exit(), SbiParser::For(), SbiExpression::Gen(), SbiExprList::Gen(), SbiExprNode::Gen(), SbiExprNode::GenElement(), GenStmnt(), SbiParser::Goto(), SbiParser::HasGlobalCode(), SbiParser::If(), SbiParser::Input(), SbiParser::LineInput(), SbiParser::LSet(), SbiParser::Name(), SbiParser::On(), SbiParser::OnGoto(), SbiParser::Open(), SbiParser::Parse(), SbiParser::Print(), SbiParser::Resume(), SbiParser::Return(), SbiParser::RSet(), SbiParser::SbiParser(), SbiParser::Select(), SbiParser::Set(), SbiParser::Stop(), SbiParser::Symbol(), SbiParser::While(), and SbiParser::Write().
sal_uInt32 SbiCodeGen::Gen | ( | SbiOpcode | eOpcode, |
sal_uInt32 | nOpnd | ||
) |
Definition at line 102 of file codegen.cxx.
References aCode, ERRCODE_BASIC_INTERNAL_ERROR, SbiTokenizer::Error(), GenStmnt(), GetPC(), SbiParser::IsCodeCompleting(), n, pParser, and SbOP1_END.
sal_uInt32 SbiCodeGen::Gen | ( | SbiOpcode | eOpcode, |
sal_uInt32 | nOpnd1, | ||
sal_uInt32 | nOpnd2 | ||
) |
Definition at line 118 of file codegen.cxx.
References aCode, ERRCODE_BASIC_INTERNAL_ERROR, SbiTokenizer::Error(), GenStmnt(), GetPC(), SbiParser::IsCodeCompleting(), n, pParser, and SbOP2_END.
void SbiCodeGen::GenStmnt | ( | ) |
Definition at line 73 of file codegen.cxx.
References bStmnt, Gen(), SbiParser::IsCodeCompleting(), nCol, nLine, pParser, and STMNT_.
Referenced by SbiSymDef::Define(), Gen(), and SbiSymPool::Reference().
|
inline |
Definition at line 39 of file codegen.hxx.
References rMod.
Referenced by SbiParser::Option(), and SbiExpression::Term().
|
inline |
Definition at line 48 of file codegen.hxx.
References GetPC().
Referenced by SbiSymDef::Reference().
|
inline |
Definition at line 38 of file codegen.hxx.
References pParser.
Referenced by SbiParser::DefEnum(), SbiExprList::Gen(), SbiExprNode::Gen(), and SbiExprNode::GenElement().
sal_uInt32 SbiCodeGen::GetPC | ( | ) | const |
Definition at line 49 of file codegen.cxx.
References aCode, and SbiBuffer::GetSize().
Referenced by SbiSymDef::Define(), SbiParser::DoLoop(), SbiParser::For(), Gen(), GetOffset(), and SbiParser::While().
|
inline |
Definition at line 52 of file codegen.hxx.
References nForLevel.
Referenced by SbiParser::OpenBlock().
|
inline |
Definition at line 43 of file codegen.hxx.
References aCode, SbiBuffer::Patch(), and v.
Referenced by SbiParser::OnGoto().
void SbiCodeGen::Save | ( | ) |
Definition at line 137 of file codegen.cxx.
References aCode, SbiParser::aGblStrings, SbiParser::aIfaceVector, aPropName, SbiParser::aPublics, SbiParser::aRequiredTypes, SbiParser::bExplicit, SbModule::bIsProxyModule, CLASSMODULE, SbxArray::Count(), SbModule::EndDefinitions(), SbiTokenizer::Error(), EXPLICIT, SbiStringPool::Find(), SbiSymPool::First(), SbiSymPool::Get(), Get, SbiSymDef::GetAddr(), SbiBuffer::GetBuffer(), SbiSymDef::GetDefaultId(), SbiSymDef::GetDims(), SbiBuffer::GetErrCode(), SbiBuffer::GetErrMessage(), SbModule::GetIfaceMapperMethod(), SbMethod::GetInfo(), SbiProcDef::GetLib(), SbiProcDef::GetLine1(), SbiProcDef::GetLine2(), SbModule::GetMethod(), SbiSymDef::GetName(), SbiProcDef::GetParams(), SbiProcDef::GetProcDef(), SbModule::GetProcedureProperty(), SbiProcDef::getPropertyMode(), SbiProcDef::GetPropName(), GetSbData(), SbiStringPool::GetSize(), SbiSymPool::GetSize(), SbiSymDef::GetType(), SbiParser::HasGlobalCode(), Hidden, i, INITCODE, SbxArray::Insert(), SbiSymDef::IsByVal(), SbiParser::IsCodeCompleting(), SbiSymDef::IsDefined(), SbiSymDef::IsOptional(), SbiSymDef::IsParamArray(), SbiProcDef::IsPublic(), SbiSymDef::IsWithBrackets(), Let, SbModule::mnType, SbiParser::nBase, nCount, SbiSymPool::Next(), SbMethod::nLine1, SbMethod::nLine2, NONE, SbMethod::nStart, SbxParamInfo::nUserData, Optional, p, PARAM_INFO_PARAMARRAY, PARAM_INFO_WITHBRACKETS, SbModule::pClassData, SbModule::pImage, pParser, Private, Read, SbiParser::rEnumArray, rMod, SbiParser::rTypeArray, SbxARRAY, SbxBYREF, SbxEMPTY, SbxOBJECT, SbxVARIANT, Set, SbxBase::SetFlag(), SbxVariable::SetInfo(), SbxVariable::SetName(), SbModule::StartDefinitions(), o3tl::starts_with(), and t.
void SbiCodeGen::Statement | ( | ) |
Definition at line 56 of file codegen.cxx.
References bStmnt, SbiScanner::GetCol1(), SbiScanner::GetLine(), SbiParser::IsCodeCompleting(), nCol, nForLevel, nLine, and pParser.
Referenced by SbiParser::DefDeclare(), SbiParser::DefVar(), SbiParser::If(), SbiParser::Line(), SbiParser::Name(), SbiParser::Parse(), and SbiParser::Select().
|
private |
Definition at line 31 of file codegen.hxx.
Referenced by BackChain(), Gen(), GetPC(), Patch(), and Save().
|
private |
Definition at line 34 of file codegen.hxx.
Referenced by GenStmnt(), and Statement().
|
private |
Definition at line 32 of file codegen.hxx.
Referenced by GenStmnt(), and Statement().
|
private |
Definition at line 33 of file codegen.hxx.
Referenced by DecForLevel(), IncForLevel(), and Statement().
|
private |
Definition at line 32 of file codegen.hxx.
Referenced by GenStmnt(), and Statement().
|
private |
Definition at line 29 of file codegen.hxx.
Referenced by Gen(), GenStmnt(), GetParser(), Save(), and Statement().
|
private |
Definition at line 30 of file codegen.hxx.
Referenced by GetModule(), and Save().