Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jscomp/common/ext_log.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type 'a logging = ('a, Format.formatter, unit, unit, unit, unit) format6 -> 'a

(* TODO: add {[@.]} later for all *)
let dwarn ?(__POS__ : (string * int * int * int) option) f =
if Js_config.get_diagnose () then
if !Js_config.diagnose then
match __POS__ with
| None -> Format.fprintf Format.err_formatter ("WARN: " ^^ f ^^ "@.")
| Some (file, line, _, _) ->
Expand Down
6 changes: 0 additions & 6 deletions jscomp/common/js_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ let directives = ref []
let cross_module_inline = ref false
let diagnose = ref false

let get_diagnose () =
!diagnose
#ifndef RELEASE
|| Sys.getenv_opt "RES_DEBUG_FILE" <> None
#endif

(* let (//) = Filename.concat *)

(* let get_packages_info () = !packages_info *)
Expand Down
3 changes: 0 additions & 3 deletions jscomp/common/js_config.mli
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ val cross_module_inline : bool ref
val diagnose : bool ref
(** diagnose option *)

val get_diagnose : unit -> bool
(* val set_diagnose : bool -> unit *)

val no_builtin_ppx : bool ref
(** options for builtin ppx *)

Expand Down
4 changes: 2 additions & 2 deletions jscomp/core/bs_cmi_load.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ let load_cmi ~unit_name : Env.Persistent_signature.t option =
let {Cmij_cache.module_names; module_data} = Lazy.force cmi_cache in
match Ext_string_array.find_sorted module_names unit_name with
| Some index ->
if Js_config.get_diagnose () then
if !Js_config.diagnose then
Format.fprintf Format.err_formatter ">Cmi: %s@." unit_name;
let cmi = Cmij_cache.unmarshal_cmi_data module_data.(index) in
if Js_config.get_diagnose () then
if !Js_config.diagnose then
Format.fprintf Format.err_formatter "<Cmi: %s@." unit_name;
Some {filename = Sys.executable_name ;
cmi }
Expand Down
4 changes: 2 additions & 2 deletions jscomp/core/js_cmj_load_builtin_unit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ let load_builin_unit (unit_name : string) : Js_cmj_format.cmj_load_info =
let { Cmij_cache.module_names; module_data } = Lazy.force cmj_cache in
match Ext_string_array.find_sorted module_names unit_name with
| Some i ->
if Js_config.get_diagnose () then
if !Js_config.diagnose then
Format.fprintf Format.err_formatter ">Cmj: %s@." unit_name;
let cmj_table : Js_cmj_format.t =
let { Cmij_cache.values; pure } =
Expand All @@ -53,7 +53,7 @@ let load_builin_unit (unit_name : string) : Js_cmj_format.cmj_load_info =
}
(* FIXME when we change it *)
in
if Js_config.get_diagnose () then
if !Js_config.diagnose then
Format.fprintf Format.err_formatter "<Cmj: %s@." unit_name;
{
package_path = Filename.dirname (Filename.dirname Sys.executable_name);
Expand Down
2 changes: 1 addition & 1 deletion jscomp/core/js_pass_debug.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let log_counter = ref 0
let dump name (prog : J.program) =
begin
let () =
if Js_config.get_diagnose ()
if !Js_config.diagnose
then
begin
incr log_counter ;
Expand Down
2 changes: 1 addition & 1 deletion jscomp/core/lam_compile_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ let compile
#ifndef RELEASE
let () =
Ext_log.dwarn ~__POS__ "After coercion: %a@." Lam_stats.print meta ;
if Js_config.get_diagnose () then
if !Js_config.diagnose then
let f =
Ext_filename.new_extension !Location.input_name ".lambda" in
Ext_fmt.with_file_as_pp f begin fun fmt ->
Expand Down
2 changes: 1 addition & 1 deletion jscomp/core/lam_util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ let dump ext lam =
#else
let log_counter = ref 0
let dump ext lam =
if Js_config.get_diagnose ()
if !Js_config.diagnose
then
(* ATTENTION: easy to introduce a bug during refactoring when forgeting `begin` `end`*)
begin
Expand Down
13 changes: 0 additions & 13 deletions scripts/dbg

This file was deleted.