Skip to content

Commit 6b98b01

Browse files
committed
fixup! Rewrite inline pass
1 parent b9b4386 commit 6b98b01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/lib/inline.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ let rec small_function ~context info args =
354354
let info' = Var.Map.find arg context.env in
355355
let arity = List.assoc param relevant_params in
356356
if
357-
List.length info'.params = arity
357+
List.compare_length_with info'.params ~len:arity = 0
358358
&& should_inline
359359
~context:
360360
{ context with
@@ -511,7 +511,7 @@ let inline_function p rem branch x params cont args =
511511
parameters are used in the function body. *)
512512
let fresh_addr = free_pc in
513513
let free_pc = fresh_addr + 1 in
514-
assert (List.length args = List.length params);
514+
assert (List.compare_lengths args params = 0);
515515
let blocks =
516516
Addr.Map.add fresh_addr { params; body = []; branch = Branch cont } blocks
517517
in

0 commit comments

Comments
 (0)