top | up | prev | next

NullPtrToPtrConversion Class

Definition at line 65 of BoundCompileUnit.cpp

Constructors

NullPtrToPtrConversion(TypeSymbol* nullPtrType_, TypeSymbol* targetPointerType_)

Member Functions

const char* ClassName() const override
uint8_t ConversionDistance() const override
std::unique_ptr<Value> ConvertValue(const std::unique_ptr<Value>& value) 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* nullPtrType
TypeSymbol* targetPointerType

Constructor Details

NullPtrToPtrConversion Constructor

cmajor::binder::NullPtrToPtrConversion::NullPtrToPtrConversion(TypeSymbol* nullPtrType_, TypeSymbol* targetPointerType_)

Definition at line 80 of BoundCompileUnit.cpp :
  80 :
  81 FunctionSymbol(Span()boost::uuids::nil_uuid()U"nullptr2ptr")nullPtrType(nullPtrType_)targetPointerType(targetPointerType_)
  82 {
  83     SetConversion();
  84     SetGroupName(U"@conversion");
  85     SetAccess(SymbolAccess::public_);
  86     SetConversionSourceType(nullPtrType->PlainType(GetSpan()SourceModuleId()));
  87     SetConversionTargetType(targetPointerType->PlainType(GetSpan()SourceModuleId()));
  89 }


Declaration at line 68 of BoundCompileUnit.cpp


Member Function Details

ClassName Member Function

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

Definition at line 74 of BoundCompileUnit.cpp :
  74 { return "NullPtrToPtrConversion"; }


ConversionDistance Member Function

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

Definition at line 70 of BoundCompileUnit.cpp :
  70 { return 1; }


ConvertValue Member Function

std::unique_ptr<Value> cmajor::binder::NullPtrToPtrConversion::ConvertValue(const std::unique_ptr<Value>& value) const override

Definition at line 98 of BoundCompileUnit.cpp
Declaration at line 73 of BoundCompileUnit.cpp


GenerateCall Member Function

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

Definition at line 91 of BoundCompileUnit.cpp :
  92 {
  93     emitter.SetCurrentDebugLocation(span);
  94     void* value = emitter.Stack().Pop();
  95     emitter.Stack().Push(emitter.CreateBitCast(valuetargetPointerType->IrType(emitter)));
  96 }


Declaration at line 72 of BoundCompileUnit.cpp


GetConversionType Member Function

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

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


IsBasicTypeOperation Member Function

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

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


top | up | prev | next