MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
tuple.cpp File Reference
#include "mim/tuple.h"
#include <cassert>
#include "mim/world.h"
Include dependency graph for tuple.cpp:

Go to the source code of this file.

Namespaces

namespace  mim
 

Functions

Helpers to work with Tulpes/Sigmas/Arrays/Packs
bool mim::is_unit (const Def *)
 
std::string mim::tuple2str (const Def *)
 
size_t mim::flatten (DefVec &ops, const Def *def, bool flatten_sigmas=true)
 Same as unflatten, but uses the operands of a flattened Pack / Tuple directly.
 
const Defmim::flatten (const Def *def)
 Flattens a sigma/array/pack/tuple.
 
const Defmim::unflatten (Defs ops, const Def *type, bool flatten_muts=true)
 Same as unflatten, but uses the operands of a flattened Pack / Tuple directly.
 
const Defmim::unflatten (const Def *def, const Def *type)
 Applies the reverse transformation on a Pack / Tuple, given the original type.
 
const Defmim::tuple_of_types (const Def *t)
 
Concatenation

Works for Tuples, Packs, Sigmas, and Arrays alike.

DefVec mim::cat (Defs, Defs)
 
DefVec mim::cat (nat_t n, nat_t m, const Def *a, const Def *b)
 
const Defmim::cat_tuple (nat_t n, nat_t m, const Def *a, const Def *b)
 
const Defmim::cat_sigma (nat_t n, nat_t m, const Def *a, const Def *b)
 
const Defmim::cat_tuple (World &, Defs, Defs)
 
const Defmim::cat_sigma (World &, Defs, Defs)