top | up | prev | next

ArrayEndFunction Class

Definition at line 72 of ArrayTypeSymbol.hpp

Constructors

ArrayEndFunction(ArrayTypeSymbol* arrayType_)
ArrayEndFunction(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

ArrayEndFunction Constructor

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

Definition at line 250 of ArrayTypeSymbol.cpp
Declaration at line 76 of ArrayTypeSymbol.hpp


ArrayEndFunction Constructor

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

Definition at line 245 of ArrayTypeSymbol.cpp :
245 :
246 FunctionSymbol(SymbolType::arrayEndFunctionSymbolspan_sourceModuleId_name_)arrayType(nullptr)
247 {
248 }


Declaration at line 75 of ArrayTypeSymbol.hpp


Member Function Details

Check Member Function

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

Definition at line 300 of ArrayTypeSymbol.cpp :
301 {
302     FunctionSymbol::Check();
303     if (!arrayType)
304     {
305         throw SymbolCheckException("array end function has no array type"GetSpan()SourceModuleId());
306     }
307 }


Declaration at line 83 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::ArrayEndFunction::ClassName() const override

Definition at line 82 of ArrayTypeSymbol.hpp :
 82 { return "ArrayEndFunction"; }

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


EmplaceType Member Function

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

Definition at line 277 of ArrayTypeSymbol.cpp
Declaration at line 79 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::ArrayEndFunction::GenerateCall(Emitter& emitter, std::vector<GenObject*>& genObjects, OperationFlags flags, const Span& span, const boost::uuids::uuid& moduleId) override

Definition at line 290 of ArrayTypeSymbol.cpp :
291 {
292     Assert(genObjects.size() == 1"array end needs one object");
293     genObjects[0]->Load(emitterOperationFlags::addr);
294     emitter.SetCurrentDebugLocation(span);
295     void* arrayPtr = emitter.Stack().Pop();
296     void* endPtr = emitter.GetArrayEndAddress(arrayPtrarrayType->Size());
297     emitter.Stack().Push(endPtr);
298 }


Declaration at line 80 of ArrayTypeSymbol.hpp

Calls: cmajor::symbols::ArrayTypeSymbol::Size


IsBasicTypeOperation Member Function

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

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

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


Read Member Function

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

Definition at line 269 of ArrayTypeSymbol.cpp :
270 {
271     FunctionSymbol::Read(reader);
272     boost::uuids::uuid typeId;
273     reader.GetBinaryReader().ReadUuid(typeId);
274     reader.GetSymbolTable()->EmplaceTypeRequest(readerthistypeId1);
275 }


Declaration at line 78 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::ArrayEndFunction::Write(SymbolWriter & writer) override

Definition at line 263 of ArrayTypeSymbol.cpp :
264 {
265     FunctionSymbol::Write(writer);
266     writer.GetBinaryWriter().Write(arrayType->TypeId());
267 }


Declaration at line 77 of ArrayTypeSymbol.hpp

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

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

Called by: cmajor::symbols::ArrayEndFunction::Write


top | up | prev | next