top | up | prev | next

BoundFunctionCall Class

Definition at line 267 of BoundExpression.hpp

Constructors

BoundFunctionCall(const BoundFunctionCall&) delete
BoundFunctionCall(const Span& span_, const boost::uuids::uuid& moduleId_, FunctionSymbol* functionSymbol_)

Member Functions

void Accept(BoundNodeVisitor& visitor) override
void AddArgument(std::unique_ptr<BoundExpression>&& argument)
void AddTemporary(std::unique_ptr<BoundLocalVariable>&& temporary)
const std::vector<std::unique_ptr<BoundExpression>>& Arguments() const
BoundExpression* Clone() override
bool ContainsExceptionCapture() const override
const FunctionSymbol* GetFunctionSymbol() const
FunctionSymbol* GetFunctionSymbol()
bool HasValue() const override
bool IsLvalueExpression() const override
void Load(Emitter& emitter, OperationFlags flags) override
std::vector<std::unique_ptr<GenObject>> ReleaseTemporaries()
void SetArguments(std::vector<std::unique_ptr<BoundExpression>>&& arguments_)
void Store(Emitter& emitter, OperationFlags flags) override
std::string TypeString() const override
BoundFunctionCall& operator=(const BoundFunctionCall&) delete

Member Variables

std::vector<std::unique_ptr<BoundExpression>> arguments
FunctionSymbol* functionSymbol
std::vector<std::unique_ptr<BoundLocalVariable>> temporaries

Constructor Details

BoundFunctionCall Constructor

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

Definition at line 271 of BoundExpression.hpp


BoundFunctionCall Constructor

cmajor::binder::BoundFunctionCall::BoundFunctionCall(const Span& span_, const boost::uuids::uuid& moduleId_, FunctionSymbol* functionSymbol_)

Definition at line 786 of BoundExpression.cpp :
 786 :
 787 BoundExpression(span_moduleId_BoundNodeType::boundFunctionCallfunctionSymbol_->ReturnType())functionSymbol(functionSymbol_)
 788 {
 789 }



Member Function Details

Accept Member Function

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

Definition at line 970 of BoundExpression.cpp :
 971 {
 972     visitor.Visit(*this);
 973 }


Declaration at line 276 of BoundExpression.hpp

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

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


AddArgument Member Function

void cmajor::binder::BoundFunctionCall::AddArgument(std::unique_ptr<BoundExpression >&& argument)

Definition at line 805 of BoundExpression.cpp :
 806 {
 807     argument->MoveTemporaryDestructorCallsTo(*this);
 808     arguments.push_back(std::move(argument));
 809 }


Declaration at line 282 of BoundExpression.hpp

Calls: cmajor::binder::BoundExpression::MoveTemporaryDestructorCallsTo

Called by: cmajor::binder::BoundFunctionCall::Clone , cmajor::binder::ExpressionBinder::BindArrow , cmajor::binder::ExpressionBinder::Visit , cmajor::binder::StatementBinder::Visit


AddTemporary Member Function

void cmajor::binder::BoundFunctionCall::AddTemporary(std::unique_ptr<BoundLocalVariable >&& temporary)

Definition at line 816 of BoundExpression.cpp :
 817 {
 818     temporaries.push_back(std::move(temporary));
 819 }


Declaration at line 285 of BoundExpression.hpp

Called by: cmajor::binder::BoundFunctionCall::Clone


Arguments Member Function

const std::vector<std::unique_ptr<BoundExpression >>& cmajor::binder::BoundFunctionCall::Arguments() const

Definition at line 284 of BoundExpression.hpp :
284 { return arguments; }

Called by: cmajor::binder::ExpressionBinder::BindArrow , cmajor::binder::ExpressionBinder::Visit


Clone Member Function

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

Definition at line 791 of BoundExpression.cpp
Declaration at line 273 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundFunctionCall::AddArgument , cmajor::binder::BoundFunctionCall::AddTemporary , cmajor::binder::BoundFunctionCall::Clone , cmajor::binder::BoundNode::GetSpan , cmajor::binder::BoundNode::ModuleId

Called by: cmajor::binder::BoundFunctionCall::Clone


ContainsExceptionCapture Member Function

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

Definition at line 821 of BoundExpression.cpp
Declaration at line 286 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundExpression::ContainsExceptionCapture , cmajor::binder::BoundFunctionCall::ContainsExceptionCapture

Called by: cmajor::binder::BoundFunctionCall::ContainsExceptionCapture


GetFunctionSymbol Member Function

const FunctionSymbol * cmajor::binder::BoundFunctionCall::GetFunctionSymbol() const

Definition at line 280 of BoundExpression.hpp :
280 { return functionSymbol; }


GetFunctionSymbol Member Function

FunctionSymbol * cmajor::binder::BoundFunctionCall::GetFunctionSymbol()

Definition at line 281 of BoundExpression.hpp :
281 { return functionSymbol; }


HasValue Member Function

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

Definition at line 975 of BoundExpression.cpp :
 976 {
 977     return functionSymbol->ReturnType() && functionSymbol->ReturnType()->GetSymbolType() != SymbolType::voidTypeSymbol;
 978 }


Declaration at line 277 of BoundExpression.hpp

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

Calls: cmajor::symbols::FunctionSymbol::ReturnType , cmajor::symbols::Symbol::GetSymbolType


IsLvalueExpression Member Function

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

Definition at line 980 of BoundExpression.cpp :
 981 {
 982     if (functionSymbol->IsArrayElementAccess()) return true;
 983     TypeSymbol* returnType = functionSymbol->ReturnType();
 984     if (returnType && returnType->GetSymbolType() != SymbolType::voidTypeSymbol)
 985     {
 986         return !returnType->IsConstType() && returnType->IsLvalueReferenceType();
 987     }
 988     return false;
 989 }


Declaration at line 279 of BoundExpression.hpp

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

Calls: cmajor::symbols::FunctionSymbol::IsArrayElementAccess , cmajor::symbols::FunctionSymbol::ReturnType


Load Member Function

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

Definition at line 847 of BoundExpression.cpp
Declaration at line 274 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundExpression::DestroyTemporaries , cmajor::binder::BoundExpression::GetFlag , cmajor::binder::BoundExpression::GetType , cmajor::binder::BoundExpression::GetType , cmajor::binder::BoundNode::GetSpan , cmajor::binder::BoundNode::ModuleId , cmajor::ir::Emitter::CreateLoad , cmajor::ir::Emitter::SetLineNumber , cmajor::ir::Emitter::Stack , cmajor::ir::GenObject::SetType , cmajor::ir::ValueStack::Pop , cmajor::ir::ValueStack::Push , cmajor::symbols::FunctionSymbol::DontThrow , cmajor::symbols::FunctionSymbol::GenerateCall , cmajor::symbols::FunctionSymbol::IsArrayElementAccess , cmajor::symbols::Symbol::GetSymbolType , cmajor::symbols::Symbol::Parent

Called by: cmajor::binder::BoundMemberVariable::Load , cmajor::binder::BoundMemberVariable::Store


ReleaseTemporaries Member Function

std::vector<std::unique_ptr<GenObject >> cmajor::binder::BoundFunctionCall::ReleaseTemporaries()

Definition at line 837 of BoundExpression.cpp :
 838 {
 839     std::vector<std::std::unique_ptr<GenObject>>temps;
 840     for (std::std::unique_ptr<BoundLocalVariable>&temp : temporaries)
 841     {
 842         temps.push_back(std::move(temp));
 843     }
 844     return temps;
 845 }


Declaration at line 287 of BoundExpression.hpp


SetArguments Member Function

void cmajor::binder::BoundFunctionCall::SetArguments(std::vector<std::unique_ptr<BoundExpression >>&& arguments_)

Definition at line 811 of BoundExpression.cpp :
 812 {
 813     arguments = std::move(arguments_);
 814 }


Declaration at line 283 of BoundExpression.hpp


Store Member Function

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

Definition at line 914 of BoundExpression.cpp
Declaration at line 275 of BoundExpression.hpp

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

Calls: cmajor::binder::BoundExpression::DestroyTemporaries , cmajor::binder::BoundExpression::GetFlag , cmajor::binder::BoundExpression::GetType , cmajor::binder::BoundNode::GetSpan , cmajor::binder::BoundNode::ModuleId , cmajor::ir::Emitter::CreateLoad , cmajor::ir::Emitter::CreateStore , cmajor::ir::Emitter::SaveObjectPointer , cmajor::ir::Emitter::SetLineNumber , cmajor::ir::Emitter::Stack , cmajor::ir::GenObject::SetType , cmajor::ir::ValueStack::Pop , cmajor::symbols::FunctionSymbol::DontThrow , cmajor::symbols::FunctionSymbol::GenerateCall , cmajor::symbols::FunctionSymbol::IsArrayElementAccess


TypeString Member Function

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

Definition at line 278 of BoundExpression.hpp :
278 { return "function call"; }

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


operator= Member Function

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

Definition at line 272 of BoundExpression.hpp


top | up | prev | next