Yume
Public Member Functions | List of all members
yume::ty::Function Class Reference

A function pointer type. More...

#include <type.hpp>

Inheritance diagram for yume::ty::Function:
Inheritance graph
[legend]
Collaboration diagram for yume::ty::Function:
Collaboration graph
[legend]

Public Member Functions

 Function (string name, vector< Type > args, optional< Type > ret, vector< Type > closure, bool fn_ptr, bool c_varargs=false)
 
auto args () const -> const auto &
 
auto args () -> auto &
 
auto closure () const -> const auto &
 
auto closure () -> auto &
 
auto ret () const -> const auto &
 
auto is_fn_ptr () const
 
auto is_c_varargs () const
 
auto name () const -> string override
 
auto fn_memo () const -> auto *
 
auto closure_memo () const -> auto *
 
auto memo () const -> auto *
 
void fn_memo (Compiler &, llvm::FunctionType *memo) const
 
void closure_memo (Compiler &, llvm::StructType *memo) const
 
void memo (Compiler &, llvm::Type *memo) const
 
auto get_or_create_instantiation (Substitutions sub) const -> const Function &
 
- Public Member Functions inherited from yume::ty::BaseType
 BaseType (const BaseType &) noexcept=delete
 
 BaseType (BaseType &&) noexcept=delete
 
auto operator= (const BaseType &) noexcept -> BaseType &=delete
 
auto operator= (BaseType &&) noexcept -> BaseType &=delete
 
virtual ~BaseType ()=default
 
auto kind () const -> Kind
 
auto base_name () const -> string
 
virtual auto name () const -> string=0
 

Additional Inherited Members

- Protected Member Functions inherited from yume::ty::BaseType
 BaseType (Kind kind, string name)
 

Detailed Description

A function pointer type.

Definition at line 129 of file type.hpp.

Constructor & Destructor Documentation

◆ Function()

yume::ty::Function::Function ( string  name,
vector< Type args,
optional< Type ret,
vector< Type closure,
bool  fn_ptr,
bool  c_varargs = false 
)
inline

Definition at line 149 of file type.hpp.

Member Function Documentation

◆ args() [1/2]

auto yume::ty::Function::args ( ) -> auto&
inline

Definition at line 154 of file type.hpp.

◆ args() [2/2]

auto yume::ty::Function::args ( ) const -> const auto&
inline

Definition at line 153 of file type.hpp.

◆ closure() [1/2]

auto yume::ty::Function::closure ( ) -> auto&
inline

Definition at line 156 of file type.hpp.

◆ closure() [2/2]

auto yume::ty::Function::closure ( ) const -> const auto&
inline

Definition at line 155 of file type.hpp.

◆ closure_memo() [1/2]

auto yume::ty::Function::closure_memo ( ) const -> auto*
inline

Definition at line 163 of file type.hpp.

Referenced by yume::Compiler::declare().

◆ closure_memo() [2/2]

void yume::ty::Function::closure_memo ( Compiler ,
llvm::StructType *  memo 
) const
inline

Definition at line 167 of file type.hpp.

References memo().

◆ fn_memo() [1/2]

auto yume::ty::Function::fn_memo ( ) const -> auto*
inline

Definition at line 162 of file type.hpp.

Referenced by yume::Compiler::declare().

◆ fn_memo() [2/2]

void yume::ty::Function::fn_memo ( Compiler ,
llvm::FunctionType *  memo 
) const
inline

Definition at line 166 of file type.hpp.

References memo().

◆ get_or_create_instantiation()

auto yume::ty::Function::get_or_create_instantiation ( Substitutions  sub) const -> const Function&

Definition at line 339 of file type.cpp.

References get_or_create_instantiation(), and YUME_ASSERT.

Referenced by get_or_create_instantiation().

◆ is_c_varargs()

auto yume::ty::Function::is_c_varargs ( ) const
inline

Definition at line 159 of file type.hpp.

◆ is_fn_ptr()

auto yume::ty::Function::is_fn_ptr ( ) const
inline

Definition at line 158 of file type.hpp.

◆ memo() [1/2]

auto yume::ty::Function::memo ( ) const -> auto*
inline

Definition at line 164 of file type.hpp.

Referenced by closure_memo(), and fn_memo().

◆ memo() [2/2]

void yume::ty::Function::memo ( Compiler ,
llvm::Type *  memo 
) const
inline

Definition at line 168 of file type.hpp.

References memo().

Referenced by memo().

◆ name()

auto yume::ty::Function::name ( ) const -> string
overridevirtual

Implements yume::ty::BaseType.

Definition at line 479 of file type.cpp.

References yume::ty::BaseType::base_name().

◆ ret()

auto yume::ty::Function::ret ( ) const -> const auto&
inline

Definition at line 157 of file type.hpp.


The documentation for this class was generated from the following files: