Skip to content

Commit 39deade

Browse files
committed
No lambda-lifting when producing Wasm
1 parent ffe3020 commit 39deade

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/lib/driver.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ let effects ~deadcode_sentinal p =
112112
Deadcode.f p
113113
else p, live_vars
114114
in
115-
p |> Effects.f ~flow_info:info ~live_vars +> map_fst Lambda_lifting.f)
115+
p
116+
|> Effects.f ~flow_info:info ~live_vars
117+
|> map_fst
118+
(match Config.target () with
119+
| `JavaScript -> Lambda_lifting.f
120+
| `Wasm -> Fun.id))
116121
else
117122
( p
118123
, (Code.Var.Set.empty : Effects.trampolined_calls)

0 commit comments

Comments
 (0)