Skip to content

Commit 3603852

Browse files
committed
clean up
1 parent 8cd19cf commit 3603852

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

jscomp/core/js_dump_program.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ let node_program ~output_dir f (x : J.deps_program) =
7373
P.newline f;
7474
let cxt =
7575
Js_dump_import_export.requires L.require Ext_pp_scope.empty f
76-
(* dynamic import should not print in require statement *)
76+
(* Not be emitted in require statements *)
7777
(Ext_list.filter_map x.modules (fun x ->
7878
match x.dynamic_import with
7979
| true -> None
@@ -87,7 +87,7 @@ let node_program ~output_dir f (x : J.deps_program) =
8787
let es6_program ~output_dir fmt f (x : J.deps_program) =
8888
let cxt =
8989
Js_dump_import_export.imports Ext_pp_scope.empty f
90-
(* dynamic import should not print in import statement *)
90+
(* Not be emitted in require statements *)
9191
(Ext_list.filter_map x.modules (fun x ->
9292
match x.dynamic_import with
9393
| true -> None

jscomp/core/lam_convert.ml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,10 +505,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) :
505505
primitive %s"
506506
s
507507
in
508-
let dynamic_import = match primitive with
509-
| Pimport -> true
510-
| _ -> false
511-
in
508+
let dynamic_import = primitive = Pimport in
512509
let args = Ext_list.map args (convert_aux ~dynamic_import) in
513510
prim ~primitive ~args loc
514511
and convert_aux ?(dynamic_import = false) (lam : Lambda.lambda) : Lam.t =

0 commit comments

Comments
 (0)