let new_frame kf ~m_here ~m_pre ~m_post ropt =
let may_cons acc lab x =
match x with
| None -> acc
| Some x -> (lab,x)::acc
in
let memories =
(may_cons
(may_cons
(may_cons [] Clabels.Post m_post)
Clabels.Pre m_pre)
Clabels.Here m_here)
in
{
states = [];
memories = memories;
result = ropt;
exit_status = None;
return = Some(Kernel_function.get_return_type kf);
}