LibreOffice Module basic (master) 1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
SbiCodeGen Class Reference

#include <codegen.hxx>

Collaboration diagram for SbiCodeGen:
[legend]

Public Member Functions

 SbiCodeGen (SbModule &, SbiParser *)
 
SbiParserGetParser ()
 
SbModuleGetModule ()
 
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

SbiParserpParser
 
SbModulerMod
 
SbiBuffer aCode
 
short nLine
 
short nCol
 
short nForLevel
 
bool bStmnt
 

Detailed Description

Definition at line 28 of file codegen.hxx.

Constructor & Destructor Documentation

◆ SbiCodeGen()

SbiCodeGen::SbiCodeGen ( SbModule r,
SbiParser p 
)

Definition at line 39 of file codegen.cxx.

References p.

Member Function Documentation

◆ BackChain()

void SbiCodeGen::BackChain ( sal_uInt32  off)
inline

◆ calcLegacyOffSet()

sal_uInt16 SbiCodeGen::calcLegacyOffSet ( sal_uInt8 const *  pCode,
sal_uInt32  nOffset 
)
static

Definition at line 566 of file codegen.cxx.

Referenced by SbiImage::CalcLegacyOffset().

◆ calcNewOffSet()

sal_uInt32 SbiCodeGen::calcNewOffSet ( sal_uInt8 const *  pCode,
sal_uInt16  nOffset 
)
static

Definition at line 560 of file codegen.cxx.

Referenced by SbiImage::CalcNewOffset().

◆ DecForLevel()

void SbiCodeGen::DecForLevel ( )
inline

Definition at line 53 of file codegen.hxx.

References nForLevel.

Referenced by SbiParser::CloseBlock().

◆ Gen() [1/3]

sal_uInt32 SbiCodeGen::Gen ( SbiOpcode  eOpcode)

◆ Gen() [2/3]

sal_uInt32 SbiCodeGen::Gen ( SbiOpcode  eOpcode,
sal_uInt32  nOpnd 
)

◆ Gen() [3/3]

sal_uInt32 SbiCodeGen::Gen ( SbiOpcode  eOpcode,
sal_uInt32  nOpnd1,
sal_uInt32  nOpnd2 
)

◆ GenStmnt()

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().

◆ GetModule()

SbModule & SbiCodeGen::GetModule ( )
inline

Definition at line 39 of file codegen.hxx.

References rMod.

Referenced by SbiParser::Option(), and SbiExpression::Term().

◆ GetOffset()

sal_uInt32 SbiCodeGen::GetOffset ( ) const
inline

Definition at line 48 of file codegen.hxx.

References GetPC().

Referenced by SbiSymDef::Reference().

◆ GetParser()

SbiParser * SbiCodeGen::GetParser ( )
inline

Definition at line 38 of file codegen.hxx.

References pParser.

Referenced by SbiParser::DefEnum(), SbiExprList::Gen(), SbiExprNode::Gen(), and SbiExprNode::GenElement().

◆ GetPC()

sal_uInt32 SbiCodeGen::GetPC ( ) const

◆ IncForLevel()

void SbiCodeGen::IncForLevel ( )
inline

Definition at line 52 of file codegen.hxx.

References nForLevel.

Referenced by SbiParser::OpenBlock().

◆ Patch()

void SbiCodeGen::Patch ( sal_uInt32  o,
sal_uInt32  v 
)
inline

Definition at line 43 of file codegen.hxx.

References aCode, SbiBuffer::Patch(), and v.

Referenced by SbiParser::OnGoto().

◆ Save()

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.

◆ Statement()

void SbiCodeGen::Statement ( )

Member Data Documentation

◆ aCode

SbiBuffer SbiCodeGen::aCode
private

Definition at line 31 of file codegen.hxx.

Referenced by BackChain(), Gen(), GetPC(), Patch(), and Save().

◆ bStmnt

bool SbiCodeGen::bStmnt
private

Definition at line 34 of file codegen.hxx.

Referenced by GenStmnt(), and Statement().

◆ nCol

short SbiCodeGen::nCol
private

Definition at line 32 of file codegen.hxx.

Referenced by GenStmnt(), and Statement().

◆ nForLevel

short SbiCodeGen::nForLevel
private

Definition at line 33 of file codegen.hxx.

Referenced by DecForLevel(), IncForLevel(), and Statement().

◆ nLine

short SbiCodeGen::nLine
private

Definition at line 32 of file codegen.hxx.

Referenced by GenStmnt(), and Statement().

◆ pParser

SbiParser* SbiCodeGen::pParser
private

Definition at line 29 of file codegen.hxx.

Referenced by Gen(), GenStmnt(), GetParser(), Save(), and Statement().

◆ rMod

SbModule& SbiCodeGen::rMod
private

Definition at line 30 of file codegen.hxx.

Referenced by GetModule(), and Save().


The documentation for this class was generated from the following files: