Skip to content

Commit 10a1ba8

Browse files
vouillonhhugo
authored andcommitted
Less aggressive functor inlining for JavaScript code
1 parent a40a9d2 commit 10a1ba8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/lib/inline.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ let interesting_parameters ~context info =
326326
code elimination, ...
327327
*)
328328
let functor_like ~context info =
329-
(context.aggressive || body_size ~context info <= 15)
329+
(match Config.target () with
330+
| `Wasm when context.aggressive -> true
331+
| _ -> body_size ~context info <= 15)
330332
&& (not info.recursive)
331333
&& (not (contains_loop ~context info))
332334
&& returns_a_block ~context info

0 commit comments

Comments
 (0)