top | up | prev | next

VoidPtrToDelegateConversion Class

Definition at line 167 of DelegateSymbol.hpp

Constructors

VoidPtrToDelegateConversion(TypeSymbol* voidPtrType_, TypeSymbol* delegateType_, TypeSymbol* ulongType_)

Member Functions

const char* ClassName() const override
uint8_t ConversionDistance() const override
void GenerateCall(Emitter& emitter, std::vector<GenObject*>& genObjects, OperationFlags flags, const Span& span, const boost::uuids::uuid& moduleId) override
ConversionType GetConversionType() const override
bool IsBasicTypeOperation() const override

Member Variables

TypeSymbol* delegateType
TypeSymbol* ulongType
TypeSymbol* voidPtrType

Constructor Details

VoidPtrToDelegateConversion Constructor

cmajor::symbols::VoidPtrToDelegateConversion::VoidPtrToDelegateConversion(TypeSymbol * voidPtrType_, TypeSymbol * delegateType_, TypeSymbol * ulongType_)

Definition at line 667 of DelegateSymbol.cpp :
 667 :
 668 FunctionSymbol(delegateType_->GetSpan()delegateType_->SourceModuleId()U"voidptr2dlg")voidPtrType(voidPtrType_)delegateType(delegateType_)ulongType(ulongType_)
 669 {
 670     SetConversion();
 671     SetGroupName(U"@conversion");
 672     SetAccess(SymbolAccess::public_);
 673     SetConversionSourceType(delegateType->PlainType(GetSpan()SourceModuleId()));
 674     SetConversionTargetType(voidPtrType->PlainType(GetSpan()SourceModuleId()));
 675 }


Declaration at line 170 of DelegateSymbol.hpp


Member Function Details

ClassName Member Function

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

Definition at line 175 of DelegateSymbol.hpp :
175 { return "VoidPtrToDelegateConversion"; }

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


ConversionDistance Member Function

uint8_t cmajor::symbols::VoidPtrToDelegateConversion::ConversionDistance() const override

Definition at line 172 of DelegateSymbol.hpp :
172 { return 255; }

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


GenerateCall Member Function

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

Definition at line 677 of DelegateSymbol.cpp :
 678 {
 679     emitter.SetCurrentDebugLocation(span);
 680     void* value = emitter.Stack().Pop();
 681     void* ulongValue = emitter.CreatePtrToInt(valueulongType->IrType(emitter));
 682     emitter.Stack().Push(emitter.CreateIntToPtr(ulongValuedelegateType->IrType(emitter)));
 683 }


Declaration at line 174 of DelegateSymbol.hpp

Calls: cmajor::symbols::TypeSymbol::IrType


GetConversionType Member Function

ConversionType cmajor::symbols::VoidPtrToDelegateConversion::GetConversionType() const override

Definition at line 171 of DelegateSymbol.hpp :
171 { return ConversionType::explicit_; }

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


IsBasicTypeOperation Member Function

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

Definition at line 173 of DelegateSymbol.hpp :
173 { return true; }

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


top | up | prev | next