top | up | prev | next

BoundStatement Abstract Class

Definition at line 42 of BoundStatement.hpp

Constructors

BoundStatement(const BoundStatement&) delete
BoundStatement(const Span& span_, const boost::uuids::uuid& moduleId_, BoundNodeType boundNodeType_)

Member Functions

BoundCompoundStatement* Block()
bool Generated() const
bool GetFlag(BoundStatementFlags flag) const
bool IgnoreNode() const
bool IsAssertNode() const
bool IsForLoopStatementNode() const
bool IsOrContainsBoundReturnStatement() const virtual
const std::u32string& Label() const
void Load(Emitter& emitter, OperationFlags flags) override
BoundStatement* Parent()
bool Postfix() const
void SetAssertNode()
void SetFlag(BoundStatementFlags flag)
void SetForLoopStatementNode() virtual
void SetGenerated()
void SetIgnoreNode()
void SetLabel(const std::u32string& label_)
void SetParent(BoundStatement* parent_)
void SetPostfix()
void Store(Emitter& emitter, OperationFlags flags) override
BoundStatement& operator=(const BoundStatement&) delete

Member Variables

BoundStatementFlags flags
std::u32string label
BoundStatement* parent

Constructor Details

BoundStatement Constructor

cmajor::binder::BoundStatement::BoundStatement(const BoundStatement &) delete

Definition at line 46 of BoundStatement.hpp


BoundStatement Constructor

cmajor::binder::BoundStatement::BoundStatement(const Span& span_, const boost::uuids::uuid& moduleId_, BoundNodeType boundNodeType_)

Definition at line 13 of BoundStatement.cpp :
 13 :
 14 BoundNode(span_moduleId_boundNodeType_)parent(nullptr)flags(BoundStatementFlags::none)
 15 {
 16 }


Declaration at line 45 of BoundStatement.hpp


Member Function Details

Block Member Function

BoundCompoundStatement * cmajor::binder::BoundStatement::Block()

Definition at line 18 of BoundStatement.cpp :
 19 {
 20     if (GetBoundNodeType() == BoundNodeType::boundCompoundStatement)
 21     {
 22         return static_cast<BoundCompoundStatement*>(this);
 23     }
 24     return parent->Block();
 25 }


Declaration at line 52 of BoundStatement.hpp

Calls: cmajor::binder::BoundNode::GetBoundNodeType , cmajor::binder::BoundStatement::Block

Called by: cmajor::binder::BoundStatement::Block , cmajor::binder::ControlFlowAnalyzer::ResolveGoto


Generated Member Function

bool cmajor::binder::BoundStatement::Generated() const

Definition at line 58 of BoundStatement.hpp :
 58 { return GetFlag(BoundStatementFlags::generated); }

Calls: cmajor::binder::BoundStatement::GetFlag


GetFlag Member Function

bool cmajor::binder::BoundStatement::GetFlag(BoundStatementFlags flag) const

Definition at line 70 of BoundStatement.hpp :
 70 { return (flags & flag) != BoundStatementFlags::none;  }

Called by: cmajor::binder::BoundStatement::Generated , cmajor::binder::BoundStatement::IgnoreNode , cmajor::binder::BoundStatement::IsAssertNode , cmajor::binder::BoundStatement::IsForLoopStatementNode , cmajor::binder::BoundStatement::Postfix


IgnoreNode Member Function

bool cmajor::binder::BoundStatement::IgnoreNode() const

Definition at line 62 of BoundStatement.hpp :
 62 { return GetFlag(BoundStatementFlags::ignoreNode); }

Calls: cmajor::binder::BoundStatement::GetFlag


IsAssertNode Member Function

bool cmajor::binder::BoundStatement::IsAssertNode() const

Definition at line 64 of BoundStatement.hpp :
 64 { return GetFlag(BoundStatementFlags::assertNode); }

Calls: cmajor::binder::BoundStatement::GetFlag


IsForLoopStatementNode Member Function

bool cmajor::binder::BoundStatement::IsForLoopStatementNode() const

Definition at line 59 of BoundStatement.hpp :
 59 { return GetFlag(BoundStatementFlags::forLoopStatementNode); }

Calls: cmajor::binder::BoundStatement::GetFlag


IsOrContainsBoundReturnStatement Member Function

bool cmajor::binder::BoundStatement::IsOrContainsBoundReturnStatement() const virtual

Definition at line 61 of BoundStatement.hpp :
 61 { return false; }

Derived class overrides: cmajor::binder::BoundReturnStatement::IsOrContainsBoundReturnStatement , cmajor::binder::BoundSequenceStatement::IsOrContainsBoundReturnStatement


Label Member Function

const std::u32string& cmajor::binder::BoundStatement::Label() const

Definition at line 54 of BoundStatement.hpp :
 54 { return label; }

Called by: cmajor::binder::ControlFlowAnalyzer::CollectLabel


Load Member Function

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

Definition at line 27 of BoundStatement.cpp :
 28 {
 29     throw Exception("cannot load from statement"GetSpan()ModuleId());
 30 }


Declaration at line 48 of BoundStatement.hpp

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

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


Parent Member Function

BoundStatement * cmajor::binder::BoundStatement::Parent()

Definition at line 50 of BoundStatement.hpp :
 50 { return parent; }

Called by: cmajor::binder::ControlFlowAnalyzer::ResolveGoto


Postfix Member Function

bool cmajor::binder::BoundStatement::Postfix() const

Definition at line 56 of BoundStatement.hpp :
 56 { return GetFlag(BoundStatementFlags::postfix); }

Calls: cmajor::binder::BoundStatement::GetFlag


SetAssertNode Member Function

void cmajor::binder::BoundStatement::SetAssertNode()

Definition at line 65 of BoundStatement.hpp :
 65 { SetFlag(BoundStatementFlags::assertNode); }

Calls: cmajor::binder::BoundStatement::SetFlag


SetFlag Member Function

void cmajor::binder::BoundStatement::SetFlag(BoundStatementFlags flag)

Definition at line 71 of BoundStatement.hpp :
 71 { flags = flags | flag; }

Called by: cmajor::binder::BoundStatement::SetAssertNode , cmajor::binder::BoundStatement::SetForLoopStatementNode , cmajor::binder::BoundStatement::SetGenerated , cmajor::binder::BoundStatement::SetIgnoreNode , cmajor::binder::BoundStatement::SetPostfix


SetForLoopStatementNode Member Function

void cmajor::binder::BoundStatement::SetForLoopStatementNode() virtual

Definition at line 60 of BoundStatement.hpp :
 60 { SetFlag(BoundStatementFlags::forLoopStatementNode); }

Derived class overrides: cmajor::binder::BoundSequenceStatement::SetForLoopStatementNode

Calls: cmajor::binder::BoundStatement::SetFlag

Called by: cmajor::binder::StatementBinder::Visit


SetGenerated Member Function

void cmajor::binder::BoundStatement::SetGenerated()

Definition at line 57 of BoundStatement.hpp :
 57 { SetFlag(BoundStatementFlags::generated); }

Calls: cmajor::binder::BoundStatement::SetFlag


SetIgnoreNode Member Function

void cmajor::binder::BoundStatement::SetIgnoreNode()

Definition at line 63 of BoundStatement.hpp :
 63 { SetFlag(BoundStatementFlags::ignoreNode); }

Calls: cmajor::binder::BoundStatement::SetFlag


SetLabel Member Function

void cmajor::binder::BoundStatement::SetLabel(const std::u32string& label_)

Definition at line 37 of BoundStatement.cpp :
 38 {
 39     label = label_;
 40 }


Declaration at line 53 of BoundStatement.hpp


SetParent Member Function

void cmajor::binder::BoundStatement::SetParent(BoundStatement * parent_)

Definition at line 51 of BoundStatement.hpp :
 51 { parent = parent_; }

Called by: cmajor::binder::BoundCaseStatement::AddStatement , cmajor::binder::BoundCatchStatement::SetCatchBlock , cmajor::binder::BoundCompoundStatement::AddStatement , cmajor::binder::BoundCompoundStatement::InsertStatementToFront , cmajor::binder::BoundDefaultStatement::AddStatement , cmajor::binder::BoundSwitchStatement::AddCaseStatement , cmajor::binder::BoundSwitchStatement::SetDefaultStatement , cmajor::binder::BoundTryStatement::AddCatch , cmajor::binder::BoundTryStatement::SetTryBlock


SetPostfix Member Function

void cmajor::binder::BoundStatement::SetPostfix()

Definition at line 55 of BoundStatement.hpp :
 55 { SetFlag(BoundStatementFlags::postfix); }

Calls: cmajor::binder::BoundStatement::SetFlag

Called by: cmajor::binder::StatementBinder::AddStatement


Store Member Function

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

Definition at line 32 of BoundStatement.cpp :
 33 {
 34     throw Exception("cannot store to statement"GetSpan()ModuleId());
 35 }


Declaration at line 49 of BoundStatement.hpp

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

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


operator= Member Function

BoundStatement & cmajor::binder::BoundStatement::operator=(const BoundStatement &) delete

Definition at line 47 of BoundStatement.hpp


top | up | prev | next