top | up | prev | next

UStringValue Abstract Class

Definition at line 353 of Value.hpp

Constructors

UStringValue(const Span& span_, const boost::uuids::uuid& moduleId_, int stringId_, const std::u32string& str_)

Member Functions

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
TypeSymbol* GetType(SymbolTable* symbolTable) override
void* IrValue(Emitter& emitter)
void Read(BinaryReader& reader) override
const std::u32string& Str() const
int StringId() const
void Write(BinaryWriter& writer) override

Member Variables

std::u32string str
int stringId

Constructor Details

UStringValue Constructor

cmajor::symbols::UStringValue::UStringValue(const Span& span_, const boost::uuids::uuid& moduleId_, int stringId_, const std::u32string& str_)

Definition at line 3745 of Value.cpp :
3745 : Value(span_moduleId_ValueType::ustringValue)stringId(stringId_)str(str_)
3746 {
3747 }



Member Function Details

As Member Function

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

Definition at line 3767 of Value.cpp

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


ClassName Member Function

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

Definition at line 365 of Value.hpp :
365 { return "UStringValue"; }

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


Clone Member Function

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

Definition at line 357 of Value.hpp :
357 { return new UStringValue(GetSpan()ModuleId()stringIdstr); }

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

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


GetType Member Function

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

Definition at line 3789 of Value.cpp :
3790 {
3791     return symbolTable->GetTypeByName(U"uchar")->AddConst(GetSpan()ModuleId())->AddPointer(GetSpan()ModuleId());
3792 }


Declaration at line 362 of Value.hpp

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

Calls: cmajor::symbols::SymbolTable::GetTypeByName , cmajor::symbols::TypeSymbol::AddConst , cmajor::symbols::TypeSymbol::AddPointer , cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId


IrValue Member Function

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

Definition at line 3749 of Value.cpp :
3750 {
3751     if (stringId == -1)
3752     {
3753         stringId = emitter.Install(str);
3754     }
3755     void* ustringConstant = emitter.GetGlobalUStringConstant(stringId);
3756     return emitter.CreateIrValueForUString(ustringConstant);
3757 }



Read Member Function

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

Definition at line 3763 of Value.cpp :
3764 {
3765 }


Declaration at line 360 of Value.hpp

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


Str Member Function

const std::u32string& cmajor::symbols::UStringValue::Str() const

Definition at line 364 of Value.hpp :
364 { return str; }

Called by: cmajor::symbols::StringLengthFunction::ConstructValue


StringId Member Function

int cmajor::symbols::UStringValue::StringId() const

Definition at line 363 of Value.hpp :
363 { return stringId; }


Write Member Function

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

Definition at line 3759 of Value.cpp :
3760 {
3761 }


Declaration at line 359 of Value.hpp

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


top | up | prev | next