top | up | prev | next

PtrToVoidPtrConversion Class

Definition at line 142 of BoundCompileUnit.cpp

Constructors

PtrToVoidPtrConversion(TypeSymbol* sourcePtrType_, TypeSymbol* voidPtrType_)

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* sourcePtrType
TypeSymbol* voidPtrType

Constructor Details

PtrToVoidPtrConversion Constructor

cmajor::binder::PtrToVoidPtrConversion::PtrToVoidPtrConversion(TypeSymbol* sourcePtrType_, TypeSymbol* voidPtrType_)

Definition at line 156 of BoundCompileUnit.cpp :
 156 :
 157 FunctionSymbol(Span()boost::uuids::nil_uuid()U"ptr2voidPtr")sourcePtrType(sourcePtrType_)voidPtrType(voidPtrType_)
 158 {
 159     SetConversion();
 160     SetGroupName(U"@conversion");
 161     SetAccess(SymbolAccess::public_);
 162     SetConversionSourceType(sourcePtrType->PlainType(GetSpan()SourceModuleId()));
 163     SetConversionTargetType(voidPtrType->PlainType(GetSpan()SourceModuleId()));
 164 }


Declaration at line 145 of BoundCompileUnit.cpp


Member Function Details

ClassName Member Function

const char * cmajor::binder::PtrToVoidPtrConversion::ClassName() const override

Definition at line 150 of BoundCompileUnit.cpp :
 150 { return "PtrToVoidPtrConversion"; }


ConversionDistance Member Function

uint8_t cmajor::binder::PtrToVoidPtrConversion::ConversionDistance() const override

Definition at line 147 of BoundCompileUnit.cpp :
 147 { return 10; }


GenerateCall Member Function

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

Definition at line 166 of BoundCompileUnit.cpp :
 167 {
 168     emitter.SetCurrentDebugLocation(span);
 169     void* value = emitter.Stack().Pop();
 170     emitter.Stack().Push(emitter.CreateBitCast(valuevoidPtrType->IrType(emitter)));
 171 }


Declaration at line 149 of BoundCompileUnit.cpp


GetConversionType Member Function

ConversionType cmajor::binder::PtrToVoidPtrConversion::GetConversionType() const override

Definition at line 146 of BoundCompileUnit.cpp :
 146 { return ConversionType::implicit_; }


IsBasicTypeOperation Member Function

bool cmajor::binder::PtrToVoidPtrConversion::IsBasicTypeOperation() const override

Definition at line 148 of BoundCompileUnit.cpp :
 148 { return true; }


top | up | prev | next