Yume
Classes | Public Member Functions | Public Attributes | List of all members
yume::TypeHolder Struct Reference

#include <type_holder.hpp>

Collaboration diagram for yume::TypeHolder:
Collaboration graph
[legend]

Classes

struct  IntTypePair
 

Public Member Functions

 TypeHolder ()
 
void declare_size_type (Compiler &)
 
constexpr auto int8 () -> IntTypePair
 
constexpr auto int16 () -> IntTypePair
 
constexpr auto int32 () -> IntTypePair
 
constexpr auto int64 () -> IntTypePair
 
auto find_or_create_fn_type (const vector< ty::Type > &args, optional< ty::Type > ret, const vector< ty::Type > &closure) -> ty::Function *
 
auto find_or_create_fn_ptr_type (const vector< ty::Type > &args, optional< ty::Type > ret, bool c_varargs=false) -> ty::Function *
 

Public Attributes

array< IntTypePair, 4 > int_types {}
 
ty::Intbool_type {}
 
IntTypePair size_type {}
 
ty::Nilnil_type {}
 
llvm::StringMap< unique_ptr< ty::BaseType > > known {}
 
std::vector< unique_ptr< ty::Function > > fn_types {}
 

Detailed Description

Definition at line 11 of file type_holder.hpp.

Constructor & Destructor Documentation

◆ TypeHolder()

yume::TypeHolder::TypeHolder ( )

Definition at line 11 of file type_holder.cpp.

References bool_type, int_types, known, and nil_type.

Member Function Documentation

◆ declare_size_type()

void yume::TypeHolder::declare_size_type ( Compiler compiler)

◆ find_or_create_fn_ptr_type()

auto yume::TypeHolder::find_or_create_fn_ptr_type ( const vector< ty::Type > &  args,
optional< ty::Type ret,
bool  c_varargs = false 
) -> ty::Function*

Definition at line 53 of file type_holder.cpp.

Referenced by yume::semantic::TypeWalker::statement().

◆ find_or_create_fn_type()

auto yume::TypeHolder::find_or_create_fn_type ( const vector< ty::Type > &  args,
optional< ty::Type ret,
const vector< ty::Type > &  closure 
) -> ty::Function*

Definition at line 43 of file type_holder.cpp.

Referenced by yume::semantic::TypeWalker::expression().

◆ int16()

constexpr auto yume::TypeHolder::int16 ( ) -> IntTypePair
inlineconstexpr

Definition at line 29 of file type_holder.hpp.

References int_types.

◆ int32()

constexpr auto yume::TypeHolder::int32 ( ) -> IntTypePair
inlineconstexpr

Definition at line 30 of file type_holder.hpp.

References int_types.

Referenced by yume::semantic::TypeWalker::expression().

◆ int64()

constexpr auto yume::TypeHolder::int64 ( ) -> IntTypePair
inlineconstexpr

Definition at line 31 of file type_holder.hpp.

References int_types.

Referenced by yume::semantic::TypeWalker::expression().

◆ int8()

constexpr auto yume::TypeHolder::int8 ( ) -> IntTypePair
inlineconstexpr

Definition at line 28 of file type_holder.hpp.

References int_types.

Referenced by yume::semantic::TypeWalker::expression().

Member Data Documentation

◆ bool_type

ty::Int* yume::TypeHolder::bool_type {}

Definition at line 18 of file type_holder.hpp.

Referenced by yume::semantic::TypeWalker::expression(), and TypeHolder().

◆ fn_types

std::vector<unique_ptr<ty::Function> > yume::TypeHolder::fn_types {}

Definition at line 22 of file type_holder.hpp.

◆ int_types

array<IntTypePair, 4> yume::TypeHolder::int_types {}

Definition at line 17 of file type_holder.hpp.

Referenced by int16(), int32(), int64(), int8(), and TypeHolder().

◆ known

llvm::StringMap<unique_ptr<ty::BaseType> > yume::TypeHolder::known {}

Definition at line 21 of file type_holder.hpp.

Referenced by declare_size_type(), and TypeHolder().

◆ nil_type

ty::Nil* yume::TypeHolder::nil_type {}

Definition at line 20 of file type_holder.hpp.

Referenced by TypeHolder().

◆ size_type

IntTypePair yume::TypeHolder::size_type {}

Definition at line 19 of file type_holder.hpp.

Referenced by declare_size_type().


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