#include <mim/axm.h>#include <mim/lam.h>#include <mim/world.h>#include <mim/plug/core/core.h>#include "mim/plug/mem/autogen.h"Go to the source code of this file.
Namespaces | |
| namespace | mim |
| namespace | mim::plug |
| namespace | mim::plug::mem |
| The mem Plugin | |
Functions | |
%mem.M | |
| Lam * | mim::plug::mem::mut_con (World &w, nat_t a=0) |
| Yields con[mem.M 0]. | |
| Lam * | mim::plug::mem::mut_con (const Def *dom) |
| Yields con[mem.M 0, dom]. | |
| const App * | mim::plug::mem::isa_mem (const Def *def) |
If def is a mem.M-typed value, yields its memory type mem.M a; otherwise nullptr. | |
| bool | mim::plug::mem::has_leading_mem (const Pi *pi) |
Does pi already thread memory - a leading mem.M, either directly or grouped as the first component of the first parameter (e.g. | |
| const Def * | mim::plug::mem::mem_def (const Def *def) |
| Returns the (first) element of type mem.M a from the given tuple. | |
| const Def * | mim::plug::mem::mem_var (Lam *lam) |
| Returns the memory argument of a function if it has one. | |
| const Def * | mim::plug::mem::strip_mem_ty (const Def *def) |
| Removes recusively all occurences of mem from a type (sigma). | |
| const Def * | mim::plug::mem::strip_mem (const Def *def) |
| Recursively removes all occurrences of mem from a tuple. | |
%mem.lea | |
| const Def * | mim::plug::mem::pointee (const Def *ptr) |
| const Def * | mim::plug::mem::op_lea (const Def *ptr, const Def *index) |
| const Def * | mim::plug::mem::op_lea_unsafe (const Def *ptr, const Def *i) |
| const Def * | mim::plug::mem::op_lea_unsafe (const Def *ptr, u64 i) |
%mem.alloc | |
| const Def * | mim::plug::mem::op_alloc (const Def *type, const Def *as, const Def *mem) |
| const Def * | mim::plug::mem::op_alloc (const Def *type, const Def *mem) |
%mem.slot | |
| const Def * | mim::plug::mem::op_slot (const Def *type, const Def *as, const Def *mem, const Def *ret) |
| const Def * | mim::plug::mem::op_slot (const Def *type, const Def *mem, const Def *ret) |
| std::tuple< const Def *, Lam *, const Def *, const Def * > | mim::plug::mem::split_slot (const App *slot) |
Decomposes the continuation-based slot into (mem, ret_lam, ret_mem, ptr), where ret_mem is the continuation's mem and ptr is the continuation's slot var; the slot's lifetime is ret_lam's scope. | |
%mem.malloc | |
| const Def * | mim::plug::mem::op_malloc (const Def *type, const Def *as, const Def *mem) |
| const Def * | mim::plug::mem::op_malloc (const Def *type, const Def *mem) |
%mem.mslot | |
| const Def * | mim::plug::mem::op_mslot (const Def *type, const Def *as, const Def *mem, const Def *ret) |
| const Def * | mim::plug::mem::op_mslot (const Def *type, const Def *mem, const Def *ret) |