31 void check()
override;
79 void check()
override;
159const Def*
flatten(
const Def* def);
161size_t flatten(
DefVec& ops,
const Def* def,
bool flatten_sigmas =
true);
164const Def*
unflatten(
const Def* def,
const Def* type);
166const Def*
unflatten(
Defs ops,
const Def* type,
bool flatten_muts =
true);
A (possibly paramterized) Array.
Arr * set_body(const Def *body)
const Def * reduce(const Def *arg) const
const Def * shape() const
Arr * set_shape(const Def *shape)
Arr * stub_(World &, Ref) override
const Def * immutabilize() override
Tries to make an immutable from a mutable.
const Def * op(size_t i) const
Def * unset()
Unsets all Def::ops; works even, if not set at all or partially.
const Def * type() const
Yields the raw type of this Def, i.e. maybe nullptr.
Def * set(size_t i, const Def *def)
Successively set from left to right.
Creates a new Tuple / Pack by inserting Insert::value at position Insert::index into Insert::tuple.
const Def * tuple() const
const Def * value() const
const Def * index() const
A (possibly paramterized) Tuple.
Pack * set(const Def *body)
Pack * reset(const Def *body)
Pack * stub_(World &, Ref) override
const Def * shape() const
const Def * immutabilize() override
Tries to make an immutable from a mutable.
const Def * reduce(const Def *arg) const
Helper class to retrieve Infer::arg if present.
Sigma * set(size_t i, const Def *def)
const Def * immutabilize() override
Tries to make an immutable from a mutable.
Sigma * stub_(World &, Ref) override
This is a thin wrapper for std::span<T, N> with the following additional features:
Data constructor for a Sigma.
The World represents the whole program and manages creation of Thorin nodes (Defs).
#define THORIN_DEF_MIXIN(T)
Ref tuple_of_types(Ref t)
const Def * flatten(const Def *def)
Flattens a sigma/array/pack/tuple.
const Def * merge_tuple(const Def *def, Defs defs)
bool is_unit(const Def *)
const Def * unflatten(const Def *def, const Def *type)
Applies the reverse transformation on a pack/tuple, given the original type.
const Def * merge_sigma(const Def *def, Defs defs)
Vector< const Def * > DefVec
std::string tuple2str(const Def *)