top | up | prev | next

BoundTemporary Class

Definition at line 186 of BoundExpression.hpp

Constructors

BoundTemporary(std::unique_ptr<BoundExpression>&& rvalueExpr_, std::unique_ptr<BoundLocalVariable>&& backingStore_)

Member Functions

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

Member Variables

std::unique_ptr<BoundLocalVariable> backingStore
std::unique_ptr<BoundExpression> rvalueExpr

Constructor Details

BoundTemporary Constructor

cmajor::binder::BoundTemporary::BoundTemporary(std::unique_ptr<BoundExpression >&& rvalueExpr_, std::unique_ptr<BoundLocalVariable >&& backingStore_)

Definition at line 503 of BoundExpression.cpp :
 503 :
 504 BoundExpression(rvalueExpr_->GetSpan()rvalueExpr_->ModuleId()BoundNodeType::boundTemporaryrvalueExpr_->GetType())rvalueExpr(std::move(rvalueExpr_))backingStore(std::move(backingStore_))
 505 {
 506     rvalueExpr->MoveTemporaryDestructorCallsTo(*this);
 507     if (backingStore)
 508     {
 509         backingStore->MoveTemporaryDestructorCallsTo(*this);
 510     }
 511 }


Declaration at line 189 of BoundExpression.hpp


Member Function Details

Accept Member Function

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

Definition at line 553 of BoundExpression.cpp :
 554 {
 555     visitor.Visit(*this);
 556 }


Declaration at line 193 of BoundExpression.hpp

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

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


BackingStore Member Function

BoundLocalVariable * cmajor::binder::BoundTemporary::BackingStore()

Definition at line 200 of BoundExpression.hpp :
200 { return backingStore.get(); }


Clone Member Function

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

Definition at line 513 of BoundExpression.cpp :
 514 {
 515     std::unique_ptr<BoundExpression> clonedRvalueExpr;
 516     clonedRvalueExpr.reset(rvalueExpr->Clone());
 517     std::unique_ptr<BoundLocalVariable> clonedBackingStore;
 518     if (backingStore)
 519     {
 520         clonedBackingStore.reset(static_cast<BoundLocalVariable*>(backingStore->Clone()));
 521     }
 522     return new BoundTemporary(std::move(clonedRvalueExpr)std::move(clonedBackingStore));
 523 }


Declaration at line 190 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundTemporary::Clone

Called by: cmajor::binder::BoundTemporary::Clone


ContainsExceptionCapture Member Function

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

Definition at line 563 of BoundExpression.cpp
Declaration at line 198 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundExpression::ContainsExceptionCapture , cmajor::binder::BoundTemporary::ContainsExceptionCapture

Called by: cmajor::binder::BoundTemporary::ContainsExceptionCapture


HasValue Member Function

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

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

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


IsLvalueExpression Member Function

bool cmajor::binder::BoundTemporary::IsLvalueExpression() const override

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

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


Load Member Function

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

Definition at line 525 of BoundExpression.cpp
Declaration at line 191 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::binder::BoundTemporary::Load , cmajor::binder::BoundTemporary::Store

Called by: cmajor::binder::BoundTemporary::Load


RvalueExpr Member Function

BoundExpression * cmajor::binder::BoundTemporary::RvalueExpr()

Definition at line 199 of BoundExpression.hpp :
199 { return rvalueExpr.get(); }


Store Member Function

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

Definition at line 548 of BoundExpression.cpp :
 549 {
 550     throw Exception("cannot store to a temporary"GetSpan()ModuleId());
 551 }


Declaration at line 192 of BoundExpression.hpp

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

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

Called by: cmajor::binder::BoundTemporary::Load


ToValue Member Function

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

Definition at line 558 of BoundExpression.cpp :
 559 {
 560     return rvalueExpr->ToValue(boundCompileUnit);
 561 }


Declaration at line 197 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundTemporary::ToValue

Called by: cmajor::binder::BoundTemporary::ToValue


TypeString Member Function

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

Definition at line 196 of BoundExpression.hpp :
196 { return "temporary"; }

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


top | up | prev | next