top | up | prev | next

ArrayBeginFunction Class

Definition at line 56 of ArrayTypeSymbol.hpp

Constructors

ArrayBeginFunction(ArrayTypeSymbol* arrayType_)
ArrayBeginFunction(const Span& span_, const boost::uuids::uuid& sourceModuleId_, const std::u32string& name_)

Member Functions

void Check() override
const char* ClassName() const override
void EmplaceType(TypeSymbol* typeSymbol, int index) override
void GenerateCall(Emitter& emitter, std::vector<GenObject*>& genObjects, OperationFlags flags, const Span& span, const boost::uuids::uuid& moduleId) override
bool IsBasicTypeOperation() const override
void Read(SymbolReader& reader) override
void Write(SymbolWriter& writer) override

Member Variables

ArrayTypeSymbol* arrayType

Constructor Details

ArrayBeginFunction Constructor

cmajor::symbols::ArrayBeginFunction::ArrayBeginFunction(ArrayTypeSymbol * arrayType_)

Definition at line 186 of ArrayTypeSymbol.cpp
Declaration at line 60 of ArrayTypeSymbol.hpp


ArrayBeginFunction Constructor

cmajor::symbols::ArrayBeginFunction::ArrayBeginFunction(const Span& span_, const boost::uuids::uuid& sourceModuleId_, const std::u32string& name_)

Definition at line 181 of ArrayTypeSymbol.cpp :
181 :
182 FunctionSymbol(SymbolType::arrayBeginFunctionSymbolspan_sourceModuleId_name_)arrayType(nullptr)
183 {
184 }


Declaration at line 59 of ArrayTypeSymbol.hpp


Member Function Details

Check Member Function

void cmajor::symbols::ArrayBeginFunction::Check() override

Definition at line 236 of ArrayTypeSymbol.cpp :
237 {
238     FunctionSymbol::Check();
239     if (!arrayType)
240     {
241         throw SymbolCheckException("array begin function has no array type"GetSpan()SourceModuleId());
242     }
243 }


Declaration at line 67 of ArrayTypeSymbol.hpp

Base class overridden functions: cmajor::symbols::ContainerSymbol::Check , cmajor::symbols::FunctionSymbol::Check , cmajor::symbols::Symbol::Check

Calls: cmajor::symbols::FunctionSymbol::Check , cmajor::symbols::Symbol::GetSpan , cmajor::symbols::Symbol::SourceModuleId


ClassName Member Function

const char * cmajor::symbols::ArrayBeginFunction::ClassName() const override

Definition at line 66 of ArrayTypeSymbol.hpp :
 66 { return "ArrayBeginFunction"; }

Base class overridden functions: cmajor::symbols::ContainerSymbol::ClassName , cmajor::symbols::FunctionSymbol::ClassName , cmajor::symbols::Symbol::ClassName


EmplaceType Member Function

void cmajor::symbols::ArrayBeginFunction::EmplaceType(TypeSymbol * typeSymbol, int index) override

Definition at line 213 of ArrayTypeSymbol.cpp
Declaration at line 63 of ArrayTypeSymbol.hpp

Base class overridden functions: cmajor::symbols::FunctionSymbol::EmplaceType , cmajor::symbols::Symbol::EmplaceType

Calls: cmajor::symbols::FunctionSymbol::EmplaceType , cmajor::symbols::Symbol::GetSymbolType


GenerateCall Member Function

void cmajor::symbols::ArrayBeginFunction::GenerateCall(Emitter& emitter, std::vector<GenObject*>& genObjects, OperationFlags flags, const Span& span, const boost::uuids::uuid& moduleId) override

Definition at line 226 of ArrayTypeSymbol.cpp :
227 {
228     Assert(genObjects.size() == 1"array begin needs one object");
229     genObjects[0]->Load(emitterOperationFlags::addr);
230     emitter.SetCurrentDebugLocation(span);
231     void* arrayPtr = emitter.Stack().Pop();
232     void* beginPtr = emitter.GetArrayBeginAddress(arrayPtr);
233     emitter.Stack().Push(beginPtr);
234 }


Declaration at line 64 of ArrayTypeSymbol.hpp


IsBasicTypeOperation Member Function

bool cmajor::symbols::ArrayBeginFunction::IsBasicTypeOperation() const override

Definition at line 65 of ArrayTypeSymbol.hpp :
 65 { return true; }

Base class overridden functions: cmajor::symbols::FunctionSymbol::IsBasicTypeOperation


Read Member Function

void cmajor::symbols::ArrayBeginFunction::Read(SymbolReader & reader) override

Definition at line 205 of ArrayTypeSymbol.cpp :
206 {
207     FunctionSymbol::Read(reader);
208     boost::uuids::uuid typeId;
209     reader.GetBinaryReader().ReadUuid(typeId);
210     reader.GetSymbolTable()->EmplaceTypeRequest(readerthistypeId1);
211 }


Declaration at line 62 of ArrayTypeSymbol.hpp

Base class overridden functions: cmajor::symbols::ContainerSymbol::Read , cmajor::symbols::FunctionSymbol::Read , cmajor::symbols::Symbol::Read

Calls: cmajor::symbols::FunctionSymbol::Read , cmajor::symbols::SymbolReader::GetBinaryReader , cmajor::symbols::SymbolReader::GetSymbolTable , cmajor::symbols::SymbolTable::EmplaceTypeRequest


Write Member Function

void cmajor::symbols::ArrayBeginFunction::Write(SymbolWriter & writer) override

Definition at line 199 of ArrayTypeSymbol.cpp :
200 {
201     FunctionSymbol::Write(writer);
202     writer.GetBinaryWriter().Write(arrayType->TypeId());
203 }


Declaration at line 61 of ArrayTypeSymbol.hpp

Base class overridden functions: cmajor::symbols::ContainerSymbol::Write , cmajor::symbols::FunctionSymbol::Write , cmajor::symbols::Symbol::Write

Calls: cmajor::symbols::ArrayBeginFunction::Write , cmajor::symbols::FunctionSymbol::Write , cmajor::symbols::SymbolWriter::GetBinaryWriter , cmajor::symbols::TypeSymbol::TypeId

Called by: cmajor::symbols::ArrayBeginFunction::Write


top | up | prev | next