top | up | prev | next

BoundAsExpression Class

Definition at line 431 of BoundExpression.hpp

Constructors

BoundAsExpression(std::unique_ptr<BoundExpression>&& expr_, ClassTypeSymbol* rightClassType_, std::unique_ptr<BoundLocalVariable>&& variable_, std::unique_ptr<BoundLocalVariable>&& leftClassIdVar_, std::unique_ptr<BoundLocalVariable>&& rightClassIdVar_)

Member Functions

void Accept(BoundNodeVisitor& visitor) override
BoundExpression* Clone() override
bool ContainsExceptionCapture() const override
BoundExpression* Expr()
bool HasValue() const override
void Load(Emitter& emitter, OperationFlags flags) override
ClassTypeSymbol* RightClassType()
void Store(Emitter& emitter, OperationFlags flags) override
std::string TypeString() const override
BoundLocalVariable* Variable()

Member Variables

std::unique_ptr<BoundExpression> expr
std::unique_ptr<BoundLocalVariable> leftClassIdVar
std::unique_ptr<BoundLocalVariable> rightClassIdVar
ClassTypeSymbol* rightClassType
std::unique_ptr<BoundLocalVariable> variable

Constructor Details

BoundAsExpression Constructor

cmajor::binder::BoundAsExpression::BoundAsExpression(std::unique_ptr<BoundExpression >&& expr_, ClassTypeSymbol* rightClassType_, std::unique_ptr<BoundLocalVariable >&& variable_, std::unique_ptr<BoundLocalVariable >&& leftClassIdVar_, std::unique_ptr<BoundLocalVariable >&& rightClassIdVar_)

Definition at line 1575 of BoundExpression.cpp :
1576 :
1577 BoundExpression(expr_->GetSpan()expr_->ModuleId()BoundNodeType::boundAsExpressionrightClassType_->AddPointer(expr_->GetSpan()expr_->ModuleId()))
1578 expr(std::move(expr_))rightClassType(rightClassType_)variable(std::move(variable_))
1579 leftClassIdVar(std::move(leftClassIdVar_))rightClassIdVar(std::move(rightClassIdVar_))
1580 {
1581 }



Member Function Details

Accept Member Function

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

Definition at line 1687 of BoundExpression.cpp :
1688 {
1689     visitor.Visit(*this);
1690 }


Declaration at line 439 of BoundExpression.hpp

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

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


Clone Member Function

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

Definition at line 1583 of BoundExpression.cpp :
1584 {
1585     std::unique_ptr<BoundExpression> clonedExpr;
1586     clonedExpr.reset(expr->Clone());
1587     std::unique_ptr<BoundLocalVariable> clonedVariable;
1588     clonedVariable.reset(static_cast<BoundLocalVariable*>(variable->Clone()));
1589     return new BoundAsExpression(std::move(clonedExpr)rightClassTypestd::move(clonedVariable)
1590         std::unique_ptr<BoundLocalVariable>(static_cast<BoundLocalVariable*>(leftClassIdVar->Clone()))
1591         std::unique_ptr<BoundLocalVariable>(static_cast<BoundLocalVariable*>(rightClassIdVar->Clone())));
1592 }


Declaration at line 436 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundAsExpression::Clone

Called by: cmajor::binder::BoundAsExpression::Clone


ContainsExceptionCapture Member Function

bool cmajor::binder::BoundAsExpression::ContainsExceptionCapture() const override

Definition at line 1692 of BoundExpression.cpp :
1693 {
1694     if (BoundExpression::ContainsExceptionCapture())
1695     {
1696         return true;
1697     }
1698     return expr->ContainsExceptionCapture();
1699 }


Declaration at line 442 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundAsExpression::ContainsExceptionCapture , cmajor::binder::BoundExpression::ContainsExceptionCapture

Called by: cmajor::binder::BoundAsExpression::ContainsExceptionCapture


Expr Member Function

BoundExpression * cmajor::binder::BoundAsExpression::Expr()

Definition at line 443 of BoundExpression.hpp :
443 { return expr.get(); }


HasValue Member Function

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

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

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


Load Member Function

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

Definition at line 1594 of BoundExpression.cpp
Declaration at line 437 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundAsExpression::Load , cmajor::binder::BoundAsExpression::Store , cmajor::binder::BoundExpression::DestroyTemporaries , cmajor::binder::BoundExpression::GetType , cmajor::binder::BoundNode::GetSpan , cmajor::binder::BoundNode::ModuleId , cmajor::ir::Emitter::CreateBasicBlock , cmajor::ir::Emitter::CreateBitCast , cmajor::ir::Emitter::CreateBr , cmajor::ir::Emitter::CreateCall , cmajor::ir::Emitter::CreateCondBr , cmajor::ir::Emitter::CreateDefaultIrValueForPtrType , cmajor::ir::Emitter::CreateDefaultIrValueForULong , cmajor::ir::Emitter::CreateICmpEQ , cmajor::ir::Emitter::CreateLoad , cmajor::ir::Emitter::CreatePtrToInt , cmajor::ir::Emitter::CreateURem , cmajor::ir::Emitter::GetClassIdPtr , cmajor::ir::Emitter::GetIrTypeForBool , cmajor::ir::Emitter::GetIrTypeForFunction , cmajor::ir::Emitter::GetIrTypeForULong , cmajor::ir::Emitter::GetIrTypeForVoidPtrType , cmajor::ir::Emitter::GetOrInsertFunction , cmajor::ir::Emitter::GetVmtPtr , cmajor::ir::Emitter::SetCurrentBasicBlock , cmajor::ir::Emitter::Stack , cmajor::ir::ValueStack::Pop , cmajor::ir::ValueStack::Push , cmajor::symbols::ClassTypeSymbol::VmtObject , cmajor::symbols::TypeSymbol::AddPointer , cmajor::symbols::TypeSymbol::IrType

Called by: cmajor::binder::BoundAsExpression::Load


RightClassType Member Function

ClassTypeSymbol * cmajor::binder::BoundAsExpression::RightClassType()

Definition at line 445 of BoundExpression.hpp :
445 { return rightClassType; }


Store Member Function

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

Definition at line 1682 of BoundExpression.cpp :
1683 {
1684     throw Exception("cannot store to an 'as' expression"GetSpan()ModuleId());
1685 }


Declaration at line 438 of BoundExpression.hpp

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

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

Called by: cmajor::binder::BoundAsExpression::Load


TypeString Member Function

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

Definition at line 441 of BoundExpression.hpp :
441 { return "as expression"; }

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


Variable Member Function

BoundLocalVariable * cmajor::binder::BoundAsExpression::Variable()

Definition at line 444 of BoundExpression.hpp :
444 { return variable.get(); }


top | up | prev | next