diff --git a/jscomp/common/bs_loc.ml b/jscomp/common/bs_loc.ml index 59389724ee..c83cb7dd35 100644 --- a/jscomp/common/bs_loc.ml +++ b/jscomp/common/bs_loc.ml @@ -39,4 +39,4 @@ let merge (l: t) (r : t) = -> {loc_start ;loc_end; loc_ghost = false} -let none = Location.none +(* let none = Location.none *) diff --git a/jscomp/common/bs_loc.mli b/jscomp/common/bs_loc.mli index fbc69e8642..65e15301b9 100644 --- a/jscomp/common/bs_loc.mli +++ b/jscomp/common/bs_loc.mli @@ -28,7 +28,7 @@ type t = Location.t = { loc_ghost : bool } -val is_ghost : t -> bool +(* val is_ghost : t -> bool *) val merge : t -> t -> t -val none : t +(* val none : t *) diff --git a/jscomp/common/js_config.ml b/jscomp/common/js_config.ml index 2a227470ee..4dd37ef0e9 100644 --- a/jscomp/common/js_config.ml +++ b/jscomp/common/js_config.ml @@ -59,7 +59,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) diff --git a/jscomp/common/js_config.mli b/jscomp/common/js_config.mli index 61d6f46c42..e97aac8093 100644 --- a/jscomp/common/js_config.mli +++ b/jscomp/common/js_config.mli @@ -54,7 +54,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) diff --git a/jscomp/core/js_analyzer.ml b/jscomp/core/js_analyzer.ml index 4011527708..e92a94db4f 100644 --- a/jscomp/core/js_analyzer.ml +++ b/jscomp/core/js_analyzer.ml @@ -350,7 +350,7 @@ let rev_toplevel_flatten block = | x :: xs -> aux (x :: acc) xs in aux [] block -let rec is_constant (x : J.expression) = +(* let rec is_constant (x : J.expression) = match x.expression_desc with | Array_index (a,b) -> is_constant a && is_constant b | Str (b,_) -> b @@ -360,7 +360,7 @@ let rec is_constant (x : J.expression) = -> Ext_list.for_all xs is_constant && is_constant tag | Bin (_op, a, b) -> is_constant a && is_constant b - | _ -> false + | _ -> false *) let rec is_okay_to_duplicate (e : J.expression) = diff --git a/jscomp/core/js_analyzer.mli b/jscomp/core/js_analyzer.mli index cec450df86..35491a72c9 100644 --- a/jscomp/core/js_analyzer.mli +++ b/jscomp/core/js_analyzer.mli @@ -40,8 +40,9 @@ val free_variables_of_statement : val free_variables_of_expression : Set_ident.t -> Set_ident.t -> J.finish_ident_expression -> Set_ident.t -val no_side_effect_expression_desc : - J.expression_desc -> bool +(* val no_side_effect_expression_desc : + J.expression_desc -> bool *) + val no_side_effect_expression : J.expression -> bool (** [no_side_effect] means this expression has no side effect, @@ -77,7 +78,7 @@ val rev_flatten_seq : J.expression -> J.block val rev_toplevel_flatten : J.block -> J.block (** return the block in reverse order *) -val is_constant : J.expression -> bool +(* val is_constant : J.expression -> bool *) (** Simple expression, diff --git a/jscomp/core/js_exp_make.ml b/jscomp/core/js_exp_make.ml index 4464e9f7a7..03677b6600 100644 --- a/jscomp/core/js_exp_make.ml +++ b/jscomp/core/js_exp_make.ml @@ -326,8 +326,8 @@ let fuse_to_seq x xs = if xs = [] then x else Ext_list.fold_left xs x seq -let empty_string_literal : t = - {expression_desc = Str (true,""); comment = None} +(* let empty_string_literal : t = + {expression_desc = Str (true,""); comment = None} *) let zero_int_literal : t = {expression_desc = Number (Int {i = 0l; c = None}) ; comment = None} @@ -506,7 +506,7 @@ let function_length ?comment (e : t) : t = | _ -> { expression_desc = Length (e, Function) ; comment } (** no dependency introduced *) -let js_global_dot ?comment (x : string) (e1 : string) : t = +(* let js_global_dot ?comment (x : string) (e1 : string) : t = { expression_desc = Static_index (js_global x, e1,None); comment} let char_of_int ?comment (v : t) : t = @@ -514,7 +514,7 @@ let char_of_int ?comment (v : t) : t = | Number (Int {i; _}) -> str (String.make 1(Char.chr (Int32.to_int i))) | Char_to_int v -> v - | _ -> {comment ; expression_desc = Char_of_int v} + | _ -> {comment ; expression_desc = Char_of_int v} *) let char_to_int ?comment (v : t) : t = match v.expression_desc with diff --git a/jscomp/core/js_exp_make.mli b/jscomp/core/js_exp_make.mli index c6f4f00dc7..995d3c3529 100644 --- a/jscomp/core/js_exp_make.mli +++ b/jscomp/core/js_exp_make.mli @@ -119,12 +119,12 @@ val nint : ?comment:string -> nativeint -> t val small_int : int -> t val float : ?comment:string -> string -> t -val empty_string_literal : t +(* val empty_string_literal : t *) (* TODO: we can do hash consing for small integers *) val zero_int_literal : t -val one_int_literal : t +(* val one_int_literal : t *) val zero_float_lit : t -val obj_int_tag_literal : t +(* val obj_int_tag_literal : t *) (** [is_out e range] is equivalent to [e > range or e <0] @@ -147,7 +147,7 @@ val bytes_length : ?comment:string -> t -> t val function_length : ?comment:string -> t -> t -val char_of_int : ?comment:string -> t -> t +(* val char_of_int : ?comment:string -> t -> t *) val char_to_int : ?comment:string -> t -> t @@ -164,7 +164,7 @@ val string_append : ?comment:string -> t -> t -> t (* val bind_var_call : ?comment:string -> Ident.t -> string -> t list -> t *) (* val bind_call : ?comment:string -> J.expression -> string -> J.expression list -> t *) -val js_global_dot : ?comment:string -> string -> string -> t +(* val js_global_dot : ?comment:string -> string -> string -> t *) diff --git a/jscomp/core/js_fold_basic.ml b/jscomp/core/js_fold_basic.ml index 9e201353eb..0946c9a499 100644 --- a/jscomp/core/js_fold_basic.ml +++ b/jscomp/core/js_fold_basic.ml @@ -24,7 +24,7 @@ -class count_deps (add : Ident.t -> unit ) = +(* class count_deps (add : Ident.t -> unit ) = object(self) inherit Js_fold.fold as super method! expression lam = @@ -46,7 +46,7 @@ class count_deps (add : Ident.t -> unit ) = *) | _ -> super#expression lam method! ident x = add x ; self - end + end *) let add_lam_module_ident = Lam_module_ident.Hash_set.add let create = Lam_module_ident.Hash_set.create @@ -82,7 +82,7 @@ let calculate_hard_dependencies block = will not depend [variables] *) -let depends_j (lam : J.expression) (variables : Set_ident.t) = +(* let depends_j (lam : J.expression) (variables : Set_ident.t) = let v = ref Set_ident.empty in let add id = if Set_ident.mem variables id then @@ -90,4 +90,4 @@ let depends_j (lam : J.expression) (variables : Set_ident.t) = in ignore @@ (new count_deps add ) # expression lam ; !v - + *) diff --git a/jscomp/core/js_fold_basic.mli b/jscomp/core/js_fold_basic.mli index 2db816d5b1..e7912f4455 100644 --- a/jscomp/core/js_fold_basic.mli +++ b/jscomp/core/js_fold_basic.mli @@ -27,7 +27,7 @@ (** A module to calculate hard dependency based on JS IR in module [J] *) -val depends_j : J.expression -> Set_ident.t -> Set_ident.t +(* val depends_j : J.expression -> Set_ident.t -> Set_ident.t *) (** TODO: {!Ordered_hash_set} for better ordering *) val calculate_hard_dependencies : J.block -> Lam_module_ident.Hash_set.t diff --git a/jscomp/core/js_fun_env.ml b/jscomp/core/js_fun_env.ml index 5a35e67574..2dcad9c4dc 100644 --- a/jscomp/core/js_fun_env.ml +++ b/jscomp/core/js_fun_env.ml @@ -68,8 +68,8 @@ let make ?immutable_mask n = { bound_loop_mutable_values =Set_ident.empty; } -let is_tailcalled x = - x.immutable_mask <> All_immutable_and_no_tail_call +(* let is_tailcalled x = + x.immutable_mask <> All_immutable_and_no_tail_call *) let mark_unused t i = t.used_mask.(i) <- true @@ -77,13 +77,13 @@ let mark_unused t i = let get_unused t i = t.used_mask.(i) -let get_length t = Array.length t.used_mask +(* let get_length t = Array.length t.used_mask *) -let to_string env = +(* let to_string env = String.concat "," (Ext_list.map (Set_ident.elements env.unbounded ) (fun id -> Printf.sprintf "%s/%d" id.name id.stamp) - ) + ) *) let get_mutable_params (params : Ident.t list) (x : t ) = match x.immutable_mask with @@ -110,4 +110,4 @@ let get_lexical_scope env = (* TODO: can be refined if it only enclose toplevel variables *) -let is_empty t = Set_ident.is_empty t.unbounded +(* let is_empty t = Set_ident.is_empty t.unbounded *) diff --git a/jscomp/core/js_fun_env.mli b/jscomp/core/js_fun_env.mli index 1429e4808b..4ed1c2125e 100644 --- a/jscomp/core/js_fun_env.mli +++ b/jscomp/core/js_fun_env.mli @@ -37,9 +37,9 @@ type t val make : ?immutable_mask:bool array -> int -> t -val is_tailcalled : t -> bool +(* val is_tailcalled : t -> bool -val is_empty : t -> bool +val is_empty : t -> bool *) val set_unbounded : t -> Set_ident.t -> unit @@ -49,7 +49,7 @@ val set_lexical_scope : t -> Set_ident.t -> unit val get_lexical_scope : t -> Set_ident.t -val to_string : t -> string +(* val to_string : t -> string *) val mark_unused : t -> int -> unit @@ -59,4 +59,4 @@ val get_mutable_params : Ident.t list -> t -> Ident.t list val get_unbounded : t -> Set_ident.t -val get_length : t -> int +(* val get_length : t -> int *) diff --git a/jscomp/core/js_implementation.mli b/jscomp/core/js_implementation.mli index 18d61b6338..30879bfc4c 100644 --- a/jscomp/core/js_implementation.mli +++ b/jscomp/core/js_implementation.mli @@ -41,11 +41,11 @@ val interface_mliast : Format.formatter -> string -> string -> unit -val after_parsing_impl : +(* val after_parsing_impl : Format.formatter -> string -> Parsetree.structure -> - unit + unit *) (** [after_parsing_impl ppf sourcefile outputprefix ast ] Make sure you need run {!Compmisc.init_path} for set up Used in eval diff --git a/jscomp/core/js_stmt_make.ml b/jscomp/core/js_stmt_make.ml index 47fb35bf3c..95877890b2 100644 --- a/jscomp/core/js_stmt_make.ml +++ b/jscomp/core/js_stmt_make.ml @@ -34,9 +34,9 @@ type t = J.statement let return_stmt ?comment e : t = {statement_desc = Return {return_value = e; } ; comment} -let return_unit : t list = +(* let return_unit : t list = [{ statement_desc = Return {return_value = E.unit; } ; - comment = None}] + comment = None}] *) let empty_stmt : t = { statement_desc = Block []; comment = None} @@ -86,12 +86,12 @@ let define_variable ?comment ?ident_info ident_info ;}; comment} -let alias_variable ?comment ~exp (v:Ident.t) : t= +(* let alias_variable ?comment ~exp (v:Ident.t) : t= {statement_desc = Variable { ident = v; value = Some exp; property = Alias; ident_info = {used_stats = NA } }; - comment} + comment} *) let int_switch @@ -301,7 +301,7 @@ let assign ?comment id e : t = statement_desc = J.Exp ( E.assign (E.var id) e ) ; comment } -let assign_unit ?comment id : t = +(* let assign_unit ?comment id : t = { statement_desc = J.Exp( E.assign (E.var id) E.unit); comment @@ -315,7 +315,7 @@ let declare_unit ?comment id : t = ident_info = {used_stats = NA} }; comment - } + } *) let while_ ?comment ?label ?env (e : E.t) (st : J.block) : t = let env = @@ -350,11 +350,11 @@ let try_ ?comment ?with_ ?finally body : t = (* TODO: actually, only loops can be labelled *) -let continue_stmt ?comment ?(label="") () : t = +(* let continue_stmt ?comment ?(label="") () : t = { statement_desc = J.Continue label; comment; - } + } *) let continue_ : t = { statement_desc = Continue "" ; diff --git a/jscomp/core/js_stmt_make.mli b/jscomp/core/js_stmt_make.mli index ba39726c9b..b4ee71ec57 100644 --- a/jscomp/core/js_stmt_make.mli +++ b/jscomp/core/js_stmt_make.mli @@ -36,8 +36,8 @@ type t = J.statement (** empty statement, block of length 0 *) -val empty_stmt : - t +(* val empty_stmt : + t *) val throw_stmt : ?comment:string -> @@ -113,11 +113,11 @@ val define_variable : t (** created an alias expression *) -val alias_variable : +(* val alias_variable : ?comment:string -> exp:J.expression -> Ident.t -> - t + t *) val assign : ?comment:string -> @@ -132,10 +132,10 @@ val assign : done in .. ]} *) -val assign_unit : +(* val assign_unit : ?comment:string -> J.ident -> - t + t *) (** used in cases like {[ @@ -144,10 +144,10 @@ val assign_unit : done in .. ]} *) -val declare_unit : +(* val declare_unit : ?comment:string -> J.ident -> - t + t *) val while_ : ?comment:string -> @@ -185,16 +185,17 @@ val return_stmt : t -val return_unit : t list +(* val return_unit : t list *) (** for ocaml function which returns unit it will be compiled into [return 0] in js *) (** if [label] is not set, it will default to empty *) -val continue_stmt : +(* val continue_stmt : ?comment:string -> ?label:J.label -> unit -> - t + t *) + val continue_ : t val debugger_block : t list diff --git a/jscomp/core/lam_bounded_vars.ml b/jscomp/core/lam_bounded_vars.ml index c55c523ef5..71dd8b9f18 100644 --- a/jscomp/core/lam_bounded_vars.ml +++ b/jscomp/core/lam_bounded_vars.ml @@ -168,4 +168,4 @@ let rewrite (map : _ Hash_ident.t) aux lam -let refresh lam = rewrite (Hash_ident.create 17 : Lam.t Hash_ident.t ) lam +(* let refresh lam = rewrite (Hash_ident.create 17 : Lam.t Hash_ident.t ) lam *) diff --git a/jscomp/core/lam_bounded_vars.mli b/jscomp/core/lam_bounded_vars.mli index 26f379abf7..1b0f86d44d 100644 --- a/jscomp/core/lam_bounded_vars.mli +++ b/jscomp/core/lam_bounded_vars.mli @@ -29,6 +29,6 @@ val rewrite : Lam.t Hash_ident.t -> Lam.t -> Lam.t (** refresh lambda to replace all bounded vars for new ones *) -val refresh : +(* val refresh : Lam.t -> - Lam.t + Lam.t *) diff --git a/jscomp/depends/ast_extract.mli b/jscomp/depends/ast_extract.mli index 94a136ae20..8dec006bf8 100644 --- a/jscomp/depends/ast_extract.mli +++ b/jscomp/depends/ast_extract.mli @@ -36,8 +36,8 @@ val read_parse_and_extract : 'a Ml_binary.kind -> 'a -> Set_string.t type ('a,'b) t -val sort_files_by_dependencies : - domain:Set_string.t -> Set_string.t Map_string.t -> string Queue.t +(* val sort_files_by_dependencies : + domain:Set_string.t -> Set_string.t Map_string.t -> string Queue.t *) val sort : @@ -56,7 +56,7 @@ val collect_ast_map : string list -> (Format.formatter -> string -> 'a) -> (Format.formatter -> string -> 'b) -> - ('a, 'b) t Map_string.t + ('a, 'b) t Map_string.t type dir_spec = { dir : string ; diff --git a/jscomp/ext/ext_format.ml b/jscomp/ext/ext_format.ml index 7d6f0c60ce..40d1fe6351 100644 --- a/jscomp/ext/ext_format.ml +++ b/jscomp/ext/ext_format.ml @@ -33,17 +33,17 @@ open Format type t = formatter -let string = pp_print_string +(* let string = pp_print_string *) -let break = fun fmt -> pp_print_break fmt 0 0 +(* let break = fun fmt -> pp_print_break fmt 0 0 let break1 = fun fmt -> pp_print_break fmt 0 1 let space fmt = pp_print_break fmt 1 0 - -let vgroup fmt indent u = + *) +(* let vgroup fmt indent u = pp_open_vbox fmt indent; let v = u () in pp_close_box fmt (); @@ -72,9 +72,9 @@ let bracket fmt u = string fmt "["; let v = u () in string fmt "]"; - v + v *) -let paren_group st n action = +(* let paren_group st n action = group st n (fun _ -> paren st action) let brace_group st n action = @@ -99,7 +99,7 @@ let to_out_channel = formatter_of_out_channel (* let non_breaking_space fmt = string fmt " " *) (* let set_needed_space_function _ _ = () *) let flush = pp_print_flush - + *) (* let list = pp_print_list *) let pp_print_queue ?(pp_sep = pp_print_cut) pp_v ppf q = diff --git a/jscomp/ext/ext_format.mli b/jscomp/ext/ext_format.mli index a478784614..4432881c38 100644 --- a/jscomp/ext/ext_format.mli +++ b/jscomp/ext/ext_format.mli @@ -34,7 +34,7 @@ type t = private Format.formatter -val string : t -> string -> unit +(* val string : t -> string -> unit val break : t -> unit @@ -63,7 +63,7 @@ val newline : t -> unit val to_out_channel : out_channel -> t -val flush : t -> unit -> unit +val flush : t -> unit -> unit *) val pp_print_queue : ?pp_sep:(Format.formatter -> unit -> unit) -> diff --git a/lib/4.06.1/bsdep.ml b/lib/4.06.1/bsdep.ml index 595a42e093..d63c1ee2e2 100644 --- a/lib/4.06.1/bsdep.ml +++ b/lib/4.06.1/bsdep.ml @@ -35571,9 +35571,9 @@ type t = Location.t = { loc_ghost : bool } -val is_ghost : t -> bool +(* val is_ghost : t -> bool *) val merge : t -> t -> t -val none : t +(* val none : t *) end = struct @@ -35619,7 +35619,7 @@ let merge (l: t) (r : t) = -> {loc_start ;loc_end; loc_ghost = false} -let none = Location.none +(* let none = Location.none *) end module Ast_utf8_string_interp : sig @@ -47129,7 +47129,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) @@ -47246,7 +47246,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) diff --git a/lib/4.06.1/bsppx.ml b/lib/4.06.1/bsppx.ml index 262e3214ff..29ae56c02a 100644 --- a/lib/4.06.1/bsppx.ml +++ b/lib/4.06.1/bsppx.ml @@ -4893,7 +4893,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) @@ -5010,7 +5010,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) @@ -292946,9 +292946,9 @@ type t = Location.t = { loc_ghost : bool } -val is_ghost : t -> bool +(* val is_ghost : t -> bool *) val merge : t -> t -> t -val none : t +(* val none : t *) end = struct @@ -292994,7 +292994,7 @@ let merge (l: t) (r : t) = -> {loc_start ;loc_end; loc_ghost = false} -let none = Location.none +(* let none = Location.none *) end module Ast_utf8_string_interp : sig diff --git a/lib/4.06.1/unstable/all_ounit_tests.ml b/lib/4.06.1/unstable/all_ounit_tests.ml index bf2bdb5023..94f15f9ac9 100644 --- a/lib/4.06.1/unstable/all_ounit_tests.ml +++ b/lib/4.06.1/unstable/all_ounit_tests.ml @@ -5055,7 +5055,7 @@ module Ext_format : sig type t = private Format.formatter -val string : t -> string -> unit +(* val string : t -> string -> unit val break : t -> unit @@ -5084,7 +5084,7 @@ val newline : t -> unit val to_out_channel : out_channel -> t -val flush : t -> unit -> unit +val flush : t -> unit -> unit *) val pp_print_queue : ?pp_sep:(Format.formatter -> unit -> unit) -> @@ -5127,17 +5127,17 @@ open Format type t = formatter -let string = pp_print_string +(* let string = pp_print_string *) -let break = fun fmt -> pp_print_break fmt 0 0 +(* let break = fun fmt -> pp_print_break fmt 0 0 let break1 = fun fmt -> pp_print_break fmt 0 1 let space fmt = pp_print_break fmt 1 0 - -let vgroup fmt indent u = + *) +(* let vgroup fmt indent u = pp_open_vbox fmt indent; let v = u () in pp_close_box fmt (); @@ -5166,9 +5166,9 @@ let bracket fmt u = string fmt "["; let v = u () in string fmt "]"; - v + v *) -let paren_group st n action = +(* let paren_group st n action = group st n (fun _ -> paren st action) let brace_group st n action = @@ -5193,7 +5193,7 @@ let to_out_channel = formatter_of_out_channel (* let non_breaking_space fmt = string fmt " " *) (* let set_needed_space_function _ _ = () *) let flush = pp_print_flush - + *) (* let list = pp_print_list *) let pp_print_queue ?(pp_sep = pp_print_cut) pp_v ppf q = @@ -7707,7 +7707,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) @@ -7824,7 +7824,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) @@ -8605,8 +8605,8 @@ val read_parse_and_extract : 'a Ml_binary.kind -> 'a -> Set_string.t type ('a,'b) t -val sort_files_by_dependencies : - domain:Set_string.t -> Set_string.t Map_string.t -> string Queue.t +(* val sort_files_by_dependencies : + domain:Set_string.t -> Set_string.t Map_string.t -> string Queue.t *) val sort : @@ -8625,7 +8625,7 @@ val collect_ast_map : string list -> (Format.formatter -> string -> 'a) -> (Format.formatter -> string -> 'b) -> - ('a, 'b) t Map_string.t + ('a, 'b) t Map_string.t type dir_spec = { dir : string ; @@ -18083,9 +18083,9 @@ type t = Location.t = { loc_ghost : bool } -val is_ghost : t -> bool +(* val is_ghost : t -> bool *) val merge : t -> t -> t -val none : t +(* val none : t *) end = struct @@ -18131,7 +18131,7 @@ let merge (l: t) (r : t) = -> {loc_start ;loc_end; loc_ghost = false} -let none = Location.none +(* let none = Location.none *) end module Ast_utf8_string_interp : sig diff --git a/lib/4.06.1/unstable/bspack.ml b/lib/4.06.1/unstable/bspack.ml index 76c48cfed0..fed4ffb89e 100644 --- a/lib/4.06.1/unstable/bspack.ml +++ b/lib/4.06.1/unstable/bspack.ml @@ -8354,7 +8354,7 @@ module Ext_format : sig type t = private Format.formatter -val string : t -> string -> unit +(* val string : t -> string -> unit val break : t -> unit @@ -8383,7 +8383,7 @@ val newline : t -> unit val to_out_channel : out_channel -> t -val flush : t -> unit -> unit +val flush : t -> unit -> unit *) val pp_print_queue : ?pp_sep:(Format.formatter -> unit -> unit) -> @@ -8426,17 +8426,17 @@ open Format type t = formatter -let string = pp_print_string +(* let string = pp_print_string *) -let break = fun fmt -> pp_print_break fmt 0 0 +(* let break = fun fmt -> pp_print_break fmt 0 0 let break1 = fun fmt -> pp_print_break fmt 0 1 let space fmt = pp_print_break fmt 1 0 - -let vgroup fmt indent u = + *) +(* let vgroup fmt indent u = pp_open_vbox fmt indent; let v = u () in pp_close_box fmt (); @@ -8465,9 +8465,9 @@ let bracket fmt u = string fmt "["; let v = u () in string fmt "]"; - v + v *) -let paren_group st n action = +(* let paren_group st n action = group st n (fun _ -> paren st action) let brace_group st n action = @@ -8492,7 +8492,7 @@ let to_out_channel = formatter_of_out_channel (* let non_breaking_space fmt = string fmt " " *) (* let set_needed_space_function _ _ = () *) let flush = pp_print_flush - + *) (* let list = pp_print_list *) let pp_print_queue ?(pp_sep = pp_print_cut) pp_v ppf q = @@ -11281,7 +11281,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) @@ -11398,7 +11398,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) @@ -12179,8 +12179,8 @@ val read_parse_and_extract : 'a Ml_binary.kind -> 'a -> Set_string.t type ('a,'b) t -val sort_files_by_dependencies : - domain:Set_string.t -> Set_string.t Map_string.t -> string Queue.t +(* val sort_files_by_dependencies : + domain:Set_string.t -> Set_string.t Map_string.t -> string Queue.t *) val sort : @@ -12199,7 +12199,7 @@ val collect_ast_map : string list -> (Format.formatter -> string -> 'a) -> (Format.formatter -> string -> 'b) -> - ('a, 'b) t Map_string.t + ('a, 'b) t Map_string.t type dir_spec = { dir : string ; diff --git a/lib/4.06.1/unstable/js_compiler.ml b/lib/4.06.1/unstable/js_compiler.ml index 4f86f4e6b7..06d652fdca 100644 --- a/lib/4.06.1/unstable/js_compiler.ml +++ b/lib/4.06.1/unstable/js_compiler.ml @@ -13519,9 +13519,9 @@ type t = Location.t = { loc_ghost : bool } -val is_ghost : t -> bool +(* val is_ghost : t -> bool *) val merge : t -> t -> t -val none : t +(* val none : t *) end = struct @@ -13567,7 +13567,7 @@ let merge (l: t) (r : t) = -> {loc_start ;loc_end; loc_ghost = false} -let none = Location.none +(* let none = Location.none *) end module Ast_utf8_string_interp : sig @@ -90214,7 +90214,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) @@ -90331,7 +90331,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) @@ -96525,9 +96525,9 @@ type t val make : ?immutable_mask:bool array -> int -> t -val is_tailcalled : t -> bool +(* val is_tailcalled : t -> bool -val is_empty : t -> bool +val is_empty : t -> bool *) val set_unbounded : t -> Set_ident.t -> unit @@ -96537,7 +96537,7 @@ val set_lexical_scope : t -> Set_ident.t -> unit val get_lexical_scope : t -> Set_ident.t -val to_string : t -> string +(* val to_string : t -> string *) val mark_unused : t -> int -> unit @@ -96547,7 +96547,7 @@ val get_mutable_params : Ident.t list -> t -> Ident.t list val get_unbounded : t -> Set_ident.t -val get_length : t -> int +(* val get_length : t -> int *) end = struct #1 "js_fun_env.ml" @@ -96621,8 +96621,8 @@ let make ?immutable_mask n = { bound_loop_mutable_values =Set_ident.empty; } -let is_tailcalled x = - x.immutable_mask <> All_immutable_and_no_tail_call +(* let is_tailcalled x = + x.immutable_mask <> All_immutable_and_no_tail_call *) let mark_unused t i = t.used_mask.(i) <- true @@ -96630,13 +96630,13 @@ let mark_unused t i = let get_unused t i = t.used_mask.(i) -let get_length t = Array.length t.used_mask +(* let get_length t = Array.length t.used_mask *) -let to_string env = +(* let to_string env = String.concat "," (Ext_list.map (Set_ident.elements env.unbounded ) (fun id -> Printf.sprintf "%s/%d" id.name id.stamp) - ) + ) *) let get_mutable_params (params : Ident.t list) (x : t ) = match x.immutable_mask with @@ -96663,7 +96663,7 @@ let get_lexical_scope env = (* TODO: can be refined if it only enclose toplevel variables *) -let is_empty t = Set_ident.is_empty t.unbounded +(* let is_empty t = Set_ident.is_empty t.unbounded *) end module Js_op @@ -98316,8 +98316,9 @@ val free_variables_of_statement : val free_variables_of_expression : Set_ident.t -> Set_ident.t -> J.finish_ident_expression -> Set_ident.t -val no_side_effect_expression_desc : - J.expression_desc -> bool +(* val no_side_effect_expression_desc : + J.expression_desc -> bool *) + val no_side_effect_expression : J.expression -> bool (** [no_side_effect] means this expression has no side effect, @@ -98353,7 +98354,7 @@ val rev_flatten_seq : J.expression -> J.block val rev_toplevel_flatten : J.block -> J.block (** return the block in reverse order *) -val is_constant : J.expression -> bool +(* val is_constant : J.expression -> bool *) (** Simple expression, @@ -98716,7 +98717,7 @@ let rev_toplevel_flatten block = | x :: xs -> aux (x :: acc) xs in aux [] block -let rec is_constant (x : J.expression) = +(* let rec is_constant (x : J.expression) = match x.expression_desc with | Array_index (a,b) -> is_constant a && is_constant b | Str (b,_) -> b @@ -98726,7 +98727,7 @@ let rec is_constant (x : J.expression) = -> Ext_list.for_all xs is_constant && is_constant tag | Bin (_op, a, b) -> is_constant a && is_constant b - | _ -> false + | _ -> false *) let rec is_okay_to_duplicate (e : J.expression) = @@ -99181,12 +99182,12 @@ val nint : ?comment:string -> nativeint -> t val small_int : int -> t val float : ?comment:string -> string -> t -val empty_string_literal : t +(* val empty_string_literal : t *) (* TODO: we can do hash consing for small integers *) val zero_int_literal : t -val one_int_literal : t +(* val one_int_literal : t *) val zero_float_lit : t -val obj_int_tag_literal : t +(* val obj_int_tag_literal : t *) (** [is_out e range] is equivalent to [e > range or e <0] @@ -99209,7 +99210,7 @@ val bytes_length : ?comment:string -> t -> t val function_length : ?comment:string -> t -> t -val char_of_int : ?comment:string -> t -> t +(* val char_of_int : ?comment:string -> t -> t *) val char_to_int : ?comment:string -> t -> t @@ -99226,7 +99227,7 @@ val string_append : ?comment:string -> t -> t -> t (* val bind_var_call : ?comment:string -> Ident.t -> string -> t list -> t *) (* val bind_call : ?comment:string -> J.expression -> string -> J.expression list -> t *) -val js_global_dot : ?comment:string -> string -> string -> t +(* val js_global_dot : ?comment:string -> string -> string -> t *) @@ -99746,8 +99747,8 @@ let fuse_to_seq x xs = if xs = [] then x else Ext_list.fold_left xs x seq -let empty_string_literal : t = - {expression_desc = Str (true,""); comment = None} +(* let empty_string_literal : t = + {expression_desc = Str (true,""); comment = None} *) let zero_int_literal : t = {expression_desc = Number (Int {i = 0l; c = None}) ; comment = None} @@ -99926,7 +99927,7 @@ let function_length ?comment (e : t) : t = | _ -> { expression_desc = Length (e, Function) ; comment } (** no dependency introduced *) -let js_global_dot ?comment (x : string) (e1 : string) : t = +(* let js_global_dot ?comment (x : string) (e1 : string) : t = { expression_desc = Static_index (js_global x, e1,None); comment} let char_of_int ?comment (v : t) : t = @@ -99934,7 +99935,7 @@ let char_of_int ?comment (v : t) : t = | Number (Int {i; _}) -> str (String.make 1(Char.chr (Int32.to_int i))) | Char_to_int v -> v - | _ -> {comment ; expression_desc = Char_of_int v} + | _ -> {comment ; expression_desc = Char_of_int v} *) let char_to_int ?comment (v : t) : t = match v.expression_desc with @@ -109677,7 +109678,7 @@ module Js_fold_basic : sig (** A module to calculate hard dependency based on JS IR in module [J] *) -val depends_j : J.expression -> Set_ident.t -> Set_ident.t +(* val depends_j : J.expression -> Set_ident.t -> Set_ident.t *) (** TODO: {!Ordered_hash_set} for better ordering *) val calculate_hard_dependencies : J.block -> Lam_module_ident.Hash_set.t @@ -109710,7 +109711,7 @@ end = struct -class count_deps (add : Ident.t -> unit ) = +(* class count_deps (add : Ident.t -> unit ) = object(self) inherit Js_fold.fold as super method! expression lam = @@ -109732,7 +109733,7 @@ class count_deps (add : Ident.t -> unit ) = *) | _ -> super#expression lam method! ident x = add x ; self - end + end *) let add_lam_module_ident = Lam_module_ident.Hash_set.add let create = Lam_module_ident.Hash_set.create @@ -109768,7 +109769,7 @@ let calculate_hard_dependencies block = will not depend [variables] *) -let depends_j (lam : J.expression) (variables : Set_ident.t) = +(* let depends_j (lam : J.expression) (variables : Set_ident.t) = let v = ref Set_ident.empty in let add id = if Set_ident.mem variables id then @@ -109776,7 +109777,7 @@ let depends_j (lam : J.expression) (variables : Set_ident.t) = in ignore @@ (new count_deps add ) # expression lam ; !v - + *) end module Js_stmt_make : sig @@ -109819,8 +109820,8 @@ type t = J.statement (** empty statement, block of length 0 *) -val empty_stmt : - t +(* val empty_stmt : + t *) val throw_stmt : ?comment:string -> @@ -109896,11 +109897,11 @@ val define_variable : t (** created an alias expression *) -val alias_variable : +(* val alias_variable : ?comment:string -> exp:J.expression -> Ident.t -> - t + t *) val assign : ?comment:string -> @@ -109915,10 +109916,10 @@ val assign : done in .. ]} *) -val assign_unit : +(* val assign_unit : ?comment:string -> J.ident -> - t + t *) (** used in cases like {[ @@ -109927,10 +109928,10 @@ val assign_unit : done in .. ]} *) -val declare_unit : +(* val declare_unit : ?comment:string -> J.ident -> - t + t *) val while_ : ?comment:string -> @@ -109968,16 +109969,17 @@ val return_stmt : t -val return_unit : t list +(* val return_unit : t list *) (** for ocaml function which returns unit it will be compiled into [return 0] in js *) (** if [label] is not set, it will default to empty *) -val continue_stmt : +(* val continue_stmt : ?comment:string -> ?label:J.label -> unit -> - t + t *) + val continue_ : t val debugger_block : t list @@ -110020,9 +110022,9 @@ type t = J.statement let return_stmt ?comment e : t = {statement_desc = Return {return_value = e; } ; comment} -let return_unit : t list = +(* let return_unit : t list = [{ statement_desc = Return {return_value = E.unit; } ; - comment = None}] + comment = None}] *) let empty_stmt : t = { statement_desc = Block []; comment = None} @@ -110072,12 +110074,12 @@ let define_variable ?comment ?ident_info ident_info ;}; comment} -let alias_variable ?comment ~exp (v:Ident.t) : t= +(* let alias_variable ?comment ~exp (v:Ident.t) : t= {statement_desc = Variable { ident = v; value = Some exp; property = Alias; ident_info = {used_stats = NA } }; - comment} + comment} *) let int_switch @@ -110287,7 +110289,7 @@ let assign ?comment id e : t = statement_desc = J.Exp ( E.assign (E.var id) e ) ; comment } -let assign_unit ?comment id : t = +(* let assign_unit ?comment id : t = { statement_desc = J.Exp( E.assign (E.var id) E.unit); comment @@ -110301,7 +110303,7 @@ let declare_unit ?comment id : t = ident_info = {used_stats = NA} }; comment - } + } *) let while_ ?comment ?label ?env (e : E.t) (st : J.block) : t = let env = @@ -110336,11 +110338,11 @@ let try_ ?comment ?with_ ?finally body : t = (* TODO: actually, only loops can be labelled *) -let continue_stmt ?comment ?(label="") () : t = +(* let continue_stmt ?comment ?(label="") () : t = { statement_desc = J.Continue label; comment; - } + } *) let continue_ : t = { statement_desc = Continue "" ; @@ -116240,9 +116242,9 @@ module Lam_bounded_vars : sig val rewrite : Lam.t Hash_ident.t -> Lam.t -> Lam.t (** refresh lambda to replace all bounded vars for new ones *) -val refresh : +(* val refresh : Lam.t -> - Lam.t + Lam.t *) end = struct #1 "lam_bounded_vars.ml" @@ -116416,7 +116418,7 @@ let rewrite (map : _ Hash_ident.t) aux lam -let refresh lam = rewrite (Hash_ident.create 17 : Lam.t Hash_ident.t ) lam +(* let refresh lam = rewrite (Hash_ident.create 17 : Lam.t Hash_ident.t ) lam *) end module Lam_var_stats : sig diff --git a/lib/4.06.1/unstable/js_refmt_compiler.ml b/lib/4.06.1/unstable/js_refmt_compiler.ml index 2d7c95377b..d39364b099 100644 --- a/lib/4.06.1/unstable/js_refmt_compiler.ml +++ b/lib/4.06.1/unstable/js_refmt_compiler.ml @@ -292625,9 +292625,9 @@ type t = Location.t = { loc_ghost : bool } -val is_ghost : t -> bool +(* val is_ghost : t -> bool *) val merge : t -> t -> t -val none : t +(* val none : t *) end = struct @@ -292673,7 +292673,7 @@ let merge (l: t) (r : t) = -> {loc_start ;loc_end; loc_ghost = false} -let none = Location.none +(* let none = Location.none *) end module Ast_utf8_string_interp : sig @@ -369320,7 +369320,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) @@ -369437,7 +369437,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) @@ -375631,9 +375631,9 @@ type t val make : ?immutable_mask:bool array -> int -> t -val is_tailcalled : t -> bool +(* val is_tailcalled : t -> bool -val is_empty : t -> bool +val is_empty : t -> bool *) val set_unbounded : t -> Set_ident.t -> unit @@ -375643,7 +375643,7 @@ val set_lexical_scope : t -> Set_ident.t -> unit val get_lexical_scope : t -> Set_ident.t -val to_string : t -> string +(* val to_string : t -> string *) val mark_unused : t -> int -> unit @@ -375653,7 +375653,7 @@ val get_mutable_params : Ident.t list -> t -> Ident.t list val get_unbounded : t -> Set_ident.t -val get_length : t -> int +(* val get_length : t -> int *) end = struct #1 "js_fun_env.ml" @@ -375727,8 +375727,8 @@ let make ?immutable_mask n = { bound_loop_mutable_values =Set_ident.empty; } -let is_tailcalled x = - x.immutable_mask <> All_immutable_and_no_tail_call +(* let is_tailcalled x = + x.immutable_mask <> All_immutable_and_no_tail_call *) let mark_unused t i = t.used_mask.(i) <- true @@ -375736,13 +375736,13 @@ let mark_unused t i = let get_unused t i = t.used_mask.(i) -let get_length t = Array.length t.used_mask +(* let get_length t = Array.length t.used_mask *) -let to_string env = +(* let to_string env = String.concat "," (Ext_list.map (Set_ident.elements env.unbounded ) (fun id -> Printf.sprintf "%s/%d" id.name id.stamp) - ) + ) *) let get_mutable_params (params : Ident.t list) (x : t ) = match x.immutable_mask with @@ -375769,7 +375769,7 @@ let get_lexical_scope env = (* TODO: can be refined if it only enclose toplevel variables *) -let is_empty t = Set_ident.is_empty t.unbounded +(* let is_empty t = Set_ident.is_empty t.unbounded *) end module Js_op @@ -377422,8 +377422,9 @@ val free_variables_of_statement : val free_variables_of_expression : Set_ident.t -> Set_ident.t -> J.finish_ident_expression -> Set_ident.t -val no_side_effect_expression_desc : - J.expression_desc -> bool +(* val no_side_effect_expression_desc : + J.expression_desc -> bool *) + val no_side_effect_expression : J.expression -> bool (** [no_side_effect] means this expression has no side effect, @@ -377459,7 +377460,7 @@ val rev_flatten_seq : J.expression -> J.block val rev_toplevel_flatten : J.block -> J.block (** return the block in reverse order *) -val is_constant : J.expression -> bool +(* val is_constant : J.expression -> bool *) (** Simple expression, @@ -377822,7 +377823,7 @@ let rev_toplevel_flatten block = | x :: xs -> aux (x :: acc) xs in aux [] block -let rec is_constant (x : J.expression) = +(* let rec is_constant (x : J.expression) = match x.expression_desc with | Array_index (a,b) -> is_constant a && is_constant b | Str (b,_) -> b @@ -377832,7 +377833,7 @@ let rec is_constant (x : J.expression) = -> Ext_list.for_all xs is_constant && is_constant tag | Bin (_op, a, b) -> is_constant a && is_constant b - | _ -> false + | _ -> false *) let rec is_okay_to_duplicate (e : J.expression) = @@ -378287,12 +378288,12 @@ val nint : ?comment:string -> nativeint -> t val small_int : int -> t val float : ?comment:string -> string -> t -val empty_string_literal : t +(* val empty_string_literal : t *) (* TODO: we can do hash consing for small integers *) val zero_int_literal : t -val one_int_literal : t +(* val one_int_literal : t *) val zero_float_lit : t -val obj_int_tag_literal : t +(* val obj_int_tag_literal : t *) (** [is_out e range] is equivalent to [e > range or e <0] @@ -378315,7 +378316,7 @@ val bytes_length : ?comment:string -> t -> t val function_length : ?comment:string -> t -> t -val char_of_int : ?comment:string -> t -> t +(* val char_of_int : ?comment:string -> t -> t *) val char_to_int : ?comment:string -> t -> t @@ -378332,7 +378333,7 @@ val string_append : ?comment:string -> t -> t -> t (* val bind_var_call : ?comment:string -> Ident.t -> string -> t list -> t *) (* val bind_call : ?comment:string -> J.expression -> string -> J.expression list -> t *) -val js_global_dot : ?comment:string -> string -> string -> t +(* val js_global_dot : ?comment:string -> string -> string -> t *) @@ -378852,8 +378853,8 @@ let fuse_to_seq x xs = if xs = [] then x else Ext_list.fold_left xs x seq -let empty_string_literal : t = - {expression_desc = Str (true,""); comment = None} +(* let empty_string_literal : t = + {expression_desc = Str (true,""); comment = None} *) let zero_int_literal : t = {expression_desc = Number (Int {i = 0l; c = None}) ; comment = None} @@ -379032,7 +379033,7 @@ let function_length ?comment (e : t) : t = | _ -> { expression_desc = Length (e, Function) ; comment } (** no dependency introduced *) -let js_global_dot ?comment (x : string) (e1 : string) : t = +(* let js_global_dot ?comment (x : string) (e1 : string) : t = { expression_desc = Static_index (js_global x, e1,None); comment} let char_of_int ?comment (v : t) : t = @@ -379040,7 +379041,7 @@ let char_of_int ?comment (v : t) : t = | Number (Int {i; _}) -> str (String.make 1(Char.chr (Int32.to_int i))) | Char_to_int v -> v - | _ -> {comment ; expression_desc = Char_of_int v} + | _ -> {comment ; expression_desc = Char_of_int v} *) let char_to_int ?comment (v : t) : t = match v.expression_desc with @@ -388783,7 +388784,7 @@ module Js_fold_basic : sig (** A module to calculate hard dependency based on JS IR in module [J] *) -val depends_j : J.expression -> Set_ident.t -> Set_ident.t +(* val depends_j : J.expression -> Set_ident.t -> Set_ident.t *) (** TODO: {!Ordered_hash_set} for better ordering *) val calculate_hard_dependencies : J.block -> Lam_module_ident.Hash_set.t @@ -388816,7 +388817,7 @@ end = struct -class count_deps (add : Ident.t -> unit ) = +(* class count_deps (add : Ident.t -> unit ) = object(self) inherit Js_fold.fold as super method! expression lam = @@ -388838,7 +388839,7 @@ class count_deps (add : Ident.t -> unit ) = *) | _ -> super#expression lam method! ident x = add x ; self - end + end *) let add_lam_module_ident = Lam_module_ident.Hash_set.add let create = Lam_module_ident.Hash_set.create @@ -388874,7 +388875,7 @@ let calculate_hard_dependencies block = will not depend [variables] *) -let depends_j (lam : J.expression) (variables : Set_ident.t) = +(* let depends_j (lam : J.expression) (variables : Set_ident.t) = let v = ref Set_ident.empty in let add id = if Set_ident.mem variables id then @@ -388882,7 +388883,7 @@ let depends_j (lam : J.expression) (variables : Set_ident.t) = in ignore @@ (new count_deps add ) # expression lam ; !v - + *) end module Js_stmt_make : sig @@ -388925,8 +388926,8 @@ type t = J.statement (** empty statement, block of length 0 *) -val empty_stmt : - t +(* val empty_stmt : + t *) val throw_stmt : ?comment:string -> @@ -389002,11 +389003,11 @@ val define_variable : t (** created an alias expression *) -val alias_variable : +(* val alias_variable : ?comment:string -> exp:J.expression -> Ident.t -> - t + t *) val assign : ?comment:string -> @@ -389021,10 +389022,10 @@ val assign : done in .. ]} *) -val assign_unit : +(* val assign_unit : ?comment:string -> J.ident -> - t + t *) (** used in cases like {[ @@ -389033,10 +389034,10 @@ val assign_unit : done in .. ]} *) -val declare_unit : +(* val declare_unit : ?comment:string -> J.ident -> - t + t *) val while_ : ?comment:string -> @@ -389074,16 +389075,17 @@ val return_stmt : t -val return_unit : t list +(* val return_unit : t list *) (** for ocaml function which returns unit it will be compiled into [return 0] in js *) (** if [label] is not set, it will default to empty *) -val continue_stmt : +(* val continue_stmt : ?comment:string -> ?label:J.label -> unit -> - t + t *) + val continue_ : t val debugger_block : t list @@ -389126,9 +389128,9 @@ type t = J.statement let return_stmt ?comment e : t = {statement_desc = Return {return_value = e; } ; comment} -let return_unit : t list = +(* let return_unit : t list = [{ statement_desc = Return {return_value = E.unit; } ; - comment = None}] + comment = None}] *) let empty_stmt : t = { statement_desc = Block []; comment = None} @@ -389178,12 +389180,12 @@ let define_variable ?comment ?ident_info ident_info ;}; comment} -let alias_variable ?comment ~exp (v:Ident.t) : t= +(* let alias_variable ?comment ~exp (v:Ident.t) : t= {statement_desc = Variable { ident = v; value = Some exp; property = Alias; ident_info = {used_stats = NA } }; - comment} + comment} *) let int_switch @@ -389393,7 +389395,7 @@ let assign ?comment id e : t = statement_desc = J.Exp ( E.assign (E.var id) e ) ; comment } -let assign_unit ?comment id : t = +(* let assign_unit ?comment id : t = { statement_desc = J.Exp( E.assign (E.var id) E.unit); comment @@ -389407,7 +389409,7 @@ let declare_unit ?comment id : t = ident_info = {used_stats = NA} }; comment - } + } *) let while_ ?comment ?label ?env (e : E.t) (st : J.block) : t = let env = @@ -389442,11 +389444,11 @@ let try_ ?comment ?with_ ?finally body : t = (* TODO: actually, only loops can be labelled *) -let continue_stmt ?comment ?(label="") () : t = +(* let continue_stmt ?comment ?(label="") () : t = { statement_desc = J.Continue label; comment; - } + } *) let continue_ : t = { statement_desc = Continue "" ; @@ -395346,9 +395348,9 @@ module Lam_bounded_vars : sig val rewrite : Lam.t Hash_ident.t -> Lam.t -> Lam.t (** refresh lambda to replace all bounded vars for new ones *) -val refresh : +(* val refresh : Lam.t -> - Lam.t + Lam.t *) end = struct #1 "lam_bounded_vars.ml" @@ -395522,7 +395524,7 @@ let rewrite (map : _ Hash_ident.t) aux lam -let refresh lam = rewrite (Hash_ident.create 17 : Lam.t Hash_ident.t ) lam +(* let refresh lam = rewrite (Hash_ident.create 17 : Lam.t Hash_ident.t ) lam *) end module Lam_var_stats : sig diff --git a/lib/4.06.1/unstable/native_ppx.ml b/lib/4.06.1/unstable/native_ppx.ml index d16280d062..aee2e46f09 100644 --- a/lib/4.06.1/unstable/native_ppx.ml +++ b/lib/4.06.1/unstable/native_ppx.ml @@ -13497,9 +13497,9 @@ type t = Location.t = { loc_ghost : bool } -val is_ghost : t -> bool +(* val is_ghost : t -> bool *) val merge : t -> t -> t -val none : t +(* val none : t *) end = struct @@ -13545,7 +13545,7 @@ let merge (l: t) (r : t) = -> {loc_start ;loc_end; loc_ghost = false} -let none = Location.none +(* let none = Location.none *) end module Ast_utf8_string_interp : sig @@ -23113,7 +23113,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) @@ -23230,7 +23230,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) diff --git a/lib/4.06.1/whole_compiler.ml b/lib/4.06.1/whole_compiler.ml index f561d31564..b9d98a8bf8 100644 --- a/lib/4.06.1/whole_compiler.ml +++ b/lib/4.06.1/whole_compiler.ml @@ -5955,7 +5955,7 @@ val get_cross_module_inline : unit -> bool (** diagnose option *) val diagnose : bool ref val get_diagnose : unit -> bool -val set_diagnose : bool -> unit +(* val set_diagnose : bool -> unit *) (** options for builtin ppx *) @@ -6072,7 +6072,7 @@ let set_cross_module_inline b = let diagnose = ref false let get_diagnose () = !diagnose -let set_diagnose b = diagnose := b +(* let set_diagnose b = diagnose := b *) (* let (//) = Filename.concat *) @@ -64761,7 +64761,7 @@ module Ext_format : sig type t = private Format.formatter -val string : t -> string -> unit +(* val string : t -> string -> unit val break : t -> unit @@ -64790,7 +64790,7 @@ val newline : t -> unit val to_out_channel : out_channel -> t -val flush : t -> unit -> unit +val flush : t -> unit -> unit *) val pp_print_queue : ?pp_sep:(Format.formatter -> unit -> unit) -> @@ -64833,17 +64833,17 @@ open Format type t = formatter -let string = pp_print_string +(* let string = pp_print_string *) -let break = fun fmt -> pp_print_break fmt 0 0 +(* let break = fun fmt -> pp_print_break fmt 0 0 let break1 = fun fmt -> pp_print_break fmt 0 1 let space fmt = pp_print_break fmt 1 0 - -let vgroup fmt indent u = + *) +(* let vgroup fmt indent u = pp_open_vbox fmt indent; let v = u () in pp_close_box fmt (); @@ -64872,9 +64872,9 @@ let bracket fmt u = string fmt "["; let v = u () in string fmt "]"; - v + v *) -let paren_group st n action = +(* let paren_group st n action = group st n (fun _ -> paren st action) let brace_group st n action = @@ -64899,7 +64899,7 @@ let to_out_channel = formatter_of_out_channel (* let non_breaking_space fmt = string fmt " " *) (* let set_needed_space_function _ _ = () *) let flush = pp_print_flush - + *) (* let list = pp_print_list *) let pp_print_queue ?(pp_sep = pp_print_cut) pp_v ppf q = @@ -66796,8 +66796,8 @@ val read_parse_and_extract : 'a Ml_binary.kind -> 'a -> Set_string.t type ('a,'b) t -val sort_files_by_dependencies : - domain:Set_string.t -> Set_string.t Map_string.t -> string Queue.t +(* val sort_files_by_dependencies : + domain:Set_string.t -> Set_string.t Map_string.t -> string Queue.t *) val sort : @@ -66816,7 +66816,7 @@ val collect_ast_map : string list -> (Format.formatter -> string -> 'a) -> (Format.formatter -> string -> 'b) -> - ('a, 'b) t Map_string.t + ('a, 'b) t Map_string.t type dir_spec = { dir : string ; @@ -81043,9 +81043,9 @@ type t = Location.t = { loc_ghost : bool } -val is_ghost : t -> bool +(* val is_ghost : t -> bool *) val merge : t -> t -> t -val none : t +(* val none : t *) end = struct @@ -81091,7 +81091,7 @@ let merge (l: t) (r : t) = -> {loc_start ;loc_end; loc_ghost = false} -let none = Location.none +(* let none = Location.none *) end module Ast_utf8_string_interp : sig @@ -89305,9 +89305,9 @@ type t val make : ?immutable_mask:bool array -> int -> t -val is_tailcalled : t -> bool +(* val is_tailcalled : t -> bool -val is_empty : t -> bool +val is_empty : t -> bool *) val set_unbounded : t -> Set_ident.t -> unit @@ -89317,7 +89317,7 @@ val set_lexical_scope : t -> Set_ident.t -> unit val get_lexical_scope : t -> Set_ident.t -val to_string : t -> string +(* val to_string : t -> string *) val mark_unused : t -> int -> unit @@ -89327,7 +89327,7 @@ val get_mutable_params : Ident.t list -> t -> Ident.t list val get_unbounded : t -> Set_ident.t -val get_length : t -> int +(* val get_length : t -> int *) end = struct #1 "js_fun_env.ml" @@ -89401,8 +89401,8 @@ let make ?immutable_mask n = { bound_loop_mutable_values =Set_ident.empty; } -let is_tailcalled x = - x.immutable_mask <> All_immutable_and_no_tail_call +(* let is_tailcalled x = + x.immutable_mask <> All_immutable_and_no_tail_call *) let mark_unused t i = t.used_mask.(i) <- true @@ -89410,13 +89410,13 @@ let mark_unused t i = let get_unused t i = t.used_mask.(i) -let get_length t = Array.length t.used_mask +(* let get_length t = Array.length t.used_mask *) -let to_string env = +(* let to_string env = String.concat "," (Ext_list.map (Set_ident.elements env.unbounded ) (fun id -> Printf.sprintf "%s/%d" id.name id.stamp) - ) + ) *) let get_mutable_params (params : Ident.t list) (x : t ) = match x.immutable_mask with @@ -89443,7 +89443,7 @@ let get_lexical_scope env = (* TODO: can be refined if it only enclose toplevel variables *) -let is_empty t = Set_ident.is_empty t.unbounded +(* let is_empty t = Set_ident.is_empty t.unbounded *) end module Js_op @@ -96940,8 +96940,9 @@ val free_variables_of_statement : val free_variables_of_expression : Set_ident.t -> Set_ident.t -> J.finish_ident_expression -> Set_ident.t -val no_side_effect_expression_desc : - J.expression_desc -> bool +(* val no_side_effect_expression_desc : + J.expression_desc -> bool *) + val no_side_effect_expression : J.expression -> bool (** [no_side_effect] means this expression has no side effect, @@ -96977,7 +96978,7 @@ val rev_flatten_seq : J.expression -> J.block val rev_toplevel_flatten : J.block -> J.block (** return the block in reverse order *) -val is_constant : J.expression -> bool +(* val is_constant : J.expression -> bool *) (** Simple expression, @@ -97340,7 +97341,7 @@ let rev_toplevel_flatten block = | x :: xs -> aux (x :: acc) xs in aux [] block -let rec is_constant (x : J.expression) = +(* let rec is_constant (x : J.expression) = match x.expression_desc with | Array_index (a,b) -> is_constant a && is_constant b | Str (b,_) -> b @@ -97350,7 +97351,7 @@ let rec is_constant (x : J.expression) = -> Ext_list.for_all xs is_constant && is_constant tag | Bin (_op, a, b) -> is_constant a && is_constant b - | _ -> false + | _ -> false *) let rec is_okay_to_duplicate (e : J.expression) = @@ -97805,12 +97806,12 @@ val nint : ?comment:string -> nativeint -> t val small_int : int -> t val float : ?comment:string -> string -> t -val empty_string_literal : t +(* val empty_string_literal : t *) (* TODO: we can do hash consing for small integers *) val zero_int_literal : t -val one_int_literal : t +(* val one_int_literal : t *) val zero_float_lit : t -val obj_int_tag_literal : t +(* val obj_int_tag_literal : t *) (** [is_out e range] is equivalent to [e > range or e <0] @@ -97833,7 +97834,7 @@ val bytes_length : ?comment:string -> t -> t val function_length : ?comment:string -> t -> t -val char_of_int : ?comment:string -> t -> t +(* val char_of_int : ?comment:string -> t -> t *) val char_to_int : ?comment:string -> t -> t @@ -97850,7 +97851,7 @@ val string_append : ?comment:string -> t -> t -> t (* val bind_var_call : ?comment:string -> Ident.t -> string -> t list -> t *) (* val bind_call : ?comment:string -> J.expression -> string -> J.expression list -> t *) -val js_global_dot : ?comment:string -> string -> string -> t +(* val js_global_dot : ?comment:string -> string -> string -> t *) @@ -98370,8 +98371,8 @@ let fuse_to_seq x xs = if xs = [] then x else Ext_list.fold_left xs x seq -let empty_string_literal : t = - {expression_desc = Str (true,""); comment = None} +(* let empty_string_literal : t = + {expression_desc = Str (true,""); comment = None} *) let zero_int_literal : t = {expression_desc = Number (Int {i = 0l; c = None}) ; comment = None} @@ -98550,7 +98551,7 @@ let function_length ?comment (e : t) : t = | _ -> { expression_desc = Length (e, Function) ; comment } (** no dependency introduced *) -let js_global_dot ?comment (x : string) (e1 : string) : t = +(* let js_global_dot ?comment (x : string) (e1 : string) : t = { expression_desc = Static_index (js_global x, e1,None); comment} let char_of_int ?comment (v : t) : t = @@ -98558,7 +98559,7 @@ let char_of_int ?comment (v : t) : t = | Number (Int {i; _}) -> str (String.make 1(Char.chr (Int32.to_int i))) | Char_to_int v -> v - | _ -> {comment ; expression_desc = Char_of_int v} + | _ -> {comment ; expression_desc = Char_of_int v} *) let char_to_int ?comment (v : t) : t = match v.expression_desc with @@ -101718,7 +101719,7 @@ module Js_fold_basic : sig (** A module to calculate hard dependency based on JS IR in module [J] *) -val depends_j : J.expression -> Set_ident.t -> Set_ident.t +(* val depends_j : J.expression -> Set_ident.t -> Set_ident.t *) (** TODO: {!Ordered_hash_set} for better ordering *) val calculate_hard_dependencies : J.block -> Lam_module_ident.Hash_set.t @@ -101751,7 +101752,7 @@ end = struct -class count_deps (add : Ident.t -> unit ) = +(* class count_deps (add : Ident.t -> unit ) = object(self) inherit Js_fold.fold as super method! expression lam = @@ -101773,7 +101774,7 @@ class count_deps (add : Ident.t -> unit ) = *) | _ -> super#expression lam method! ident x = add x ; self - end + end *) let add_lam_module_ident = Lam_module_ident.Hash_set.add let create = Lam_module_ident.Hash_set.create @@ -101809,7 +101810,7 @@ let calculate_hard_dependencies block = will not depend [variables] *) -let depends_j (lam : J.expression) (variables : Set_ident.t) = +(* let depends_j (lam : J.expression) (variables : Set_ident.t) = let v = ref Set_ident.empty in let add id = if Set_ident.mem variables id then @@ -101817,7 +101818,7 @@ let depends_j (lam : J.expression) (variables : Set_ident.t) = in ignore @@ (new count_deps add ) # expression lam ; !v - + *) end module Js_stmt_make : sig @@ -101860,8 +101861,8 @@ type t = J.statement (** empty statement, block of length 0 *) -val empty_stmt : - t +(* val empty_stmt : + t *) val throw_stmt : ?comment:string -> @@ -101937,11 +101938,11 @@ val define_variable : t (** created an alias expression *) -val alias_variable : +(* val alias_variable : ?comment:string -> exp:J.expression -> Ident.t -> - t + t *) val assign : ?comment:string -> @@ -101956,10 +101957,10 @@ val assign : done in .. ]} *) -val assign_unit : +(* val assign_unit : ?comment:string -> J.ident -> - t + t *) (** used in cases like {[ @@ -101968,10 +101969,10 @@ val assign_unit : done in .. ]} *) -val declare_unit : +(* val declare_unit : ?comment:string -> J.ident -> - t + t *) val while_ : ?comment:string -> @@ -102009,16 +102010,17 @@ val return_stmt : t -val return_unit : t list +(* val return_unit : t list *) (** for ocaml function which returns unit it will be compiled into [return 0] in js *) (** if [label] is not set, it will default to empty *) -val continue_stmt : +(* val continue_stmt : ?comment:string -> ?label:J.label -> unit -> - t + t *) + val continue_ : t val debugger_block : t list @@ -102061,9 +102063,9 @@ type t = J.statement let return_stmt ?comment e : t = {statement_desc = Return {return_value = e; } ; comment} -let return_unit : t list = +(* let return_unit : t list = [{ statement_desc = Return {return_value = E.unit; } ; - comment = None}] + comment = None}] *) let empty_stmt : t = { statement_desc = Block []; comment = None} @@ -102113,12 +102115,12 @@ let define_variable ?comment ?ident_info ident_info ;}; comment} -let alias_variable ?comment ~exp (v:Ident.t) : t= +(* let alias_variable ?comment ~exp (v:Ident.t) : t= {statement_desc = Variable { ident = v; value = Some exp; property = Alias; ident_info = {used_stats = NA } }; - comment} + comment} *) let int_switch @@ -102328,7 +102330,7 @@ let assign ?comment id e : t = statement_desc = J.Exp ( E.assign (E.var id) e ) ; comment } -let assign_unit ?comment id : t = +(* let assign_unit ?comment id : t = { statement_desc = J.Exp( E.assign (E.var id) E.unit); comment @@ -102342,7 +102344,7 @@ let declare_unit ?comment id : t = ident_info = {used_stats = NA} }; comment - } + } *) let while_ ?comment ?label ?env (e : E.t) (st : J.block) : t = let env = @@ -102377,11 +102379,11 @@ let try_ ?comment ?with_ ?finally body : t = (* TODO: actually, only loops can be labelled *) -let continue_stmt ?comment ?(label="") () : t = +(* let continue_stmt ?comment ?(label="") () : t = { statement_desc = J.Continue label; comment; - } + } *) let continue_ : t = { statement_desc = Continue "" ; @@ -108541,9 +108543,9 @@ module Lam_bounded_vars : sig val rewrite : Lam.t Hash_ident.t -> Lam.t -> Lam.t (** refresh lambda to replace all bounded vars for new ones *) -val refresh : +(* val refresh : Lam.t -> - Lam.t + Lam.t *) end = struct #1 "lam_bounded_vars.ml" @@ -108717,7 +108719,7 @@ let rewrite (map : _ Hash_ident.t) aux lam -let refresh lam = rewrite (Hash_ident.create 17 : Lam.t Hash_ident.t ) lam +(* let refresh lam = rewrite (Hash_ident.create 17 : Lam.t Hash_ident.t ) lam *) end module Lam_var_stats : sig @@ -416035,11 +416037,11 @@ val interface_mliast : Format.formatter -> string -> string -> unit -val after_parsing_impl : +(* val after_parsing_impl : Format.formatter -> string -> Parsetree.structure -> - unit + unit *) (** [after_parsing_impl ppf sourcefile outputprefix ast ] Make sure you need run {!Compmisc.init_path} for set up Used in eval