newlines are overrated am i right

This commit is contained in:
tali 2023-12-13 17:38:30 -05:00
parent 37377c044d
commit 21bc2c3cb3
1 changed files with 0 additions and 3 deletions

View File

@ -107,18 +107,15 @@ let rec compile_lambda (lam : Ir.lambda) =
let n_slots = List.length vals in let n_slots = List.length vals in
let elems = Hashtbl.create (List.length vals + List.length funs) in let elems = Hashtbl.create (List.length vals + List.length funs) in
let mthds = Array.make (List.length funs) undef_method in let mthds = Array.make (List.length funs) undef_method in
List.iteri List.iteri
(fun i name -> (fun i name ->
Hashtbl.add elems name (Value.Field i)) Hashtbl.add elems name (Value.Field i))
vals; vals;
List.iteri List.iteri
(fun i (name, lambda) -> (fun i (name, lambda) ->
Hashtbl.add elems name (Value.Method i); Hashtbl.add elems name (Value.Method i);
mthds.(i) <- Code.Function (compile_lambda lambda)) mthds.(i) <- Code.Function (compile_lambda lambda))
funs; funs;
emit (CON (sp, { n_slots; elems; mthds })) emit (CON (sp, { n_slots; elems; mthds }))
| ir -> | ir ->