Yume
Public Member Functions | List of all members
yume::ty::Int Class Referencefinal

A built-in integral type, such as I32 or Bool. More...

#include <type.hpp>

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

Public Member Functions

 Int (string name, int size, bool is_signed)
 
auto size () const -> int
 
auto is_signed () const -> bool
 
auto name () const -> string override
 
auto in_range (int64_t num) const -> bool
 
- 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 built-in integral type, such as I32 or Bool.

Definition at line 35 of file type.hpp.

Constructor & Destructor Documentation

◆ Int()

yume::ty::Int::Int ( string  name,
int  size,
bool  is_signed 
)
inline

Definition at line 40 of file type.hpp.

Member Function Documentation

◆ in_range()

auto yume::ty::Int::in_range ( int64_t  num) const -> bool

Definition at line 536 of file type.cpp.

References yume::ty::detail::minmax_for_bits().

Referenced by yume::semantic::literal_cast().

◆ is_signed()

auto yume::ty::Int::is_signed ( ) const -> bool
inline

Definition at line 42 of file type.hpp.

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

◆ name()

auto yume::ty::Int::name ( ) const -> string
inlineoverridevirtual

Implements yume::ty::BaseType.

Definition at line 43 of file type.hpp.

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

◆ size()

auto yume::ty::Int::size ( ) const -> int
inline

Definition at line 41 of file type.hpp.


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