top | up | prev | next

BoundBitCast Class

Definition at line 484 of BoundExpression.hpp

Constructors

BoundBitCast(std::unique_ptr<BoundExpression>&& expr_, TypeSymbol* type_)

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
void Store(Emitter& emitter, OperationFlags flags) override

Member Variables

std::unique_ptr<BoundExpression> expr

Constructor Details

BoundBitCast Constructor

cmajor::binder::BoundBitCast::BoundBitCast(std::unique_ptr<BoundExpression >&& expr_, TypeSymbol* type_)

Definition at line 1806 of BoundExpression.cpp :
1806 :
1807 BoundExpression(expr_->GetSpan()expr_->ModuleId()BoundNodeType::boundBitCasttype_)expr(std::move(expr_))
1808 {
1809     expr->MoveTemporaryDestructorCallsTo(*this);
1810 }



Member Function Details

Accept Member Function

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

Definition at line 1831 of BoundExpression.cpp :
1832 {
1833     visitor.Visit(*this);
1834 }


Declaration at line 491 of BoundExpression.hpp

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

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


Clone Member Function

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

Definition at line 1812 of BoundExpression.cpp :
1813 {
1814     return new BoundBitCast(std::unique_ptr<BoundExpression>(expr->Clone())GetType());
1815 }


Declaration at line 488 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundBitCast::Clone , cmajor::binder::BoundExpression::GetType

Called by: cmajor::binder::BoundBitCast::Clone


ContainsExceptionCapture Member Function

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

Definition at line 1836 of BoundExpression.cpp :
1837 {
1838     if (BoundExpression::ContainsExceptionCapture())
1839     {
1840         return true;
1841     }
1842     return expr->ContainsExceptionCapture();
1843 }


Declaration at line 493 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundBitCast::ContainsExceptionCapture , cmajor::binder::BoundExpression::ContainsExceptionCapture

Called by: cmajor::binder::BoundBitCast::ContainsExceptionCapture


Expr Member Function

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

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


HasValue Member Function

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

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

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


Load Member Function

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

Definition at line 1817 of BoundExpression.cpp :
1818 {
1819     expr->Load(emitterOperationFlags::none);
1820     void* value = emitter.Stack().Pop();
1821     void* casted = emitter.CreateBitCast(valueGetType()->IrType(emitter));
1822     emitter.Stack().Push(casted);
1823     DestroyTemporaries(emitter);
1824 }


Declaration at line 489 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundBitCast::Load , cmajor::binder::BoundExpression::DestroyTemporaries , cmajor::binder::BoundExpression::GetType , cmajor::ir::Emitter::CreateBitCast , cmajor::ir::Emitter::Stack , cmajor::ir::ValueStack::Pop , cmajor::ir::ValueStack::Push , cmajor::symbols::TypeSymbol::IrType

Called by: cmajor::binder::BoundBitCast::Load


Store Member Function

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

Definition at line 1826 of BoundExpression.cpp :
1827 {
1828     throw Exception("cannot store to bit cast"GetSpan()ModuleId());
1829 }


Declaration at line 490 of BoundExpression.hpp

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

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


top | up | prev | next