fprintf f "lset %s:%d.%d" var.var_uname frame idx

| B_test _ -> fprintf f "test"

- fprintf f "lambda/%d" (Array.length abs.~~abs~~_params)

+ fprintf f "lambda/%d" (Array.length abs.lam_params)

| B_ret -> fprintf f "ret"

| B_apply -> fprintf f "apply"

| B_arg (idx, _) -> fprintf f "arg %d" idx

allow us to compile it in terms of the *live* environment rather

than with everything unbound. However, there are many cases

where we would not gain any benefit from deferred compilation *)

- B_abs ( { abs_params = params;

- abs_body = None }, next)

+ B_abs ( { lam_params = params;

+ lam_body = None }, next)

| A_app (fn, args) -> begin

let c = bc_compile env fn B_apply in

let _, n = Array.fold_left

let next = if acc == Sfalse then falseb else trueb in

eval acc globals env rib stack next

| B_abs (abs, next) -> begin

- let () = match abs.~~abs~~_body with

+ let () = match abs.lam_body with

(* This compiles the lambda abstraction in order to create the

compilation even longer, under the application of the

function, if that was beneficial.

- { vars = abs.abs_params;

- vals = Array.map (fun _ -> Sunbound) abs.abs_params } in

+ { vars = abs.lam_params;

+ vals = Array.map (fun _ -> Sunbound) abs.lam_params } in

let env = frame :: env in

- let body = bc_compile env abs.abs_code B_ret in

- abs.abs_body <- Some body*)

+ let body = bc_compile env abs.lam_ast B_ret in

+ abs.lam_body <- Some body*)

let closure = Sclosure (env, abs) in

eval closure globals env rib stack next

let var = mklocal "conti" in

let body = B_nuate (stack, (var, Lbinding (0, 0))) in

- let abs = { abs_params = [| var |];

- abs_code = A_lit (Sunbound);

- abs_body = Some (Bytecode body) } in

+ let abs = { lam_params = [| var |];

+ lam_ast = A_lit (Sunbound);

+ lam_body = Some (Bytecode body) } in

let acc = Sclosure ([], abs) in

eval acc globals env rib stack x

and apply acc globals env rib stack =

- let { abs_params = params;

- abs_body = body } = abs in

+ let { lam_params = params;

+ lam_body = body } = abs in

let frame = if varargs then

(* one param (the last) is the varargs, the rest are the

function until it is applied. However, we can't memoize

it since it is compiled with values of the params

bound in the environment *)

- let body = compile globals env abs.abs_code B_ret in

- (* abs.abs_body <- Some body; *)

+ let body = compile globals env abs.lam_ast B_ret in

+ (* abs.lam_body <- Some body; *)

| Some Bytecode body -> body