Skip to content

Commit 7095739

Browse files
committed
remove Js_config.is_reason which is not needed
1 parent 3a83a77 commit 7095739

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

jscomp/common/js_config.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ let jsx_version = ref (-1)
9595

9696
let refmt = ref None
9797

98-
let is_reason = ref false
9998

10099
let js_stdout = ref true
101100

jscomp/common/js_config.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ val force_cmj : bool ref
9090

9191
val jsx_version : int ref
9292
val refmt : string option ref
93-
val is_reason : bool ref
93+
9494

9595
val js_stdout : bool ref
9696

jscomp/core/js_implementation.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ let after_parsing_sig ppf outputprefix ast =
5858
end;
5959
if !Js_config.binary_ast then
6060
begin
61+
let sourcefile = !Location.input_name in
6162
Binary_ast.write_ast
6263
Mli
63-
~sourcefile:!Location.input_name
64-
~output:(outputprefix ^ if !Js_config.is_reason then Literals.suffix_reiast else Literals.suffix_mliast)
64+
~sourcefile
65+
~output:(outputprefix ^ Filename.extension sourcefile ^ "ast")
6566
(* to support relocate to another directory *)
6667
ast
6768

@@ -165,10 +166,9 @@ let after_parsing_impl ppf outputprefix (ast : Parsetree.structure) =
165166
close_out oc ;
166167
end;
167168
if !Js_config.binary_ast then
168-
Binary_ast.write_ast ~sourcefile:!Location.input_name
169-
Ml ~output:(outputprefix ^
170-
if !Js_config.is_reason then Literals.suffix_reast else Literals.suffix_mlast
171-
)
169+
let sourcefile = !Location.input_name in
170+
Binary_ast.write_ast ~sourcefile
171+
Ml ~output:(outputprefix ^ Filename.extension sourcefile ^ "ast")
172172
ast ;
173173
if !Js_config.syntax_only then
174174
Warnings.check_fatal ()

jscomp/main/js_main.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ let process_implementation_file ppf name =
2222

2323

2424
let setup_reason_context () =
25-
Js_config.is_reason := true;
2625
Lazy.force Super_main.setup;
2726
Lazy.force Reason_outcome_printer_main.setup
2827

0 commit comments

Comments
 (0)