MimIR 0.1
MimIR is my Intermediate Representation
|
#include "mim/plug/clos/clos.h"
#include <mim/config.h>
#include <mim/pass/eta_exp.h>
#include <mim/pass/eta_red.h>
#include <mim/pass/pass.h>
#include <mim/pass/pipelinebuilder.h>
#include <mim/pass/scalarize.h>
#include "mim/plug/clos/pass/branch_clos_elim.h"
#include "mim/plug/clos/pass/clos2sjlj.h"
#include "mim/plug/clos/pass/clos_conv_prep.h"
#include "mim/plug/clos/pass/lower_typed_clos_prep.h"
#include "mim/plug/clos/phase/clos_conv.h"
#include "mim/plug/clos/phase/lower_typed_clos.h"
Go to the source code of this file.
Namespaces | |
namespace | mim |
namespace | mim::plug |
namespace | mim::plug::clos |
The clos Plugin | |
Functions | |
MIM_EXPORT Plugin | mim_get_plugin () |
Closures | |
ClosLit | mim::plug::clos::isa_clos_lit (Ref def, bool fn_isa_lam=true) |
Tries to match a closure literal. | |
Ref | mim::plug::clos::clos_pack (Ref env, Ref fn, Ref ct=nullptr) |
Pack a typed closure. This assumes that fn expects the environment as its Clos_Env_Paramth argument. | |
std::tuple< Ref, Ref, Ref > | mim::plug::clos::clos_unpack (Ref c) |
Deconstruct a closure into (env_type, function, env) . | |
Ref | mim::plug::clos::clos_apply (Ref closure, Ref args) |
Apply a closure to arguments. | |
Closure Types | |
const Sigma * | mim::plug::clos::isa_clos_type (Ref def) |
Sigma * | mim::plug::clos::clos_type (const Pi *pi) |
Creates a typed closure type from pi . | |
const Pi * | mim::plug::clos::clos_type_to_pi (Ref ct, Ref new_env_type=nullptr) |
Convert a closure type to a Pi, where the environment type has been removed or replaced by new_env_type (if new_env_type != nullptr ) | |
Closure Environment | |
Ref | mim::plug::clos::clos_insert_env (size_t i, Ref env, std::function< Ref(size_t)> f) |
Ref | mim::plug::clos::clos_remove_env (size_t i, std::function< Ref(size_t)> f) |
Ref | mim::plug::clos::ctype (World &w, Defs doms, Ref env_type=nullptr) |
MIM_EXPORT Plugin mim_get_plugin | ( | ) |
Definition at line 21 of file clos.cpp.
References mim::Annex::Base, mim::plug::clos::register_normalizers(), mim::register_pass(), and mim::register_phase().