top | up | prev | next

PtrToULongConversion Class

Definition at line 173 of BoundCompileUnit.cpp

Constructors

PtrToULongConversion(TypeSymbol* ptrType_, 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* ptrType
TypeSymbol* ulongType

Constructor Details

PtrToULongConversion Constructor

cmajor::binder::PtrToULongConversion::PtrToULongConversion(TypeSymbol* ptrType_, TypeSymbol* ulongType_)

Definition at line 187 of BoundCompileUnit.cpp :
 187 :
 188 FunctionSymbol(Span()boost::uuids::nil_uuid()U"ptr2ulong")ptrType(ptrType_)ulongType(ulongType_)
 189 {
 190     SetConversion();
 191     SetGroupName(U"@conversion");
 192     SetAccess(SymbolAccess::public_);
 193     SetConversionSourceType(ptrType->PlainType(GetSpan()SourceModuleId()));
 194     SetConversionTargetType(ulongType->PlainType(GetSpan()SourceModuleId()));
 195 }


Declaration at line 176 of BoundCompileUnit.cpp


Member Function Details

ClassName Member Function

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

Definition at line 181 of BoundCompileUnit.cpp :
 181 { return "PtrToULongConversion"; }


ConversionDistance Member Function

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

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


GenerateCall Member Function

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

Definition at line 197 of BoundCompileUnit.cpp :
 198 {
 199     emitter.SetCurrentDebugLocation(span);
 200     void* value = emitter.Stack().Pop();
 201     emitter.Stack().Push(emitter.CreatePtrToInt(valueulongType->IrType(emitter)));
 202 }


Declaration at line 180 of BoundCompileUnit.cpp


GetConversionType Member Function

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

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


IsBasicTypeOperation Member Function

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

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


top | up | prev | next