Thorin 1.9.0
The Higher ORder INtermediate representation
|
#include <optional>
#include <vector>
#include <fe/assert.h>
#include <fe/cast.h>
#include "thorin/config.h"
#include "thorin/util/dbg.h"
#include "thorin/util/hash.h"
#include "thorin/util/pool.h"
#include "thorin/util/print.h"
#include "thorin/util/util.h"
#include "thorin/util/vector.h"
Go to the source code of this file.
Classes | |
class | thorin::Ref |
Helper class to retrieve Infer::arg if present. More... | |
class | thorin::Use |
References a user. More... | |
struct | thorin::UseHash |
struct | thorin::UseEq |
class | thorin::Def |
Base class for all Defs. More... | |
struct | thorin::DefDefHash |
struct | thorin::DefDefEq |
class | thorin::Var |
class | thorin::Univ |
class | thorin::UMax |
class | thorin::UInc |
class | thorin::Type |
class | thorin::Lit |
class | thorin::Nat |
class | thorin::Idx |
A built-in constant of type .Nat -> * . More... | |
class | thorin::Proxy |
class | thorin::Global |
Namespaces | |
namespace | thorin |
namespace | thorin::Node |
Macros | |
#define | THORIN_NODE(m) |
#define | CODE(node, name) node, |
#define | CODE(node, name) +size_t(1) |
#define | THORIN_PROJ(NAME, CONST) |
Use as mixin to wrap all kind of Def::proj and Def::projs variants. | |
#define | THORIN_SETTERS_(T) |
Use as mixin to declare setters for Def::loc & Def::name using a covariant return type. | |
#define | THORIN_SETTERS(T) public: |
#define | THORIN_DEF_MIXIN(T) |
Typedefs | |
Def | |
GIDSet / GIDMap keyed by Def::gid of | |
template<class To > | |
using | thorin::DefMap = GIDMap< const Def *, To > |
using | thorin::DefSet = GIDSet< const Def * > |
using | thorin::Def2Def = DefMap< const Def * > |
using | thorin::Defs = View< const Def * > |
using | thorin::DefVec = Vector< const Def * > |
Def (Mutable) | |
GIDSet / GIDMap keyed by Def::gid of | |
template<class To > | |
using | thorin::MutMap = GIDMap< Def *, To > |
using | thorin::MutSet = GIDSet< Def * > |
using | thorin::Mut2Mut = MutMap< Def * > |
using | thorin::Muts = PooledSet< Def * > |
DefDef | |
using | thorin::DefDef = std::tuple< const Def *, const Def * > |
template<class To > | |
using | thorin::DefDefMap = absl::flat_hash_map< DefDef, To, DefDefHash, DefDefEq > |
using | thorin::DefDefSet = absl::flat_hash_set< DefDef, DefDefHash, DefDefEq > |
Enumerations | |
enum | : node_t { thorin::Node::Type , thorin::Node::Univ , thorin::Node::UMax , thorin::Node::UInc , thorin::Node::Pi , thorin::Node::Lam , thorin::Node::App , thorin::Node::Sigma , thorin::Node::Tuple , thorin::Node::Extract , thorin::Node::Insert , thorin::Node::Arr , thorin::Node::Pack , thorin::Node::Join , thorin::Node::Vel , thorin::Node::Test , thorin::Node::Top , thorin::Node::Meet , thorin::Node::Ac , thorin::Node::Pick , thorin::Node::Bot , thorin::Node::Proxy , thorin::Node::Axiom , thorin::Node::Lit , thorin::Node::Nat , thorin::Node::Idx , thorin::Node::Var , thorin::Node::Infer , thorin::Node::Global , thorin::Node::Singleton } |
Dep | |
enum class | thorin::Dep : unsigned { thorin::None = 0 , thorin::Axiom = 1 << 0 , thorin::Infer = 1 << 1 , thorin::Mut = 1 << 2 , thorin::Proxy = 1 << 3 , thorin::Var = 1 << 4 } |
Functions | |
std::ostream operator | |
std::ostream & | thorin::operator<< (std::ostream &os, const Def *def) |
This will stream def as an operand. | |
std::ostream & | thorin::operator<< (std::ostream &, Ref) |
Formatted Output | |
Provides a Use
| |
template<class T = std::logic_error, class... Args> | |
void | thorin::error (const Def *def, const char *fmt, Args &&... args) |
Variables | |
constexpr auto | thorin::Node::Num_Nodes = size_t(0) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) |
Var | |
GIDSet / GIDMap keyed by Var::gid of | |
enum class | thorin::Sort { thorin::Term , thorin::Type , thorin::Kind , thorin::Space , thorin::Univ , thorin::Level } |
template<class To > | |
using | thorin::VarMap = GIDMap< const Var *, To > |
using | thorin::VarSet = GIDSet< const Var * > |
using | thorin::Var2Var = VarMap< const Var * > |
using | thorin::Vars = PooledSet< const Var * > |
using | thorin::NormalizeFn = Ref(*)(Ref, Ref, Ref) |
using | thorin::Uses = absl::flat_hash_set< Use, UseHash, UseEq > |
#define THORIN_DEF_MIXIN | ( | T | ) |
#define THORIN_NODE | ( | m | ) |
#define THORIN_PROJ | ( | NAME, | |
CONST | |||
) |
Use as mixin to wrap all kind of Def::proj and Def::projs variants.
#define THORIN_SETTERS_ | ( | T | ) |
Use as mixin to declare setters for Def::loc & Def::name using a covariant return type.