top | up | prev | next

PointerValue Abstract Class

Definition at line 387 of Value.hpp

Constructors

PointerValue(const Span& span_, const boost::uuids::uuid& moduleId_, TypeSymbol* type_, const void* ptr_)

Member Functions

Value* Add(int64_t offset) const
Value* As(TypeSymbol* targetType, bool cast, const Span& span, const boost::uuids::uuid& moduleId, bool dontThrow) const
const char* ClassName() const override
Value* Clone() const override
Value* Deref() const
TypeSymbol* GetType(SymbolTable* symbolTable) override
const void* GetValue() const
void* IrValue(Emitter& emitter)
TypeSymbol* PointeeType() const
void Read(BinaryReader& reader) override
void SetType(TypeSymbol* type_) override
Value* Sub(const void* thatPtr) const
Value* Sub(int64_t offset) const
void Write(BinaryWriter& writer) override

Typedefs

const void* OperandType

Member Variables

const void* ptr
TypeSymbol* type

Constructor Details

PointerValue Constructor

cmajor::symbols::PointerValue::PointerValue(const Span& span_, const boost::uuids::uuid& moduleId_, TypeSymbol * type_, const void * ptr_)

Definition at line 3856 of Value.cpp :
3856 : Value(span_moduleId_ValueType::pointerValue)type(type_)ptr(ptr_)
3857 {
3858 }



Member Function Details

Add Member Function

Value * cmajor::symbols::PointerValue::Add(int64_t offset) const

Definition at line 3927 of Value.cpp
Declaration at line 401 of Value.hpp

Calls: cmajor::symbols::PointerValue::PointeeType , cmajor::symbols::TypeSymbol::GetValueType , cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId


As Member Function

Value * cmajor::symbols::PointerValue::As(TypeSymbol * targetType, bool cast, const Span& span, const boost::uuids::uuid& moduleId, bool dontThrow) const

Definition at line 3881 of Value.cpp

Calls: cmajor::symbols::TypeSymbol::GetValueType , cmajor::symbols::Value::GetValueType


ClassName Member Function

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

Definition at line 405 of Value.hpp :
405 { return "PointerValue"; }

Base class overridden functions: cmajor::symbols::Value::ClassName


Clone Member Function

Value * cmajor::symbols::PointerValue::Clone() const override

Definition at line 392 of Value.hpp :
392 { return new PointerValue(GetSpan()ModuleId()typeptr); }

Base class overridden functions: cmajor::symbols::Value::Clone

Calls: cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId


Deref Member Function

Value * cmajor::symbols::PointerValue::Deref() const

Definition at line 3998 of Value.cpp
Declaration at line 404 of Value.hpp

Calls: cmajor::symbols::PointerValue::PointeeType , cmajor::symbols::TypeSymbol::GetValueType , cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId


GetType Member Function

TypeSymbol * cmajor::symbols::PointerValue::GetType(SymbolTable * symbolTable) override

Definition at line 3917 of Value.cpp :
3918 {
3919     return type;
3920 }


Declaration at line 397 of Value.hpp

Base class overridden functions: cmajor::symbols::Value::GetType


GetValue Member Function

const void * cmajor::symbols::PointerValue::GetValue() const

Definition at line 400 of Value.hpp :
400 { return ptr; }


IrValue Member Function

void * cmajor::symbols::PointerValue::IrValue(Emitter& emitter)

Definition at line 3860 of Value.cpp :
3861 {
3862     if (ptr)
3863     {
3864         throw std::runtime_error("IrValue for non-null pointers not supported");
3865     }
3866     else
3867     {
3868         return emitter.CreateDefaultIrValueForPtrType(type->IrType(emitter));
3869     }
3870 }


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


PointeeType Member Function

TypeSymbol * cmajor::symbols::PointerValue::PointeeType() const

Definition at line 3922 of Value.cpp :
3923 {
3924     return type->RemovePointer(GetSpan()ModuleId());
3925 }


Declaration at line 399 of Value.hpp

Calls: cmajor::symbols::TypeSymbol::RemovePointer , cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId

Called by: cmajor::symbols::PointerValue::Add , cmajor::symbols::PointerValue::Deref , cmajor::symbols::PointerValue::Sub , cmajor::symbols::PointerValue::Sub


Read Member Function

void cmajor::symbols::PointerValue::Read(BinaryReader& reader) override

Definition at line 3876 of Value.cpp :
3877 {
3878     ptr = nullptr;
3879 }


Declaration at line 395 of Value.hpp

Base class overridden functions: cmajor::symbols::Value::Read


SetType Member Function

void cmajor::symbols::PointerValue::SetType(TypeSymbol * type_) override

Definition at line 398 of Value.hpp :
398 { type = type_; }

Base class overridden functions: cmajor::symbols::Value::SetType


Sub Member Function

Value * cmajor::symbols::PointerValue::Sub(const void * thatPtr) const

Definition at line 3975 of Value.cpp
Declaration at line 403 of Value.hpp

Calls: cmajor::symbols::PointerValue::PointeeType , cmajor::symbols::TypeSymbol::GetValueType , cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId


Sub Member Function

Value * cmajor::symbols::PointerValue::Sub(int64_t offset) const

Definition at line 3951 of Value.cpp
Declaration at line 402 of Value.hpp

Calls: cmajor::symbols::PointerValue::PointeeType , cmajor::symbols::TypeSymbol::GetValueType , cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId


Write Member Function

void cmajor::symbols::PointerValue::Write(BinaryWriter& writer) override

Definition at line 3872 of Value.cpp :
3873 {
3874 }


Declaration at line 394 of Value.hpp

Base class overridden functions: cmajor::symbols::Value::Write


top | up | prev | next