implement function_R invoke

This commit is contained in:
Folkert 2021-07-14 16:58:49 +02:00
parent 8a1a643e3b
commit 1beed7f759

View file

@ -553,15 +553,27 @@ fn function_r<'a, 'i>(env: &mut Env<'a, 'i>, stmt: &'a Stmt<'a>) -> &'a Stmt<'a>
arena.alloc(Let(*symbol, expr.clone(), *layout, b)) arena.alloc(Let(*symbol, expr.clone(), *layout, b))
} }
Invoke { Invoke {
symbol: _, symbol,
call: _, call,
layout: _, layout,
pass: _, pass,
fail: _, fail,
exception_id: _, exception_id,
} => { } => {
// TODO implement this let branch_info = BranchInfo::None;
stmt let new_pass = function_r_branch_body(env, &branch_info, pass);
let new_fail = function_r_branch_body(env, &branch_info, fail);
let invoke = Invoke {
symbol: *symbol,
call: call.clone(),
layout: *layout,
pass: new_pass,
fail: new_fail,
exception_id: *exception_id,
};
arena.alloc(invoke)
} }
Refcounting(modify_rc, continuation) => { Refcounting(modify_rc, continuation) => {
let b = function_r(env, continuation); let b = function_r(env, continuation);