Skip to content

Commit 3695d26

Browse files
committed
Compiler: jsoo only inline (small) functor in O3
1 parent 2acb9e7 commit 3695d26

File tree

2 files changed

+421
-532
lines changed

2 files changed

+421
-532
lines changed

compiler/lib/inline.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ let functor_like ~context info =
344344
(match Config.target (), context.profile with
345345
| `Wasm, (O2 | O3) -> true
346346
| `Wasm, O1 -> body_size ~context info <= 15
347-
| `JavaScript, (O1 | O2 | O3) -> body_size ~context info <= 15)
347+
| `JavaScript, (O1 | O2) -> false
348+
| `JavaScript, O3 -> body_size ~context info <= 15)
348349
&& (not info.recursive)
349350
&& (not (contains_loop ~context info))
350351
&& returns_a_block ~context info

0 commit comments

Comments
 (0)