top | up | prev | next

BoundEnumConstant Class

Definition at line 137 of BoundExpression.hpp

Constructors

BoundEnumConstant(const Span& span_, const boost::uuids::uuid& moduleId_, EnumConstantSymbol* enumConstantSymbol_)

Member Functions

void Accept(BoundNodeVisitor& visitor) override
BoundExpression* Clone() override
EnumConstantSymbol* GetEnumConstantSymbol()
bool HasValue() const override
void Load(Emitter& emitter, OperationFlags flags) override
void Store(Emitter& emitter, OperationFlags flags) override
std::unique_ptr<Value> ToValue(BoundCompileUnit& boundCompileUnit) const override
std::string TypeString() const override

Member Variables

EnumConstantSymbol* enumConstantSymbol

Constructor Details

BoundEnumConstant Constructor

cmajor::binder::BoundEnumConstant::BoundEnumConstant(const Span& span_, const boost::uuids::uuid& moduleId_, EnumConstantSymbol* enumConstantSymbol_)

Definition at line 351 of BoundExpression.cpp :
 351 :
 352 BoundExpression(span_moduleId_BoundNodeType::boundEnumConstantenumConstantSymbol_->GetType())enumConstantSymbol(enumConstantSymbol_)
 353 {
 354 }



Member Function Details

Accept Member Function

void cmajor::binder::BoundEnumConstant::Accept(BoundNodeVisitor & visitor) override

Definition at line 384 of BoundExpression.cpp :
 385 {
 386     visitor.Visit(*this);
 387 }


Declaration at line 144 of BoundExpression.hpp

Base class overridden functions: cmajor::binder::BoundNode::Accept

Calls: cmajor::binder::BoundNodeVisitor::Visit


Clone Member Function

BoundExpression * cmajor::binder::BoundEnumConstant::Clone() override

Definition at line 356 of BoundExpression.cpp :
 357 {
 358     return new BoundEnumConstant(GetSpan()ModuleId()enumConstantSymbol);
 359 }


Declaration at line 141 of BoundExpression.hpp

Base class overridden functions: cmajor::binder::BoundExpression::Clone

Calls: cmajor::binder::BoundNode::GetSpan , cmajor::binder::BoundNode::ModuleId


GetEnumConstantSymbol Member Function

EnumConstantSymbol * cmajor::binder::BoundEnumConstant::GetEnumConstantSymbol()

Definition at line 148 of BoundExpression.hpp :
148 { return enumConstantSymbol; }


HasValue Member Function

bool cmajor::binder::BoundEnumConstant::HasValue() const override

Definition at line 145 of BoundExpression.hpp :
145 { return true; }

Base class overridden functions: cmajor::binder::BoundExpression::HasValue


Load Member Function

void cmajor::binder::BoundEnumConstant::Load(Emitter & emitter, OperationFlags flags) override

Definition at line 361 of BoundExpression.cpp
Declaration at line 142 of BoundExpression.hpp

Base class overridden functions: cmajor::ir::GenObject::Load

Calls: cmajor::binder::BoundExpression::DestroyTemporaries , cmajor::binder::BoundNode::GetSpan , cmajor::binder::BoundNode::ModuleId , cmajor::ir::Emitter::SetCurrentDebugLocation , cmajor::ir::Emitter::Stack , cmajor::ir::ValueStack::Push , cmajor::symbols::EnumConstantSymbol::GetValue , cmajor::symbols::Value::IrValue


Store Member Function

void cmajor::binder::BoundEnumConstant::Store(Emitter & emitter, OperationFlags flags) override

Definition at line 379 of BoundExpression.cpp :
 380 {
 381     throw Exception("cannot store to an enumeration constant"GetSpan()ModuleId());
 382 }


Declaration at line 143 of BoundExpression.hpp

Base class overridden functions: cmajor::ir::GenObject::Store

Calls: cmajor::binder::BoundNode::GetSpan , cmajor::binder::BoundNode::ModuleId


ToValue Member Function

std::unique_ptr<Value > cmajor::binder::BoundEnumConstant::ToValue(BoundCompileUnit & boundCompileUnit) const override

Definition at line 147 of BoundExpression.hpp :
147 { return std::unique_ptr<Value>(enumConstantSymbol->GetValue()->Clone()); }

Base class overridden functions: cmajor::binder::BoundExpression::ToValue

Calls: cmajor::symbols::EnumConstantSymbol::GetValue , cmajor::symbols::Value::Clone


TypeString Member Function

std::string cmajor::binder::BoundEnumConstant::TypeString() const override

Definition at line 146 of BoundExpression.hpp :
146 { return "enumeration constant"; }

Base class overridden functions: cmajor::binder::BoundExpression::TypeString


top | up | prev | next