top | up | prev | next

ArrayLengthIntrinsicFunction Class

Definition at line 624 of Meta.cpp

Constructors

ArrayLengthIntrinsicFunction()

Member Functions

int Arity() const override
std::unique_ptr<Value> DoEvaluate(const std::vector<std::unique_ptr<Value>>& arguments, const std::vector<TypeSymbol*>& templateArguments, const Span& span, const boost::uuids::uuid& moduleId) override
const char* GroupName() const override
int NumberOfTypeParameters() const override
TypeSymbol* ReturnType(SymbolTable& symbolTable) const override

Constructor Details

ArrayLengthIntrinsicFunction Constructor

cmajor::symbols::ArrayLengthIntrinsicFunction::ArrayLengthIntrinsicFunction()

Definition at line 644 of Meta.cpp :
644 : IntrinsicFunction()
645 {
646 }


Declaration at line 627 of Meta.cpp


Member Function Details

Arity Member Function

int cmajor::symbols::ArrayLengthIntrinsicFunction::Arity() const override

Definition at line 628 of Meta.cpp :
628 { return 0; }

Base class overridden functions: cmajor::symbols::IntrinsicFunction::Arity


DoEvaluate Member Function

std::unique_ptr<Value > cmajor::symbols::ArrayLengthIntrinsicFunction::DoEvaluate(const std::vector<std::unique_ptr<Value >>& arguments, const std::vector<TypeSymbol *>& templateArguments, const Span& span, const boost::uuids::uuid& moduleId) override

Definition at line 632 of Meta.cpp :
633 {
634     TypeSymbol* type = templateArguments.front();
635     if (type->IsArrayType())
636     {
637         ArrayTypeSymbol* arrayType = static_cast<ArrayTypeSymbol*>(type);
638         return std::unique_ptr<Value>(new LongValue(spanmoduleIdarrayType->Size()));
639     }
640     return std::unique_ptr<Value>(new LongValue(spanmoduleId0));
641 }


Base class overridden functions: cmajor::symbols::IntrinsicFunction::DoEvaluate

Calls: cmajor::symbols::ArrayTypeSymbol::Size , cmajor::symbols::TypeSymbol::IsArrayType


GroupName Member Function

const char * cmajor::symbols::ArrayLengthIntrinsicFunction::GroupName() const override

Definition at line 631 of Meta.cpp :
631 { return "ArrayLength"; }

Base class overridden functions: cmajor::symbols::IntrinsicFunction::GroupName


NumberOfTypeParameters Member Function

int cmajor::symbols::ArrayLengthIntrinsicFunction::NumberOfTypeParameters() const override

Definition at line 629 of Meta.cpp :
629 { return 1; }

Base class overridden functions: cmajor::symbols::IntrinsicFunction::NumberOfTypeParameters


ReturnType Member Function

TypeSymbol * cmajor::symbols::ArrayLengthIntrinsicFunction::ReturnType(SymbolTable & symbolTable) const override

Definition at line 630 of Meta.cpp :
630 { return symbolTable.GetTypeByName(U"long"); }

Base class overridden functions: cmajor::symbols::IntrinsicFunction::ReturnType

Calls: cmajor::symbols::SymbolTable::GetTypeByName


top | up | prev | next