top | up | prev | next

VoidPtrToPtrConversion Class

Definition at line 111 of BoundCompileUnit.cpp

Constructors

VoidPtrToPtrConversion(TypeSymbol* voidPtrType_, TypeSymbol* targetPointerType_)

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

Constructor Details

VoidPtrToPtrConversion Constructor

cmajor::binder::VoidPtrToPtrConversion::VoidPtrToPtrConversion(TypeSymbol* voidPtrType_, TypeSymbol* targetPointerType_)

Definition at line 125 of BoundCompileUnit.cpp :
 125 :
 126 FunctionSymbol(Span()boost::uuids::nil_uuid()U"voidPtr2ptr")voidPtrType(voidPtrType_)targetPointerType(targetPointerType_)
 127 {
 128     SetConversion();
 129     SetGroupName(U"@conversion");
 130     SetAccess(SymbolAccess::public_);
 131     SetConversionSourceType(voidPtrType->PlainType(GetSpan()SourceModuleId()));
 132     SetConversionTargetType(targetPointerType->PlainType(GetSpan()SourceModuleId()));
 133 }


Declaration at line 114 of BoundCompileUnit.cpp


Member Function Details

ClassName Member Function

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

Definition at line 119 of BoundCompileUnit.cpp :
 119 { return "VoidPtrToPtrConversion"; }


ConversionDistance Member Function

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

Definition at line 116 of BoundCompileUnit.cpp :
 116 { return 255; }


GenerateCall Member Function

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

Definition at line 135 of BoundCompileUnit.cpp :
 136 {
 137     emitter.SetCurrentDebugLocation(span);
 138     void* value = emitter.Stack().Pop();
 139     emitter.Stack().Push(emitter.CreateBitCast(valuetargetPointerType->IrType(emitter)));
 140 }


Declaration at line 118 of BoundCompileUnit.cpp


GetConversionType Member Function

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

Definition at line 115 of BoundCompileUnit.cpp :
 115 { return ConversionType::explicit_; }


IsBasicTypeOperation Member Function

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

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


top | up | prev | next