From 7c2ea42f4f8600dd87f27113fd22e89dc1592641 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Sat, 9 Mar 2024 19:02:24 +0100 Subject: [PATCH 1/4] Compiler: propagate arity across unit boundary Propagate shape information through the flow analysis Function arity from shapes: take advantage of flow analysis --- compiler/bin-js_of_ocaml/build_fs.ml | 2 +- compiler/bin-js_of_ocaml/cmd_arg.ml | 9 + compiler/bin-js_of_ocaml/cmd_arg.mli | 1 + compiler/bin-js_of_ocaml/compile.ml | 52 +- compiler/lib/code.ml | 8 +- compiler/lib/driver.ml | 64 +- compiler/lib/driver.mli | 5 +- compiler/lib/flow.ml | 95 +- compiler/lib/flow.mli | 2 + compiler/lib/ocaml_compiler.ml | 20 + compiler/lib/ocaml_compiler.mli | 2 + compiler/lib/parse_bytecode.ml | 105 +- compiler/lib/pure_fun.ml | 3 +- compiler/lib/shape.ml | 164 + compiler/lib/shape.mli | 59 + compiler/lib/specialize.ml | 30 +- compiler/tests-compiler/gh747.ml | 436 +- compiler/tests-compiler/sourcemap.ml | 53 +- compiler/tests-full/stdlib.cma.expected.js | 4486 ++++++++---------- toplevel/examples/lwt_toplevel/dune | 1 + toplevel/examples/lwt_toplevel/test_lib/a.ml | 14 + toplevel/examples/lwt_toplevel/test_lib/b.ml | 2 + 22 files changed, 2772 insertions(+), 2841 deletions(-) create mode 100644 compiler/lib/shape.ml create mode 100644 compiler/lib/shape.mli diff --git a/compiler/bin-js_of_ocaml/build_fs.ml b/compiler/bin-js_of_ocaml/build_fs.ml index 68821c83be..17f34f11d2 100644 --- a/compiler/bin-js_of_ocaml/build_fs.ml +++ b/compiler/bin-js_of_ocaml/build_fs.ml @@ -74,7 +74,7 @@ function jsoo_create_file_extern(name,content){ let code = Code.prepend Code.empty instr in Filename.gen_file output_file (fun chan -> let pfs_fmt = Pretty_print.to_out_channel chan in - let (_ : Source_map.info) = + let (_ : Source_map.info * Shape.t StringMap.t) = Driver.f ~standalone:true ~wrap_with_fun:`Iife diff --git a/compiler/bin-js_of_ocaml/cmd_arg.ml b/compiler/bin-js_of_ocaml/cmd_arg.ml index c294be23a1..5fc7340984 100644 --- a/compiler/bin-js_of_ocaml/cmd_arg.ml +++ b/compiler/bin-js_of_ocaml/cmd_arg.ml @@ -53,6 +53,7 @@ type t = ; static_env : (string * string) list ; wrap_with_fun : [ `Iife | `Named of string | `Anonymous ] ; target_env : Target_env.t + ; shape_files : string list ; (* toplevel *) dynlink : bool ; linkall : bool @@ -102,6 +103,10 @@ let options = let doc = "Set output file name to [$(docv)]." in Arg.(value & opt (some string) None & info [ "o" ] ~docv:"FILE" ~doc) in + let shape_files = + let doc = "load shape file [$(docv)]." in + Arg.(value & opt_all string [] & info [ "load" ] ~docv:"FILE" ~doc) + in let input_file = let doc = "Compile the bytecode program [$(docv)]. " @@ -279,6 +284,7 @@ let options = output_file input_file js_files + shape_files keep_unit_names = let inline_source_content = not sourcemap_don't_inline_content in let chop_extension s = try Filename.chop_extension s with Invalid_argument _ -> s in @@ -341,6 +347,7 @@ let options = ; bytecode ; source_map ; keep_unit_names + ; shape_files } in let t = @@ -371,6 +378,7 @@ let options = $ output_file $ input_file $ js_files + $ shape_files $ keep_unit_names) in Term.ret t @@ -567,6 +575,7 @@ let options_runtime_only = ; bytecode = `None ; source_map ; keep_unit_names = false + ; shape_files = [] } in let t = diff --git a/compiler/bin-js_of_ocaml/cmd_arg.mli b/compiler/bin-js_of_ocaml/cmd_arg.mli index ec756685b5..aee3a33d30 100644 --- a/compiler/bin-js_of_ocaml/cmd_arg.mli +++ b/compiler/bin-js_of_ocaml/cmd_arg.mli @@ -37,6 +37,7 @@ type t = | `Anonymous ] ; target_env : Target_env.t + ; shape_files : string list ; (* toplevel *) dynlink : bool ; linkall : bool diff --git a/compiler/bin-js_of_ocaml/compile.ml b/compiler/bin-js_of_ocaml/compile.ml index eb50951783..17d2506485 100644 --- a/compiler/bin-js_of_ocaml/compile.ml +++ b/compiler/bin-js_of_ocaml/compile.ml @@ -52,7 +52,13 @@ let output_gen ~standalone ~custom_header ~build_info ~source_map output_file f Driver.configure fmt; if standalone then header ~custom_header fmt; if Config.Flag.header () then jsoo_header fmt build_info; - let sm = f ~standalone ~source_map (k, fmt) in + let sm, shapes = f ~standalone ~source_map (k, fmt) in + (match output_file with + | `Stdout -> () + | `Name name -> + Shape.Store.save' + (Filename.remove_extension name ^ Shape.Store.ext) + (StringMap.bindings shapes)); match source_map, sm with | No_sourcemap, _ | _, None -> () | ((Inline | File _) as output), Some sm -> @@ -70,7 +76,6 @@ let output_gen ~standalone ~custom_header ~build_info ~source_map output_file f Pretty_print.newline fmt; Pretty_print.string fmt (Printf.sprintf "//# sourceMappingURL=%s\n" urlData) in - match output_file with | `Stdout -> f stdout `Stdout | `Name name -> Filename.gen_file name (fun chan -> f chan `File) @@ -130,6 +135,11 @@ let sourcemap_of_infos ~base l = let sourcemap_of_info ~base info = sourcemap_of_infos ~base [ info ] +let map_fst f (x, y) = f x, y + +let merge_shape a b = + StringMap.union (fun _name s1 s2 -> if Shape.equal s1 s2 then Some s1 else None) a b + let run { Cmd_arg.common ; profile @@ -153,6 +163,7 @@ let run ; export_file ; keep_unit_names ; include_runtime + ; shape_files } = let source_map_base = Option.map ~f:snd source_map in let source_map = @@ -172,6 +183,7 @@ let run | `Name _, _ -> ()); List.iter params ~f:(fun (s, v) -> Config.Param.set s v); List.iter static_env ~f:(fun (s, v) -> Eval.set_static_env s v); + List.iter shape_files ~f:(fun fn -> Shape.Store.load' fn); let t = Timer.make () in let include_dirs = List.filter_map (include_dirs @ [ "+stdlib/" ]) ~f:(fun d -> Findlib.find [] d) @@ -381,7 +393,7 @@ let run ~standalone ~link:`All output_file - |> sourcemap_of_info ~base:source_map_base) + |> map_fst (sourcemap_of_info ~base:source_map_base)) | (`Stdin | `File _) as bytecode -> let kind, ic, close_ic, include_dirs = match bytecode with @@ -427,7 +439,7 @@ let run ~source_map ~link:(if linkall then `All else `Needed) output_file - |> sourcemap_of_info ~base:source_map_base) + |> map_fst (sourcemap_of_info ~base:source_map_base)) | `Cmo cmo -> let output_file = match output_file, keep_unit_names with @@ -460,12 +472,13 @@ let run (fun ~standalone ~source_map output -> match include_runtime with | true -> - let sm1 = output_partial_runtime ~standalone ~source_map output in - let sm2 = output_partial cmo code ~standalone ~source_map output in - sourcemap_of_infos ~base:source_map_base [ sm1; sm2 ] + let sm1, sh1 = output_partial_runtime ~standalone ~source_map output in + let sm2, sh2 = output_partial cmo code ~standalone ~source_map output in + ( sourcemap_of_infos ~base:source_map_base [ sm1; sm2 ] + , merge_shape sh1 sh2 ) | false -> output_partial cmo code ~standalone ~source_map output - |> sourcemap_of_info ~base:source_map_base) + |> map_fst (sourcemap_of_info ~base:source_map_base)) | `Cma cma when keep_unit_names -> (if include_runtime then @@ -488,7 +501,7 @@ let run (`Name output_file) (fun ~standalone ~source_map output -> output_partial_runtime ~standalone ~source_map output - |> sourcemap_of_info ~base:source_map_base)); + |> map_fst (sourcemap_of_info ~base:source_map_base))); List.iter cma.lib_units ~f:(fun cmo -> let output_file = match output_file with @@ -524,16 +537,16 @@ let run (`Name output_file) (fun ~standalone ~source_map output -> output_partial ~standalone ~source_map cmo code output - |> sourcemap_of_info ~base:source_map_base)) + |> map_fst (sourcemap_of_info ~base:source_map_base))) | `Cma cma -> let f ~standalone ~source_map output = - let source_map_runtime = + let runtime = if not include_runtime then None else Some (output_partial_runtime ~standalone ~source_map output) in - let source_map_units = + let units = List.map cma.lib_units ~f:(fun cmo -> let t1 = Timer.make () in let code = @@ -553,12 +566,17 @@ let run (Ocaml_compiler.Cmo_format.name cmo); output_partial ~standalone ~source_map cmo code output) in - let sm = - match source_map_runtime with - | None -> source_map_units - | Some x -> x :: source_map_units + let sm_and_shapes = + match runtime with + | None -> units + | Some x -> x :: units + in + let shapes = + List.fold_left sm_and_shapes ~init:StringMap.empty ~f:(fun acc (_, s) -> + merge_shape s acc) in - sourcemap_of_infos ~base:source_map_base sm + ( sourcemap_of_infos ~base:source_map_base (List.map sm_and_shapes ~f:fst) + , shapes ) in output_gen ~standalone:false diff --git a/compiler/lib/code.ml b/compiler/lib/code.ml index a260794262..14ce5d6afc 100644 --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml @@ -556,13 +556,17 @@ module Print = struct if exact then Format.fprintf f "%a!(%a)" Var.print g var_list args else Format.fprintf f "%a(%a)" Var.print g var_list args - | Block (t, a, _, mut) -> + | Block (t, a, k, mut) -> Format.fprintf f - "%s{tag=%d" + "{%s%s:tag=%d" (match mut with | Immutable -> "imm" | Maybe_mutable -> "") + (match k with + | Array -> "A" + | NotArray -> "NA" + | Unknown -> "U") t; for i = 0 to Array.length a - 1 do Format.fprintf f "; %d = %a" i Var.print a.(i) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index b0580bef14..3869ac08e1 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -29,6 +29,7 @@ type optimized_result = ; trampolined_calls : Effects.trampolined_calls ; in_cps : Effects.in_cps ; deadcode_sentinal : Code.Var.t + ; shapes : Shape.t StringMap.t } type profile = @@ -95,7 +96,9 @@ let phi p = let ( +> ) f g x = g (f x) -let map_fst f (x, y, z) = f x, y, z +let map_fst4 f (x, y, z, t) = f x, y, z, t + +let map_fst3 f (x, y, z) = f x, y, z let effects ~deadcode_sentinal p = if Config.Flag.effects () @@ -112,7 +115,7 @@ let effects ~deadcode_sentinal p = Deadcode.f p else p, live_vars in - p |> Effects.f ~flow_info:info ~live_vars +> map_fst Lambda_lifting.f) + p |> Effects.f ~flow_info:info ~live_vars +> map_fst3 Lambda_lifting.f) else ( p , (Code.Var.Set.empty : Effects.trampolined_calls) @@ -202,7 +205,13 @@ let generate ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect - { program; variable_uses; trampolined_calls; deadcode_sentinal; in_cps = _ } = + { program + ; variable_uses + ; trampolined_calls + ; deadcode_sentinal + ; in_cps = _ + ; shapes = _ + } = if times () then Format.eprintf "Start Generation...@."; let should_export = should_export wrap_with_fun in Generate.f @@ -659,6 +668,30 @@ if (typeof module === 'object' && module.exports) { if times () then Format.eprintf " optimizing: %a@." Timer.print t; js +let collects_shapes p = + let _, info = Flow.f p in + let pure = Pure_fun.f p in + let l = ref StringMap.empty in + Code.Addr.Map.iter + (fun _ block -> + List.iter block.Code.body ~f:(fun i -> + match i with + | Code.Let + ( _ + , Prim + ( Extern "caml_register_global" + , [ _code; Pv block; Pc (NativeString name) ] ) ) -> + let shape = Flow.the_shape_of ~pure info block in + let name = + match name with + | Byte s -> s + | Utf (Utf8 s) -> s + in + l := StringMap.add name shape !l + | _ -> ())) + p.blocks; + !l + let configure formatter = let pretty = Config.Flag.pretty () in Pretty_print.set_compact formatter (not pretty); @@ -689,18 +722,21 @@ let optimize ~profile p = | O2 -> o2 | O3 -> o3) +> exact_calls ~deadcode_sentinal profile - +> effects ~deadcode_sentinal - +> map_fst + +> (fun p -> p, collects_shapes p) + +> (fun (p, shapes) -> + let p, trampolined_calls, cps = effects ~deadcode_sentinal p in + p, trampolined_calls, cps, shapes) + +> map_fst4 (match Config.target (), Config.Flag.effects () with | `JavaScript, false -> Generate_closure.f | `JavaScript, true | `Wasm, _ -> Fun.id) - +> map_fst deadcode' + +> map_fst4 deadcode' in if times () then Format.eprintf "Start Optimizing...@."; let t = Timer.make () in - let (program, variable_uses), trampolined_calls, in_cps = opt p in + let (program, variable_uses), trampolined_calls, in_cps, shapes = opt p in let () = if times () then Format.eprintf " optimizations : %a@." Timer.print t in - { program; variable_uses; trampolined_calls; in_cps; deadcode_sentinal } + { program; variable_uses; trampolined_calls; in_cps; deadcode_sentinal; shapes } let full ~standalone ~wrap_with_fun ~profile ~link ~source_map ~formatter d p = let optimized_code = optimize ~profile p in @@ -710,10 +746,18 @@ let full ~standalone ~wrap_with_fun ~profile ~link ~source_map ~formatter d p = +> link_and_pack ~standalone ~wrap_with_fun ~link +> output formatter ~source_map () in - emit formatter optimized_code + let shapes = optimized_code.shapes in + StringMap.iter + (fun name shape -> + Shape.Store.set ~name shape; + Pretty_print.string + formatter + (Printf.sprintf "//# shape: %s:%s\n" name (Shape.to_string shape))) + shapes; + emit formatter optimized_code, shapes let full_no_source_map ~formatter ~standalone ~wrap_with_fun ~profile ~link d p = - let (_ : Source_map.info) = + let (_ : Source_map.info * _) = full ~standalone ~wrap_with_fun ~profile ~link ~source_map:false ~formatter d p in () diff --git a/compiler/lib/driver.mli b/compiler/lib/driver.mli index 07ec8f1da5..09b4095631 100644 --- a/compiler/lib/driver.mli +++ b/compiler/lib/driver.mli @@ -18,6 +18,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Stdlib + type profile type optimized_result = @@ -26,6 +28,7 @@ type optimized_result = ; trampolined_calls : Effects.trampolined_calls ; in_cps : Effects.in_cps ; deadcode_sentinal : Code.Var.t + ; shapes : Shape.t StringMap.t } val optimize : profile:profile -> Code.program -> optimized_result @@ -39,7 +42,7 @@ val f : -> formatter:Pretty_print.t -> Parse_bytecode.Debug.t -> Code.program - -> Source_map.info + -> Source_map.info * Shape.t StringMap.t val f' : ?standalone:bool diff --git a/compiler/lib/flow.ml b/compiler/lib/flow.ml index 0a3f8ea295..4d331b10d1 100644 --- a/compiler/lib/flow.ml +++ b/compiler/lib/flow.ml @@ -149,15 +149,18 @@ let propagate1 deps defs st x = | Constant _ | Apply _ | Prim _ | Special _ | Closure _ | Block _ -> Var.Set.singleton x | Field (y, n, _) -> - var_set_lift - (fun z -> - match defs.(Var.idx z) with - | Expr (Block (_, a, _, _)) when n < Array.length a -> - let t = a.(n) in - add_dep deps x t; - Var.Tbl.get st t - | Phi _ | Param | Expr _ -> Var.Set.empty) - (Var.Tbl.get st y)) + if Option.is_some (Shape.State.get x) + then Var.Set.singleton x + else + var_set_lift + (fun z -> + match defs.(Var.idx z) with + | Expr (Block (_, a, _, _)) when n < Array.length a -> + let t = a.(n) in + add_dep deps x t; + Var.Tbl.get st t + | Phi _ | Param | Expr _ -> Var.Set.empty) + (Var.Tbl.get st y)) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -294,16 +297,17 @@ let propagate2 ?(skip_param = false) defs known_origins possibly_mutable st x = match e with | Constant _ | Closure _ | Apply _ | Prim _ | Block _ | Special _ -> false | Field (y, n, _) -> - Var.Tbl.get st y - || Var.Set.exists - (fun z -> - match defs.(Var.idx z) with - | Expr (Block (_, a, _, _)) -> - n >= Array.length a - || Var.ISet.mem possibly_mutable z - || Var.Tbl.get st a.(n) - | Phi _ | Param | Expr _ -> true) - (Var.Tbl.get known_origins y)) + Option.is_none (Shape.State.get x) + && (Var.Tbl.get st y + || Var.Set.exists + (fun z -> + match defs.(Var.idx z) with + | Expr (Block (_, a, _, _)) -> + n >= Array.length a + || Var.ISet.mem possibly_mutable z + || Var.Tbl.get st a.(n) + | Phi _ | Param | Expr _ -> true) + (Var.Tbl.get known_origins y))) module Domain2 = struct type t = bool @@ -452,6 +456,59 @@ let direct_approx (info : Info.t) x = y | _ -> None +let rec the_shape_of ~pure info x = + let rec loop info x acc : Shape.t = + get_approx + info + (fun x -> + match Shape.State.get x with + | Some shape -> shape + | None -> ( + match info.info_defs.(Var.idx x) with + | Expr (Block (_, a, _, Immutable)) -> + Shape.Block (List.map ~f:(the_shape_of ~pure info) (Array.to_list a)) + | Expr (Closure (l, _)) -> + let pure = Code.Var.Set.mem x pure in + Shape.Function { arity = List.length l; pure; res = Top "unk" } + | Expr (Special (Alias_prim name)) -> ( + try + let arity = Primitive.arity name in + let pure = Primitive.is_pure name in + Shape.Function { arity; pure; res = Top "unk" } + with _ -> Top "other") + | Expr (Apply { f; args; _ }) -> ( + if true || List.mem f ~set:acc + then Top "loop" + else + match loop info f (f :: acc) with + | Shape.Function { arity = n; _ } -> + let diff = n - List.length args in + if diff > 0 + then Shape.Function { arity = diff; pure = false; res = Top "unk" } + else Shape.Top "apply" + | Shape.Block _ | Shape.Top _ -> Shape.Top "apply2") + | _ -> Shape.Top "other")) + (Top "init") + (fun u v -> + let rec merge (u : Shape.t) (v : Shape.t) = + match u, v with + | ( Function { arity = a1; pure = p1; res = r1 } + , Function { arity = a2; pure = p2; res = r2 } ) -> + if a1 = a2 + then Shape.Function { arity = a1; pure = p1 && p2; res = merge r1 r2 } + else Shape.Top "merge" + | Block b1, Block b2 -> + if List.length b1 = List.length b2 + then Block (List.map2 b1 b2 ~f:merge) + else Top "merge block" + | (Top _ as a), _ | _, (Top _ as a) -> a + | Function _, Block _ | Block _, Function _ -> Shape.Top "merge block/fun" + in + merge u v) + x + in + loop info x [] + let build_subst (info : Info.t) vars = let nv = Var.count () in let subst = Array.init nv ~f:(fun i -> Var.of_idx i) in diff --git a/compiler/lib/flow.mli b/compiler/lib/flow.mli index 32801ac301..41ebab8750 100644 --- a/compiler/lib/flow.mli +++ b/compiler/lib/flow.mli @@ -66,4 +66,6 @@ val the_block_contents_of : Info.t -> Code.prim_arg -> Code.Var.t array option val the_int : target:[ `JavaScript | `Wasm ] -> Info.t -> Code.prim_arg -> Targetint.t option +val the_shape_of : pure:Code.Var.Set.t -> Info.t -> Code.Var.t -> Shape.t + val f : ?skip_param:bool -> Code.program -> Code.program * Info.t diff --git a/compiler/lib/ocaml_compiler.ml b/compiler/lib/ocaml_compiler.ml index f8cd33453e..11f6e6027e 100644 --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml @@ -46,6 +46,26 @@ let rec constant_of_const c : Code.constant = let l = Array.of_list (List.map l ~f:constant_of_const) in Tuple (tag, l, Unknown) +let rec is_module_in_summary ident' = function + | Env.Env_empty -> false + | Env.Env_module (summary, ident, _, _) -> + Poly.(ident = ident') || is_module_in_summary ident' summary + | Env.Env_value (summary, _, _) + | Env.Env_type (summary, _, _) + | Env.Env_extension (summary, _, _) + | Env.Env_modtype (summary, _, _) + | Env.Env_class (summary, _, _) + | Env.Env_cltype (summary, _, _) + | Env.Env_open (summary, _) + | Env.Env_functor_arg (summary, _) + | Env.Env_constraints (summary, _) + | ((Env.Env_copy_types (summary, _)) [@if ocaml_version < (4, 10, 0)]) + | ((Env.Env_copy_types summary) [@if ocaml_version >= (4, 10, 0)]) + | Env.Env_persistent (summary, _) + | ((Env.Env_value_unbound (summary, _, _)) [@if ocaml_version >= (4, 10, 0)]) + | ((Env.Env_module_unbound (summary, _, _)) [@if ocaml_version >= (4, 10, 0)]) -> + is_module_in_summary ident' summary + module Symtable = struct (* Copied from ocaml/bytecomp/symtable.ml *) module Num_tbl (M : Map.S) = struct diff --git a/compiler/lib/ocaml_compiler.mli b/compiler/lib/ocaml_compiler.mli index afcb137b29..3cabd9d10c 100644 --- a/compiler/lib/ocaml_compiler.mli +++ b/compiler/lib/ocaml_compiler.mli @@ -18,6 +18,8 @@ val constant_of_const : Lambda.structured_constant -> Code.constant +val is_module_in_summary : Ident.t -> Env.summary -> bool + module Symtable : sig module Global : sig type t = diff --git a/compiler/lib/parse_bytecode.ml b/compiler/lib/parse_bytecode.ml index 9c982b6441..ebbdcd2e31 100644 --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml @@ -548,6 +548,8 @@ module State = struct ; env_offset : int ; handlers : handler list ; globals : globals + ; immutable : Code.Var.Set.t ref + ; includes : string list } let fresh_var state = @@ -632,8 +634,16 @@ module State = struct let pop_handler state = { state with handlers = List.tl state.handlers } - let initial g = - { accu = Unset; stack = []; env = [||]; env_offset = 0; handlers = []; globals = g } + let initial includes g immutable = + { accu = Unset + ; stack = [] + ; env = [||] + ; env_offset = 0 + ; handlers = [] + ; globals = g + ; immutable + ; includes + } let rec print_stack f l = match l with @@ -656,20 +666,22 @@ module State = struct print_env st.env - let rec name_rec debug i l s summary = + let rec name_rec debug st i l s summary = match l, s with | [], _ -> () | (j, ident) :: lrem, Var v :: srem when i = j -> + if Ocaml_compiler.is_module_in_summary ident summary + then st.immutable := Code.Var.Set.add v !(st.immutable); Var.name v (Ident.name ident); - name_rec debug (i + 1) lrem srem summary - | (j, _) :: _, _ :: srem when i < j -> name_rec debug (i + 1) l srem summary + name_rec debug st (i + 1) lrem srem summary + | (j, _) :: _, _ :: srem when i < j -> name_rec debug st (i + 1) l srem summary | _ -> assert false let name_vars st debug pc = if Debug.names debug then let l, summary = Debug.find debug pc in - name_rec debug 0 l st.stack summary + name_rec debug st 0 l st.stack summary let rec make_stack i state = if i = 0 @@ -761,6 +773,12 @@ let get_global state instrs i = let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = CONST(%d)@." Var.print x i; g.vars.(i) <- Some x; + (match g.named_value.(i) with + | None -> () + | Some name -> ( + match Shape.Store.load ~name state.includes with + | None -> () + | Some shape -> Shape.State.assign x shape)); x, state, instrs | false, `Wasm -> ( (* Reference to another compilation units in case of separate @@ -813,6 +831,8 @@ let string_of_addr debug_data addr = in Printf.sprintf "%s:%s-%s %s" file (pos loc.loc_start) (pos loc.loc_end) kind) +let is_immutable _instr _infos _pc = (* We don't know yet *) Maybe_mutable + let rec compile_block blocks debug_data code pc state : unit = match Addr.Map.find_opt pc !tagged_blocks with | Some old_state -> ( @@ -1303,6 +1323,7 @@ and compile infos pc state (instrs : instr list) = let j = getu code (pc + 2) in let y, state = State.fresh_var state in if debug_parser () then Format.printf "%a = %a[%d]@." Var.print y Var.print x j; + Shape.State.propagate x j y; compile infos (pc + 3) state (Let (y, Field (x, j, Non_float)) :: instrs) | PUSHGETGLOBALFIELD -> let state = State.push state in @@ -1312,6 +1333,7 @@ and compile infos pc state (instrs : instr list) = let j = getu code (pc + 2) in let y, state = State.fresh_var state in if debug_parser () then Format.printf "%a = %a[%d]@." Var.print y Var.print x j; + Shape.State.propagate x j y; compile infos (pc + 3) state (Let (y, Field (x, j, Non_float)) :: instrs) | SETGLOBAL -> let i = getu code (pc + 1) in @@ -1334,47 +1356,36 @@ and compile infos pc state (instrs : instr list) = let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = 0@." Var.print x; let instrs = register_global g i instrs in + state.immutable := Code.Var.Set.add (access_global g i) !(state.immutable); compile infos (pc + 2) state (Let (x, const 0) :: instrs) | ATOM0 -> let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = ATOM(0)@." Var.print x; - compile - infos - (pc + 1) - state - (Let (x, Block (0, [||], Unknown, Maybe_mutable)) :: instrs) + let imm = is_immutable instr infos pc in + compile infos (pc + 1) state (Let (x, Block (0, [||], Unknown, imm)) :: instrs) | ATOM -> let i = getu code (pc + 1) in let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = ATOM(%d)@." Var.print x i; - compile - infos - (pc + 2) - state - (Let (x, Block (i, [||], Unknown, Maybe_mutable)) :: instrs) + let imm = is_immutable instr infos pc in + compile infos (pc + 2) state (Let (x, Block (i, [||], Unknown, imm)) :: instrs) | PUSHATOM0 -> let state = State.push state in let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = ATOM(0)@." Var.print x; - compile - infos - (pc + 1) - state - (Let (x, Block (0, [||], Unknown, Maybe_mutable)) :: instrs) + let imm = is_immutable instr infos pc in + compile infos (pc + 1) state (Let (x, Block (0, [||], Unknown, imm)) :: instrs) | PUSHATOM -> let state = State.push state in let i = getu code (pc + 1) in let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = ATOM(%d)@." Var.print x i; - compile - infos - (pc + 2) - state - (Let (x, Block (i, [||], Unknown, Maybe_mutable)) :: instrs) + let imm = is_immutable instr infos pc in + compile infos (pc + 2) state (Let (x, Block (i, [||], Unknown, imm)) :: instrs) | MAKEBLOCK -> let size = getu code (pc + 1) in let tag = getu code (pc + 2) in @@ -1389,22 +1400,24 @@ and compile infos pc state (instrs : instr list) = Format.printf "%d = %a; " i Var.print (List.nth contents i) done; Format.printf "}@."); + let imm = is_immutable instr infos pc in compile infos (pc + 3) state - (Let (x, Block (tag, Array.of_list contents, Unknown, Maybe_mutable)) :: instrs) + (Let (x, Block (tag, Array.of_list contents, Unknown, imm)) :: instrs) | MAKEBLOCK1 -> let tag = getu code (pc + 1) in let y = State.accu state in let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = { 0 = %a; }@." Var.print x Var.print y; + let imm = is_immutable instr infos pc in compile infos (pc + 2) state - (Let (x, Block (tag, [| y |], Unknown, Maybe_mutable)) :: instrs) + (Let (x, Block (tag, [| y |], Unknown, imm)) :: instrs) | MAKEBLOCK2 -> let tag = getu code (pc + 1) in let y = State.accu state in @@ -1414,11 +1427,12 @@ and compile infos pc state (instrs : instr list) = if debug_parser () then Format.printf "%a = { 0 = %a; 1 = %a; }@." Var.print x Var.print y Var.print z; + let imm = is_immutable instr infos pc in compile infos (pc + 2) (State.pop 1 state) - (Let (x, Block (tag, [| y; z |], Unknown, Maybe_mutable)) :: instrs) + (Let (x, Block (tag, [| y; z |], Unknown, imm)) :: instrs) | MAKEBLOCK3 -> let tag = getu code (pc + 1) in let y = State.accu state in @@ -1438,11 +1452,12 @@ and compile infos pc state (instrs : instr list) = z Var.print t; + let imm = is_immutable instr infos pc in compile infos (pc + 2) (State.pop 2 state) - (Let (x, Block (tag, [| y; z; t |], Unknown, Maybe_mutable)) :: instrs) + (Let (x, Block (tag, [| y; z; t |], Unknown, imm)) :: instrs) | MAKEFLOATBLOCK -> let size = getu code (pc + 1) in let state = State.push state in @@ -1456,34 +1471,39 @@ and compile infos pc state (instrs : instr list) = Format.printf "%d = %a; " i Var.print (List.nth contents i) done; Format.printf "}@."); + let imm = is_immutable instr infos pc in compile infos (pc + 2) state - (Let (x, Block (254, Array.of_list contents, Unknown, Maybe_mutable)) :: instrs) + (Let (x, Block (254, Array.of_list contents, Unknown, imm)) :: instrs) | GETFIELD0 -> let y = State.accu state in let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = %a[0]@." Var.print x Var.print y; + Shape.State.propagate y 0 x; compile infos (pc + 1) state (Let (x, Field (y, 0, Non_float)) :: instrs) | GETFIELD1 -> let y = State.accu state in let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = %a[1]@." Var.print x Var.print y; + Shape.State.propagate y 1 x; compile infos (pc + 1) state (Let (x, Field (y, 1, Non_float)) :: instrs) | GETFIELD2 -> let y = State.accu state in let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = %a[2]@." Var.print x Var.print y; + Shape.State.propagate y 2 x; compile infos (pc + 1) state (Let (x, Field (y, 2, Non_float)) :: instrs) | GETFIELD3 -> let y = State.accu state in let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = %a[3]@." Var.print x Var.print y; + Shape.State.propagate y 3 x; compile infos (pc + 1) state (Let (x, Field (y, 3, Non_float)) :: instrs) | GETFIELD -> let y = State.accu state in @@ -1491,6 +1511,7 @@ and compile infos pc state (instrs : instr list) = let x, state = State.fresh_var state in if debug_parser () then Format.printf "%a = %a[%d]@." Var.print x Var.print y n; + Shape.State.propagate y n x; compile infos (pc + 2) state (Let (x, Field (y, n, Non_float)) :: instrs) | GETFLOATFIELD -> let y = State.accu state in @@ -2444,18 +2465,28 @@ type one = ; debug : Debug.t } -let parse_bytecode code globals debug_data = - let state = State.initial globals in +let parse_bytecode ~includes code globals debug_data = + let immutable = ref Code.Var.Set.empty in + let state = State.initial includes globals immutable in Code.Var.reset (); let blocks' = Blocks.analyse code in + Shape.State.reset (); let p = if not (Blocks.is_empty blocks') then ( let start = 0 in compile_block blocks' debug_data code start state; + let immutable = !immutable in let blocks = Addr.Map.mapi (fun _ (state, instr, last) -> + let instr = + List.map instr ~f:(function + | Let (x, Block (tag, args, k, Maybe_mutable)) + when Code.Var.Set.mem x immutable -> + Let (x, Block (tag, args, k, Immutable)) + | x -> x) + in { params = State.stack_vars state; body = instr; branch = last }) !compiled_blocks in @@ -2638,7 +2669,7 @@ let from_exe Ocaml_compiler.Symtable.GlobalMap.iter symbols ~f:(fun id n -> globals.named_value.(n) <- Some (Ocaml_compiler.Symtable.Global.name id); globals.is_exported.(n) <- true); - let p = parse_bytecode code globals debug_data in + let p = parse_bytecode ~includes code globals debug_data in (* register predefined exception *) let body = List.fold_left predefined_exceptions ~init:[] ~f:(fun body (i, name) -> @@ -2761,7 +2792,7 @@ let from_bytes ~prims ~debug (code : bytecode) = t in let globals = make_globals 0 [||] prims in - let p = parse_bytecode code globals debug_data in + let p = parse_bytecode ~includes:[] code globals debug_data in let gdata = Var.fresh_n "global_data" in let need_gdata = ref false in let find_name i = @@ -2900,7 +2931,7 @@ module Reloc = struct globals end -let from_compilation_units ~includes:_ ~include_cmis ~debug_data l = +let from_compilation_units ~includes ~include_cmis ~debug_data l = let reloc = Reloc.create () in List.iter l ~f:(fun (compunit, code) -> Reloc.step1 reloc compunit code); List.iter l ~f:(fun (compunit, code) -> Reloc.step2 reloc compunit code); @@ -2909,7 +2940,7 @@ let from_compilation_units ~includes:_ ~include_cmis ~debug_data l = let l = List.map l ~f:(fun (_, c) -> Bytes.to_string c) in String.concat ~sep:"" l in - let prog = parse_bytecode code globals debug_data in + let prog = parse_bytecode ~includes code globals debug_data in let gdata = Var.fresh_n "global_data" in let need_gdata = ref false in let body = diff --git a/compiler/lib/pure_fun.ml b/compiler/lib/pure_fun.ml index d90818cd1e..db92ad35a5 100644 --- a/compiler/lib/pure_fun.ml +++ b/compiler/lib/pure_fun.ml @@ -26,7 +26,8 @@ let pure_expr pure_funs e = match e with | Block _ | Field _ | Closure _ | Constant _ -> true | Special (Alias_prim _) -> true - | Apply { f; exact; _ } -> exact && Var.Set.mem f pure_funs + | Apply { f; exact; _ } -> + exact && (Var.Set.mem f pure_funs || Shape.State.is_pure_fun f) | Prim (p, _l) -> ( match p with | Extern f -> Primitive.is_pure f diff --git a/compiler/lib/shape.ml b/compiler/lib/shape.ml new file mode 100644 index 0000000000..7ab609f3b8 --- /dev/null +++ b/compiler/lib/shape.ml @@ -0,0 +1,164 @@ +(* Js_of_ocaml compiler + * http://www.ocsigen.org/js_of_ocaml/ + * Copyright (C) 2024 Hugo Heuzard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, with linking exception; + * either version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *) + +open! Stdlib + +type t = + | Top of string + | Block of t list + | Function of + { arity : int + ; pure : bool + ; res : t + } + +type shape = t + +let rec equal a b = + match a, b with + | Top _, Top _ -> true + | ( Function { arity = a1; pure = p1; res = r1 } + , Function { arity = a2; pure = p2; res = r2 } ) -> + a1 = a2 && Bool.(p1 = p2) && equal r1 r2 + | Block b1, Block b2 -> ( + try List.for_all2 ~f:equal b1 b2 with Invalid_argument _ -> false) + | Top _, (Function _ | Block _) + | Function _, (Top _ | Block _) + | Block _, (Top _ | Function _) -> false + +let rec to_string (shape : t) = + match shape with + | Top s -> if true then "N" else Printf.sprintf "N(%s)" s + | Block l -> "[" ^ String.concat ~sep:"," (List.map ~f:to_string l) ^ "]" + | Function { arity; pure; _ } -> + Printf.sprintf "F(%d)%s" arity (if pure then "" else "") + +module Store = struct + module T = Hashtbl.Make (struct + type t = string + + let equal (a : t) (b : t) = String.equal a b + + let hash = Hashtbl.hash + end) + + let ext = ".jsoo-shape" + + let filename ~dir ~name = Filename.concat dir (name ^ ext) + + let t = T.create 17 + + let loaded = Hashtbl.create 17 + + let set ~name shape = T.replace t name shape + + let get ~name = T.find_opt t name + + let magic = "JsooShape000" + + let load' fn = + let ic = open_in_bin fn in + let m = really_input_string ic (String.length magic) in + if not (String.equal m magic) + then failwith (Printf.sprintf "Invalid magic number for shape file %s" fn); + let shapes : (string * shape) list = Marshal.from_channel ic in + close_in ic; + List.iter shapes ~f:(fun (name, shape) -> set ~name shape) + + let load ~name dirs = + if T.mem t name + then get ~name + else + match Fs.find_in_path dirs (filename ~dir:"." ~name) with + | Some f -> + load' f; + get ~name + | None -> + let rec scan : _ -> shape option = function + | [] -> None + | dir :: xs -> ( + let l = + Sys.readdir dir + |> Array.to_list + |> List.sort ~cmp:String.compare + |> List.map ~f:(fun n -> Filename.concat dir n) + in + match + List.find_map l ~f:(fun s -> + if Filename.check_suffix s ext && not (Hashtbl.mem loaded s) + then ( + load' s; + Hashtbl.add loaded s (); + match get ~name with + | None -> None + | Some shape -> Some (s, shape)) + else None) + with + | None -> scan xs + | Some (fn, shape) -> + Format.eprintf "Shape: %s loaded from %s\n" name fn; + Some shape) + in + scan dirs + + let save' fn (l : (string * shape) list) = + let oc = open_out_bin fn in + output_string oc magic; + Marshal.to_channel oc l []; + close_out oc + + let save ~name ~dir = + match get ~name with + | None -> failwith (Printf.sprintf "Don't know any shape for %s" name) + | Some shape -> + let fn = filename ~dir ~name in + save' fn [ name, shape ] +end + +module State = struct + type key = Code.Var.t + + module T = Hashtbl.Make (struct + type t = key + + let equal a b = Poly.(a = b) + + let hash = Code.Var.idx + end) + + let t = T.create 17 + + let assign x shape = T.add t x shape + + let propagate x offset target = + match T.find_opt t x with + | None -> () + | Some (Top _ | Function _) -> () + | Some (Block l) -> T.replace t target (List.nth l offset) + + let get x = T.find_opt t x + + let is_pure_fun x = + match T.find_opt t x with + | None -> false + | Some (Top _ | Block _) -> false + | Some (Function { pure; _ }) -> pure + + let reset () = T.clear t +end diff --git a/compiler/lib/shape.mli b/compiler/lib/shape.mli new file mode 100644 index 0000000000..85bacfa547 --- /dev/null +++ b/compiler/lib/shape.mli @@ -0,0 +1,59 @@ +(* Js_of_ocaml compiler + * http://www.ocsigen.org/js_of_ocaml/ + * Copyright (C) 2024 Hugo Heuzard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, with linking exception; + * either version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *) + +type t = + | Top of string + | Block of t list + | Function of + { arity : int + ; pure : bool + ; res : t + } + +val to_string : t -> string + +val equal : t -> t -> bool + +module Store : sig + val ext : string + + val set : name:string -> t -> unit + + val get : name:string -> t option + + val load' : string -> unit + + val load : name:string -> string list -> t option + + val save : name:string -> dir:string -> unit + + val save' : string -> (string * t) list -> unit +end + +module State : sig + val propagate : Code.Var.t -> int -> Code.Var.t -> unit + + val assign : Code.Var.t -> t -> unit + + val get : Code.Var.t -> t option + + val is_pure_fun : Code.Var.t -> bool + + val reset : unit -> unit +end diff --git a/compiler/lib/specialize.ml b/compiler/lib/specialize.ml index 0b6028b011..ebec2f9a0f 100644 --- a/compiler/lib/specialize.ml +++ b/compiler/lib/specialize.ml @@ -19,35 +19,11 @@ *) open! Stdlib open Code -open Flow let function_arity info x = - let rec arity info x acc = - get_approx - info - (fun x -> - match Flow.Info.def info x with - | Some (Closure (l, _)) -> Some (List.length l) - | Some (Special (Alias_prim prim)) -> ( - try Some (Primitive.arity prim) with Not_found -> None) - | Some (Apply { f; args; _ }) -> ( - if List.mem f ~set:acc - then None - else - match arity info f (f :: acc) with - | Some n -> - let diff = n - List.length args in - if diff > 0 then Some diff else None - | None -> None) - | _ -> None) - None - (fun u v -> - match u, v with - | Some n, Some m when n = m -> u - | _ -> None) - x - in - arity info x [] + match Flow.the_shape_of ~pure:Code.Var.Set.empty info x with + | Top _ | Block _ -> None + | Function { arity; _ } -> Some arity let add_event loc instrs = match loc with diff --git a/compiler/tests-compiler/gh747.ml b/compiler/tests-compiler/gh747.ml index ea4050604a..3a218dfce1 100644 --- a/compiler/tests-compiler/gh747.ml +++ b/compiler/tests-compiler/gh747.ml @@ -56,55 +56,56 @@ print_endline(String.make 1 "Ɋ".[0] ^ String.make 1 "Ɋ".[1]);; 1: 2: //# unitInfo: Provides: Test 3: //# unitInfo: Requires: Stdlib, Stdlib__Random, Stdlib__String - 4: (function - 5: (globalThis){ - 6: "use strict"; - 7: var - 8: runtime = globalThis.jsoo_runtime, - 9: caml_string_of_jsbytes = runtime.caml_string_of_jsbytes; - 10: function caml_call1(f, a0){ - 11: return (f.l >= 0 ? f.l : f.l = f.length) === 1 - 12: ? f(a0) - 13: : runtime.caml_call_gen(f, [a0]); - 14: } - 15: function caml_call2(f, a0, a1){ - 16: return (f.l >= 0 ? f.l : f.l = f.length) === 2 - 17: ? f(a0, a1) - 18: : runtime.caml_call_gen(f, [a0, a1]); - 19: } - 20: var - 21: global_data = runtime.caml_get_global_data(), - 22: greeting = caml_string_of_jsbytes("hello world"), - 23: greeting$0 = caml_string_of_jsbytes("hello world with unicode: \xc9\x8a"), - 24: Stdlib = global_data.Stdlib, - 25: Stdlib_Random = global_data.Stdlib__Random, - 26: Stdlib_String = global_data.Stdlib__String; - 27: /*<>*/ caml_call1(Stdlib[46], greeting); - 28: /*<>*/ caml_call1(Stdlib[46], greeting$0); - 29: var - 30: _a_ = /*<>*/ caml_call1(Stdlib_Random[5], 30), - 31: unicodeLength = - 32: /*<>*/ /*<>*/ runtime.caml_ml_string_length - 33: ( /*<>*/ caml_call2(Stdlib_String[1], _a_, 105)), - 34: _b_ = /*<>*/ caml_call1(Stdlib[33], unicodeLength), - 35: _c_ = - 36: /*<>*/ caml_call2 - 37: (Stdlib[28], - 38: caml_string_of_jsbytes('String.length("\xc9\x8a") should be two:'), - 39: _b_); - 40: /*<>*/ caml_call1(Stdlib[46], _c_); - 41: var - 42: _d_ = /*<>*/ caml_call2(Stdlib_String[1], 1, 138), - 43: _e_ = /*<>*/ caml_call2(Stdlib_String[1], 1, 201), - 44: _f_ = /*<>*/ caml_call2(Stdlib[28], _e_, _d_); - 45: /*<>*/ caml_call1(Stdlib[46], _f_); - 46: var Test = /*<>*/ [0, greeting$0, unicodeLength]; - 47: runtime.caml_register_global(8, Test, "Test"); - 48: return; - 49: /*<>*/ } - 50: (globalThis)); - 51: - 52: //# sourceMappingURL=test.map + 4: //# shape: Test:[N,N] + 5: (function + 6: (globalThis){ + 7: "use strict"; + 8: var + 9: runtime = globalThis.jsoo_runtime, + 10: caml_string_of_jsbytes = runtime.caml_string_of_jsbytes; + 11: function caml_call1(f, a0){ + 12: return (f.l >= 0 ? f.l : f.l = f.length) === 1 + 13: ? f(a0) + 14: : runtime.caml_call_gen(f, [a0]); + 15: } + 16: function caml_call2(f, a0, a1){ + 17: return (f.l >= 0 ? f.l : f.l = f.length) === 2 + 18: ? f(a0, a1) + 19: : runtime.caml_call_gen(f, [a0, a1]); + 20: } + 21: var + 22: global_data = runtime.caml_get_global_data(), + 23: greeting = caml_string_of_jsbytes("hello world"), + 24: greeting$0 = caml_string_of_jsbytes("hello world with unicode: \xc9\x8a"), + 25: Stdlib = global_data.Stdlib, + 26: Stdlib_Random = global_data.Stdlib__Random, + 27: Stdlib_String = global_data.Stdlib__String; + 28: /*<>*/ caml_call1(Stdlib[46], greeting); + 29: /*<>*/ caml_call1(Stdlib[46], greeting$0); + 30: var + 31: _a_ = /*<>*/ caml_call1(Stdlib_Random[5], 30), + 32: unicodeLength = + 33: /*<>*/ /*<>*/ runtime.caml_ml_string_length + 34: ( /*<>*/ caml_call2(Stdlib_String[1], _a_, 105)), + 35: _b_ = /*<>*/ caml_call1(Stdlib[33], unicodeLength), + 36: _c_ = + 37: /*<>*/ caml_call2 + 38: (Stdlib[28], + 39: caml_string_of_jsbytes('String.length("\xc9\x8a") should be two:'), + 40: _b_); + 41: /*<>*/ caml_call1(Stdlib[46], _c_); + 42: var + 43: _d_ = /*<>*/ caml_call2(Stdlib_String[1], 1, 138), + 44: _e_ = /*<>*/ caml_call2(Stdlib_String[1], 1, 201), + 45: _f_ = /*<>*/ caml_call2(Stdlib[28], _e_, _d_); + 46: /*<>*/ caml_call1(Stdlib[46], _f_); + 47: var Test = /*<>*/ [0, greeting$0, unicodeLength]; + 48: runtime.caml_register_global(8, Test, "Test"); + 49: return; + 50: /*<>*/ } + 51: (globalThis)); + 52: + 53: //# sourceMappingURL=test.map |}] let%expect_test _ = @@ -221,175 +222,176 @@ end 1: 2: //# unitInfo: Provides: Test 3: //# unitInfo: Requires: Stdlib__Printf - 4: (function - 5: (globalThis){ - 6: "use strict"; - 7: var - 8: runtime = globalThis.jsoo_runtime, - 9: caml_string_of_jsbytes = runtime.caml_string_of_jsbytes; - 10: function caml_call2(f, a0, a1){ - 11: return (f.l >= 0 ? f.l : f.l = f.length) === 2 - 12: ? f(a0, a1) - 13: : runtime.caml_call_gen(f, [a0, a1]); - 14: } - 15: function caml_call3(f, a0, a1, a2){ - 16: return (f.l >= 0 ? f.l : f.l = f.length) === 3 - 17: ? f(a0, a1, a2) - 18: : runtime.caml_call_gen(f, [a0, a1, a2]); - 19: } - 20: function caml_call8(f, a0, a1, a2, a3, a4, a5, a6, a7){ - 21: return (f.l >= 0 ? f.l : f.l = f.length) === 8 - 22: ? f(a0, a1, a2, a3, a4, a5, a6, a7) - 23: : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5, a6, a7]); - 24: } - 25: var - 26: global_data = runtime.caml_get_global_data(), - 27: cst = caml_string_of_jsbytes(""), - 28: partial = [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, 0]]], - 29: Stdlib_Printf = global_data.Stdlib__Printf, - 30: executable_name = - 31: /*<>*/ runtime.caml_sys_executable_name(0), - 32: os_type = /*<>*/ runtime.caml_sys_get_config(0)[1], - 33: backend_type = - 34: /*<>*/ [0, caml_string_of_jsbytes("js_of_ocaml")], - 35: unix = runtime.caml_sys_const_ostype_unix(0), - 36: win32 = runtime.caml_sys_const_ostype_win32(0), - 37: cygwin = runtime.caml_sys_const_ostype_cygwin(0), - 38: max_array_length = runtime.caml_sys_const_max_wosize(0), - 39: max_floatarray_length = max_array_length / 2 | 0, - 40: max_string_length = (4 * max_array_length | 0) - 1 | 0, - 41: Unhandled = - 42: [248, - 43: caml_string_of_jsbytes("Test.Unhandled"), - 44: runtime.caml_fresh_oo_id(0)], - 45: cst_Raised_at = caml_string_of_jsbytes("Raised at"), - 46: cst_Re_raised_at = caml_string_of_jsbytes("Re-raised at"), - 47: cst_Raised_by_primitive_operat = - 48: caml_string_of_jsbytes("Raised by primitive operation at"), - 49: cst_Called_from = caml_string_of_jsbytes("Called from"), - 50: cst_inlined = caml_string_of_jsbytes(" (inlined)"), - 51: _a_ = - 52: [0, - 53: [2, - 54: 0, - 55: [12, - 56: 32, - 57: [2, - 58: 0, - 59: [11, - 60: caml_string_of_jsbytes(' in file "'), - 61: [2, - 62: 0, - 63: [12, - 64: 34, - 65: [2, - 66: 0, - 67: [11, - 68: caml_string_of_jsbytes(", line "), - 69: [4, - 70: 0, + 4: //# shape: Test:[N,N,[N],N,N,N,N,N,N,N,N,N,N,F(2),F(2),[F(4)]] + 5: (function + 6: (globalThis){ + 7: "use strict"; + 8: var + 9: runtime = globalThis.jsoo_runtime, + 10: caml_string_of_jsbytes = runtime.caml_string_of_jsbytes; + 11: function caml_call2(f, a0, a1){ + 12: return (f.l >= 0 ? f.l : f.l = f.length) === 2 + 13: ? f(a0, a1) + 14: : runtime.caml_call_gen(f, [a0, a1]); + 15: } + 16: function caml_call3(f, a0, a1, a2){ + 17: return (f.l >= 0 ? f.l : f.l = f.length) === 3 + 18: ? f(a0, a1, a2) + 19: : runtime.caml_call_gen(f, [a0, a1, a2]); + 20: } + 21: function caml_call8(f, a0, a1, a2, a3, a4, a5, a6, a7){ + 22: return (f.l >= 0 ? f.l : f.l = f.length) === 8 + 23: ? f(a0, a1, a2, a3, a4, a5, a6, a7) + 24: : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5, a6, a7]); + 25: } + 26: var + 27: global_data = runtime.caml_get_global_data(), + 28: cst = caml_string_of_jsbytes(""), + 29: partial = [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, 0]]], + 30: Stdlib_Printf = global_data.Stdlib__Printf, + 31: executable_name = + 32: /*<>*/ runtime.caml_sys_executable_name(0), + 33: os_type = /*<>*/ runtime.caml_sys_get_config(0)[1], + 34: backend_type = + 35: /*<>*/ [0, caml_string_of_jsbytes("js_of_ocaml")], + 36: unix = runtime.caml_sys_const_ostype_unix(0), + 37: win32 = runtime.caml_sys_const_ostype_win32(0), + 38: cygwin = runtime.caml_sys_const_ostype_cygwin(0), + 39: max_array_length = runtime.caml_sys_const_max_wosize(0), + 40: max_floatarray_length = max_array_length / 2 | 0, + 41: max_string_length = (4 * max_array_length | 0) - 1 | 0, + 42: Unhandled = + 43: [248, + 44: caml_string_of_jsbytes("Test.Unhandled"), + 45: runtime.caml_fresh_oo_id(0)], + 46: cst_Raised_at = caml_string_of_jsbytes("Raised at"), + 47: cst_Re_raised_at = caml_string_of_jsbytes("Re-raised at"), + 48: cst_Raised_by_primitive_operat = + 49: caml_string_of_jsbytes("Raised by primitive operation at"), + 50: cst_Called_from = caml_string_of_jsbytes("Called from"), + 51: cst_inlined = caml_string_of_jsbytes(" (inlined)"), + 52: _a_ = + 53: [0, + 54: [2, + 55: 0, + 56: [12, + 57: 32, + 58: [2, + 59: 0, + 60: [11, + 61: caml_string_of_jsbytes(' in file "'), + 62: [2, + 63: 0, + 64: [12, + 65: 34, + 66: [2, + 67: 0, + 68: [11, + 69: caml_string_of_jsbytes(", line "), + 70: [4, 71: 0, 72: 0, - 73: [11, caml_string_of_jsbytes(", characters "), partial]]]]]]]]]], - 74: caml_string_of_jsbytes - 75: ('%s %s in file "%s"%s, line %d, characters %d-%d')], - 76: _b_ = - 77: [0, - 78: [2, 0, [11, caml_string_of_jsbytes(" unknown location"), 0]], - 79: caml_string_of_jsbytes("%s unknown location")], - 80: _c_ = [0, [2, 0, [12, 10, 0]], caml_string_of_jsbytes("%s\n")], - 81: _d_ = - 82: [0, - 83: [11, - 84: caml_string_of_jsbytes - 85: ("(Program not linked with -g, cannot print stack backtrace)\n"), - 86: 0], - 87: caml_string_of_jsbytes - 88: ("(Program not linked with -g, cannot print stack backtrace)\n")]; - 89: function format_backtrace_slot(pos, slot){ - 90: function info(is_raise){ - 91: /*<>*/ return is_raise - 92: ? 0 === pos ? cst_Raised_at : cst_Re_raised_at - 93: : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from /*<>*/ ; - 94: } - 95: /*<>*/ if(0 === slot[0]){ - 96: var - 97: _h_ = /*<>*/ slot[5], - 98: _i_ = slot[4], - 99: _j_ = slot[3], - 100: _k_ = slot[6] ? cst_inlined : cst, - 101: _l_ = /*<>*/ slot[2], - 102: _m_ = slot[7], - 103: _n_ = info(slot[1]); - 104: /*<>*/ return [0, - 105: caml_call8 - 106: (Stdlib_Printf[4], _a_, _n_, _m_, _l_, _k_, _j_, _i_, _h_)] /*<>*/ ; - 107: } - 108: /*<>*/ if(slot[1]) /*<>*/ return 0; - 109: var _o_ = /*<>*/ info(0); - 110: /*<>*/ return [0, caml_call2(Stdlib_Printf[4], _b_, _o_)] /*<>*/ ; - 111: /*<>*/ } - 112: function print_exception_backtrace(outchan, backtrace){ - 113: /*<>*/ if(! backtrace) - 114: /*<>*/ return caml_call2(Stdlib_Printf[1], outchan, _d_) /*<>*/ ; - 115: var - 116: a = /*<>*/ backtrace[1], - 117: _f_ = /*<>*/ a.length - 2 | 0, - 118: _e_ = 0; - 119: if(_f_ >= 0){ - 120: var i = _e_; - 121: for(;;){ - 122: var - 123: match = - 124: /*<>*/ /*<>*/ format_backtrace_slot - 125: (i, /*<>*/ runtime.caml_check_bound(a, i)[1 + i]); - 126: /*<>*/ if(match){ - 127: var str = match[1]; - 128: /*<>*/ caml_call3(Stdlib_Printf[1], outchan, _c_, str); - 129: } - 130: var _g_ = /*<>*/ i + 1 | 0; - 131: if(_f_ === i) break; - 132: i = _g_; - 133: } - 134: } - 135: /*<>*/ return 0; - 136: /*<>*/ } - 137: function compare(left, right, e1, e2){ - 138: /*<>*/ if(0 === e1[0]){ - 139: var v1 = e1[1]; - 140: if(0 !== e2[0]) /*<>*/ return -1; - 141: var v2 = /*<>*/ e2[1]; - 142: /*<>*/ return caml_call2(left, v1, v2) /*<>*/ ; - 143: } - 144: var v1$0 = /*<>*/ e1[1]; - 145: if(0 === e2[0]) /*<>*/ return 1; - 146: var v2$0 = /*<>*/ e2[1]; - 147: /*<>*/ return caml_call2(right, v1$0, v2$0) /*<>*/ ; - 148: } - 149: var - 150: Either = /*<>*/ [0, compare], - 151: Test = - 152: [0, - 153: executable_name, - 154: os_type, - 155: backend_type, - 156: 0, - 157: 32, + 73: 0, + 74: [11, caml_string_of_jsbytes(", characters "), partial]]]]]]]]]], + 75: caml_string_of_jsbytes + 76: ('%s %s in file "%s"%s, line %d, characters %d-%d')], + 77: _b_ = + 78: [0, + 79: [2, 0, [11, caml_string_of_jsbytes(" unknown location"), 0]], + 80: caml_string_of_jsbytes("%s unknown location")], + 81: _c_ = [0, [2, 0, [12, 10, 0]], caml_string_of_jsbytes("%s\n")], + 82: _d_ = + 83: [0, + 84: [11, + 85: caml_string_of_jsbytes + 86: ("(Program not linked with -g, cannot print stack backtrace)\n"), + 87: 0], + 88: caml_string_of_jsbytes + 89: ("(Program not linked with -g, cannot print stack backtrace)\n")]; + 90: function format_backtrace_slot(pos, slot){ + 91: function info(is_raise){ + 92: /*<>*/ return is_raise + 93: ? 0 === pos ? cst_Raised_at : cst_Re_raised_at + 94: : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from /*<>*/ ; + 95: } + 96: /*<>*/ if(0 === slot[0]){ + 97: var + 98: _h_ = /*<>*/ slot[5], + 99: _i_ = slot[4], + 100: _j_ = slot[3], + 101: _k_ = slot[6] ? cst_inlined : cst, + 102: _l_ = /*<>*/ slot[2], + 103: _m_ = slot[7], + 104: _n_ = info(slot[1]); + 105: /*<>*/ return [0, + 106: caml_call8 + 107: (Stdlib_Printf[4], _a_, _n_, _m_, _l_, _k_, _j_, _i_, _h_)] /*<>*/ ; + 108: } + 109: /*<>*/ if(slot[1]) /*<>*/ return 0; + 110: var _o_ = /*<>*/ info(0); + 111: /*<>*/ return [0, caml_call2(Stdlib_Printf[4], _b_, _o_)] /*<>*/ ; + 112: /*<>*/ } + 113: function print_exception_backtrace(outchan, backtrace){ + 114: /*<>*/ if(! backtrace) + 115: /*<>*/ return caml_call2(Stdlib_Printf[1], outchan, _d_) /*<>*/ ; + 116: var + 117: a = /*<>*/ backtrace[1], + 118: _f_ = /*<>*/ a.length - 2 | 0, + 119: _e_ = 0; + 120: if(_f_ >= 0){ + 121: var i = _e_; + 122: for(;;){ + 123: var + 124: match = + 125: /*<>*/ /*<>*/ format_backtrace_slot + 126: (i, /*<>*/ runtime.caml_check_bound(a, i)[1 + i]); + 127: /*<>*/ if(match){ + 128: var str = match[1]; + 129: /*<>*/ caml_call3(Stdlib_Printf[1], outchan, _c_, str); + 130: } + 131: var _g_ = /*<>*/ i + 1 | 0; + 132: if(_f_ === i) break; + 133: i = _g_; + 134: } + 135: } + 136: /*<>*/ return 0; + 137: /*<>*/ } + 138: function compare(left, right, e1, e2){ + 139: /*<>*/ if(0 === e1[0]){ + 140: var v1 = e1[1]; + 141: if(0 !== e2[0]) /*<>*/ return -1; + 142: var v2 = /*<>*/ e2[1]; + 143: /*<>*/ return caml_call2(left, v1, v2) /*<>*/ ; + 144: } + 145: var v1$0 = /*<>*/ e1[1]; + 146: if(0 === e2[0]) /*<>*/ return 1; + 147: var v2$0 = /*<>*/ e2[1]; + 148: /*<>*/ return caml_call2(right, v1$0, v2$0) /*<>*/ ; + 149: } + 150: var + 151: Either = /*<>*/ [0, compare], + 152: Test = + 153: [0, + 154: executable_name, + 155: os_type, + 156: backend_type, + 157: 0, 158: 32, - 159: unix, - 160: win32, - 161: cygwin, - 162: max_array_length, - 163: max_floatarray_length, - 164: max_string_length, - 165: Unhandled, - 166: format_backtrace_slot, - 167: print_exception_backtrace, - 168: Either]; - 169: runtime.caml_register_global(12, Test, "Test"); - 170: return; - 171: /*<>*/ } - 172: (globalThis)); - 173: - 174: //# sourceMappingURL=test.map + 159: 32, + 160: unix, + 161: win32, + 162: cygwin, + 163: max_array_length, + 164: max_floatarray_length, + 165: max_string_length, + 166: Unhandled, + 167: format_backtrace_slot, + 168: print_exception_backtrace, + 169: Either]; + 170: runtime.caml_register_global(12, Test, "Test"); + 171: return; + 172: /*<>*/ } + 173: (globalThis)); + 174: + 175: //# sourceMappingURL=test.map |}] diff --git a/compiler/tests-compiler/sourcemap.ml b/compiler/tests-compiler/sourcemap.ml index ad83ae7cc8..45ba1c1c50 100644 --- a/compiler/tests-compiler/sourcemap.ml +++ b/compiler/tests-compiler/sourcemap.ml @@ -67,32 +67,33 @@ let%expect_test _ = -> print_mapping ~line_offset:gen_line ~col_offset:gen_column map)); [%expect {| - $ cat "test.ml" - 1: let id x = x - $ cat "test.js" - 1: - 2: //# unitInfo: Provides: Test - 3: (function(globalThis){ - 4: "use strict"; - 5: var runtime = globalThis.jsoo_runtime; - 6: function id(x){return x;} - 7: var Test = [0, id]; - 8: runtime.caml_register_global(0, Test, "Test"); - 9: return; - 10: } - 11: (globalThis)); - 12: - 13: //# sourceMappingURL=test.map - /builtin/blackbox.ml:1:0 -> 5:7 - /builtin/blackbox.ml:1:0 -> 5:17 - /builtin/blackbox.ml:1:0 -> 6:0 - /builtin/blackbox.ml:1:0 -> 6:12 - /builtin/blackbox.ml:1:0 -> 6:15 - /dune-root/test.ml:1:11 -> 6:18 - /dune-root/test.ml:1:12 -> 6:27 - /dune-root/test.ml:1:12 -> 7:0 - /dune-root/test.ml:1:12 -> 7:7 - /builtin/blackbox.ml:1:0 -> 7:14 + $ cat "test.ml" + 1: let id x = x + $ cat "test.js" + 1: + 2: //# unitInfo: Provides: Test + 3: //# shape: Test:[F(1)] + 4: (function(globalThis){ + 5: "use strict"; + 6: var runtime = globalThis.jsoo_runtime; + 7: function id(x){return x;} + 8: var Test = [0, id]; + 9: runtime.caml_register_global(0, Test, "Test"); + 10: return; + 11: } + 12: (globalThis)); + 13: + 14: //# sourceMappingURL=test.map + /builtin/blackbox.ml:1:0 -> 6:7 + /builtin/blackbox.ml:1:0 -> 6:17 + /builtin/blackbox.ml:1:0 -> 7:0 + /builtin/blackbox.ml:1:0 -> 7:12 + /builtin/blackbox.ml:1:0 -> 7:15 + /dune-root/test.ml:1:11 -> 7:18 + /dune-root/test.ml:1:12 -> 7:27 + /dune-root/test.ml:1:12 -> 8:0 + /dune-root/test.ml:1:12 -> 8:7 + /builtin/blackbox.ml:1:0 -> 8:14 |}] let%expect_test _ = diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 099faef92e..87bc792531 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -1,5 +1,6 @@ //# unitInfo: Provides: CamlinternalFormatBasics +//# shape: CamlinternalFormatBasics:[F(2),F(1),F(2)] (function (globalThis){ "use strict"; @@ -349,6 +350,7 @@ //# unitInfo: Provides: Stdlib //# unitInfo: Requires: CamlinternalFormatBasics +//# shape: Stdlib:[F(1),F(1),N,N,N,N,N,N,N,N,N,N,N,N,N,F(2),F(2),F(1),N,N,F(1),N,N,N,N,N,N,F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),N,N,N,F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(3),F(1),F(1),F(2),F(2),F(2),F(4),F(4),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(1),F(2),F(1),F(1),F(3),F(1),F(1),F(4),F(4),F(2),F(1),F(1),F(1),F(2),F(1),F(1),F(1),F(1),F(2),N,F(1),F(2),F(1),F(1),F(1),F(4),F(1),N] (function (globalThis){ "use strict"; @@ -387,11 +389,6 @@ ? f(a0) : runtime.caml_call_gen(f, [a0]); } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } var global_data = runtime.caml_get_global_data(), CamlinternalFormatBasics = global_data.CamlinternalFormatBasics, @@ -835,7 +832,7 @@ fmt1 = _h_[1], s2 = /*<>*/ "%," + str2; /*<>*/ return [0, - caml_call2(CamlinternalFormatBasics[3], fmt1, fmt2), + (0, CamlinternalFormatBasics[3])(fmt1, fmt2), str1 + s2] /*<>*/ ; /*<>*/ } var exit_function = /*<>*/ [0, flush_all]; @@ -997,7 +994,9 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Either -(function(globalThis){ +//# shape: Stdlib__Either:[F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(3),F(3),F(3),F(3),F(4),F(4)] +(function + (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime; function caml_call1(f, a0){ @@ -1113,6 +1112,7 @@ //# unitInfo: Provides: Stdlib__Sys //# unitInfo: Requires: Stdlib +//# shape: Stdlib__Sys:[N,F(1),N,N,[N],N,N,N,N,N,N,N,N,N,F(2),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(1),N,N,N,F(1),F(1),[F(2)]] (function (globalThis){ "use strict"; @@ -1218,6 +1218,7 @@ //# unitInfo: Provides: Stdlib__Obj //# unitInfo: Requires: Stdlib, Stdlib__Sys +//# shape: Stdlib__Obj:[F(1),F(2),F(3),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,[F(1),F(1),F(1)],N] (function (globalThis){ "use strict"; @@ -1225,13 +1226,7 @@ runtime = globalThis.jsoo_runtime, cst_Obj_extension_constructor$1 = "Obj.extension_constructor", caml_check_bound = runtime.caml_check_bound, - caml_obj_tag = runtime.caml_obj_tag; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } - var + caml_obj_tag = runtime.caml_obj_tag, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Sys = global_data.Stdlib__Sys; @@ -1262,13 +1257,14 @@ (is_block(slot) && /*<>*/ caml_obj_tag(slot) === 248){var name = /*<>*/ slot[1]; break a;} var name = - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Obj_extension_constructor$0); + /*<>*/ /*<>*/ (0, Stdlib[1]) + (cst_Obj_extension_constructor$0); } /*<>*/ return caml_obj_tag(name) === 252 ? slot - : /*<>*/ caml_call1 - (Stdlib[1], cst_Obj_extension_constructor) /*<>*/ ; + : /*<>*/ (0, + Stdlib[1]) + (cst_Obj_extension_constructor) /*<>*/ ; } function name(slot){ /*<>*/ return slot[1];} function id(slot){ /*<>*/ return slot[2];} @@ -1287,7 +1283,7 @@ _f_ = /*<>*/ 0 <= l ? 1 : 0, _g_ = _f_ ? l <= max_ephe_length ? 1 : 0 : _f_; if(1 - _g_) - /*<>*/ caml_call1(Stdlib[1], cst_Obj_Ephemeron_create); + /*<>*/ (0, Stdlib[1])(cst_Obj_Ephemeron_create); /*<>*/ return runtime.caml_ephe_create(l) /*<>*/ ; } function length(x){ @@ -1298,7 +1294,7 @@ _c_ = /*<>*/ 0 <= o ? 1 : 0, _d_ = _c_ ? o < /*<>*/ length(e) ? 1 : 0 : _c_, _e_ = /*<>*/ 1 - _d_; - return _e_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _e_ /*<>*/ ; + return _e_ ? /*<>*/ (0, Stdlib[1])(msg) : _e_ /*<>*/ ; } function get_key(e, o){ /*<>*/ raise_if_invalid_offset @@ -1342,8 +1338,7 @@ : _a_; /*<>*/ return _b_; } - /*<>*/ return caml_call1 - (Stdlib[1], cst_Obj_Ephemeron_blit_key) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Obj_Ephemeron_blit_key) /*<>*/ ; } var Stdlib_Obj = @@ -1393,16 +1388,12 @@ //# unitInfo: Provides: Stdlib__Type //# unitInfo: Requires: Stdlib__Obj +//# shape: Stdlib__Type:[[F(1),F(1),F(2)]] (function (globalThis){ "use strict"; - var runtime = globalThis.jsoo_runtime; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } var + runtime = globalThis.jsoo_runtime, global_data = runtime.caml_get_global_data(), Stdlib_Obj = global_data.Stdlib__Obj, cst_Id = "Id", @@ -1412,8 +1403,8 @@ return [0, Id]; /*<>*/ } function uid(A){ - var _b_ = /*<>*/ caml_call1(Stdlib_Obj[22][1], A[1]); - /*<>*/ return caml_call1(Stdlib_Obj[22][3], _b_); + var _b_ = /*<>*/ (0, Stdlib_Obj[22][1])(A[1]); + /*<>*/ return (0, Stdlib_Obj[22][3])(_b_); } function provably_equal(A, B){ /*<>*/ return A[1] === B[1] ? _a_ : 0 /*<>*/ ; @@ -1425,7 +1416,9 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Atomic -(function(globalThis){ +//# shape: Stdlib__Atomic:[F(1),F(1),F(1),F(2),F(2),F(3),F(2),F(1),F(1)] +(function + (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, @@ -1462,6 +1455,7 @@ //# unitInfo: Provides: CamlinternalLazy //# unitInfo: Requires: Stdlib, Stdlib__Obj +//# shape: CamlinternalLazy:[N,F(1),F(2)] (function (globalThis){ "use strict"; @@ -1538,6 +1532,7 @@ //# unitInfo: Provides: Stdlib__Lazy //# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Obj +//# shape: Stdlib__Lazy:[N,F(2),F(1),F(1),F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -1547,18 +1542,13 @@ ? f(a0) : runtime.caml_call_gen(f, [a0]); } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } var global_data = runtime.caml_get_global_data(), CamlinternalLazy = global_data.CamlinternalLazy, Stdlib_Obj = global_data.Stdlib__Obj, Undefined = CamlinternalLazy[1]; function force_val(l){ - /*<>*/ return caml_call2(CamlinternalLazy[3], 1, l) /*<>*/ ; + /*<>*/ return (0, CamlinternalLazy[3])(1, l) /*<>*/ ; } function from_fun(f){ var x = /*<>*/ runtime.caml_obj_block(Stdlib_Obj[8], 1); @@ -1586,7 +1576,7 @@ var _h_ = x[1]; else{ if(246 !== _g_ && 244 !== _g_){var _h_ = x; break a;} - var _h_ = caml_call1(CamlinternalLazy[2], x); + var _h_ = (0, CamlinternalLazy[2])(x); } return caml_call1(f, _h_); }] /*<>*/ ; @@ -1601,7 +1591,7 @@ var _e_ = x[1]; else{ if(246 !== _d_ && 244 !== _d_){var _e_ = x; break a;} - var _e_ = caml_call1(CamlinternalLazy[2], x); + var _e_ = (0, CamlinternalLazy[2])(x); } return caml_call1(f, _e_); }] /*<>*/ ; @@ -1611,7 +1601,7 @@ var _b_ = x[1]; else{ if(246 !== _a_ && 244 !== _a_){var _b_ = x; break a;} - var _b_ = caml_call1(CamlinternalLazy[2], x); + var _b_ = (0, CamlinternalLazy[2])(x); } /*<>*/ return /*<>*/ from_val ( /*<>*/ caml_call1(f, _b_)) /*<>*/ ; @@ -1633,6 +1623,7 @@ //# unitInfo: Provides: Stdlib__Seq //# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Atomic, Stdlib__Lazy +//# shape: Stdlib__Seq:[F(1),F(1),F(1),F(2),F(3),F(2),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(4),F(3),F(3),F(3),F(3),F(1),F(2),F(3),F(2),F(3),F(2),F(2),F(2),F(2),F(3),F(2),F(3),F(3),F(3),F(2),F(2),F(3),F(3),F(3),F(1),N,F(1),F(2),F(3),F(2),F(3),F(3),F(3),F(4),F(3),F(4),F(2),F(3),F(1),F(1),F(2),F(2),F(1),F(1),F(2)] (function (globalThis){ "use strict"; @@ -2035,7 +2026,7 @@ /*<>*/ } function init(n, f){ /*<>*/ if(0 > n) - /*<>*/ return caml_call1(Stdlib[1], cst_Seq_init) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Seq_init) /*<>*/ ; var _af_ = /*<>*/ 0; return function(_ag_){ /*<>*/ return init_aux(f, _af_, n, _ag_);} /*<>*/ ; @@ -2132,7 +2123,7 @@ } function take(n, xs){ /*<>*/ if(n < 0) - /*<>*/ caml_call1(Stdlib[1], cst_Seq_take); + /*<>*/ (0, Stdlib[1])(cst_Seq_take); /*<>*/ return take_aux(n, xs) /*<>*/ ; } function drop(n, xs){ @@ -2156,7 +2147,7 @@ xs$0 = xs$1; } /*<>*/ } - : /*<>*/ caml_call1(Stdlib[1], cst_Seq_drop) /*<>*/ ; + : /*<>*/ (0, Stdlib[1])(cst_Seq_drop) /*<>*/ ; } function take_while(p, xs, param){ var match = /*<>*/ caml_call1(xs, 0); @@ -2214,12 +2205,12 @@ var xs$0 = /*<>*/ match[2], x = match[1]; /*<>*/ return [0, x, memoize(xs$0)] /*<>*/ ; /*<>*/ } - var s = /*<>*/ caml_call1(to_lazy, s$0); + var s = /*<>*/ to_lazy(s$0); /*<>*/ return function(param){ var _I_ = /*<>*/ runtime.caml_obj_tag(s); if(250 === _I_) return s[1]; if(246 !== _I_ && 244 !== _I_) return s; - return caml_call1(CamlinternalLazy[2], s) /*<>*/ ;} /*<>*/ ; + return (0, CamlinternalLazy[2])(s) /*<>*/ ;} /*<>*/ ; /*<>*/ } function once(xs){ function f(param){ @@ -2228,10 +2219,9 @@ var xs$0 = /*<>*/ match[2], x = match[1]; /*<>*/ return [0, x, once(xs$0)] /*<>*/ ; /*<>*/ } - var action = /*<>*/ caml_call1(Stdlib_Atomic[1], f); + var action = /*<>*/ (0, Stdlib_Atomic[1])(f); /*<>*/ return function(param){ - var - f = /*<>*/ caml_call2(Stdlib_Atomic[5], action, failure); + var f = /*<>*/ (0, Stdlib_Atomic[5])(action, failure); /*<>*/ return caml_call1(f, 0) /*<>*/ ;} /*<>*/ ; /*<>*/ } function zip(xs, ys, param){ @@ -2561,6 +2551,7 @@ //# unitInfo: Provides: Stdlib__Option //# unitInfo: Requires: Stdlib, Stdlib__Seq +//# shape: Stdlib__Option:[N,F(1),F(2),F(1),F(2),F(1),F(2),F(3),F(2),F(1),F(1),F(3),F(3),F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -2591,7 +2582,7 @@ /*<>*/ } function get(param){ /*<>*/ if(! param) - /*<>*/ return caml_call1(Stdlib[1], cst_option_is_None) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_option_is_None) /*<>*/ ; var v = /*<>*/ param[1]; /*<>*/ return v; /*<>*/ } @@ -2658,9 +2649,12 @@ function to_seq(param){ /*<>*/ if(! param) /*<>*/ return Stdlib_Seq[20]; - var v = /*<>*/ param[1]; - /*<>*/ return caml_call1(Stdlib_Seq[21], v) /*<>*/ ; - } + var + v = /*<>*/ param[1], + _a_ = /*<>*/ Stdlib_Seq[21]; + return function(_b_){ + /*<>*/ return _a_(v, _b_);} /*<>*/ ; + /*<>*/ } var Stdlib_Option = /*<>*/ [0, @@ -2687,6 +2681,7 @@ //# unitInfo: Provides: Stdlib__Result //# unitInfo: Requires: Stdlib, Stdlib__Seq +//# shape: Stdlib__Result:[F(1),F(1),F(2),F(1),F(1),F(2),F(1),F(2),F(2),F(3),F(2),F(2),F(1),F(1),F(4),F(4),F(1),F(1),F(1)] (function (globalThis){ "use strict"; @@ -2721,14 +2716,13 @@ /*<>*/ } function get_ok(param){ /*<>*/ if(0 !== param[0]) - /*<>*/ return caml_call1 - (Stdlib[1], cst_result_is_Error) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_result_is_Error) /*<>*/ ; var v = /*<>*/ param[1]; /*<>*/ return v; /*<>*/ } function get_error(param){ /*<>*/ if(0 === param[0]) - /*<>*/ return caml_call1(Stdlib[1], cst_result_is_Ok) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_result_is_Ok) /*<>*/ ; var e = /*<>*/ param[1]; /*<>*/ return e; /*<>*/ } @@ -2822,9 +2816,12 @@ function to_seq(param){ /*<>*/ if(0 !== param[0]) /*<>*/ return Stdlib_Seq[20]; - var v = /*<>*/ param[1]; - /*<>*/ return caml_call1(Stdlib_Seq[21], v) /*<>*/ ; - } + var + v = /*<>*/ param[1], + _a_ = /*<>*/ Stdlib_Seq[21]; + return function(_b_){ + /*<>*/ return _a_(v, _b_);} /*<>*/ ; + /*<>*/ } var Stdlib_Result = /*<>*/ [0, @@ -2853,7 +2850,9 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Bool -(function(globalThis){ +//# shape: Stdlib__Bool:[F(1),F(2),F(2),F(1),F(1),F(1),F(2),F(1)] +(function + (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, caml_hash = runtime.caml_hash; function equal(_d_, _c_){return _d_ === _c_ ? 1 : 0;} @@ -2891,6 +2890,7 @@ //# unitInfo: Provides: Stdlib__Char //# unitInfo: Requires: Stdlib +//# shape: Stdlib__Char:[F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(1)] (function (globalThis){ "use strict"; @@ -2899,13 +2899,7 @@ caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, caml_create_bytes = runtime.caml_create_bytes, caml_hash = runtime.caml_hash, - caml_string_of_bytes = runtime.caml_string_of_bytes; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } - var + caml_string_of_bytes = runtime.caml_string_of_bytes, global_data = runtime.caml_get_global_data(), cst = "\\\\", cst$0 = "\\'", @@ -2918,7 +2912,7 @@ function chr(n){ /*<>*/ if(0 <= n && 255 >= n) /*<>*/ return n; - /*<>*/ return caml_call1(Stdlib[1], cst_Char_chr) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Char_chr) /*<>*/ ; } function escaped(c){ a: @@ -2989,6 +2983,7 @@ //# unitInfo: Provides: Stdlib__Uchar //# unitInfo: Requires: Stdlib +//# shape: Stdlib__Uchar:[N,N,N,N,F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(2),F(1),F(1),F(1)] (function (globalThis){ "use strict"; @@ -2996,18 +2991,7 @@ runtime = globalThis.jsoo_runtime, cst_uchar_ml = "uchar.ml", caml_format_int = runtime.caml_format_int, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } - var + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, global_data = runtime.caml_get_global_data(), err_no_pred = "U+0000 has no predecessor", err_no_succ = "U+10FFFF has no successor", @@ -3023,7 +3007,7 @@ ? hi_bound : u === 1114111 - ? /*<>*/ caml_call1(Stdlib[1], err_no_succ) + ? /*<>*/ (0, Stdlib[1])(err_no_succ) : u + 1 | 0 /*<>*/ ; } function pred(u){ @@ -3031,7 +3015,7 @@ ? lo_bound : u === 0 - ? /*<>*/ caml_call1(Stdlib[1], err_no_pred) + ? /*<>*/ (0, Stdlib[1])(err_no_pred) : u - 1 | 0 /*<>*/ ; } function is_valid(i){ @@ -3048,11 +3032,10 @@ /*<>*/ if(is_valid(i)) /*<>*/ return i; var _m_ = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], - /*<>*/ caml_format_int("%X", i), + /*<>*/ /*<>*/ (0, Stdlib[28]) + ( /*<>*/ caml_format_int("%X", i), cst_is_not_an_Unicode_scalar_v); - /*<>*/ return caml_call1(Stdlib[1], _m_); + /*<>*/ return (0, Stdlib[1])(_m_); } function is_char(u){ /*<>*/ return u < 256 ? 1 : 0; @@ -3064,12 +3047,10 @@ /*<>*/ if(255 >= u) /*<>*/ return u; var _k_ = - /*<>*/ caml_call2 - (Stdlib[28], - caml_format_int("%04X", u), - cst_is_not_a_latin1_character), - _l_ = /*<>*/ caml_call2(Stdlib[28], cst_U, _k_); - /*<>*/ return caml_call1(Stdlib[1], _l_) /*<>*/ ; + /*<>*/ (0, Stdlib[28]) + (caml_format_int("%04X", u), cst_is_not_a_latin1_character), + _l_ = /*<>*/ (0, Stdlib[28])(cst_U, _k_); + /*<>*/ return (0, Stdlib[1])(_l_) /*<>*/ ; } function unsafe_to_char(_j_){ /*<>*/ return _j_;} function equal(_i_, _h_){return _i_ === _h_ ? 1 : 0;} @@ -3151,6 +3132,7 @@ //# unitInfo: Provides: Stdlib__List //# unitInfo: Requires: Stdlib +//# shape: Stdlib__List:[F(1),F(2),F(2),F(1),F(2),F(1),F(1),F(2),F(2),F(1),F(2),F(2),F(2),F(1),F(1),F(3),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(3),F(3),F(4),F(4),F(2),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(1),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(3),F(1),F(1)] (function (globalThis){ "use strict"; @@ -3199,23 +3181,23 @@ /*<>*/ } function hd(param){ /*<>*/ if(! param) - /*<>*/ return caml_call1(Stdlib[2], cst_hd) /*<>*/ ; + /*<>*/ return (0, Stdlib[2])(cst_hd) /*<>*/ ; var a = /*<>*/ param[1]; /*<>*/ return a; /*<>*/ } function tl(param){ /*<>*/ if(! param) - /*<>*/ return caml_call1(Stdlib[2], cst_tl) /*<>*/ ; + /*<>*/ return (0, Stdlib[2])(cst_tl) /*<>*/ ; var l = /*<>*/ param[2]; /*<>*/ return l; /*<>*/ } function nth(l, n){ /*<>*/ if(0 > n) - /*<>*/ return caml_call1(Stdlib[1], cst_List_nth) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_nth) /*<>*/ ; var l$0 = /*<>*/ l, n$0 = n; for(;;){ /*<>*/ if(! l$0) - /*<>*/ return caml_call1(Stdlib[2], cst_nth) /*<>*/ ; + /*<>*/ return (0, Stdlib[2])(cst_nth) /*<>*/ ; var l$1 = /*<>*/ l$0[2], a = l$0[1]; /*<>*/ if(0 === n$0) /*<>*/ return a; var n$1 = /*<>*/ n$0 - 1 | 0; @@ -3225,7 +3207,7 @@ /*<>*/ } function nth_opt(l, n){ /*<>*/ if(0 > n) - /*<>*/ return caml_call1(Stdlib[1], cst_List_nth$0) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_nth$0) /*<>*/ ; var l$0 = /*<>*/ l, n$0 = n; for(;;){ /*<>*/ if(! l$0) /*<>*/ return 0; @@ -3267,7 +3249,7 @@ } function init(len, f){ /*<>*/ if(0 > len) - /*<>*/ return caml_call1(Stdlib[1], cst_List_init) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_init) /*<>*/ ; var last = /*<>*/ len - 1 | 0, i$1 = 0; /*<>*/ if(last < 0) /*<>*/ return 0; /*<>*/ if(0 === last) @@ -3306,7 +3288,7 @@ r = /*<>*/ param[2], l = param[1], _I_ = /*<>*/ flatten(r); - /*<>*/ return caml_call2(Stdlib[37], l, _I_); + /*<>*/ return (0, Stdlib[37])(l, _I_); } function map(f, param){ /*<>*/ if(! param) /*<>*/ return 0; @@ -3502,7 +3484,7 @@ break a; } /*<>*/ dst[1 + offset] = - caml_call1(Stdlib[1], cst_List_map2$0); + (0, Stdlib[1])(cst_List_map2$0); } /*<>*/ return [0, r1, block]; } @@ -3517,7 +3499,7 @@ } } else if(! l2) /*<>*/ return 0; - /*<>*/ return caml_call1(Stdlib[1], cst_List_map2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_map2) /*<>*/ ; } function rev_map2(f, l1, l2){ var accu = /*<>*/ 0, l1$0 = l1, l2$0 = l2; @@ -3537,7 +3519,7 @@ } } else if(! l2$0) /*<>*/ return accu; - /*<>*/ return caml_call1(Stdlib[1], cst_List_rev_map2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_rev_map2) /*<>*/ ; } } function iter2(f, l1, l2){ @@ -3553,7 +3535,7 @@ } } else if(! l2$0) /*<>*/ return 0; - /*<>*/ return caml_call1(Stdlib[1], cst_List_iter2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_iter2) /*<>*/ ; } } function fold_left2(f, accu, l1, l2){ @@ -3574,7 +3556,7 @@ } } else if(! l2$0) /*<>*/ return accu$0; - /*<>*/ return caml_call1(Stdlib[1], cst_List_fold_left2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_fold_left2) /*<>*/ ; } } function fold_right2(f, l1, l2, accu){ @@ -3589,7 +3571,7 @@ } } else if(! l2) /*<>*/ return accu; - /*<>*/ return caml_call1(Stdlib[1], cst_List_fold_right2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_fold_right2) /*<>*/ ; } function for_all(p, param){ var param$0 = /*<>*/ param; @@ -3633,7 +3615,7 @@ } } else if(! l2$0) /*<>*/ return 1; - /*<>*/ return caml_call1(Stdlib[1], cst_List_for_all2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_for_all2) /*<>*/ ; } } function exists2(p, l1, l2){ @@ -3654,7 +3636,7 @@ } } else if(! l2$0) /*<>*/ return 0; - /*<>*/ return caml_call1(Stdlib[1], cst_List_exists2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_exists2) /*<>*/ ; } } function mem(x, param){ @@ -4076,7 +4058,7 @@ } } else if(! l2) /*<>*/ return 0; - /*<>*/ return caml_call1(Stdlib[1], cst_List_combine) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_List_combine) /*<>*/ ; } function merge(cmp, l1, l2){ /*<>*/ if(! l1) /*<>*/ return l2; @@ -4696,7 +4678,9 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Int -(function(globalThis){ +//# shape: Stdlib__Int:[N,N,N,F(1),N,N,F(1),F(2),F(2),F(2),F(2),F(1),F(2),F(1)] +(function + (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, caml_hash = runtime.caml_hash; function abs(x){ @@ -4744,6 +4728,7 @@ //# unitInfo: Provides: Stdlib__Bytes //# unitInfo: Requires: Stdlib, Stdlib__Char, Stdlib__Int, Stdlib__Seq, Stdlib__Sys, Stdlib__Uchar +//# shape: Stdlib__Bytes:[F(2),F(2),N,F(1),F(1),F(1),F(3),F(3),F(3),F(4),F(5),F(5),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(2),F(2),F(1),F(1),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(2),F(3),F(3),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(1),F(1),F(2),F(1),F(1),F(1),F(2),F(3),F(1),F(2),F(3),F(1),F(2),F(3),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(1)] (function (globalThis){ "use strict"; @@ -4854,8 +4839,7 @@ /*<>*/ caml_blit_bytes(s, ofs, r, 0, len); /*<>*/ return r; } - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_sub_Bytes_sub) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_String_sub_Bytes_sub) /*<>*/ ; } function sub_string(b, ofs, len){ /*<>*/ return /*<>*/ caml_string_of_bytes @@ -4871,7 +4855,7 @@ if(a < 0){if(_an_ && ! match) break a;} else if(! _an_ && match) break a; /*<>*/ return c; } - /*<>*/ return caml_call1(Stdlib[1], cst_Bytes_extend) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Bytes_extend) /*<>*/ ; } function extend(s, left, right){ var @@ -4885,9 +4869,8 @@ var dstoff = /*<>*/ 0, srcoff = - left | 0; var cpylen = - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Int[10], - /*<>*/ caml_ml_bytes_length(s) - srcoff | 0, + /*<>*/ /*<>*/ (0, Stdlib_Int[10]) + ( /*<>*/ caml_ml_bytes_length(s) - srcoff | 0, len - dstoff | 0); /*<>*/ if(0 < cpylen) /*<>*/ caml_blit_bytes(s, srcoff, r, dstoff, cpylen); @@ -4897,8 +4880,7 @@ /*<>*/ if (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) /*<>*/ return caml_fill_bytes(s, ofs, len, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_fill_Bytes_fill) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_String_fill_Bytes_fill) /*<>*/ ; } function blit(s1, ofs1, s2, ofs2, len){ /*<>*/ if @@ -4909,7 +4891,7 @@ (caml_ml_bytes_length(s1) - len | 0) >= ofs1 && 0 <= ofs2 && (caml_ml_bytes_length(s2) - len | 0) >= ofs2) /*<>*/ return caml_blit_bytes(s1, ofs1, s2, ofs2, len) /*<>*/ ; - /*<>*/ return caml_call1(Stdlib[1], cst_Bytes_blit) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Bytes_blit) /*<>*/ ; } function blit_string(s1, ofs1, s2, ofs2, len){ /*<>*/ if @@ -4921,8 +4903,8 @@ && 0 <= ofs2 && (caml_ml_bytes_length(s2) - len | 0) >= ofs2) /*<>*/ return runtime.caml_blit_string (s1, ofs1, s2, ofs2, len) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_blit_Bytes_blit_str) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_blit_Bytes_blit_str) /*<>*/ ; } function iter(f, a){ var @@ -4975,7 +4957,7 @@ acc$0 = /*<>*/ acc <= x ? x - : /*<>*/ caml_call1(Stdlib[1], cst_Bytes_concat); + : /*<>*/ (0, Stdlib[1])(cst_Bytes_concat); /*<>*/ acc = acc$0; param = tl; } @@ -5378,15 +5360,15 @@ var l = /*<>*/ caml_ml_bytes_length(s); /*<>*/ if(0 <= i && l >= i) /*<>*/ return index_rec(s, l, i, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_index_from_Bytes_in) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_index_from_Bytes_in) /*<>*/ ; } function index_from_opt(s, i, c){ var l = /*<>*/ caml_ml_bytes_length(s); /*<>*/ if(0 <= i && l >= i) /*<>*/ return index_rec_opt(s, l, i, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_index_from_opt_Byte) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_index_from_opt_Byte) /*<>*/ ; } function rindex_rec(s, i, c){ var i$0 = /*<>*/ i; @@ -5406,8 +5388,8 @@ function rindex_from(s, i, c){ /*<>*/ if(-1 <= i && caml_ml_bytes_length(s) > i) /*<>*/ return rindex_rec(s, i, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_rindex_from_Bytes_r) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_rindex_from_Bytes_r) /*<>*/ ; } function rindex_rec_opt(s, i, c){ var i$0 = /*<>*/ i; @@ -5426,8 +5408,8 @@ function rindex_from_opt(s, i, c){ /*<>*/ if(-1 <= i && caml_ml_bytes_length(s) > i) /*<>*/ return rindex_rec_opt(s, i, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_rindex_from_opt_Byt) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_rindex_from_opt_Byt) /*<>*/ ; } function contains_from(s, i, c){ var l = /*<>*/ caml_ml_bytes_length(s); @@ -5442,8 +5424,8 @@ if(_J_ === Stdlib[8]) /*<>*/ return 0; /*<>*/ throw caml_maybe_attach_backtrace(_J_, 0); } - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_contains_from_Bytes) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_contains_from_Bytes) /*<>*/ ; } function contains(s, c){ /*<>*/ return contains_from(s, 0, c) /*<>*/ ; @@ -5460,8 +5442,8 @@ if(_G_ === Stdlib[8]) /*<>*/ return 0; /*<>*/ throw caml_maybe_attach_backtrace(_G_, 0); } - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_rcontains_from_Byte) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_rcontains_from_Byte) /*<>*/ ; } var compare = /*<>*/ runtime.caml_bytes_compare, @@ -5521,19 +5503,18 @@ var n = /*<>*/ [0, 0], buf = /*<>*/ [0, make(256, 0)]; - /*<>*/ caml_call2 - (Stdlib_Seq[4], - function(c){ + /*<>*/ (0, Stdlib_Seq[4]) + (function(c){ /*<>*/ if(n[1] === caml_ml_bytes_length(buf[1])){ var new_len = - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Int[10], - 2 * /*<>*/ caml_ml_bytes_length(buf[1]) | 0, + /*<>*/ /*<>*/ (0, + Stdlib_Int[10]) + (2 * /*<>*/ caml_ml_bytes_length(buf[1]) | 0, Stdlib_Sys[12]); /*<>*/ if(caml_ml_bytes_length(buf[1]) === new_len) - /*<>*/ caml_call1 - (Stdlib[2], cst_Bytes_of_seq_cannot_grow_b); + /*<>*/ (0, Stdlib[2]) + (cst_Bytes_of_seq_cannot_grow_b); var new_buf = /*<>*/ make(new_len, 0); /*<>*/ blit(buf[1], 0, new_buf, 0, n[1]); /*<>*/ buf[1] = new_buf; @@ -5680,8 +5661,8 @@ _e_ = [0, cst_bytes_ml, 831, 9], _f_ = [0, cst_bytes_ml, 820, 20]; function dec_ret(n, u){ - var _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); - /*<>*/ return caml_call2(Stdlib_Uchar[21], n, _l_); + var _l_ = /*<>*/ (0, Stdlib_Uchar[9])(u); + /*<>*/ return (0, Stdlib_Uchar[21])(n, _l_); } function not_in_x80_to_xBF(b){ /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; @@ -5722,59 +5703,59 @@ case 0: var i$0 = /*<>*/ i + 1 | 0; /*<>*/ if(max < i$0) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var b1$4 = /*<>*/ caml_bytes_unsafe_get(b, i$0); /*<>*/ if(not_in_x80_to_x9F(b1$4)) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var i$1 = /*<>*/ i$0 + 1 | 0; /*<>*/ if(max < i$1) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var b2$3 = /*<>*/ caml_bytes_unsafe_get(b, i$1); /*<>*/ return not_in_x80_to_xBF(b2$3) - ? /*<>*/ caml_call1(dec_invalid, 2) + ? /*<>*/ dec_invalid(2) : /*<>*/ dec_ret (3, /*<>*/ utf_8_uchar_3(b0, b1$4, b2$3)) /*<>*/ ; case 3: var i$4 = /*<>*/ i + 1 | 0; /*<>*/ if(max < i$4) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var b1$2 = /*<>*/ caml_bytes_unsafe_get(b, i$4); /*<>*/ if(not_in_x90_to_xBF(b1$2)) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var i$5 = /*<>*/ i$4 + 1 | 0; /*<>*/ if(max < i$5) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var b2$1 = /*<>*/ caml_bytes_unsafe_get(b, i$5); /*<>*/ if(not_in_x80_to_xBF(b2$1)) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var i$6 = /*<>*/ i$5 + 1 | 0; /*<>*/ if(max < i$6) - /*<>*/ return caml_call1(dec_invalid, 3) /*<>*/ ; + /*<>*/ return dec_invalid(3) /*<>*/ ; var b3$1 = /*<>*/ caml_bytes_unsafe_get(b, i$6); /*<>*/ return not_in_x80_to_xBF(b3$1) - ? /*<>*/ caml_call1(dec_invalid, 3) + ? /*<>*/ dec_invalid(3) : /*<>*/ dec_ret (4, /*<>*/ utf_8_uchar_4(b0, b1$2, b2$1, b3$1)) /*<>*/ ; case 7: var i$10 = /*<>*/ i + 1 | 0; /*<>*/ if(max < i$10) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var b1$0 = /*<>*/ caml_bytes_unsafe_get(b, i$10); /*<>*/ if(not_in_x80_to_x8F(b1$0)) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var i$11 = /*<>*/ i$10 + 1 | 0; /*<>*/ if(max < i$11) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var b2 = /*<>*/ caml_bytes_unsafe_get(b, i$11); /*<>*/ if(not_in_x80_to_xBF(b2)) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var i$12 = /*<>*/ i$11 + 1 | 0; /*<>*/ if(max < i$12) - /*<>*/ return caml_call1(dec_invalid, 3) /*<>*/ ; + /*<>*/ return dec_invalid(3) /*<>*/ ; var b3 = /*<>*/ caml_bytes_unsafe_get(b, i$12); /*<>*/ return not_in_x80_to_xBF(b3) - ? /*<>*/ caml_call1(dec_invalid, 3) + ? /*<>*/ dec_invalid(3) : /*<>*/ dec_ret (4, /*<>*/ utf_8_uchar_4(b0, b1$0, b2, b3)) /*<>*/ ; @@ -5783,22 +5764,22 @@ default: var i$7 = /*<>*/ i + 1 | 0; /*<>*/ if(max < i$7) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var b1$1 = /*<>*/ caml_bytes_unsafe_get(b, i$7); /*<>*/ if(not_in_x80_to_xBF(b1$1)) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var i$8 = /*<>*/ i$7 + 1 | 0; /*<>*/ if(max < i$8) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var b2$0 = /*<>*/ caml_bytes_unsafe_get(b, i$8); /*<>*/ if(not_in_x80_to_xBF(b2$0)) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var i$9 = /*<>*/ i$8 + 1 | 0; /*<>*/ if(max < i$9) - /*<>*/ return caml_call1(dec_invalid, 3) /*<>*/ ; + /*<>*/ return dec_invalid(3) /*<>*/ ; var b3$0 = /*<>*/ caml_bytes_unsafe_get(b, i$9); /*<>*/ return not_in_x80_to_xBF(b3$0) - ? /*<>*/ caml_call1(dec_invalid, 3) + ? /*<>*/ dec_invalid(3) : /*<>*/ dec_ret (4, /*<>*/ utf_8_uchar_4(b0, b1$1, b2$0, b3$0)) /*<>*/ ; @@ -5807,31 +5788,31 @@ else if(225 > b0){ var i$13 = /*<>*/ i + 1 | 0; /*<>*/ if(max < i$13) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var b1$5 = /*<>*/ caml_bytes_unsafe_get(b, i$13); /*<>*/ if(not_in_xA0_to_xBF(b1$5)) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var i$14 = /*<>*/ i$13 + 1 | 0; /*<>*/ if(max < i$14) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var b2$4 = /*<>*/ caml_bytes_unsafe_get(b, i$14); /*<>*/ return not_in_x80_to_xBF(b2$4) - ? /*<>*/ caml_call1(dec_invalid, 2) + ? /*<>*/ dec_invalid(2) : /*<>*/ dec_ret (3, /*<>*/ utf_8_uchar_3(b0, b1$5, b2$4)) /*<>*/ ; } var i$2 = /*<>*/ i + 1 | 0; /*<>*/ if(max < i$2) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var b1$3 = /*<>*/ caml_bytes_unsafe_get(b, i$2); /*<>*/ if(not_in_x80_to_xBF(b1$3)) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var i$3 = /*<>*/ i$2 + 1 | 0; /*<>*/ if(max < i$3) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var b2$2 = /*<>*/ caml_bytes_unsafe_get(b, i$3); /*<>*/ return not_in_x80_to_xBF(b2$2) - ? /*<>*/ caml_call1(dec_invalid, 2) + ? /*<>*/ dec_invalid(2) : /*<>*/ dec_ret (3, /*<>*/ utf_8_uchar_3(b0, b1$3, b2$2)) /*<>*/ ; } @@ -5840,14 +5821,14 @@ /*<>*/ if(194 <= b0){ var i$15 = /*<>*/ i + 1 | 0; /*<>*/ if(max < i$15) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var b1 = /*<>*/ caml_bytes_unsafe_get(b, i$15); /*<>*/ return not_in_x80_to_xBF(b1) - ? /*<>*/ caml_call1(dec_invalid, 1) + ? /*<>*/ dec_invalid(1) : /*<>*/ dec_ret(2, (b0 & 31) << 6 | b1 & 63) /*<>*/ ; } } - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; } function set_utf_8_uchar(b, i, u){ function set(_i_, _h_, _g_){ @@ -5855,7 +5836,7 @@ } var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0, - u$0 = /*<>*/ caml_call1(Stdlib_Uchar[10], u); + u$0 = /*<>*/ (0, Stdlib_Uchar[10])(u); /*<>*/ if(0 > u$0) /*<>*/ throw caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); @@ -6055,15 +6036,14 @@ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; /*<>*/ if(0 <= i && max >= i){ /*<>*/ if(i === max) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var hi = /*<>*/ unsafe_get_uint16_be(b, i); /*<>*/ if(55296 <= hi && 57343 >= hi){ /*<>*/ if(56319 < hi) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var last = /*<>*/ i + 3 | 0; /*<>*/ if(max < last) - /*<>*/ return caml_call1 - (dec_invalid, (max - i | 0) + 1 | 0) /*<>*/ ; + /*<>*/ return dec_invalid((max - i | 0) + 1 | 0) /*<>*/ ; var lo = /*<>*/ unsafe_get_uint16_be(b, i + 2 | 0); /*<>*/ if(56320 <= lo && 57343 >= lo){ var @@ -6071,17 +6051,16 @@ /*<>*/ ((hi & 1023) << 10 | lo & 1023) + 65536 | 0; /*<>*/ return dec_ret(4, u) /*<>*/ ; } - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; } /*<>*/ return dec_ret(2, hi) /*<>*/ ; } - /*<>*/ return caml_call1 - (Stdlib[1], cst_index_out_of_bounds) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_index_out_of_bounds) /*<>*/ ; } function set_utf_16be_uchar(b, i, u){ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; /*<>*/ if(0 <= i && max >= i){ - var u$0 = /*<>*/ caml_call1(Stdlib_Uchar[10], u); + var u$0 = /*<>*/ (0, Stdlib_Uchar[10])(u); /*<>*/ if(0 > u$0) /*<>*/ throw caml_maybe_attach_backtrace ([0, Assert_failure, _d_], 1); @@ -6104,8 +6083,7 @@ /*<>*/ unsafe_set_uint16_be(b, i + 2 | 0, lo); /*<>*/ return 4; } - /*<>*/ return caml_call1 - (Stdlib[1], cst_index_out_of_bounds$0) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_index_out_of_bounds$0) /*<>*/ ; } function is_valid_utf_16be(b){ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0, i = 0; @@ -6135,15 +6113,14 @@ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; /*<>*/ if(0 <= i && max >= i){ /*<>*/ if(i === max) - /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; + /*<>*/ return dec_invalid(1) /*<>*/ ; var hi = /*<>*/ unsafe_get_uint16_le(b, i); /*<>*/ if(55296 <= hi && 57343 >= hi){ /*<>*/ if(56319 < hi) - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; var last = /*<>*/ i + 3 | 0; /*<>*/ if(max < last) - /*<>*/ return caml_call1 - (dec_invalid, (max - i | 0) + 1 | 0) /*<>*/ ; + /*<>*/ return dec_invalid((max - i | 0) + 1 | 0) /*<>*/ ; var lo = /*<>*/ unsafe_get_uint16_le(b, i + 2 | 0); /*<>*/ if(56320 <= lo && 57343 >= lo){ var @@ -6151,17 +6128,16 @@ /*<>*/ ((hi & 1023) << 10 | lo & 1023) + 65536 | 0; /*<>*/ return dec_ret(4, u) /*<>*/ ; } - /*<>*/ return caml_call1(dec_invalid, 2) /*<>*/ ; + /*<>*/ return dec_invalid(2) /*<>*/ ; } /*<>*/ return dec_ret(2, hi) /*<>*/ ; } - /*<>*/ return caml_call1 - (Stdlib[1], cst_index_out_of_bounds$1) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_index_out_of_bounds$1) /*<>*/ ; } function set_utf_16le_uchar(b, i, u){ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; /*<>*/ if(0 <= i && max >= i){ - var u$0 = /*<>*/ caml_call1(Stdlib_Uchar[10], u); + var u$0 = /*<>*/ (0, Stdlib_Uchar[10])(u); /*<>*/ if(0 > u$0) /*<>*/ throw caml_maybe_attach_backtrace ([0, Assert_failure, _f_], 1); @@ -6184,8 +6160,7 @@ /*<>*/ unsafe_set_uint16_le(b, i + 2 | 0, lo); /*<>*/ return 4; } - /*<>*/ return caml_call1 - (Stdlib[1], cst_index_out_of_bounds$2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_index_out_of_bounds$2) /*<>*/ ; } function is_valid_utf_16le(b){ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0, i = 0; @@ -6308,6 +6283,7 @@ //# unitInfo: Provides: Stdlib__String //# unitInfo: Requires: Stdlib, Stdlib__Bytes +//# shape: Stdlib__String:[F(2),F(2),N,F(1),F(1),F(5),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(2),F(3),F(2),F(2),F(2),F(3),F(3),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(3),F(3),F(3),F(3),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(2)] (function (globalThis){ "use strict"; @@ -6331,11 +6307,6 @@ ? f(a0, a1) : runtime.caml_call_gen(f, [a0, a1]); } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } var global_data = runtime.caml_get_global_data(), cst = cst$0, @@ -6345,20 +6316,18 @@ bts = Stdlib_Bytes[44], bos = Stdlib_Bytes[45]; function make(n, c){ - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call2(Stdlib_Bytes[1], n, c)) /*<>*/ ; + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[1])(n, c)) /*<>*/ ; } function init(n, f){ - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call2(Stdlib_Bytes[2], n, f)) /*<>*/ ; + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[2])(n, f)) /*<>*/ ; } var of_bytes = /*<>*/ Stdlib_Bytes[6], to_bytes = Stdlib_Bytes[5]; function sub(s, ofs, len){ - var _X_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, - /*<>*/ caml_call3 - (Stdlib_Bytes[7], _X_, ofs, len)) /*<>*/ ; + var _X_ = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[7])(_X_, ofs, len)) /*<>*/ ; } var blit = /*<>*/ Stdlib_Bytes[12], @@ -6384,7 +6353,7 @@ acc$0 = /*<>*/ acc <= x ? x - : /*<>*/ caml_call1(Stdlib[1], cst_String_concat); + : /*<>*/ (0, Stdlib[1])(cst_String_concat); /*<>*/ acc = acc$0; param = tl; } @@ -6422,7 +6391,7 @@ /*<>*/ caml_blit_string (hd$0, 0, dst, pos, caml_ml_string_length(hd$0)); } - /*<>*/ return caml_call1(bts, dst); + /*<>*/ return bts(dst); } } var @@ -6468,32 +6437,30 @@ /*<>*/ return 0; /*<>*/ } function map(f, s){ - var _P_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, - /*<>*/ caml_call2(Stdlib_Bytes[17], f, _P_)) /*<>*/ ; + var _P_ = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[17])(f, _P_)) /*<>*/ ; } function mapi(f, s){ - var _O_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, - /*<>*/ caml_call2(Stdlib_Bytes[18], f, _O_)) /*<>*/ ; + var _O_ = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[18])(f, _O_)) /*<>*/ ; } function fold_right(f, x, a){ - var _N_ = /*<>*/ caml_call1(bos, x); - /*<>*/ return caml_call3(Stdlib_Bytes[20], f, _N_, a) /*<>*/ ; + var _N_ = /*<>*/ bos(x); + /*<>*/ return (0, Stdlib_Bytes[20])(f, _N_, a) /*<>*/ ; } function fold_left(f, a, x){ - var _M_ = /*<>*/ caml_call1(bos, x); - /*<>*/ return caml_call3(Stdlib_Bytes[19], f, a, _M_); + var _M_ = /*<>*/ bos(x); + /*<>*/ return (0, Stdlib_Bytes[19])(f, a, _M_); } function exists(f, s){ - var _L_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[22], f, _L_); + var _L_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[22])(f, _L_); } function for_all(f, s){ - var _K_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[21], f, _K_); + var _K_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[21])(f, _K_); } function is_space(param){ var _J_ = /*<>*/ param - 9 | 0; @@ -6517,14 +6484,14 @@ ( /*<>*/ caml_string_unsafe_get (s, caml_ml_string_length(s) - 1 | 0))) /*<>*/ return s; - var _I_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[23], _I_)) /*<>*/ ; + var _I_ = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[23])(_I_)) /*<>*/ ; } function escaped(s){ - var b = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[87], b)) /*<>*/ ; + var b = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[87])(b)) /*<>*/ ; } function index_rec(s, lim, i, c){ var i$0 = /*<>*/ i; @@ -6560,15 +6527,15 @@ var l = /*<>*/ caml_ml_string_length(s); /*<>*/ if(0 <= i && l >= i) /*<>*/ return index_rec(s, l, i, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_index_from_Bytes_in) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_index_from_Bytes_in) /*<>*/ ; } function index_from_opt(s, i, c){ var l = /*<>*/ caml_ml_string_length(s); /*<>*/ if(0 <= i && l >= i) /*<>*/ return index_rec_opt(s, l, i, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_index_from_opt_Byte) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_index_from_opt_Byte) /*<>*/ ; } function rindex_rec(s, i, c){ var i$0 = /*<>*/ i; @@ -6589,8 +6556,8 @@ function rindex_from(s, i, c){ /*<>*/ if(-1 <= i && caml_ml_string_length(s) > i) /*<>*/ return rindex_rec(s, i, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_rindex_from_Bytes_r) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_rindex_from_Bytes_r) /*<>*/ ; } function rindex_rec_opt(s, i, c){ var i$0 = /*<>*/ i; @@ -6609,8 +6576,8 @@ function rindex_from_opt(s, i, c){ /*<>*/ if(-1 <= i && caml_ml_string_length(s) > i) /*<>*/ return rindex_rec_opt(s, i, c) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_rindex_from_opt_Byt) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_rindex_from_opt_Byt) /*<>*/ ; } function contains_from(s, i, c){ var l = /*<>*/ caml_ml_string_length(s); @@ -6625,8 +6592,8 @@ if(_F_ === Stdlib[8]) /*<>*/ return 0; /*<>*/ throw caml_maybe_attach_backtrace(_F_, 0); } - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_contains_from_Bytes) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_contains_from_Bytes) /*<>*/ ; } function contains(s, c){ /*<>*/ return contains_from(s, 0, c) /*<>*/ ; @@ -6643,28 +6610,28 @@ if(_C_ === Stdlib[8]) /*<>*/ return 0; /*<>*/ throw caml_maybe_attach_backtrace(_C_, 0); } - /*<>*/ return caml_call1 - (Stdlib[1], cst_String_rcontains_from_Byte) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_String_rcontains_from_Byte) /*<>*/ ; } function uppercase_ascii(s){ - var _B_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[36], _B_)) /*<>*/ ; + var _B_ = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[36])(_B_)) /*<>*/ ; } function lowercase_ascii(s){ - var _A_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[37], _A_)) /*<>*/ ; + var _A_ = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[37])(_A_)) /*<>*/ ; } function capitalize_ascii(s){ - var _z_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[38], _z_)) /*<>*/ ; + var _z_ = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[38])(_z_)) /*<>*/ ; } function uncapitalize_ascii(s){ - var _y_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[39], _y_)) /*<>*/ ; + var _y_ = /*<>*/ bos(s); + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[39])(_y_)) /*<>*/ ; } function starts_with(prefix, s){ var @@ -6728,80 +6695,80 @@ /*<>*/ } var compare = /*<>*/ runtime.caml_string_compare; function to_seq(s){ - var _r_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[47], _r_) /*<>*/ ; + var _r_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[47])(_r_) /*<>*/ ; } function to_seqi(s){ - var _q_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[48], _q_) /*<>*/ ; + var _q_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[48])(_q_) /*<>*/ ; } function of_seq(g){ - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[49], g)) /*<>*/ ; + /*<>*/ return /*<>*/ bts + ( /*<>*/ (0, Stdlib_Bytes[49])(g)) /*<>*/ ; } function get_utf_8_uchar(s, i){ - var _p_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[50], _p_, i) /*<>*/ ; + var _p_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[50])(_p_, i) /*<>*/ ; } function is_valid_utf_8(s){ - var _o_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[52], _o_); + var _o_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[52])(_o_); } function get_utf_16be_uchar(s, i){ - var _n_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[53], _n_, i) /*<>*/ ; + var _n_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[53])(_n_, i) /*<>*/ ; } function is_valid_utf_16be(s){ - var _m_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[55], _m_); + var _m_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[55])(_m_); } function get_utf_16le_uchar(s, i){ - var _l_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[56], _l_, i) /*<>*/ ; + var _l_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[56])(_l_, i) /*<>*/ ; } function is_valid_utf_16le(s){ - var _k_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[58], _k_); + var _k_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[58])(_k_); } function get_int8(s, i){ - var _j_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[60], _j_, i) /*<>*/ ; + var _j_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[60])(_j_, i) /*<>*/ ; } function get_uint16_le(s, i){ - var _i_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[63], _i_, i) /*<>*/ ; + var _i_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[63])(_i_, i) /*<>*/ ; } function get_uint16_be(s, i){ - var _h_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[62], _h_, i) /*<>*/ ; + var _h_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[62])(_h_, i) /*<>*/ ; } function get_int16_ne(s, i){ - var _g_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[64], _g_, i) /*<>*/ ; + var _g_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[64])(_g_, i) /*<>*/ ; } function get_int16_le(s, i){ - var _f_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[66], _f_, i) /*<>*/ ; + var _f_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[66])(_f_, i) /*<>*/ ; } function get_int16_be(s, i){ - var _e_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[65], _e_, i) /*<>*/ ; + var _e_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[65])(_e_, i) /*<>*/ ; } function get_int32_le(s, i){ - var _d_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[69], _d_, i) /*<>*/ ; + var _d_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[69])(_d_, i) /*<>*/ ; } function get_int32_be(s, i){ - var _c_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[68], _c_, i) /*<>*/ ; + var _c_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[68])(_c_, i) /*<>*/ ; } function get_int64_le(s, i){ - var _b_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[72], _b_, i) /*<>*/ ; + var _b_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[72])(_b_, i) /*<>*/ ; } function get_int64_be(s, i){ - var _a_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[71], _a_, i) /*<>*/ ; + var _a_ = /*<>*/ bos(s); + /*<>*/ return (0, Stdlib_Bytes[71])(_a_, i) /*<>*/ ; } var Stdlib_String = @@ -6876,7 +6843,9 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Unit -(function(globalThis){ +//# shape: Stdlib__Unit:[F(2),F(2),F(1)] +(function + (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, cst = "()"; function equal(_b_, param){ @@ -6896,6 +6865,7 @@ //# unitInfo: Provides: Stdlib__Marshal //# unitInfo: Requires: Stdlib, Stdlib__Bytes +//# shape: Stdlib__Marshal:[F(3),F(5),F(1),F(2),F(2),N,F(2),F(2)] (function (globalThis){ "use strict"; @@ -6903,13 +6873,7 @@ runtime = globalThis.jsoo_runtime, cst_Marshal_from_bytes$1 = "Marshal.from_bytes", caml_marshal_data_size = runtime.caml_marshal_data_size, - caml_ml_bytes_length = runtime.caml_ml_bytes_length; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } - var + caml_ml_bytes_length = runtime.caml_ml_bytes_length, global_data = runtime.caml_get_global_data(), Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib = global_data.Stdlib, @@ -6920,8 +6884,8 @@ (0 <= ofs && 0 <= len && (caml_ml_bytes_length(buff) - len | 0) >= ofs) /*<>*/ return runtime.caml_output_value_to_buffer (buff, ofs, len, v, flags) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_Marshal_to_buffer_substrin) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_Marshal_to_buffer_substrin) /*<>*/ ; } var cst_Marshal_data_size = /*<>*/ "Marshal.data_size", @@ -6931,8 +6895,7 @@ /*<>*/ if (0 <= ofs && (caml_ml_bytes_length(buff) - 16 | 0) >= ofs) /*<>*/ return caml_marshal_data_size(buff, ofs) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_Marshal_data_size) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Marshal_data_size) /*<>*/ ; } function total_size(buff, ofs){ /*<>*/ return 16 + data_size(buff, ofs) | 0 /*<>*/ ; @@ -6945,18 +6908,17 @@ - (16 + len | 0) | 0) < ofs - ? /*<>*/ caml_call1 - (Stdlib[1], cst_Marshal_from_bytes$0) + ? /*<>*/ (0, + Stdlib[1]) + (cst_Marshal_from_bytes$0) : /*<>*/ runtime.caml_input_value_from_bytes (buff, ofs) /*<>*/ ; } - /*<>*/ return caml_call1 - (Stdlib[1], cst_Marshal_from_bytes) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Marshal_from_bytes) /*<>*/ ; } function from_string(buff, ofs){ /*<>*/ return /*<>*/ from_bytes - ( /*<>*/ caml_call1(Stdlib_Bytes[45], buff), - ofs) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Bytes[45])(buff), ofs) /*<>*/ ; } var Stdlib_Marshal = @@ -6976,6 +6938,7 @@ //# unitInfo: Provides: Stdlib__Array //# unitInfo: Requires: Stdlib, Stdlib__Seq +//# shape: Stdlib__Array:[F(2),F(3),F(3),F(2),F(1),F(3),F(1),F(4),F(5),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(3),F(2),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(1),F(1),F(1),[]] (function (globalThis){ "use strict"; @@ -6996,11 +6959,6 @@ ? f(a0, a1) : runtime.caml_call_gen(f, [a0, a1]); } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } var global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, @@ -7023,7 +6981,7 @@ function init(l, f){ /*<>*/ if(0 === l) /*<>*/ return [0]; /*<>*/ if(0 > l) - /*<>*/ return caml_call1(Stdlib[1], cst_Array_init) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Array_init) /*<>*/ ; var res = /*<>*/ /*<>*/ caml_make_vect @@ -7043,7 +7001,7 @@ /*<>*/ } function make_matrix(sx, sy, init){ /*<>*/ if(sy < 0) - /*<>*/ caml_call1(Stdlib[1], cst_Array_make_matrix); + /*<>*/ (0, Stdlib[1])(cst_Array_make_matrix); var res = /*<>*/ caml_make_vect(sx, [0]); /*<>*/ if(0 < sy){ var _aB_ = /*<>*/ sx - 1 | 0, _aA_ = 0; @@ -7061,7 +7019,7 @@ /*<>*/ } function init_matrix(sx, sy, f){ /*<>*/ if(sy < 0) - /*<>*/ caml_call1(Stdlib[1], cst_Array_init_matrix); + /*<>*/ (0, Stdlib[1])(cst_Array_init_matrix); var res = /*<>*/ caml_make_vect(sx, [0]); /*<>*/ if(0 < sy){ var _av_ = /*<>*/ sx - 1 | 0, _au_ = 0; @@ -7111,13 +7069,13 @@ /*<>*/ if (0 <= ofs && 0 <= len && (a.length - 1 - len | 0) >= ofs) /*<>*/ return caml_array_sub(a, ofs, len) /*<>*/ ; - /*<>*/ return caml_call1(Stdlib[1], cst_Array_sub) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Array_sub) /*<>*/ ; } function fill(a, ofs, len, v){ /*<>*/ if (0 <= ofs && 0 <= len && (a.length - 1 - len | 0) >= ofs) /*<>*/ return runtime.caml_array_fill(a, ofs, len, v) /*<>*/ ; - /*<>*/ return caml_call1(Stdlib[1], cst_Array_fill) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Array_fill) /*<>*/ ; } function blit(a1, ofs1, a2, ofs2, len){ /*<>*/ if @@ -7129,7 +7087,7 @@ && 0 <= ofs2 && (a2.length - 1 - len | 0) >= ofs2) /*<>*/ return runtime.caml_array_blit (a1, ofs1, a2, ofs2, len) /*<>*/ ; - /*<>*/ return caml_call1(Stdlib[1], cst_Array_blit) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Array_blit) /*<>*/ ; } function iter(f, a){ var _as_ = /*<>*/ a.length - 2 | 0, _ar_ = 0; @@ -7146,8 +7104,8 @@ /*<>*/ } function iter2(f, a, b){ /*<>*/ if(a.length - 1 !== b.length - 1) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Array_iter2_arrays_must_ha) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_Array_iter2_arrays_must_ha) /*<>*/ ; var _ap_ = /*<>*/ a.length - 2 | 0, _ao_ = 0; if(_ap_ >= 0){ var i = _ao_; @@ -7211,8 +7169,8 @@ la = /*<>*/ a.length - 1, lb = /*<>*/ b.length - 1; /*<>*/ if(la !== lb) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Array_map2_arrays_must_hav) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_Array_map2_arrays_must_hav) /*<>*/ ; /*<>*/ if(0 === la) /*<>*/ return [0]; var r = @@ -7390,7 +7348,7 @@ function for_all2(p, l1, l2){ var n1 = /*<>*/ l1.length - 1, n2 = l2.length - 1; /*<>*/ if(n1 !== n2) - /*<>*/ return caml_call1(Stdlib[1], cst_Array_for_all2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Array_for_all2) /*<>*/ ; var i = /*<>*/ 0; for(;;){ /*<>*/ if(i === n1) /*<>*/ return 1; @@ -7403,7 +7361,7 @@ function exists2(p, l1, l2){ var n1 = /*<>*/ l1.length - 1, n2 = l2.length - 1; /*<>*/ if(n1 !== n2) - /*<>*/ return caml_call1(Stdlib[1], cst_Array_exists2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Array_exists2) /*<>*/ ; var i = /*<>*/ 0; for(;;){ /*<>*/ if(i === n1) /*<>*/ return 0; @@ -7519,7 +7477,7 @@ na = /*<>*/ a.length - 1, nb = /*<>*/ b.length - 1; /*<>*/ if(na !== nb) - /*<>*/ caml_call1(Stdlib[1], cst_Array_combine); + /*<>*/ (0, Stdlib[1])(cst_Array_combine); /*<>*/ if(0 === na) /*<>*/ return [0]; var x = /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), @@ -7840,9 +7798,8 @@ function of_seq(i$2){ var l = - /*<>*/ caml_call3 - (Stdlib_Seq[5], - function(acc, x){ + /*<>*/ (0, Stdlib_Seq[5]) + (function(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ }, 0, @@ -7917,6 +7874,7 @@ //# unitInfo: Provides: Stdlib__Float //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Seq +//# shape: Stdlib__Float:[N,N,N,F(1),F(1),N,N,N,N,N,N,N,N,N,F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),N,N] (function (globalThis){ "use strict"; @@ -7944,11 +7902,6 @@ ? f(a0, a1) : runtime.caml_call_gen(f, [a0, a1]); } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } var global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, @@ -8114,7 +8067,7 @@ _aU_ = (ofs + len | 0) < 0 ? 1 : 0, _aS_ = _aU_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _aS_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _aS_ /*<>*/ ; + return _aS_ ? /*<>*/ (0, Stdlib[1])(msg) : _aS_ /*<>*/ ; } function make(n, v){ var result = /*<>*/ caml_floatarray_create(n); @@ -8123,8 +8076,7 @@ /*<>*/ } function init(l, f){ /*<>*/ if(0 > l) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Float_Array_init) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Float_Array_init) /*<>*/ ; var res = /*<>*/ caml_floatarray_create(l), _aP_ = /*<>*/ l - 1 | 0, @@ -8142,8 +8094,7 @@ /*<>*/ } function make_matrix(sx, sy, v){ /*<>*/ if(sy < 0) - /*<>*/ caml_call1 - (Stdlib[1], cst_Float_Array_make_matrix); + /*<>*/ (0, Stdlib[1])(cst_Float_Array_make_matrix); var res = /*<>*/ /*<>*/ caml_make_vect @@ -8164,8 +8115,7 @@ /*<>*/ } function init_matrix(sx, sy, f){ /*<>*/ if(sy < 0) - /*<>*/ caml_call1 - (Stdlib[1], cst_Float_Array_init_matrix); + /*<>*/ (0, Stdlib[1])(cst_Float_Array_init_matrix); var res = /*<>*/ /*<>*/ caml_make_vect @@ -8217,8 +8167,7 @@ acc$0 = /*<>*/ acc <= x ? x - : /*<>*/ caml_call1 - (Stdlib[1], cst_Float_Array_concat); + : /*<>*/ (0, Stdlib[1])(cst_Float_Array_concat); /*<>*/ acc = acc$0; param = tl; } @@ -8267,16 +8216,15 @@ (src, sofs, dst, dofs, len) /*<>*/ ; } function to_list(a){ - /*<>*/ return caml_call2 - (Stdlib_List[11], - a.length - 1, + /*<>*/ return (0, Stdlib_List[11]) + (a.length - 1, function(_aE_){ /*<>*/ return a[1 + _aE_];}) /*<>*/ ; } function of_list(l){ var result = /*<>*/ /*<>*/ caml_floatarray_create - ( /*<>*/ caml_call1(Stdlib_List[1], l)), + ( /*<>*/ (0, Stdlib_List[1])(l)), i = /*<>*/ 0, l$0 = l; for(;;){ @@ -8303,8 +8251,8 @@ /*<>*/ } function iter2(f, a, b){ /*<>*/ if(a.length - 1 !== b.length - 1) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Float_Array_iter2_arrays_m) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_Float_Array_iter2_arrays_m) /*<>*/ ; var _az_ = /*<>*/ a.length - 2 | 0, _ay_ = 0; if(_az_ >= 0){ var i = _ay_; @@ -8352,8 +8300,8 @@ la = /*<>*/ a.length - 1, lb = /*<>*/ b.length - 1; /*<>*/ if(la !== lb) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Float_Array_map2_arrays_mu) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_Float_Array_map2_arrays_mu) /*<>*/ ; var r = /*<>*/ caml_floatarray_create(la), _aq_ = /*<>*/ la - 1 | 0, @@ -8844,14 +8792,13 @@ function of_seq(i$2){ var l = - /*<>*/ caml_call3 - (Stdlib_Seq[5], - function(acc, x){ + /*<>*/ (0, Stdlib_Seq[5]) + (function(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ }, 0, i$2), - len = /*<>*/ caml_call1(Stdlib_List[1], l), + len = /*<>*/ (0, Stdlib_List[1])(l), a = /*<>*/ caml_floatarray_create(len), i$1 = /*<>*/ len - 1 | 0, i = i$1, @@ -9037,6 +8984,7 @@ //# unitInfo: Provides: Stdlib__Int32 //# unitInfo: Requires: Stdlib, Stdlib__Sys +//# shape: Stdlib__Int32:[N,N,N,F(2),F(2),F(1),F(1),F(1),N,N,F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(1)] (function (globalThis){ "use strict"; @@ -9063,12 +9011,12 @@ } function lognot(n){ /*<>*/ return n ^ -1;} var - _a_ = /*<>*/ Stdlib_Sys[9], - _b_ = [0, "int32.ml", 69, 6], + match = /*<>*/ Stdlib_Sys[9], + _a_ = [0, "int32.ml", 69, 6], minus_one = -1, min_int = -2147483648, max_int = 2147483647; - if(32 === _a_) + if(32 === match) var max_int$0 = /*<>*/ Stdlib[19], unsigned_to_int = @@ -9080,9 +9028,9 @@ /*<>*/ return 0; /*<>*/ }; else{ - /*<>*/ if(64 !== _a_) + /*<>*/ if(64 !== match) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); + ([0, Assert_failure, _a_], 1); var unsigned_to_int = /*<>*/ function(n){ @@ -9094,13 +9042,13 @@ } function of_string_opt(s){ /*<>*/ try{ - var _d_ = /*<>*/ [0, runtime.caml_int_of_string(s)]; - return _d_; + var _c_ = /*<>*/ [0, runtime.caml_int_of_string(s)]; + return _c_; } - catch(_e_){ - var _c_ = /*<>*/ caml_wrap_exception(_e_); - if(_c_[1] === Stdlib[7]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_c_, 0); + catch(_d_){ + var _b_ = /*<>*/ caml_wrap_exception(_d_); + if(_b_[1] === Stdlib[7]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(_b_, 0); } /*<>*/ } var compare = /*<>*/ caml_int_compare, equal = runtime.caml_equal; @@ -9172,6 +9120,7 @@ //# unitInfo: Provides: Stdlib__Int64 //# unitInfo: Requires: Stdlib +//# shape: Stdlib__Int64:[N,N,N,F(2),F(2),F(1),F(1),F(1),N,N,F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(1)] (function (globalThis){ "use strict"; @@ -9319,6 +9268,7 @@ //# unitInfo: Provides: Stdlib__Nativeint //# unitInfo: Requires: Stdlib, Stdlib__Sys +//# shape: Stdlib__Nativeint:[N,N,N,F(2),F(2),F(1),F(1),F(1),N,N,N,F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(1)] (function (globalThis){ "use strict"; @@ -9442,6 +9392,7 @@ //# unitInfo: Provides: Stdlib__Lexing //# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Int, Stdlib__Sys +//# shape: Stdlib__Lexing:[N,F(2),F(2),F(2),F(2),F(2),F(1),F(1),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(3),F(3),F(2),F(2),F(3),F(3)] (function (globalThis){ "use strict"; @@ -9452,31 +9403,11 @@ caml_check_bound = runtime.caml_check_bound, caml_create_bytes = runtime.caml_create_bytes, caml_ml_bytes_length = runtime.caml_ml_bytes_length; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } function caml_call2(f, a0, a1){ return (f.l >= 0 ? f.l : f.l = f.length) === 2 ? f(a0, a1) : runtime.caml_call_gen(f, [a0, a1]); } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var global_data = runtime.caml_get_global_data(), dummy_pos = [0, cst, 0, 0, -1], @@ -9532,9 +9463,8 @@ /*<>*/ if (((lexbuf[3] - lexbuf[5] | 0) + n | 0) <= caml_ml_bytes_length(lexbuf[2])) - /*<>*/ caml_call5 - (Stdlib_Bytes[11], - lexbuf[2], + /*<>*/ (0, Stdlib_Bytes[11]) + (lexbuf[2], lexbuf[5], lexbuf[2], 0, @@ -9542,25 +9472,20 @@ else{ var newlen = - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Int[10], - 2 + /*<>*/ /*<>*/ (0, + Stdlib_Int[10]) + (2 * /*<>*/ caml_ml_bytes_length(lexbuf[2]) | 0, Stdlib_Sys[12]); /*<>*/ if (newlen < ((lexbuf[3] - lexbuf[5] | 0) + n | 0)) - /*<>*/ caml_call1 - (Stdlib[2], cst_Lexing_lex_refill_cannot_g); + /*<>*/ (0, Stdlib[2]) + (cst_Lexing_lex_refill_cannot_g); var newbuf = /*<>*/ caml_create_bytes(newlen); - /*<>*/ caml_call5 - (Stdlib_Bytes[11], - lexbuf[2], - lexbuf[5], - newbuf, - 0, - lexbuf[3] - lexbuf[5] | 0); + /*<>*/ (0, Stdlib_Bytes[11]) + (lexbuf[2], lexbuf[5], newbuf, 0, lexbuf[3] - lexbuf[5] | 0); /*<>*/ lexbuf[2] = newbuf; } var s = /*<>*/ lexbuf[5]; @@ -9586,8 +9511,8 @@ } } } - /*<>*/ caml_call5 - (Stdlib_Bytes[11], aux_buffer, 0, lexbuf[2], lexbuf[3], n); + /*<>*/ (0, Stdlib_Bytes[11]) + (aux_buffer, 0, lexbuf[2], lexbuf[3], n); /*<>*/ lexbuf[3] = lexbuf[3] + n | 0; return 0; }, @@ -9607,8 +9532,7 @@ /*<>*/ return from_function (with_positions, function(buf, n){ - /*<>*/ return caml_call4 - (Stdlib[84], ic, buf, 0, n) /*<>*/ ; + /*<>*/ return (0, Stdlib[84])(ic, buf, 0, n) /*<>*/ ; }) /*<>*/ ; } function from_string(opt, s){ @@ -9621,7 +9545,7 @@ /*<>*/ lexbuf[9] = 1; return 0; /*<>*/ }, - /*<>*/ caml_call1(Stdlib_Bytes[5], s), + /*<>*/ (0, Stdlib_Bytes[5])(s), /*<>*/ runtime.caml_ml_string_length(s), 0, 0, @@ -9649,19 +9573,18 @@ /*<>*/ } function lexeme(lexbuf){ var len = /*<>*/ lexbuf[6] - lexbuf[5] | 0; - /*<>*/ return caml_call3 - (Stdlib_Bytes[8], lexbuf[2], lexbuf[5], len) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[8]) + (lexbuf[2], lexbuf[5], len) /*<>*/ ; } function sub_lexeme(lexbuf, i1, i2){ var len = /*<>*/ i2 - i1 | 0; - /*<>*/ return caml_call3 - (Stdlib_Bytes[8], lexbuf[2], i1, len) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[8])(lexbuf[2], i1, len) /*<>*/ ; } function sub_lexeme_opt(lexbuf, i1, i2){ /*<>*/ if(0 > i1) /*<>*/ return 0; var len = /*<>*/ i2 - i1 | 0; /*<>*/ return [0, - caml_call3(Stdlib_Bytes[8], lexbuf[2], i1, len)] /*<>*/ ; + (0, Stdlib_Bytes[8])(lexbuf[2], i1, len)] /*<>*/ ; /*<>*/ } function sub_lexeme_char(lexbuf, i){ /*<>*/ return caml_bytes_get(lexbuf[2], i) /*<>*/ ; @@ -9738,6 +9661,7 @@ //# unitInfo: Provides: Stdlib__Parsing //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Lexing, Stdlib__Obj +//# shape: Stdlib__Parsing:[F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),N,F(1),N,F(4),F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -9753,16 +9677,6 @@ ? f(a0) : runtime.caml_call_gen(f, [a0]); } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var global_data = runtime.caml_get_global_data(), Stdlib_Obj = global_data.Stdlib__Obj, @@ -9799,23 +9713,22 @@ /*<>*/ caml_make_vect(newsize, Stdlib_Lexing[1]), new_end = /*<>*/ caml_make_vect(newsize, Stdlib_Lexing[1]); - /*<>*/ caml_call5 - (Stdlib_Array[9], env[1], 0, new_s, 0, oldsize); + /*<>*/ (0, Stdlib_Array[9]) + (env[1], 0, new_s, 0, oldsize); /*<>*/ env[1] = new_s; - /*<>*/ caml_call5 - (Stdlib_Array[9], env[2], 0, new_v, 0, oldsize); + /*<>*/ (0, Stdlib_Array[9]) + (env[2], 0, new_v, 0, oldsize); /*<>*/ env[2] = new_v; - /*<>*/ caml_call5 - (Stdlib_Array[9], env[3], 0, new_start, 0, oldsize); + /*<>*/ (0, Stdlib_Array[9]) + (env[3], 0, new_start, 0, oldsize); /*<>*/ env[3] = new_start; - /*<>*/ caml_call5 - (Stdlib_Array[9], env[4], 0, new_end, 0, oldsize); + /*<>*/ (0, Stdlib_Array[9]) + (env[4], 0, new_end, 0, oldsize); /*<>*/ env[4] = new_end; /*<>*/ env[5] = newsize; /*<>*/ } function clear_parser(param){ - /*<>*/ caml_call4 - (Stdlib_Array[8], env[2], 0, env[5], 0); + /*<>*/ (0, Stdlib_Array[8])(env[2], 0, env[5], 0); /*<>*/ env[8] = 0; return 0; /*<>*/ } @@ -9905,7 +9818,7 @@ } /*<>*/ current_lookahead_fun[1] = function(tok){ - /*<>*/ if(! caml_call1(Stdlib_Obj[1], tok)) + /*<>*/ if(! (0, Stdlib_Obj[1])(tok)) /*<>*/ return caml_check_bound(tables[2], tok) [1 + tok] === curr_char @@ -9999,6 +9912,7 @@ //# unitInfo: Provides: Stdlib__Set //# unitInfo: Requires: Stdlib, Stdlib__List, Stdlib__Seq +//# shape: Stdlib__Set:[F(1)] (function (globalThis){ "use strict"; @@ -10016,11 +9930,6 @@ ? f(a0, a1) : runtime.caml_call_gen(f, [a0, a1]); } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } var global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, @@ -10066,7 +9975,7 @@ var hr = /*<>*/ 0; /*<>*/ if((hr + 2 | 0) < hl){ /*<>*/ if(! l) - /*<>*/ return caml_call1(Stdlib[1], cst_Set_bal$0) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Set_bal$0) /*<>*/ ; var lr = /*<>*/ l[3], lv = l[2], @@ -10076,7 +9985,7 @@ /*<>*/ return /*<>*/ create (ll, lv, /*<>*/ create(lr, v, r)) /*<>*/ ; /*<>*/ if(! lr) - /*<>*/ return caml_call1(Stdlib[1], cst_Set_bal) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Set_bal) /*<>*/ ; var lrr = /*<>*/ lr[3], lrv = lr[2], @@ -10090,7 +9999,7 @@ return [0, l, v, r, _X_]; } /*<>*/ if(! r) - /*<>*/ return caml_call1(Stdlib[1], cst_Set_bal$2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Set_bal$2) /*<>*/ ; var rr = /*<>*/ r[3], rv = r[2], @@ -10100,7 +10009,7 @@ /*<>*/ return /*<>*/ create ( /*<>*/ create(l, v, rl), rv, rr) /*<>*/ ; /*<>*/ if(! rl) - /*<>*/ return caml_call1(Stdlib[1], cst_Set_bal$1) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Set_bal$1) /*<>*/ ; var rlr = /*<>*/ rl[3], rlv = rl[2], @@ -10219,8 +10128,7 @@ /*<>*/ } function remove_min_elt(param){ /*<>*/ if(! param) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Set_remove_min_elt) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Set_remove_min_elt) /*<>*/ ; var l = /*<>*/ param[1]; if(l){ var r = param[3], v = param[2]; @@ -10853,7 +10761,7 @@ (x1, /*<>*/ singleton(x0)))) /*<>*/ ; /*<>*/ if(_q_[2]){ var - l$0 = /*<>*/ caml_call2(Stdlib_List[62], Ord[1], l), + l$0 = /*<>*/ (0, Stdlib_List[62])(Ord[1], l), sub = /*<>*/ function(n, l){ /*<>*/ if(3 >= n >>> 0) @@ -10912,8 +10820,7 @@ /*<>*/ return [0, create(left, mid, right), l$2] /*<>*/ ; /*<>*/ }; /*<>*/ return /*<>*/ sub - ( /*<>*/ caml_call1(Stdlib_List[1], l$0), - l$0) + ( /*<>*/ (0, Stdlib_List[1])(l$0), l$0) [1] /*<>*/ ; } var x4 = /*<>*/ _q_[1]; @@ -10927,9 +10834,8 @@ (x1, /*<>*/ singleton(x0))))) /*<>*/ ; } function add_seq(i, m){ - /*<>*/ return caml_call3 - (Stdlib_Seq[5], - function(s, x){ + /*<>*/ return (0, Stdlib_Seq[5]) + (function(s, x){ /*<>*/ return add(x, s) /*<>*/ ; }, m, @@ -11069,6 +10975,7 @@ //# unitInfo: Provides: Stdlib__Map //# unitInfo: Requires: Stdlib, Stdlib__List, Stdlib__Seq +//# shape: Stdlib__Map:[F(1)] (function (globalThis){ "use strict"; @@ -11134,7 +11041,7 @@ var hr = /*<>*/ 0; /*<>*/ if((hr + 2 | 0) < hl){ /*<>*/ if(! l) - /*<>*/ return caml_call1(Stdlib[1], cst_Map_bal$0) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Map_bal$0) /*<>*/ ; var lr = /*<>*/ l[4], ld = l[3], @@ -11145,7 +11052,7 @@ /*<>*/ return /*<>*/ create (ll, lv, ld, /*<>*/ create(lr, x, d, r)) /*<>*/ ; /*<>*/ if(! lr) - /*<>*/ return caml_call1(Stdlib[1], cst_Map_bal) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Map_bal) /*<>*/ ; var lrr = /*<>*/ lr[4], lrd = lr[3], @@ -11163,7 +11070,7 @@ return [0, l, x, d, r, _J_]; } /*<>*/ if(! r) - /*<>*/ return caml_call1(Stdlib[1], cst_Map_bal$2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Map_bal$2) /*<>*/ ; var rr = /*<>*/ r[4], rd = r[3], @@ -11174,7 +11081,7 @@ /*<>*/ return /*<>*/ create ( /*<>*/ create(l, x, d, rl), rv, rd, rr) /*<>*/ ; /*<>*/ if(! rl) - /*<>*/ return caml_call1(Stdlib[1], cst_Map_bal$1) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Map_bal$1) /*<>*/ ; var rlr = /*<>*/ rl[4], rld = rl[3], @@ -11445,8 +11352,7 @@ /*<>*/ } function remove_min_binding(param){ /*<>*/ if(! param) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Map_remove_min_elt) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Map_remove_min_elt) /*<>*/ ; var l = /*<>*/ param[1]; if(l){ var r = param[4], d = param[3], v = param[2]; @@ -11963,9 +11869,8 @@ /*<>*/ return bindings_aux(0, s) /*<>*/ ; } function of_list(bs){ - /*<>*/ return caml_call3 - (Stdlib_List[26], - function(m, param){ + /*<>*/ return (0, Stdlib_List[26]) + (function(m, param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return add(k, v, m) /*<>*/ ; }, @@ -11973,9 +11878,8 @@ bs) /*<>*/ ; } function add_seq(i, m){ - /*<>*/ return caml_call3 - (Stdlib_Seq[5], - function(m, param){ + /*<>*/ return (0, Stdlib_Seq[5]) + (function(m, param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return add(k, v, m) /*<>*/ ; }, @@ -12120,28 +12024,13 @@ //# unitInfo: Provides: Stdlib__Stack //# unitInfo: Requires: Stdlib__List, Stdlib__Seq +//# shape: Stdlib__Stack:[N,F(1),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(1),F(2),F(1)] (function (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } - var + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Stdlib_List = global_data.Stdlib__List, @@ -12208,18 +12097,17 @@ /*<>*/ return s[2]; /*<>*/ } function iter(f, s){ - /*<>*/ return caml_call2(Stdlib_List[18], f, s[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_List[18])(f, s[1]) /*<>*/ ; } function fold(f, acc, s){ - /*<>*/ return caml_call3(Stdlib_List[26], f, acc, s[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_List[26])(f, acc, s[1]) /*<>*/ ; } function to_seq(s){ - /*<>*/ return caml_call1(Stdlib_List[64], s[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_List[64])(s[1]) /*<>*/ ; } function add_seq(q, i){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(x){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(x){ /*<>*/ return push(x, q) /*<>*/ ; }, i) /*<>*/ ; @@ -12256,6 +12144,7 @@ //# unitInfo: Provides: Stdlib__Queue //# unitInfo: Requires: Stdlib__Seq +//# shape: Stdlib__Queue:[N,F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(2),F(1),F(2),F(1)] (function (globalThis){ "use strict"; @@ -12414,9 +12303,8 @@ /*<>*/ return aux(_a_, _b_);} /*<>*/ ; /*<>*/ } function add_seq(q, i){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(x){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(x){ /*<>*/ return add(x, q) /*<>*/ ; }, i) /*<>*/ ; @@ -12456,6 +12344,7 @@ //# unitInfo: Provides: Stdlib__Buffer //# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Seq, Stdlib__String, Stdlib__Sys +//# shape: Stdlib__Buffer:[F(1),F(1),F(1),F(3),F(5),F(2),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(4),F(4),F(3),F(2),F(3),F(1),F(1),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2)] (function (globalThis){ "use strict"; @@ -12482,26 +12371,6 @@ ? f(a0) : runtime.caml_call_gen(f, [a0]); } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var global_data = runtime.caml_get_global_data(), Stdlib_Bytes = global_data.Stdlib__Bytes, @@ -12523,19 +12392,16 @@ /*<>*/ return [0, [0, s, n$1], 0, s]; /*<>*/ } function contents(b){ - /*<>*/ return caml_call3 - (Stdlib_Bytes[8], b[1][1], 0, b[2]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[8])(b[1][1], 0, b[2]) /*<>*/ ; } function to_bytes(b){ - /*<>*/ return caml_call3 - (Stdlib_Bytes[7], b[1][1], 0, b[2]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[7])(b[1][1], 0, b[2]) /*<>*/ ; } function sub(b, ofs, len){ /*<>*/ if (0 <= ofs && 0 <= len && (b[2] - len | 0) >= ofs) - /*<>*/ return caml_call3 - (Stdlib_Bytes[8], b[1][1], ofs, len) /*<>*/ ; - /*<>*/ return caml_call1(Stdlib[1], cst_Buffer_sub) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[8])(b[1][1], ofs, len) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Buffer_sub) /*<>*/ ; } function blit(src, srcoff, dst, dstoff, len){ /*<>*/ if @@ -12545,9 +12411,9 @@ && (src[2] - len | 0) >= srcoff && 0 <= dstoff && (caml_ml_bytes_length(dst) - len | 0) >= dstoff) - /*<>*/ return caml_call5 - (Stdlib_Bytes[11], src[1][1], srcoff, dst, dstoff, len) /*<>*/ ; - /*<>*/ return caml_call1(Stdlib[1], cst_Buffer_blit) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[11]) + (src[1][1], srcoff, dst, dstoff, len) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Buffer_blit) /*<>*/ ; } function nth(b, ofs){ var @@ -12558,7 +12424,7 @@ /*<>*/ if (0 <= ofs && position > ofs && length >= position) /*<>*/ return runtime.caml_bytes_unsafe_get(buffer, ofs) /*<>*/ ; - /*<>*/ return caml_call1(Stdlib[1], cst_Buffer_nth) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Buffer_nth) /*<>*/ ; } function length(b){ /*<>*/ return b[2]; @@ -12586,11 +12452,10 @@ /*<>*/ if((old_pos + more | 0) <= Stdlib_Sys[12]) /*<>*/ new_len[1] = Stdlib_Sys[12]; else - /*<>*/ caml_call1 - (Stdlib[2], cst_Buffer_add_cannot_grow_buf); + /*<>*/ (0, Stdlib[2])(cst_Buffer_add_cannot_grow_buf); var new_buffer = /*<>*/ caml_create_bytes(new_len[1]); - /*<>*/ caml_call5 - (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); + /*<>*/ (0, Stdlib_Bytes[11]) + (b[1][1], 0, new_buffer, 0, b[2]); /*<>*/ b[1] = [0, new_buffer, new_len[1]]; /*<>*/ } function add_char(b, c){ @@ -12620,10 +12485,7 @@ var pos = b[2]; /*<>*/ if(b[1][2] <= pos) /*<>*/ resize(b, uchar_utf_8_byte_length_max); - var - n = - /*<>*/ caml_call3 - (Stdlib_Bytes[51], b[1][1], pos, u); + var n = /*<>*/ (0, Stdlib_Bytes[51])(b[1][1], pos, u); /*<>*/ if(0 !== n){ /*<>*/ b[2] = pos + n | 0; return 0; @@ -12636,10 +12498,7 @@ var pos = b[2]; /*<>*/ if(b[1][2] <= pos) /*<>*/ resize(b, uchar_utf_16_byte_length_max); - var - n = - /*<>*/ caml_call3 - (Stdlib_Bytes[54], b[1][1], pos, u); + var n = /*<>*/ (0, Stdlib_Bytes[54])(b[1][1], pos, u); /*<>*/ if(0 !== n){ /*<>*/ b[2] = pos + n | 0; return 0; @@ -12652,10 +12511,7 @@ var pos = b[2]; /*<>*/ if(b[1][2] <= pos) /*<>*/ resize(b, uchar_utf_16_byte_length_max); - var - n = - /*<>*/ caml_call3 - (Stdlib_Bytes[57], b[1][1], pos, u); + var n = /*<>*/ (0, Stdlib_Bytes[57])(b[1][1], pos, u); /*<>*/ if(0 !== n){ /*<>*/ b[2] = pos + n | 0; return 0; @@ -12672,8 +12528,7 @@ _u_ = len < 0 ? 1 : 0, _t_ = _u_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); if(_t_) - /*<>*/ caml_call1 - (Stdlib[1], cst_Buffer_add_substring_add_s); + /*<>*/ (0, Stdlib[1])(cst_Buffer_add_substring_add_s); var position = /*<>*/ b[2], match = /*<>*/ b[1], @@ -12682,8 +12537,8 @@ new_position = /*<>*/ position + len | 0; /*<>*/ if(length < new_position){ /*<>*/ resize(b, len); - /*<>*/ caml_call5 - (Stdlib_Bytes[12], s, offset, b[1][1], b[2], len); + /*<>*/ (0, Stdlib_Bytes[12]) + (s, offset, b[1][1], b[2], len); } else /*<>*/ caml_blit_string @@ -12694,7 +12549,7 @@ function add_subbytes(b, s, offset, len){ /*<>*/ return /*<>*/ add_substring (b, - /*<>*/ caml_call1(Stdlib_Bytes[44], s), + /*<>*/ (0, Stdlib_Bytes[44])(s), offset, len) /*<>*/ ; } @@ -12708,8 +12563,7 @@ new_position = /*<>*/ position + len | 0; /*<>*/ if(length < new_position){ /*<>*/ resize(b, len); - /*<>*/ caml_call5 - (Stdlib_Bytes[12], s, 0, b[1][1], b[2], len); + /*<>*/ (0, Stdlib_Bytes[12])(s, 0, b[1][1], b[2], len); } else /*<>*/ caml_blit_string(s, 0, buffer, position, len); @@ -12718,7 +12572,7 @@ /*<>*/ } function add_bytes(b, s){ /*<>*/ return /*<>*/ add_string - (b, /*<>*/ caml_call1(Stdlib_Bytes[44], s)) /*<>*/ ; + (b, /*<>*/ (0, Stdlib_Bytes[44])(s)) /*<>*/ ; } function add_buffer(b, bs){ /*<>*/ return add_subbytes(b, bs[1][1], 0, bs[2]) /*<>*/ ; @@ -12727,8 +12581,7 @@ var _q_ = /*<>*/ to_read$1 < 0 ? 1 : 0, _r_ = _q_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); - if(_r_) - /*<>*/ caml_call1(Stdlib[1], cst_Buffer_add_channel); + if(_r_) /*<>*/ (0, Stdlib[1])(cst_Buffer_add_channel); /*<>*/ if(b[1][2] < (b[2] + to_read$1 | 0)) /*<>*/ resize(b, to_read$1); var @@ -12740,9 +12593,7 @@ for(;;){ /*<>*/ if(0 !== to_read){ var - r = - /*<>*/ caml_call4 - (Stdlib[84], ic, buf, ofs, to_read); + r = /*<>*/ (0, Stdlib[84])(ic, buf, ofs, to_read); /*<>*/ if(0 !== r){ var already_read$0 = /*<>*/ already_read + r | 0, @@ -12762,8 +12613,7 @@ } /*<>*/ } function output_buffer(oc, b){ - /*<>*/ return caml_call4 - (Stdlib[68], oc, b[1][1], 0, b[2]) /*<>*/ ; + /*<>*/ return (0, Stdlib[68])(oc, b[1][1], 0, b[2]) /*<>*/ ; } function add_substitute(b, f, s){ var @@ -12830,8 +12680,8 @@ var val = /*<>*/ [0, - /*<>*/ caml_call3 - (Stdlib_String[16], s, start, stop$0 - start | 0), + /*<>*/ (0, Stdlib_String[16]) + (s, start, stop$0 - start | 0), stop$0]; break a; } @@ -12871,8 +12721,8 @@ var val = /*<>*/ [0, - /*<>*/ caml_call3 - (Stdlib_String[16], s, new_start, (stop - start | 0) - 1 | 0), + /*<>*/ (0, Stdlib_String[16]) + (s, new_start, (stop - start | 0) - 1 | 0), stop + 1 | 0]; } } @@ -12906,7 +12756,7 @@ /*<>*/ b[2] = len; return 0; } - /*<>*/ return caml_call1(Stdlib[1], cst_Buffer_truncate) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Buffer_truncate) /*<>*/ ; } function to_seq(b){ function aux(i, param){ @@ -12939,9 +12789,8 @@ /*<>*/ return aux(_f_, _g_);} /*<>*/ ; /*<>*/ } function add_seq(b, seq){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(_e_){ /*<>*/ return add_char(b, _e_);}, + /*<>*/ return (0, Stdlib_Seq[4]) + (function(_e_){ /*<>*/ return add_char(b, _e_);}, seq) /*<>*/ ; } function of_seq(i){ @@ -13110,7 +12959,9 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Mutex -(function(globalThis){ +//# shape: Stdlib__Mutex:[F(1),F(1),F(1),F(1),F(2)] +(function + (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, @@ -13150,7 +13001,9 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Condition -(function(globalThis){ +//# shape: Stdlib__Condition:[F(1),F(2),F(1),F(1)] +(function + (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, @@ -13167,23 +13020,13 @@ //# unitInfo: Provides: Stdlib__Semaphore //# unitInfo: Requires: Stdlib, Stdlib__Condition, Stdlib__Mutex +//# shape: Stdlib__Semaphore:[[F(1),F(1),F(1),F(1),F(1)],[F(1),F(1),F(1),F(1)]] (function (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } - var + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, global_data = runtime.caml_get_global_data(), Stdlib_Mutex = global_data.Stdlib__Mutex, Stdlib_Condition = global_data.Stdlib__Condition, @@ -13193,41 +13036,38 @@ cst_Semaphore_Counting_release = "Semaphore.Counting.release: overflow"; function make(v){ /*<>*/ if(v < 0) - /*<>*/ caml_call1 - (Stdlib[1], cst_Semaphore_Counting_init_wr); - var _c_ = /*<>*/ caml_call1(Stdlib_Condition[1], 0); - /*<>*/ return [0, - caml_call1(Stdlib_Mutex[1], 0), - v, - _c_] /*<>*/ ; + /*<>*/ (0, Stdlib[1]) + (cst_Semaphore_Counting_init_wr); + var _c_ = /*<>*/ (0, Stdlib_Condition[1])(0); + /*<>*/ return [0, (0, Stdlib_Mutex[1])(0), v, _c_] /*<>*/ ; /*<>*/ } function release(s){ - /*<>*/ caml_call1(Stdlib_Mutex[2], s[1]); + /*<>*/ (0, Stdlib_Mutex[2])(s[1]); /*<>*/ if(s[2] < Stdlib[19]){ /*<>*/ s[2] = s[2] + 1 | 0; - /*<>*/ caml_call1(Stdlib_Condition[3], s[3]); - /*<>*/ return caml_call1(Stdlib_Mutex[4], s[1]) /*<>*/ ; + /*<>*/ (0, Stdlib_Condition[3])(s[3]); + /*<>*/ return (0, Stdlib_Mutex[4])(s[1]) /*<>*/ ; } - /*<>*/ caml_call1(Stdlib_Mutex[4], s[1]); + /*<>*/ (0, Stdlib_Mutex[4])(s[1]); /*<>*/ throw caml_maybe_attach_backtrace ([0, Stdlib[11], cst_Semaphore_Counting_release], 1); /*<>*/ } function acquire(s){ - /*<>*/ caml_call1(Stdlib_Mutex[2], s[1]); + /*<>*/ (0, Stdlib_Mutex[2])(s[1]); /*<>*/ for(;;){ if(0 !== s[2]){ /*<>*/ s[2] = s[2] - 1 | 0; - /*<>*/ return caml_call1(Stdlib_Mutex[4], s[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Mutex[4])(s[1]) /*<>*/ ; } - /*<>*/ caml_call2(Stdlib_Condition[2], s[3], s[1]); + /*<>*/ (0, Stdlib_Condition[2])(s[3], s[1]); } /*<>*/ } function try_acquire(s){ - /*<>*/ caml_call1(Stdlib_Mutex[2], s[1]); + /*<>*/ (0, Stdlib_Mutex[2])(s[1]); var ret = /*<>*/ 0 === s[2] ? 0 : (s[2] = s[2] - 1 | 0, 1); - /*<>*/ caml_call1(Stdlib_Mutex[4], s[1]); + /*<>*/ (0, Stdlib_Mutex[4])(s[1]); /*<>*/ return ret; /*<>*/ } function get_value(s){ @@ -13237,33 +13077,30 @@ Counting = /*<>*/ [0, make, release, acquire, try_acquire, get_value]; function make$0(b){ var - _a_ = /*<>*/ caml_call1(Stdlib_Condition[1], 0), + _a_ = /*<>*/ (0, Stdlib_Condition[1])(0), _b_ = /*<>*/ b ? 1 : 0; - /*<>*/ return [0, - caml_call1(Stdlib_Mutex[1], 0), - _b_, - _a_] /*<>*/ ; + /*<>*/ return [0, (0, Stdlib_Mutex[1])(0), _b_, _a_] /*<>*/ ; /*<>*/ } function release$0(s){ - /*<>*/ caml_call1(Stdlib_Mutex[2], s[1]); + /*<>*/ (0, Stdlib_Mutex[2])(s[1]); /*<>*/ s[2] = 1; - /*<>*/ caml_call1(Stdlib_Condition[3], s[3]); - /*<>*/ return caml_call1(Stdlib_Mutex[4], s[1]) /*<>*/ ; + /*<>*/ (0, Stdlib_Condition[3])(s[3]); + /*<>*/ return (0, Stdlib_Mutex[4])(s[1]) /*<>*/ ; } function acquire$0(s){ - /*<>*/ caml_call1(Stdlib_Mutex[2], s[1]); + /*<>*/ (0, Stdlib_Mutex[2])(s[1]); /*<>*/ for(;;){ if(0 !== s[2]){ /*<>*/ s[2] = 0; - /*<>*/ return caml_call1(Stdlib_Mutex[4], s[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Mutex[4])(s[1]) /*<>*/ ; } - /*<>*/ caml_call2(Stdlib_Condition[2], s[3], s[1]); + /*<>*/ (0, Stdlib_Condition[2])(s[3], s[1]); } /*<>*/ } function try_acquire$0(s){ - /*<>*/ caml_call1(Stdlib_Mutex[2], s[1]); + /*<>*/ (0, Stdlib_Mutex[2])(s[1]); var ret = /*<>*/ 0 === s[2] ? 0 : (s[2] = 0, 1); - /*<>*/ caml_call1(Stdlib_Mutex[4], s[1]); + /*<>*/ (0, Stdlib_Mutex[4])(s[1]); /*<>*/ return ret; /*<>*/ } var @@ -13276,6 +13113,7 @@ //# unitInfo: Provides: Stdlib__Domain //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Condition, Stdlib__List, Stdlib__Mutex +//# shape: Stdlib__Domain:[F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),N] (function (globalThis){ "use strict"; @@ -13292,21 +13130,6 @@ ? f(a0) : runtime.caml_call_gen(f, [a0]); } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var dummy = 0, global_data = runtime.caml_get_global_data(), @@ -13327,23 +13150,21 @@ /*<>*/ } /*<>*/ create_dls(0); var - key_counter = /*<>*/ caml_call1(Stdlib_Atomic[1], 0), - parent_keys = /*<>*/ caml_call1(Stdlib_Atomic[1], 0), + key_counter = /*<>*/ (0, Stdlib_Atomic[1])(0), + parent_keys = /*<>*/ (0, Stdlib_Atomic[1])(0), _a_ = /*<>*/ [0, "domain.ml", 184, 13]; function new_key(split_from_parent, init_orphan){ var - idx = - /*<>*/ caml_call2(Stdlib_Atomic[7], key_counter, 1), + idx = /*<>*/ (0, Stdlib_Atomic[7])(key_counter, 1), k = /*<>*/ [0, idx, init_orphan]; /*<>*/ if(split_from_parent){ var split = split_from_parent[1], ki = /*<>*/ [0, k, split]; for(;;){ - var - l = /*<>*/ caml_call1(Stdlib_Atomic[3], parent_keys); + var l = /*<>*/ (0, Stdlib_Atomic[3])(parent_keys); /*<>*/ if - (! (1 - caml_call3(Stdlib_Atomic[6], parent_keys, l, [0, ki, l]))) + (! (1 - (0, Stdlib_Atomic[6])(parent_keys, l, [0, ki, l]))) break; } } @@ -13363,8 +13184,7 @@ new_sz = s; } var new_st = /*<>*/ caml_make_vect(new_sz, none); - /*<>*/ caml_call5 - (Stdlib_Array[9], st, 0, new_st, 0, sz); + /*<>*/ (0, Stdlib_Array[9])(st, 0, new_st, 0, sz); /*<>*/ if (runtime.caml_domain_dls_compare_and_set(st, new_st)) /*<>*/ return new_st; @@ -13414,16 +13234,14 @@ /*<>*/ return 0 === caml_ml_domain_id(0) ? 1 : 0 /*<>*/ ; /*<>*/ } var - first_domain_spawned = - /*<>*/ caml_call1(Stdlib_Atomic[1], 0), + first_domain_spawned = /*<>*/ (0, Stdlib_Atomic[1])(0), first_spawn_function = /*<>*/ [0, function(param){ /*<>*/ }], cst_first_domain_already_spawn = /*<>*/ "first domain already spawned"; function before_first_spawn(f){ - /*<>*/ if - (caml_call1(Stdlib_Atomic[3], first_domain_spawned)) + /*<>*/ if((0, Stdlib_Atomic[3])(first_domain_spawned)) /*<>*/ throw caml_maybe_attach_backtrace ([0, Stdlib[6], cst_first_domain_already_spawn], 1); var old_f = /*<>*/ first_spawn_function[1]; @@ -13457,9 +13275,8 @@ /*<>*/ Stdlib[104][1] = do_at_exit; function spawn(f){ /*<>*/ if - (1 - caml_call1(Stdlib_Atomic[3], first_domain_spawned)){ - /*<>*/ caml_call2 - (Stdlib_Atomic[4], first_domain_spawned, 1); + (1 - (0, Stdlib_Atomic[3])(first_domain_spawned)){ + /*<>*/ (0, Stdlib_Atomic[4])(first_domain_spawned, 1); /*<>*/ caml_call1(first_spawn_function[1], 0); /*<>*/ first_spawn_function[1] = function(param){ @@ -13467,11 +13284,10 @@ /*<>*/ }; } var - _b_ = /*<>*/ caml_call1(Stdlib_Atomic[3], parent_keys), + _b_ = /*<>*/ (0, Stdlib_Atomic[3])(parent_keys), pk = - /*<>*/ caml_call2 - (Stdlib_List[20], - function(param){ + /*<>*/ (0, Stdlib_List[20]) + (function(param){ var split = /*<>*/ param[2], k = param[1]; /*<>*/ return [0, k, @@ -13479,15 +13295,14 @@ (split, /*<>*/ get(k))] /*<>*/ ; /*<>*/ }, _b_), - _c_ = /*<>*/ caml_call1(Stdlib_Condition[1], 0), + _c_ = /*<>*/ (0, Stdlib_Condition[1])(0), term_sync = - /*<>*/ [0, 0, caml_call1(Stdlib_Mutex[1], 0), _c_]; + /*<>*/ [0, 0, (0, Stdlib_Mutex[1])(0), _c_]; function body(param){ /*<>*/ try{ /*<>*/ create_dls(0); - /*<>*/ caml_call2 - (Stdlib_List[18], - function(param){ + /*<>*/ (0, Stdlib_List[18]) + (function(param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return set(k, v) /*<>*/ ; }, @@ -13514,14 +13329,12 @@ /*<>*/ for(;;){ var match = term_sync[1]; if(match){var res = match[1]; /*<>*/ return res;} - /*<>*/ caml_call2 - (Stdlib_Condition[2], term_sync[3], term_sync[2]); + /*<>*/ (0, Stdlib_Condition[2]) + (term_sync[3], term_sync[2]); } /*<>*/ } var - match = - /*<>*/ caml_call2 - (Stdlib_Mutex[5], term_sync[2], loop); + match = /*<>*/ (0, Stdlib_Mutex[5])(term_sync[2], loop); /*<>*/ if(0 === match[0]){ var x = match[1]; /*<>*/ return x; @@ -13551,6 +13364,7 @@ //# unitInfo: Provides: CamlinternalFormat //# unitInfo: Requires: CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Char, Stdlib__Int, Stdlib__String, Stdlib__Sys +//# shape: CamlinternalFormat:[F(2),F(1),F(1),F(2),F(1),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2)] (function (globalThis){ "use strict"; @@ -13701,8 +13515,7 @@ _p_ = [0, cst_camlinternalFormat_ml, 826, 22], _q_ = [0, cst_camlinternalFormat_ml, 831, 30]; function create_char_set(param){ - /*<>*/ return caml_call2 - (Stdlib_Bytes[1], 32, 0) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[1])(32, 0) /*<>*/ ; } function add_in_char_set(char_set, c){ var @@ -13715,11 +13528,10 @@ /*<>*/ return /*<>*/ caml_bytes_set (char_set, str_ind, - /*<>*/ caml_call1(Stdlib[29], _cU_)) /*<>*/ ; + /*<>*/ (0, Stdlib[29])(_cU_)) /*<>*/ ; } function freeze_char_set(char_set){ - /*<>*/ return caml_call1 - (Stdlib_Bytes[6], char_set) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[6])(char_set) /*<>*/ ; } function rev_char_set(char_set){ var @@ -13733,11 +13545,11 @@ /*<>*/ /*<>*/ caml_bytes_set (char_set$0, i, - /*<>*/ caml_call1(Stdlib[29], _cS_)); + /*<>*/ (0, Stdlib[29])(_cS_)); var _cT_ = /*<>*/ i + 1 | 0; if(31 === i) - /*<>*/ return caml_call1 - (Stdlib_Bytes[44], char_set$0) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[44]) + (char_set$0) /*<>*/ ; /*<>*/ i = _cT_; } /*<>*/ } @@ -13856,12 +13668,12 @@ /*<>*/ if(len < min_len){ var new_len = - /*<>*/ caml_call2 - (Stdlib_Int[11], len * 2 | 0, min_len), + /*<>*/ (0, Stdlib_Int[11]) + (len * 2 | 0, min_len), new_str = /*<>*/ caml_create_bytes(new_len); - /*<>*/ caml_call5 - (Stdlib_Bytes[11], buf[2], 0, new_str, 0, len); + /*<>*/ (0, Stdlib_Bytes[11]) + (buf[2], 0, new_str, 0, len); /*<>*/ buf[2] = new_str; } /*<>*/ } @@ -13874,13 +13686,13 @@ var str_len = /*<>*/ caml_ml_string_length(s); /*<>*/ buffer_check_size(buf, str_len); - /*<>*/ caml_call5 - (Stdlib_String[6], s, 0, buf[2], buf[1], str_len); + /*<>*/ (0, Stdlib_String[6]) + (s, 0, buf[2], buf[1], str_len); /*<>*/ buf[1] = buf[1] + str_len | 0; /*<>*/ } function buffer_contents(buf){ - /*<>*/ return caml_call3 - (Stdlib_Bytes[8], buf[2], 0, buf[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[8]) + (buf[2], 0, buf[1]) /*<>*/ ; } function char_of_iconv(iconv){ /*<>*/ switch(iconv){ @@ -13947,8 +13759,7 @@ var width = /*<>*/ pad_opt[1]; /*<>*/ return /*<>*/ buffer_add_string (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], width)) /*<>*/ ; + /*<>*/ (0, Stdlib_Int[12])(width)) /*<>*/ ; } function bprint_padding(buf, pad){ /*<>*/ if(typeof pad === "number") @@ -13958,8 +13769,7 @@ /*<>*/ bprint_padty(buf, padty); /*<>*/ return /*<>*/ buffer_add_string (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], n)) /*<>*/ ; + /*<>*/ (0, Stdlib_Int[12])(n)) /*<>*/ ; } var padty$0 = /*<>*/ pad[1]; /*<>*/ bprint_padty(buf, padty$0); @@ -13971,8 +13781,7 @@ /*<>*/ buffer_add_char(buf, 46); /*<>*/ return /*<>*/ buffer_add_string (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], n)) /*<>*/ ; + /*<>*/ (0, Stdlib_Int[12])(n)) /*<>*/ ; } /*<>*/ if(prec) /*<>*/ return buffer_add_string(buf, cst) /*<>*/ ; @@ -14044,10 +13853,9 @@ var c = /*<>*/ formatting_lit[1], _cQ_ = - /*<>*/ caml_call2 - (Stdlib_String[1], 1, c); - /*<>*/ return caml_call2 - (Stdlib[28], cst$7, _cQ_); + /*<>*/ (0, Stdlib_String[1])(1, c); + /*<>*/ return (0, Stdlib[28]) + (cst$7, _cQ_); } } function bprint_char_literal(buf, chr){ @@ -14417,10 +14225,7 @@ var print_char = /*<>*/ function(buf, i){ - var - c = - /*<>*/ caml_call1 - (Stdlib[29], i); + var c = /*<>*/ (0, Stdlib[29])(i); /*<>*/ return 37 === c ? ( /*<>*/ buffer_add_char (buf, 37), @@ -14449,11 +14254,11 @@ function(c){ var after = - /*<>*/ caml_call1 - (Stdlib_Char[1], c + 1 | 0), + /*<>*/ (0, Stdlib_Char[1]) + (c + 1 | 0), before = - /*<>*/ caml_call1 - (Stdlib_Char[1], c - 1 | 0), + /*<>*/ (0, Stdlib_Char[1]) + (c - 1 | 0), _cJ_ = /*<>*/ is_in_char_set(set$0, c); /*<>*/ if(_cJ_) @@ -14486,13 +14291,10 @@ /*<>*/ if ( /*<>*/ is_in_char_set (set, - /*<>*/ caml_call1 - (Stdlib[29], i))){ + /*<>*/ (0, Stdlib[29])(i))){ var switcher = - /*<>*/ caml_call1 - (Stdlib[29], i) - - 45 + /*<>*/ (0, Stdlib[29])(i) - 45 | 0; /*<>*/ if(48 < switcher >>> 0){ if(210 <= switcher) break d; @@ -14506,12 +14308,10 @@ /*<>*/ if ( /*<>*/ is_in_char_set (set, - /*<>*/ caml_call1 - (Stdlib[29], i$1))){ + /*<>*/ (0, Stdlib[29])(i$1))){ var switcher$0 = - /*<>*/ caml_call1 - (Stdlib[29], i$1) + /*<>*/ (0, Stdlib[29])(i$1) - 45 | 0; /*<>*/ if(48 < switcher$0 >>> 0){ @@ -14523,8 +14323,8 @@ ! /*<>*/ is_in_char_set (set, - /*<>*/ caml_call1 - (Stdlib[29], i$1 + 1 | 0))){ + /*<>*/ (0, Stdlib[29]) + (i$1 + 1 | 0))){ /*<>*/ print_char (buf, i$1 - 1 | 0); var i$5 = /*<>*/ i$1 + 1 | 0; @@ -14534,8 +14334,8 @@ /*<>*/ if ( /*<>*/ is_in_char_set (set, - /*<>*/ caml_call1 - (Stdlib[29], i$1 + 1 | 0))){ + /*<>*/ (0, Stdlib[29]) + (i$1 + 1 | 0))){ var j = /*<>*/ i$1 + 2 | 0, i$3 = i$1 - 1 | 0, @@ -14546,8 +14346,7 @@ (! /*<>*/ is_in_char_set (set, - /*<>*/ caml_call1 - (Stdlib[29], j$0))) + /*<>*/ (0, Stdlib[29])(j$0))) break; var j$1 = /*<>*/ j$0 + 1 | 0; j$0 = j$1; @@ -15489,8 +15288,9 @@ var fmt$0 = /*<>*/ formatting_gen[1][1], _cC_ = /*<>*/ fmtty_of_fmt(fmt$0); - /*<>*/ return caml_call2 - (CamlinternalFormatBasics[1], _cC_, _cB_) /*<>*/ ; + /*<>*/ return (0, + CamlinternalFormatBasics[1]) + (_cC_, _cB_) /*<>*/ ; case 19: var rest$14 = /*<>*/ fmtty$0[1]; /*<>*/ return [13, @@ -15547,8 +15347,9 @@ fmtty$6 = /*<>*/ ign[2], _cD_ = /*<>*/ fmtty_of_fmt(fmtty$5); - /*<>*/ return caml_call2 - (CamlinternalFormatBasics[1], fmtty$6, _cD_) /*<>*/ ; + /*<>*/ return (0, + CamlinternalFormatBasics[1]) + (fmtty$6, _cD_) /*<>*/ ; case 10: /*<>*/ fmtty$0 = fmtty$5; break; default: /*<>*/ fmtty$0 = fmtty$5; @@ -16160,12 +15961,13 @@ pad_opt$0 = fmt[1], _cy_ = /*<>*/ [0, - caml_call1(CamlinternalFormatBasics[2], sub_fmtty1)]; + (0, CamlinternalFormatBasics[2])(sub_fmtty1)]; /*<>*/ if ( /*<>*/ caml_notequal ([0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub_fmtty$1)], + /*<>*/ (0, + CamlinternalFormatBasics[2]) + (sub_fmtty$1)], _cy_)) /*<>*/ throw caml_maybe_attach_backtrace (Type_mismatch, 1); @@ -16173,8 +15975,9 @@ match$29 = /*<>*/ /*<>*/ type_format_gen (fmt_rest$13, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], fmtty_rest$10)), + /*<>*/ (0, + CamlinternalFormatBasics[2]) + (fmtty_rest$10)), fmtty$13 = /*<>*/ match$29[2], fmt$14 = match$29[1]; /*<>*/ return [0, @@ -16581,24 +16384,26 @@ sub1_fmtty$0 = sub_fmtty[1], _cw_ = /*<>*/ [0, - caml_call1(CamlinternalFormatBasics[2], sub1_fmtty)]; + (0, CamlinternalFormatBasics[2])(sub1_fmtty)]; /*<>*/ if ( /*<>*/ caml_notequal ([0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub1_fmtty$0)], + /*<>*/ (0, + CamlinternalFormatBasics[2]) + (sub1_fmtty$0)], _cw_)) /*<>*/ throw caml_maybe_attach_backtrace (Type_mismatch, 1); var _cx_ = /*<>*/ [0, - caml_call1(CamlinternalFormatBasics[2], sub2_fmtty$1)]; + (0, CamlinternalFormatBasics[2])(sub2_fmtty$1)]; /*<>*/ if ( /*<>*/ caml_notequal ([0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub2_fmtty$2)], + /*<>*/ (0, + CamlinternalFormatBasics[2]) + (sub2_fmtty$2)], _cx_)) /*<>*/ throw caml_maybe_attach_backtrace (Type_mismatch, 1); @@ -16616,8 +16421,9 @@ var match$9 = /*<>*/ /*<>*/ type_ignored_format_substituti - ( /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub_fmtty_rest$17), + ( /*<>*/ (0, + CamlinternalFormatBasics[2]) + (sub_fmtty_rest$17), fmt, fmtty_rest$8), fmt$9 = /*<>*/ match$9[2], @@ -16699,30 +16505,30 @@ var _cv_ = /*<>*/ symm(fmtty); /*<>*/ return /*<>*/ type_format (fmt, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _cv_)) /*<>*/ ; + /*<>*/ (0, + CamlinternalFormatBasics[2]) + (_cv_)) /*<>*/ ; } function fix_padding(padty, width, str){ var len = /*<>*/ caml_ml_string_length(str), padty$0 = /*<>*/ 0 <= width ? padty : 0, - width$0 = - /*<>*/ caml_call1(Stdlib[18], width); + width$0 = /*<>*/ (0, Stdlib[18])(width); /*<>*/ if(width$0 <= len) /*<>*/ return str; var _cu_ = /*<>*/ 2 === padty$0 ? 48 : 32, res = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], width$0, _cu_); + /*<>*/ (0, Stdlib_Bytes[1]) + (width$0, _cu_); /*<>*/ switch(padty$0){ case 0: - /*<>*/ caml_call5 - (Stdlib_String[6], str, 0, res, 0, len); + /*<>*/ (0, Stdlib_String[6]) + (str, 0, res, 0, len); break; case 1: - /*<>*/ caml_call5 - (Stdlib_String[6], str, 0, res, width$0 - len | 0, len); + /*<>*/ (0, Stdlib_String[6]) + (str, 0, res, width$0 - len | 0, len); break; default: a: @@ -16740,13 +16546,8 @@ (res, 0, /*<>*/ caml_string_get(str, 0)); - /*<>*/ caml_call5 - (Stdlib_String[6], - str, - 1, - res, - (width$0 - len | 0) + 1 | 0, - len - 1 | 0); + /*<>*/ (0, Stdlib_String[6]) + (str, 1, res, (width$0 - len | 0) + 1 | 0, len - 1 | 0); break; } a: @@ -16765,25 +16566,18 @@ (res, 1, /*<>*/ caml_string_get(str, 1)); - /*<>*/ caml_call5 - (Stdlib_String[6], - str, - 2, - res, - (width$0 - len | 0) + 2 | 0, - len - 2 | 0); + /*<>*/ (0, Stdlib_String[6]) + (str, 2, res, (width$0 - len | 0) + 2 | 0, len - 2 | 0); break; } - /*<>*/ caml_call5 - (Stdlib_String[6], str, 0, res, width$0 - len | 0, len); + /*<>*/ (0, Stdlib_String[6]) + (str, 0, res, width$0 - len | 0, len); } - /*<>*/ return caml_call1 - (Stdlib_Bytes[44], res) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[44])(res) /*<>*/ ; } function fix_int_precision(prec, str){ var - prec$0 = - /*<>*/ caml_call1(Stdlib[18], prec), + prec$0 = /*<>*/ (0, Stdlib[18])(prec), len = /*<>*/ caml_ml_string_length(str), c = /*<>*/ caml_string_get(str, 0); a: @@ -16806,21 +16600,17 @@ break c; var res$1 = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], prec$0 + 2 | 0, 48); + /*<>*/ (0, Stdlib_Bytes[1]) + (prec$0 + 2 | 0, 48); /*<>*/ /*<>*/ caml_bytes_set (res$1, 1, /*<>*/ caml_string_get(str, 1)); - /*<>*/ caml_call5 - (Stdlib_String[6], - str, - 2, - res$1, - (prec$0 - len | 0) + 4 | 0, - len - 2 | 0); - /*<>*/ return caml_call1 - (Stdlib_Bytes[44], res$1) /*<>*/ ; + /*<>*/ (0, Stdlib_String[6]) + (str, 2, res$1, (prec$0 - len | 0) + 4 | 0, len - 2 | 0); + /*<>*/ return (0, + Stdlib_Bytes[44]) + (res$1) /*<>*/ ; } break b; case 0: @@ -16836,18 +16626,13 @@ break a; var res$0 = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], prec$0 + 1 | 0, 48); + /*<>*/ (0, Stdlib_Bytes[1]) + (prec$0 + 1 | 0, 48); /*<>*/ caml_bytes_set(res$0, 0, c); - /*<>*/ caml_call5 - (Stdlib_String[6], - str, - 1, - res$0, - (prec$0 - len | 0) + 2 | 0, - len - 1 | 0); - /*<>*/ return caml_call1 - (Stdlib_Bytes[44], res$0) /*<>*/ ; + /*<>*/ (0, Stdlib_String[6]) + (str, 1, res$0, (prec$0 - len | 0) + 2 | 0, len - 1 | 0); + /*<>*/ return (0, Stdlib_Bytes[44]) + (res$0) /*<>*/ ; } /*<>*/ if(71 <= c){ if(5 < c - 97 >>> 0) break a; @@ -16857,12 +16642,11 @@ /*<>*/ if(len < prec$0){ var res = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], prec$0, 48); - /*<>*/ caml_call5 - (Stdlib_String[6], str, 0, res, prec$0 - len | 0, len); - /*<>*/ return caml_call1 - (Stdlib_Bytes[44], res) /*<>*/ ; + /*<>*/ (0, Stdlib_Bytes[1]) + (prec$0, 48); + /*<>*/ (0, Stdlib_String[6]) + (str, 0, res, prec$0 - len | 0, len); + /*<>*/ return (0, Stdlib_Bytes[44])(res) /*<>*/ ; } } /*<>*/ return str; @@ -16870,30 +16654,25 @@ function string_to_caml_string(str){ var str$0 = - /*<>*/ caml_call1 - (Stdlib_String[25], str), + /*<>*/ (0, Stdlib_String[25])(str), l = /*<>*/ caml_ml_string_length(str$0), res = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], l + 2 | 0, 34); + /*<>*/ (0, Stdlib_Bytes[1]) + (l + 2 | 0, 34); /*<>*/ caml_blit_string (str$0, 0, res, 1, l); - /*<>*/ return caml_call1 - (Stdlib_Bytes[44], res) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[44])(res) /*<>*/ ; } function format_of_fconv(fconv, prec){ var - prec$0 = - /*<>*/ caml_call1(Stdlib[18], prec), + prec$0 = /*<>*/ (0, Stdlib[18])(prec), symb = /*<>*/ char_of_fconv(_r_, fconv), buf = /*<>*/ buffer_create(16); /*<>*/ buffer_add_char(buf, 37); /*<>*/ bprint_fconv_flag(buf, fconv); /*<>*/ buffer_add_char(buf, 46); /*<>*/ /*<>*/ buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], prec$0)); + (buf, /*<>*/ (0, Stdlib_Int[12])(prec$0)); /*<>*/ buffer_add_char(buf, symb); /*<>*/ return buffer_contents(buf) /*<>*/ ; } @@ -16955,8 +16734,7 @@ i = _cs_; } } - /*<>*/ return caml_call1 - (Stdlib_Bytes[44], buf) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[44])(buf) /*<>*/ ; } function convert_int(iconv, n){ /*<>*/ switch(iconv){ @@ -17150,16 +16928,17 @@ _ci_ = /*<>*/ _ch_ ? str - : /*<>*/ caml_call2 - (Stdlib[28], str, cst$17); + : /*<>*/ (0, + Stdlib[28]) + (str, cst$17); /*<>*/ return caml_special_val(_ci_) /*<>*/ ; } case 6: /*<>*/ return hex(0) /*<>*/ ; case 7: var _cj_ = /*<>*/ hex(0); - /*<>*/ return caml_call1 - (Stdlib_String[26], _cj_) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[26]) + (_cj_) /*<>*/ ; case 8: /*<>*/ return /*<>*/ caml_special_val ( /*<>*/ hex(0)) /*<>*/ ; @@ -17194,20 +16973,18 @@ var rest$0 = /*<>*/ fmt$0[1]; /*<>*/ return function(c){ var - str = - /*<>*/ caml_call1 - (Stdlib_Char[2], c), + str = /*<>*/ (0, Stdlib_Char[2])(c), l = /*<>*/ caml_ml_string_length(str), res = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], l + 2 | 0, 39); + /*<>*/ (0, Stdlib_Bytes[1]) + (l + 2 | 0, 39); /*<>*/ caml_blit_string (str, 0, res, 1, l); var new_acc = /*<>*/ [4, acc$0, - caml_call1(Stdlib_Bytes[44], res)]; + (0, Stdlib_Bytes[44])(res)]; /*<>*/ return make_printf (k$0, new_acc, rest$0) /*<>*/ ;} /*<>*/ ; case 2: @@ -17437,8 +17214,9 @@ /*<>*/ return /*<>*/ make_printf (k$0, acc$0, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _cf_, rest$13)) /*<>*/ ;} /*<>*/ ; + /*<>*/ (0, + CamlinternalFormatBasics[3]) + (_cf_, rest$13)) /*<>*/ ;} /*<>*/ ; case 15: var rest$14 = /*<>*/ fmt$0[1]; /*<>*/ return function(f, x){ @@ -17719,8 +17497,9 @@ /*<>*/ return /*<>*/ make_from_fmtty (k, acc, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], ty, rest$8), + /*<>*/ (0, + CamlinternalFormatBasics[1]) + (ty, rest$8), fmt) /*<>*/ ;} /*<>*/ ; case 10: var rest$9 = /*<>*/ fmtty[1]; @@ -18117,8 +17896,9 @@ /*<>*/ return /*<>*/ make_iprintf (k$0, o, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _bW_, rest$19)) /*<>*/ ;} /*<>*/ ; + /*<>*/ (0, + CamlinternalFormatBasics[3]) + (_bW_, rest$19)) /*<>*/ ;} /*<>*/ ; case 15: var rest$20 = /*<>*/ fmt$0[1], @@ -18334,8 +18114,7 @@ /*<>*/ string_of_formatting_lit (fmting_lit); /*<>*/ output_acc(o, p); - /*<>*/ return caml_call2 - (Stdlib[66], o, s) /*<>*/ ; + /*<>*/ return (0, Stdlib[66])(o, s) /*<>*/ ; case 1: var match = /*<>*/ acc$0[2], @@ -18343,15 +18122,13 @@ if(0 === match[0]){ var acc$1 = match[1]; /*<>*/ output_acc(o, p$0); - /*<>*/ caml_call2 - (Stdlib[66], o, cst$18); + /*<>*/ (0, Stdlib[66])(o, cst$18); /*<>*/ acc$0 = acc$1; } else{ var acc$2 = /*<>*/ match[1]; /*<>*/ output_acc(o, p$0); - /*<>*/ caml_call2 - (Stdlib[66], o, cst$19); + /*<>*/ (0, Stdlib[66])(o, cst$19); /*<>*/ acc$0 = acc$2; } break; @@ -18364,30 +18141,26 @@ case 7: var p$4 = /*<>*/ acc$0[1]; /*<>*/ output_acc(o, p$4); - /*<>*/ return caml_call1 - (Stdlib[63], o) /*<>*/ ; + /*<>*/ return (0, Stdlib[63])(o) /*<>*/ ; case 8: var msg = /*<>*/ acc$0[2], p$5 = acc$0[1]; /*<>*/ output_acc(o, p$5); - /*<>*/ return caml_call1 - (Stdlib[1], msg) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(msg) /*<>*/ ; case 2: case 4: var s$0 = /*<>*/ acc$0[2], p$1 = acc$0[1]; /*<>*/ output_acc(o, p$1); - /*<>*/ return caml_call2 - (Stdlib[66], o, s$0) /*<>*/ ; + /*<>*/ return (0, Stdlib[66])(o, s$0) /*<>*/ ; default: var c = /*<>*/ acc$0[2], p$2 = acc$0[1]; /*<>*/ output_acc(o, p$2); - /*<>*/ return caml_call2 - (Stdlib[65], o, c) /*<>*/ ; + /*<>*/ return (0, Stdlib[65])(o, c) /*<>*/ ; } } } @@ -18405,8 +18178,8 @@ /*<>*/ string_of_formatting_lit (fmting_lit); /*<>*/ bufput_acc(b, p); - /*<>*/ return caml_call2 - (Stdlib_Buffer[16], b, s) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[16]) + (b, s) /*<>*/ ; case 1: var match = /*<>*/ acc$0[2], @@ -18414,15 +18187,15 @@ if(0 === match[0]){ var acc$1 = match[1]; /*<>*/ bufput_acc(b, p$0); - /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$20); + /*<>*/ (0, Stdlib_Buffer[16]) + (b, cst$20); /*<>*/ acc$0 = acc$1; } else{ var acc$2 = /*<>*/ match[1]; /*<>*/ bufput_acc(b, p$0); - /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$21); + /*<>*/ (0, Stdlib_Buffer[16]) + (b, cst$21); /*<>*/ acc$0 = acc$2; } break; @@ -18441,23 +18214,22 @@ msg = /*<>*/ acc$0[2], p$4 = acc$0[1]; /*<>*/ bufput_acc(b, p$4); - /*<>*/ return caml_call1 - (Stdlib[1], msg) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(msg) /*<>*/ ; case 2: case 4: var s$0 = /*<>*/ acc$0[2], p$1 = acc$0[1]; /*<>*/ bufput_acc(b, p$1); - /*<>*/ return caml_call2 - (Stdlib_Buffer[16], b, s$0) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[16]) + (b, s$0) /*<>*/ ; default: var c = /*<>*/ acc$0[2], p$2 = acc$0[1]; /*<>*/ bufput_acc(b, p$2); - /*<>*/ return caml_call2 - (Stdlib_Buffer[12], b, c) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[12]) + (b, c) /*<>*/ ; } } } @@ -18475,8 +18247,8 @@ /*<>*/ string_of_formatting_lit (fmting_lit); /*<>*/ strput_acc(b, p); - /*<>*/ return caml_call2 - (Stdlib_Buffer[16], b, s) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[16]) + (b, s) /*<>*/ ; case 1: var match = /*<>*/ acc$0[2], @@ -18484,15 +18256,15 @@ if(0 === match[0]){ var acc$1 = match[1]; /*<>*/ strput_acc(b, p$0); - /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$22); + /*<>*/ (0, Stdlib_Buffer[16]) + (b, cst$22); /*<>*/ acc$0 = acc$1; } else{ var acc$2 = /*<>*/ match[1]; /*<>*/ strput_acc(b, p$0); - /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$23); + /*<>*/ (0, Stdlib_Buffer[16]) + (b, cst$23); /*<>*/ acc$0 = acc$2; } break; @@ -18502,8 +18274,8 @@ p$3 = acc$0[1]; /*<>*/ strput_acc(b, p$3); var _bv_ = /*<>*/ caml_call1(f, 0); - /*<>*/ return caml_call2 - (Stdlib_Buffer[16], b, _bv_) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[16]) + (b, _bv_) /*<>*/ ; case 7: var acc$3 = /*<>*/ acc$0[1]; /*<>*/ acc$0 = acc$3; @@ -18513,39 +18285,34 @@ msg = /*<>*/ acc$0[2], p$4 = acc$0[1]; /*<>*/ strput_acc(b, p$4); - /*<>*/ return caml_call1 - (Stdlib[1], msg) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(msg) /*<>*/ ; case 2: case 4: var s$0 = /*<>*/ acc$0[2], p$1 = acc$0[1]; /*<>*/ strput_acc(b, p$1); - /*<>*/ return caml_call2 - (Stdlib_Buffer[16], b, s$0) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[16]) + (b, s$0) /*<>*/ ; default: var c = /*<>*/ acc$0[2], p$2 = acc$0[1]; /*<>*/ strput_acc(b, p$2); - /*<>*/ return caml_call2 - (Stdlib_Buffer[12], b, c) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[12]) + (b, c) /*<>*/ ; } } } function failwith_message(param){ var fmt = /*<>*/ param[1], - buf = - /*<>*/ caml_call1 - (Stdlib_Buffer[1], 256); + buf = /*<>*/ (0, Stdlib_Buffer[1])(256); function k(acc){ /*<>*/ strput_acc(buf, acc); var - _bu_ = - /*<>*/ caml_call1 - (Stdlib_Buffer[2], buf); - /*<>*/ return caml_call1(Stdlib[2], _bu_); + _bu_ = /*<>*/ (0, Stdlib_Buffer[2])(buf); + /*<>*/ return (0, Stdlib[2])(_bu_); } /*<>*/ return make_printf(k, 0, fmt) /*<>*/ ; } @@ -18588,8 +18355,8 @@ } var box_name = - /*<>*/ caml_call3 - (Stdlib_String[16], str, wstart, wend - wstart | 0), + /*<>*/ (0, Stdlib_String[16]) + (str, wstart, wend - wstart | 0), nstart = /*<>*/ parse_spaces(wend); a: b: @@ -18616,8 +18383,8 @@ var _bs_ = /*<>*/ /*<>*/ runtime.caml_int_of_string - ( /*<>*/ caml_call3 - (Stdlib_String[16], str, nstart, nend - nstart | 0)), + ( /*<>*/ (0, Stdlib_String[16]) + (str, nstart, nend - nstart | 0)), indent = _bs_; } catch(_bt_){ @@ -18909,9 +18676,8 @@ if(17 === switcher$0){ var s = - /*<>*/ caml_call3 - (Stdlib_String[16], - str, + /*<>*/ (0, Stdlib_String[16]) + (str, str_ind$3 - 2 | 0, (str_ind_3 - str_ind$3 | 0) + 3 | 0), _bi_ = /*<>*/ [0, s, width, 0], @@ -18937,11 +18703,8 @@ (Stdlib[8], 1); var s$0 = - /*<>*/ caml_call3 - (Stdlib_String[16], - str, - str_ind$3 - 2 | 0, - (str_ind_5 - str_ind$3 | 0) + 3 | 0), + /*<>*/ (0, Stdlib_String[16]) + (str, str_ind$3 - 2 | 0, (str_ind_5 - str_ind$3 | 0) + 3 | 0), _bk_ = /*<>*/ [0, s$0, width, offset], _bl_ = str_ind_5 + 1 | 0, @@ -19007,9 +18770,8 @@ (Stdlib[8], 1); var s$1 = - /*<>*/ caml_call3 - (Stdlib_String[16], - str, + /*<>*/ (0, Stdlib_String[16]) + (str, str_ind$4 - 2 | 0, (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), _bo_ = @@ -19612,8 +19374,7 @@ for(;;){ /*<>*/ /*<>*/ add_in_char_set (char_set, - /*<>*/ caml_call1 - (Stdlib[29], i)); + /*<>*/ (0, Stdlib[29])(i)); var _a$_ = /*<>*/ i + 1 | 0; if(c === i) break; i = _a$_; @@ -20431,15 +20192,15 @@ (Stdlib[8], 1); var ind = - /*<>*/ caml_call3 - (Stdlib_String[32], str, str_ind + 1 | 0, 62); + /*<>*/ (0, Stdlib_String[32]) + (str, str_ind + 1 | 0, 62); /*<>*/ if(end_ind <= ind) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[8], 1); var sub_str = - /*<>*/ caml_call3 - (Stdlib_String[16], str, str_ind, (ind - str_ind | 0) + 1 | 0), + /*<>*/ (0, Stdlib_String[16]) + (str, str_ind, (ind - str_ind | 0) + 1 | 0), fmt_rest$0 = /*<>*/ parse(ind + 1 | 0, end_ind)[1], sub_fmt = @@ -20558,8 +20319,9 @@ fmt]] : [0, [11, - /*<>*/ caml_call3 - (Stdlib_String[16], str, lit_start, size), + /*<>*/ (0, + Stdlib_String[16]) + (str, lit_start, size), fmt]] /*<>*/ ; } function search_subformat_end(str_ind, end_ind, c){ @@ -20774,8 +20536,8 @@ function incompatible_flag(pct_ind, str_ind, symb, option){ var subfmt = - /*<>*/ caml_call3 - (Stdlib_String[16], str, pct_ind, str_ind - pct_ind | 0); + /*<>*/ (0, Stdlib_String[16]) + (str, pct_ind, str_ind - pct_ind | 0); /*<>*/ return caml_call5 (failwith_message(_Y_), str, pct_ind, option, symb, subfmt) /*<>*/ ; } @@ -20857,6 +20619,7 @@ //# unitInfo: Provides: Stdlib__Printf //# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Buffer +//# shape: Stdlib__Printf:[F(2),F(1),F(1),F(1),F(2),F(2),F(2),F(3),F(3),F(2),F(3),F(3),F(2)] (function (globalThis){ "use strict"; @@ -20866,16 +20629,6 @@ ? f(a0) : runtime.caml_call_gen(f, [a0]); } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } var global_data = runtime.caml_get_global_data(), Stdlib_Buffer = global_data.Stdlib__Buffer, @@ -20883,11 +20636,9 @@ Stdlib = global_data.Stdlib; function kfprintf(k, o, param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[7], - function(acc){ - /*<>*/ caml_call2 - (CamlinternalFormat[9], o, acc); + /*<>*/ return (0, CamlinternalFormat[7]) + (function(acc){ + /*<>*/ (0, CamlinternalFormat[9])(o, acc); /*<>*/ return caml_call1(k, o) /*<>*/ ; }, 0, @@ -20895,11 +20646,9 @@ } function kbprintf(k, b, param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[7], - function(acc){ - /*<>*/ caml_call2 - (CamlinternalFormat[10], b, acc); + /*<>*/ return (0, CamlinternalFormat[7]) + (function(acc){ + /*<>*/ (0, CamlinternalFormat[10])(b, acc); /*<>*/ return caml_call1(k, b) /*<>*/ ; }, 0, @@ -20907,8 +20656,7 @@ } function ikfprintf(k, oc, param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[8], k, oc, fmt) /*<>*/ ; + /*<>*/ return (0, CamlinternalFormat[8])(k, oc, fmt) /*<>*/ ; } function fprintf(oc, fmt){ /*<>*/ return kfprintf @@ -20935,13 +20683,12 @@ function ksprintf(k, param){ var fmt = /*<>*/ param[1]; function k$0(acc){ - var buf = /*<>*/ caml_call1(Stdlib_Buffer[1], 64); - /*<>*/ caml_call2(CamlinternalFormat[11], buf, acc); + var buf = /*<>*/ (0, Stdlib_Buffer[1])(64); + /*<>*/ (0, CamlinternalFormat[11])(buf, acc); /*<>*/ return /*<>*/ caml_call1 - (k, /*<>*/ caml_call1(Stdlib_Buffer[2], buf)) /*<>*/ ; + (k, /*<>*/ (0, Stdlib_Buffer[2])(buf)) /*<>*/ ; } - /*<>*/ return caml_call3 - (CamlinternalFormat[7], k$0, 0, fmt) /*<>*/ ; + /*<>*/ return (0, CamlinternalFormat[7])(k$0, 0, fmt) /*<>*/ ; } function sprintf(fmt){ /*<>*/ return ksprintf @@ -20973,6 +20720,7 @@ //# unitInfo: Provides: Stdlib__Dynarray //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Printf, Stdlib__Seq, Stdlib__Sys +//# shape: Stdlib__Dynarray:[F(1),F(2),F(2),F(2),F(3),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(3),F(1),F(1),F(1),F(2),F(1),F(2),F(2),F(2),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(1),F(2),F(1)] (function (globalThis){ "use strict"; @@ -21003,16 +20751,6 @@ ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var global_data = runtime.caml_get_global_data(), f$0 = cst_ensure_capacity$0, @@ -21134,18 +20872,16 @@ cst_to_seq = "to_seq", cst_to_seq_rev = "to_seq_rev"; function negative_length_requested(f, n){ - /*<>*/ return caml_call4 - (Stdlib_Printf[10], Stdlib[1], _c_, f, n) /*<>*/ ; + /*<>*/ return caml_call2 + ((0, Stdlib_Printf[10])(Stdlib[1], _c_), f, n) /*<>*/ ; } function negative_capacity_requested(f, n){ - /*<>*/ return caml_call4 - (Stdlib_Printf[10], Stdlib[1], _d_, f, n) /*<>*/ ; + /*<>*/ return caml_call2 + ((0, Stdlib_Printf[10])(Stdlib[1], _d_), f, n) /*<>*/ ; } function missing_element(i, length){ - /*<>*/ return caml_call5 - (Stdlib_Printf[10], - Stdlib[1], - _f_, + /*<>*/ return caml_call3 + ((0, Stdlib_Printf[10])(Stdlib[1], _f_), invalid_state_description, i, length) /*<>*/ ; @@ -21155,33 +20891,31 @@ ? /*<>*/ missing_element(i, length) : 0 === length - ? /*<>*/ caml_call4 - (Stdlib_Printf[10], Stdlib[1], _a_, f, i) - : /*<>*/ caml_call5 - (Stdlib_Printf[10], Stdlib[1], _b_, f, i, length - 1 | 0) /*<>*/ ; + ? /*<>*/ caml_call2 + ((0, Stdlib_Printf[10])(Stdlib[1], _a_), f, i) + : /*<>*/ caml_call3 + ((0, Stdlib_Printf[10])(Stdlib[1], _b_), f, i, length - 1 | 0) /*<>*/ ; } function check_same_length(f, a, expected){ var length_a = /*<>*/ a[1], - _W_ = /*<>*/ expected !== length_a ? 1 : 0; - return _W_ - ? /*<>*/ caml_call5 - (Stdlib_Printf[10], Stdlib[1], _h_, f, expected, length_a) - : _W_ /*<>*/ ; + _X_ = /*<>*/ expected !== length_a ? 1 : 0; + return _X_ + ? /*<>*/ caml_call3 + ((0, Stdlib_Printf[10])(Stdlib[1], _h_), f, expected, length_a) + : _X_ /*<>*/ ; } function check_valid_length(length, arr){ var capacity = /*<>*/ arr.length - 1, - _V_ = /*<>*/ capacity < length ? 1 : 0; - return _V_ - ? /*<>*/ caml_call5 - (Stdlib_Printf[10], - Stdlib[1], - _g_, + _W_ = /*<>*/ capacity < length ? 1 : 0; + return _W_ + ? /*<>*/ caml_call3 + ((0, Stdlib_Printf[10])(Stdlib[1], _g_), invalid_state_description, length, capacity) - : _V_ /*<>*/ ; + : _W_ /*<>*/ ; } function unsafe_get(arr, i, length){ var match = /*<>*/ arr[1 + i]; @@ -21198,9 +20932,8 @@ /*<>*/ negative_length_requested(cst_make, n); /*<>*/ return [0, n, - caml_call2 - (Stdlib_Array[1], - n, + (0, Stdlib_Array[1]) + (n, function(param){ /*<>*/ return [0, x]; /*<>*/ })] /*<>*/ ; @@ -21210,9 +20943,8 @@ /*<>*/ negative_length_requested(cst_init, n); /*<>*/ return [0, n, - caml_call2 - (Stdlib_Array[1], - n, + (0, Stdlib_Array[1]) + (n, function(i){ /*<>*/ return [0, caml_call1(f, i)] /*<>*/ ; /*<>*/ })] /*<>*/ ; @@ -21242,9 +20974,8 @@ /*<>*/ check_valid_length(length, arr); /*<>*/ return [0, length, - caml_call2 - (Stdlib_Array[1], - length, + (0, Stdlib_Array[1]) + (length, function(i){ var v = /*<>*/ unsafe_get(arr, i, length); /*<>*/ return [0, v]; @@ -21254,8 +20985,8 @@ var length = /*<>*/ a[1], arr = a[2]; /*<>*/ check_valid_length(length, arr); /*<>*/ if(0 === length) - /*<>*/ caml_call3 - (Stdlib_Printf[10], Stdlib[1], _i_, f); + /*<>*/ caml_call1 + ((0, Stdlib_Printf[10])(Stdlib[1], _i_), f); /*<>*/ return unsafe_get(arr, length - 1 | 0, length) /*<>*/ ; } function find_last(a){ @@ -21284,26 +21015,26 @@ /*<>*/ try{ var x = /*<>*/ pop_last(a); } - catch(_U_){ - var _T_ = /*<>*/ caml_wrap_exception(_U_); - if(_T_ === Stdlib[8]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_T_, 0); + catch(_V_){ + var _U_ = /*<>*/ caml_wrap_exception(_V_); + if(_U_ === Stdlib[8]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(_U_, 0); } /*<>*/ return [0, x]; /*<>*/ } function remove_last(a){ var last = /*<>*/ a[1] - 1 | 0, - _R_ = /*<>*/ 0 <= last ? 1 : 0, - _S_ = - _R_ + _S_ = /*<>*/ 0 <= last ? 1 : 0, + _T_ = + _S_ ? (a [1] = last, /*<>*/ caml_check_bound(a[2], last)[1 + last] = 0, 0) - : _R_; - /*<>*/ return _S_; + : _S_; + /*<>*/ return _T_; /*<>*/ } function truncate(a, n){ /*<>*/ if(n < 0) @@ -21314,8 +21045,8 @@ : (a [1] = n, - /*<>*/ caml_call4 - (Stdlib_Array[8], arr, n, length - n | 0, 0)) /*<>*/ ; + /*<>*/ (0, Stdlib_Array[8]) + (arr, n, length - n | 0, 0)) /*<>*/ ; } function clear(a){ /*<>*/ return truncate(a, 0) /*<>*/ ; @@ -21332,28 +21063,23 @@ (cst_ensure_capacity, capacity_request) /*<>*/ ; /*<>*/ if(capacity_request <= cur_capacity) /*<>*/ return 0; - /*<>*/ if(Stdlib_Sys[13] < capacity_request) - /*<>*/ caml_call5 - (Stdlib_Printf[10], - Stdlib[1], - _e_, - f$0, - capacity_request, - Stdlib_Sys[13]); + /*<>*/ if(Stdlib_Sys[13] < capacity_request){ + var _O_ = /*<>*/ Stdlib_Sys[13]; + caml_call3 + ((0, Stdlib_Printf[10])(Stdlib[1], _e_), f$0, capacity_request, _O_); + } var n = /*<>*/ 512 < cur_capacity ? cur_capacity + (cur_capacity / 2 | 0) | 0 : cur_capacity * 2 | 0, - _O_ = /*<>*/ Stdlib_Sys[13], - _P_ = caml_call2(Stdlib[17], 8, n), - _Q_ = /*<>*/ caml_call2(Stdlib[16], _P_, _O_), + _P_ = /*<>*/ Stdlib_Sys[13], + _Q_ = (0, Stdlib[17])(8, n), + _R_ = /*<>*/ (0, Stdlib[16])(_Q_, _P_), new_capacity = - /*<>*/ caml_call2 - (Stdlib[17], _Q_, capacity_request), + /*<>*/ (0, Stdlib[17])(_R_, capacity_request), new_arr = /*<>*/ caml_make_vect(new_capacity, 0); - /*<>*/ caml_call5 - (Stdlib_Array[9], arr, 0, new_arr, 0, a[1]); + /*<>*/ (0, Stdlib_Array[9])(arr, 0, new_arr, 0, a[1]); /*<>*/ a[2] = new_arr; /*<>*/ if(0 > capacity_request) throw caml_maybe_attach_backtrace([0, Assert_failure, _k_], 1); @@ -21372,8 +21098,7 @@ : (a [2] = - /*<>*/ caml_call3 - (Stdlib_Array[6], a[2], 0, a[1]), + /*<>*/ (0, Stdlib_Array[6])(a[2], 0, a[1]), 0) /*<>*/ ; } function set_capacity(a, n){ @@ -21384,15 +21109,14 @@ arr = /*<>*/ a[2], cur_capacity = /*<>*/ arr.length - 1; /*<>*/ if(n < cur_capacity){ - /*<>*/ a[1] = caml_call2(Stdlib[16], a[1], n); - /*<>*/ a[2] = caml_call3(Stdlib_Array[6], arr, 0, n); + /*<>*/ a[1] = (0, Stdlib[16])(a[1], n); + /*<>*/ a[2] = (0, Stdlib_Array[6])(arr, 0, n); /*<>*/ return 0; } var _L_ = /*<>*/ cur_capacity < n ? 1 : 0; if(_L_){ var new_arr = /*<>*/ caml_make_vect(n, 0); - /*<>*/ caml_call5 - (Stdlib_Array[9], arr, 0, new_arr, 0, a[1]); + /*<>*/ (0, Stdlib_Array[9])(arr, 0, new_arr, 0, a[1]); /*<>*/ a[2] = new_arr; var _M_ = 0; } @@ -21439,9 +21163,8 @@ b) /*<>*/ ; } function append_seq(a, seq){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(x){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(x){ /*<>*/ return add_last(a, x) /*<>*/ ; }, seq) /*<>*/ ; @@ -21551,9 +21274,8 @@ res = /*<>*/ [0, length, - caml_call2 - (Stdlib_Array[1], - length, + (0, Stdlib_Array[1]) + (length, function(i){ /*<>*/ return [0, /*<>*/ caml_call1 @@ -21569,9 +21291,8 @@ res = /*<>*/ [0, length, - caml_call2 - (Stdlib_Array[1], - length, + (0, Stdlib_Array[1]) + (length, function(i){ /*<>*/ return [0, /*<>*/ caml_call2 @@ -21698,9 +21419,8 @@ var length = /*<>*/ a.length - 1; /*<>*/ return [0, length, - caml_call2 - (Stdlib_Array[1], - length, + (0, Stdlib_Array[1]) + (length, function(i){ /*<>*/ return [0, a[1 + i]]; /*<>*/ })] /*<>*/ ; @@ -21710,9 +21430,8 @@ /*<>*/ check_valid_length(length, arr); var res = - /*<>*/ caml_call2 - (Stdlib_Array[1], - length, + /*<>*/ (0, Stdlib_Array[1]) + (length, function(i){ /*<>*/ return unsafe_get(arr, i, length) /*<>*/ ; }); @@ -21721,9 +21440,8 @@ /*<>*/ } function of_list(li){ var a = /*<>*/ create(0); - /*<>*/ caml_call2 - (Stdlib_List[18], - function(x){ + /*<>*/ (0, Stdlib_List[18]) + (function(x){ /*<>*/ return add_last(a, x) /*<>*/ ; }, li); @@ -21857,6 +21575,7 @@ //# unitInfo: Provides: Stdlib__Arg //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Buffer, Stdlib__Int, Stdlib__List, Stdlib__Printf, Stdlib__String, Stdlib__Sys +//# shape: Stdlib__Arg:[F(3),F(3),F(5),F(5),F(5),F(3),N,N,F(2),F(2),F(2),N,F(1),F(1),F(2),F(2)] (function (globalThis){ "use strict"; @@ -21899,16 +21618,6 @@ ? f(a0, a1, a2, a3) : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } - function caml_call6(f, a0, a1, a2, a3, a4, a5){ - return (f.l >= 0 ? f.l : f.l = f.length) === 6 - ? f(a0, a1, a2, a3, a4, a5) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); - } var global_data = runtime.caml_get_global_data(), cst$7 = "\n", @@ -21963,17 +21672,16 @@ var t = /*<>*/ l[2], h = l[1], - _az_ = /*<>*/ caml_call2(Stdlib[28], prefix, h), + _az_ = /*<>*/ (0, Stdlib[28])(prefix, h), _aA_ = - /*<>*/ caml_call3 - (Stdlib_List[26], - function(x, y){ - var _aB_ = /*<>*/ caml_call2(Stdlib[28], sep, y); - /*<>*/ return caml_call2(Stdlib[28], x, _aB_); + /*<>*/ (0, Stdlib_List[26]) + (function(x, y){ + var _aB_ = /*<>*/ (0, Stdlib[28])(sep, y); + /*<>*/ return (0, Stdlib[28])(x, _aB_); }, _az_, t); - /*<>*/ return caml_call2(Stdlib[28], _aA_, suffix) /*<>*/ ; + /*<>*/ return (0, Stdlib[28])(_aA_, suffix) /*<>*/ ; } function help_action(param){ /*<>*/ throw caml_maybe_attach_backtrace([0, Stop, _c_], 1); @@ -22005,15 +21713,14 @@ [0, cst_help$0, [0, help_action], cst_Display_this_list_of_optio$0], 0]; } - var _au_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); - /*<>*/ return caml_call2(Stdlib[37], speclist, _au_); + var _au_ = /*<>*/ (0, Stdlib[37])(add1, add2); + /*<>*/ return (0, Stdlib[37])(speclist, _au_); } function usage_b(buf, speclist, errmsg){ - /*<>*/ caml_call3(Stdlib_Printf[5], buf, _d_, errmsg); + /*<>*/ caml_call1((0, Stdlib_Printf[5])(buf, _d_), errmsg); var _ap_ = /*<>*/ add_help(speclist); - /*<>*/ return caml_call2 - (Stdlib_List[18], - function(param){ + /*<>*/ return (0, Stdlib_List[18]) + (function(param){ var doc = /*<>*/ param[3], spec = param[2], @@ -22022,24 +21729,24 @@ /*<>*/ 0 < caml_ml_string_length(doc) ? 1 : 0; if(! _aq_) return _aq_; /*<>*/ if(11 !== spec[0]) - /*<>*/ return caml_call4 - (Stdlib_Printf[5], buf, _a_, key, doc); + /*<>*/ return caml_call2 + ((0, Stdlib_Printf[5])(buf, _a_), key, doc); var l = /*<>*/ spec[1], _ar_ = /*<>*/ make_symlist(cst$1, cst$0, cst, l); - /*<>*/ return caml_call5 - (Stdlib_Printf[5], buf, _b_, key, _ar_, doc); + /*<>*/ return caml_call3 + ((0, Stdlib_Printf[5])(buf, _b_), key, _ar_, doc); }, _ap_) /*<>*/ ; } function usage_string(speclist, errmsg){ - var b = /*<>*/ caml_call1(Stdlib_Buffer[1], 200); + var b = /*<>*/ (0, Stdlib_Buffer[1])(200); /*<>*/ usage_b(b, speclist, errmsg); - /*<>*/ return caml_call1(Stdlib_Buffer[2], b) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[2])(b) /*<>*/ ; } function usage(speclist, errmsg){ var _ao_ = /*<>*/ usage_string(speclist, errmsg); - /*<>*/ return caml_call2(Stdlib_Printf[3], _e_, _ao_); + /*<>*/ return caml_call1((0, Stdlib_Printf[3])(_e_), _ao_); } var current = /*<>*/ [0, 0], @@ -22109,7 +21816,7 @@ var initpos = /*<>*/ current[1]; function convert_error(error){ var - b = /*<>*/ caml_call1(Stdlib_Buffer[1], 200), + b = /*<>*/ (0, Stdlib_Buffer[1])(200), progname = /*<>*/ initpos < argv[1].length - 1 ? /*<>*/ caml_check_bound @@ -22120,34 +21827,34 @@ case 0: var s = error[1]; if(s !== cst_help$4 && s !== cst_help$3) - /*<>*/ caml_call4 - (Stdlib_Printf[5], b, _f_, progname, s); + /*<>*/ caml_call2 + ((0, Stdlib_Printf[5])(b, _f_), progname, s); break; case 1: var expected = /*<>*/ error[3], arg = error[2], opt = error[1]; - /*<>*/ caml_call6 - (Stdlib_Printf[5], b, _i_, progname, arg, opt, expected); + /*<>*/ caml_call4 + ((0, Stdlib_Printf[5])(b, _i_), progname, arg, opt, expected); break; case 2: var s$0 = /*<>*/ error[1]; - /*<>*/ caml_call4 - (Stdlib_Printf[5], b, _j_, progname, s$0); + /*<>*/ caml_call2 + ((0, Stdlib_Printf[5])(b, _j_), progname, s$0); break; default: var s$1 = /*<>*/ error[1]; - /*<>*/ caml_call4 - (Stdlib_Printf[5], b, _k_, progname, s$1); + /*<>*/ caml_call2 + ((0, Stdlib_Printf[5])(b, _k_), progname, s$1); } /*<>*/ usage_b(b, speclist[1], errmsg); /*<>*/ if (! caml_equal(error, _g_) && ! /*<>*/ caml_equal(error, _h_)) - /*<>*/ return [0, Bad, caml_call1(Stdlib_Buffer[2], b)] /*<>*/ ; - /*<>*/ return [0, Help, caml_call1(Stdlib_Buffer[2], b)] /*<>*/ ; + /*<>*/ return [0, Bad, (0, Stdlib_Buffer[2])(b)] /*<>*/ ; + /*<>*/ return [0, Help, (0, Stdlib_Buffer[2])(b)] /*<>*/ ; /*<>*/ } /*<>*/ current[1]++; /*<>*/ for(;;){ @@ -22156,7 +21863,7 @@ var _V_ = current[1], s = /*<>*/ caml_check_bound(argv[1], _V_)[1 + _V_]; - /*<>*/ if(caml_call2(Stdlib_String[11], cst$3, s)){ + /*<>*/ if((0, Stdlib_String[11])(cst$3, s)){ /*<>*/ try{ var follow$1 = /*<>*/ 0, @@ -22169,13 +21876,12 @@ if(_W_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_W_, 0); /*<>*/ try{ var - i = /*<>*/ caml_call2(Stdlib_String[36], s, 61), + i = /*<>*/ (0, Stdlib_String[36])(s, 61), len = /*<>*/ caml_ml_string_length(s), arg = - /*<>*/ caml_call3 - (Stdlib_String[16], s, i + 1 | 0, len - (i + 1 | 0) | 0), - keyword = - /*<>*/ caml_call3(Stdlib_String[16], s, 0, i), + /*<>*/ (0, Stdlib_String[16]) + (s, i + 1 | 0, len - (i + 1 | 0) | 0), + keyword = /*<>*/ (0, Stdlib_String[16])(s, 0, i), follow = /*<>*/ [0, arg], _Y_ = assoc3(keyword, speclist[1]), follow$0 = follow, @@ -22229,7 +21935,7 @@ arg = /*<>*/ get_arg$0(0); /*<>*/ try{ var - _$_ = /*<>*/ [0, caml_call1(Stdlib[32], arg)], + _$_ = /*<>*/ [0, (0, Stdlib[32])(arg)], match = _$_; } catch(_ae_){ @@ -22311,15 +22017,14 @@ case 10: var specs = /*<>*/ param[1]; /*<>*/ no_arg$0(0); - /*<>*/ return caml_call2 - (Stdlib_List[18], treat_action$0, specs) /*<>*/ ; + /*<>*/ return (0, Stdlib_List[18]) + (treat_action$0, specs) /*<>*/ ; case 11: var f$4 = /*<>*/ param[2], symb = param[1], arg$5 = /*<>*/ get_arg$0(0); - /*<>*/ if - (caml_call2(Stdlib_List[37], arg$5, symb)){ + /*<>*/ if((0, Stdlib_List[37])(arg$5, symb)){ /*<>*/ caml_call1(f$4, arg$5); /*<>*/ return consume_arg$0(0) /*<>*/ ; } @@ -22330,7 +22035,7 @@ /*<>*/ throw caml_maybe_attach_backtrace ([0, Stop, - [1, s$0, arg$5, caml_call2(Stdlib[28], cst_one_of, _aa_)]], + [1, s$0, arg$5, (0, Stdlib[28])(cst_one_of, _aa_)]], 1); case 12: var f$5 = /*<>*/ param[1]; @@ -22352,8 +22057,7 @@ /*<>*/ for(;;){ if(current[1] >= (argv[1].length - 2 | 0)) /*<>*/ return /*<>*/ caml_call1 - (f$6, - /*<>*/ caml_call1(Stdlib_List[10], acc[1])) /*<>*/ ; + (f$6, /*<>*/ (0, Stdlib_List[10])(acc[1])) /*<>*/ ; var _ad_ = /*<>*/ current[1] + 1 | 0, _ac_ = /*<>*/ acc[1]; @@ -22372,17 +22076,15 @@ /*<>*/ consume_arg$0(0); var before = - /*<>*/ caml_call3 - (Stdlib_Array[6], argv[1], 0, current[1] + 1 | 0), + /*<>*/ (0, Stdlib_Array[6]) + (argv[1], 0, current[1] + 1 | 0), after = - /*<>*/ caml_call3 - (Stdlib_Array[6], - argv[1], + /*<>*/ (0, Stdlib_Array[6]) + (argv[1], current[1] + 1 | 0, (argv[1].length - 1 - current[1] | 0) - 1 | 0); /*<>*/ argv[1] = - caml_call1 - (Stdlib_Array[5], [0, before, [0, newarg, [0, after, 0]]]); + (0, Stdlib_Array[5])([0, before, [0, newarg, [0, after, 0]]]); /*<>*/ return 0; } /*<>*/ }; @@ -22437,13 +22139,13 @@ var exn = /*<>*/ caml_wrap_exception(exn$0); if(exn[1] === Bad){ var msg$0 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[3], _l_, msg$0); - /*<>*/ return caml_call1(Stdlib[99], 2) /*<>*/ ; + /*<>*/ caml_call1((0, Stdlib_Printf[3])(_l_), msg$0); + /*<>*/ return (0, Stdlib[99])(2) /*<>*/ ; } /*<>*/ if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[2], _m_, msg$1); - /*<>*/ return caml_call1(Stdlib[99], 0) /*<>*/ ; + /*<>*/ caml_call1((0, Stdlib_Printf[2])(_m_), msg$1); + /*<>*/ return (0, Stdlib[99])(0) /*<>*/ ; } } function parse_dynamic(l, f, msg){ @@ -22458,13 +22160,13 @@ var exn = /*<>*/ caml_wrap_exception(exn$0); if(exn[1] === Bad){ var msg$0 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[3], _n_, msg$0); - /*<>*/ return caml_call1(Stdlib[99], 2) /*<>*/ ; + /*<>*/ caml_call1((0, Stdlib_Printf[3])(_n_), msg$0); + /*<>*/ return (0, Stdlib[99])(2) /*<>*/ ; } /*<>*/ if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[2], _o_, msg$1); - /*<>*/ return caml_call1(Stdlib[99], 0) /*<>*/ ; + /*<>*/ caml_call1((0, Stdlib_Printf[2])(_o_), msg$1); + /*<>*/ return (0, Stdlib[99])(0) /*<>*/ ; } } function parse_expand(l, f, msg){ @@ -22482,13 +22184,13 @@ var exn = /*<>*/ caml_wrap_exception(exn$0); if(exn[1] === Bad){ var msg$0 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[3], _p_, msg$0); - /*<>*/ return caml_call1(Stdlib[99], 2) /*<>*/ ; + /*<>*/ caml_call1((0, Stdlib_Printf[3])(_p_), msg$0); + /*<>*/ return (0, Stdlib[99])(2) /*<>*/ ; } /*<>*/ if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[2], _q_, msg$1); - /*<>*/ return caml_call1(Stdlib[99], 0) /*<>*/ ; + /*<>*/ caml_call1((0, Stdlib_Printf[2])(_q_), msg$1); + /*<>*/ return (0, Stdlib[99])(0) /*<>*/ ; } } function second_word(s){ @@ -22504,13 +22206,13 @@ } /*<>*/ } /*<>*/ try{ - var n$0 = /*<>*/ caml_call2(Stdlib_String[36], s, 9); + var n$0 = /*<>*/ (0, Stdlib_String[36])(s, 9); } catch(_Q_){ var _O_ = /*<>*/ caml_wrap_exception(_Q_); if(_O_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_O_, 0); /*<>*/ try{ - var n = /*<>*/ caml_call2(Stdlib_String[36], s, 32); + var n = /*<>*/ (0, Stdlib_String[36])(s, 32); } catch(_R_){ var _P_ = /*<>*/ caml_wrap_exception(_R_); @@ -22527,20 +22229,19 @@ spec = param[2], kwd = param[1]; /*<>*/ if(11 === spec[0]) - /*<>*/ return caml_call2 - (Stdlib_Int[11], cur, caml_ml_string_length(kwd)) /*<>*/ ; + /*<>*/ return (0, Stdlib_Int[11]) + (cur, caml_ml_string_length(kwd)) /*<>*/ ; var _N_ = /*<>*/ caml_ml_string_length(kwd) + /*<>*/ second_word(doc) | 0; - /*<>*/ return caml_call2(Stdlib_Int[11], cur, _N_) /*<>*/ ; + /*<>*/ return (0, Stdlib_Int[11])(cur, _N_) /*<>*/ ; } function replace_leading_tab(s){ var seen = /*<>*/ [0, 0]; - /*<>*/ return caml_call2 - (Stdlib_String[18], - function(c){ + /*<>*/ return (0, Stdlib_String[18]) + (function(c){ /*<>*/ if(9 === c && ! seen[1]){ /*<>*/ seen[1] = 1; /*<>*/ return 32; @@ -22554,12 +22255,10 @@ limit = /*<>*/ opt ? opt[1] : Stdlib[19], completed = /*<>*/ add_help(speclist), len = - /*<>*/ caml_call3 - (Stdlib_List[26], max_arg_len, 0, completed), - len$0 = /*<>*/ caml_call2(Stdlib_Int[10], len, limit); - /*<>*/ return caml_call2 - (Stdlib_List[20], - function(ksd){ + /*<>*/ (0, Stdlib_List[26])(max_arg_len, 0, completed), + len$0 = /*<>*/ (0, Stdlib_Int[10])(len, limit); + /*<>*/ return (0, Stdlib_List[20]) + (function(ksd){ var kwd = /*<>*/ ksd[1], spec = ksd[2]; if(ksd[3] === cst$8) /*<>*/ return ksd; /*<>*/ if(11 === spec[0]){ @@ -22567,19 +22266,18 @@ msg$0 = ksd[3], cutcol$0 = /*<>*/ second_word(msg$0), _K_ = - /*<>*/ caml_call2 - (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) + /*<>*/ (0, Stdlib_Int[11]) + (0, len$0 - cutcol$0 | 0) + 3 | 0, spaces$0 = - /*<>*/ caml_call2(Stdlib_String[1], _K_, 32), + /*<>*/ (0, Stdlib_String[1])(_K_, 32), _L_ = /*<>*/ replace_leading_tab(msg$0), - _M_ = - /*<>*/ caml_call2(Stdlib[28], spaces$0, _L_); + _M_ = /*<>*/ (0, Stdlib[28])(spaces$0, _L_); /*<>*/ return [0, kwd, spec, - caml_call2(Stdlib[28], cst$7, _M_)] /*<>*/ ; + (0, Stdlib[28])(cst$7, _M_)] /*<>*/ ; } var msg = /*<>*/ ksd[3], @@ -22593,35 +22291,32 @@ spec$0, replace_leading_tab(msg)] /*<>*/ ; var - spaces = - /*<>*/ caml_call2(Stdlib_String[1], diff, 32), + spaces = /*<>*/ (0, Stdlib_String[1])(diff, 32), _I_ = /*<>*/ replace_leading_tab(msg), prefix = - /*<>*/ caml_call3 - (Stdlib_String[16], _I_, 0, cutcol), + /*<>*/ (0, Stdlib_String[16])(_I_, 0, cutcol), suffix = - /*<>*/ /*<>*/ caml_call3 - (Stdlib_String[16], - msg, + /*<>*/ /*<>*/ (0, + Stdlib_String[16]) + (msg, cutcol, /*<>*/ caml_ml_string_length(msg) - cutcol | 0), - _J_ = - /*<>*/ caml_call2(Stdlib[28], spaces, suffix); + _J_ = /*<>*/ (0, Stdlib[28])(spaces, suffix); /*<>*/ return [0, kwd, spec$0, - caml_call2(Stdlib[28], prefix, _J_)] /*<>*/ ; + (0, Stdlib[28])(prefix, _J_)] /*<>*/ ; }, completed) /*<>*/ ; } function read_aux(trim, sep, file){ var - ic = /*<>*/ caml_call1(Stdlib[80], file), - buf = /*<>*/ caml_call1(Stdlib_Buffer[1], 200), + ic = /*<>*/ (0, Stdlib[80])(file), + buf = /*<>*/ (0, Stdlib_Buffer[1])(200), words = /*<>*/ [0, 0]; function stash(param){ - var word = /*<>*/ caml_call1(Stdlib_Buffer[2], buf); + var word = /*<>*/ (0, Stdlib_Buffer[2])(buf); /*<>*/ if(trim){ var len = /*<>*/ caml_ml_string_length(word); a: @@ -22631,8 +22326,7 @@ && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ var _H_ = - /*<>*/ caml_call3 - (Stdlib_String[16], word, 0, len - 1 | 0); + /*<>*/ (0, Stdlib_String[16])(word, 0, len - 1 | 0); break a; } var _H_ = /*<>*/ word; @@ -22642,25 +22336,25 @@ else var word$0 = /*<>*/ word; /*<>*/ words[1] = [0, word$0, words[1]]; - /*<>*/ return caml_call1(Stdlib_Buffer[8], buf) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[8])(buf) /*<>*/ ; } /*<>*/ try{ for(;;){ - var c = /*<>*/ caml_call1(Stdlib[82], ic); + var c = /*<>*/ (0, Stdlib[82])(ic); /*<>*/ if(c === sep) /*<>*/ stash(0); else - /*<>*/ caml_call2(Stdlib_Buffer[12], buf, c); + /*<>*/ (0, Stdlib_Buffer[12])(buf, c); } } catch(_G_){ var _E_ = /*<>*/ caml_wrap_exception(_G_); if(_E_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_E_, 0); - /*<>*/ if(0 < caml_call1(Stdlib_Buffer[7], buf)) + /*<>*/ if(0 < (0, Stdlib_Buffer[7])(buf)) /*<>*/ stash(0); - /*<>*/ caml_call1(Stdlib[93], ic); - var _F_ = /*<>*/ caml_call1(Stdlib_List[10], words[1]); - /*<>*/ return caml_call1(Stdlib_Array[11], _F_); + /*<>*/ (0, Stdlib[93])(ic); + var _F_ = /*<>*/ (0, Stdlib_List[10])(words[1]); + /*<>*/ return (0, Stdlib_Array[11])(_F_); } } var _r_ = /*<>*/ 10, _s_ = 1; @@ -22673,15 +22367,14 @@ /*<>*/ return read_aux(_u_, _t_, _C_); } function write_aux(sep, file, args){ - var oc = /*<>*/ caml_call1(Stdlib[61], file); - /*<>*/ caml_call2 - (Stdlib_Array[12], - function(s){ - /*<>*/ return caml_call4 - (Stdlib_Printf[1], oc, _v_, s, sep) /*<>*/ ; + var oc = /*<>*/ (0, Stdlib[61])(file); + /*<>*/ (0, Stdlib_Array[12]) + (function(s){ + /*<>*/ return caml_call2 + ((0, Stdlib_Printf[1])(oc, _v_), s, sep) /*<>*/ ; }, args); - /*<>*/ return caml_call1(Stdlib[76], oc) /*<>*/ ; + /*<>*/ return (0, Stdlib[76])(oc) /*<>*/ ; } var _w_ = /*<>*/ 10; function write_arg(_A_, _B_){return write_aux(_w_, _A_, _B_);} @@ -22713,6 +22406,7 @@ //# unitInfo: Provides: Stdlib__Printexc //# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Buffer, Stdlib__Obj, Stdlib__Printf +//# shape: Stdlib__Printexc:[F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(1),F(1),F(1),N,F(1),F(2),F(1),F(1),F(1),F(1),F(1)] (function (globalThis){ "use strict"; @@ -22742,20 +22436,15 @@ ? f(a0, a1) : runtime.caml_call_gen(f, [a0, a1]); } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } - function caml_call6(f, a0, a1, a2, a3, a4, a5){ - return (f.l >= 0 ? f.l : f.l = f.length) === 6 - ? f(a0, a1, a2, a3, a4, a5) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); + function caml_call5(f, a0, a1, a2, a3, a4){ + return (f.l >= 0 ? f.l : f.l = f.length) === 5 + ? f(a0, a1, a2, a3, a4) + : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } - function caml_call8(f, a0, a1, a2, a3, a4, a5, a6, a7){ - return (f.l >= 0 ? f.l : f.l = f.length) === 8 - ? f(a0, a1, a2, a3, a4, a5, a6, a7) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5, a6, a7]); + function caml_call7(f, a0, a1, a2, a3, a4, a5, a6){ + return (f.l >= 0 ? f.l : f.l = f.length) === 7 + ? f(a0, a1, a2, a3, a4, a5, a6) + : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5, a6]); } var global_data = runtime.caml_get_global_data(), @@ -22786,7 +22475,7 @@ Stdlib = global_data.Stdlib, Stdlib_Buffer = global_data.Stdlib__Buffer, Stdlib_Obj = global_data.Stdlib__Obj, - printers = /*<>*/ caml_call1(Stdlib_Atomic[1], 0), + printers = /*<>*/ (0, Stdlib_Atomic[1])(0), _a_ = /*<>*/ [0, [3, 0, 0], "%S"], _b_ = [0, [4, 0, 0, 0, 0], "%d"], _c_ = [0, [11, ", ", [2, 0, [2, 0, 0]]], ", %s%s"], @@ -22838,30 +22527,33 @@ cst_Program_not_linked_with_g_ = cst_Program_not_linked_with_g_$0; function field(x, i){ var f = /*<>*/ x[1 + i]; - /*<>*/ if(! caml_call1(Stdlib_Obj[1], f)) - /*<>*/ return caml_call2(Stdlib_Printf[4], _b_, f) /*<>*/ ; - var _ah_ = /*<>*/ Stdlib_Obj[15]; - if(caml_obj_tag(f) === _ah_) - /*<>*/ return caml_call2(Stdlib_Printf[4], _a_, f) /*<>*/ ; - var _ai_ = /*<>*/ Stdlib_Obj[16]; - return caml_obj_tag(f) === _ai_ - ? /*<>*/ caml_call1(Stdlib[35], f) + /*<>*/ if(! (0, Stdlib_Obj[1])(f)) + /*<>*/ return caml_call1 + ((0, Stdlib_Printf[4])(_b_), f) /*<>*/ ; + var _ak_ = /*<>*/ Stdlib_Obj[15]; + if(caml_obj_tag(f) === _ak_) + /*<>*/ return caml_call1 + ((0, Stdlib_Printf[4])(_a_), f) /*<>*/ ; + var _al_ = /*<>*/ Stdlib_Obj[16]; + return caml_obj_tag(f) === _al_ + ? /*<>*/ (0, Stdlib[35])(f) : cst /*<>*/ ; } function other_fields(x, i){ /*<>*/ if(x.length - 1 <= i) /*<>*/ return cst$0; var - _af_ = /*<>*/ other_fields(x, i + 1 | 0), - _ag_ = /*<>*/ field(x, i); - /*<>*/ return caml_call3 - (Stdlib_Printf[4], _c_, _ag_, _af_) /*<>*/ ; + _ai_ = /*<>*/ other_fields(x, i + 1 | 0), + _aj_ = /*<>*/ field(x, i); + /*<>*/ return caml_call2 + ((0, Stdlib_Printf[4])(_c_), _aj_, _ai_) /*<>*/ ; } function use_printers(x){ var param = - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Atomic[3], printers); + /*<>*/ /*<>*/ (0, + Stdlib_Atomic[3]) + (printers); /*<>*/ for(;;){ /*<>*/ if(! param) /*<>*/ return 0; @@ -22871,7 +22563,7 @@ /*<>*/ try{ var val = /*<>*/ caml_call1(hd, x); } - catch(_ae_){break a;} + catch(_ah_){break a;} /*<>*/ if(val){ var s = val[1]; /*<>*/ return [0, s]; @@ -22887,24 +22579,25 @@ match = /*<>*/ t.length - 1; if(2 < match >>> 0) var - _aa_ = /*<>*/ other_fields(t, 2), - _ab_ = /*<>*/ field(t, 1), - _ad_ = - /*<>*/ caml_call3 - (Stdlib_Printf[4], _d_, _ab_, _aa_); + _ad_ = /*<>*/ other_fields(t, 2), + _ae_ = /*<>*/ field(t, 1), + _ag_ = + /*<>*/ caml_call2 + ((0, Stdlib_Printf[4])(_d_), _ae_, _ad_); else /*<>*/ switch(match){ case 0: - var _ad_ = /*<>*/ cst$1; break; + var _ag_ = /*<>*/ cst$1; break; case 1: - var _ad_ = /*<>*/ cst$2; break; + var _ag_ = /*<>*/ cst$2; break; default: var - _ac_ = /*<>*/ field(t, 1), - _ad_ = - /*<>*/ caml_call2(Stdlib_Printf[4], _e_, _ac_); + _af_ = /*<>*/ field(t, 1), + _ag_ = + /*<>*/ caml_call1 + ((0, Stdlib_Printf[4])(_e_), _af_); } - var match$0 = /*<>*/ [0, constructor, [0, _ad_]]; + var match$0 = /*<>*/ [0, constructor, [0, _ag_]]; } else var match$0 = /*<>*/ [0, t[1], 0]; @@ -22914,7 +22607,7 @@ /*<>*/ if(! fields_opt) /*<>*/ return constructor$0; var f = /*<>*/ fields_opt[1]; - /*<>*/ return caml_call2(Stdlib[28], constructor$0, f) /*<>*/ ; + /*<>*/ return (0, Stdlib[28])(constructor$0, f) /*<>*/ ; } function to_string_default(x){ /*<>*/ if(x === Stdlib[9]) @@ -22923,9 +22616,8 @@ /*<>*/ return cst_Stack_overflow; /*<>*/ if(x[1] === Stdlib[4]){ var match = x[2], char$0 = match[3], line = match[2], file = match[1]; - /*<>*/ return caml_call6 - (Stdlib_Printf[4], - locfmt, + /*<>*/ return caml_call5 + ((0, Stdlib_Printf[4])(locfmt), file, line, char$0, @@ -22938,9 +22630,8 @@ char$1 = match$0[3], line$0 = match$0[2], file$0 = match$0[1]; - /*<>*/ return caml_call6 - (Stdlib_Printf[4], - locfmt, + /*<>*/ return caml_call5 + ((0, Stdlib_Printf[4])(locfmt), file$0, line$0, char$1, @@ -22954,9 +22645,8 @@ char$2 = match$1[3], line$1 = match$1[2], file$1 = match$1[1]; - /*<>*/ return caml_call6 - (Stdlib_Printf[4], - locfmt, + /*<>*/ return caml_call5 + ((0, Stdlib_Printf[4])(locfmt), file$1, line$1, char$2, @@ -22972,29 +22662,29 @@ /*<>*/ } function print(fct, arg){ /*<>*/ try{ - var _$_ = /*<>*/ caml_call1(fct, arg); - return _$_; + var _ac_ = /*<>*/ caml_call1(fct, arg); + return _ac_; } catch(x$0){ var x = /*<>*/ caml_wrap_exception(x$0), - ___ = /*<>*/ to_string(x); - /*<>*/ caml_call2(Stdlib_Printf[3], _f_, ___); - /*<>*/ caml_call1(Stdlib[63], Stdlib[40]); + _ab_ = /*<>*/ to_string(x); + /*<>*/ caml_call1((0, Stdlib_Printf[3])(_f_), _ab_); + /*<>*/ (0, Stdlib[63])(Stdlib[40]); /*<>*/ throw caml_maybe_attach_backtrace(x, 0); } /*<>*/ } function catch$0(fct, arg){ /*<>*/ try{ - var _Z_ = /*<>*/ caml_call1(fct, arg); - return _Z_; + var _aa_ = /*<>*/ caml_call1(fct, arg); + return _aa_; } catch(x$0){ var x = /*<>*/ caml_wrap_exception(x$0); - /*<>*/ caml_call1(Stdlib[63], Stdlib[39]); - var _Y_ = /*<>*/ to_string(x); - /*<>*/ caml_call2(Stdlib_Printf[3], _g_, _Y_); - /*<>*/ return caml_call1(Stdlib[99], 2) /*<>*/ ; + /*<>*/ (0, Stdlib[63])(Stdlib[39]); + var _$_ = /*<>*/ to_string(x); + /*<>*/ caml_call1((0, Stdlib_Printf[3])(_g_), _$_); + /*<>*/ return (0, Stdlib[99])(2) /*<>*/ ; } } function raw_backtrace_entries(bt){ @@ -23010,37 +22700,43 @@ ? 0 === pos ? cst_Raised_at : cst_Re_raised_at : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from /*<>*/ ; } - /*<>*/ if(0 === slot[0]){ + /*<>*/ if(0 !== slot[0]){ + /*<>*/ if(slot[1]) + /*<>*/ return 0; + var ___ = /*<>*/ info(0); + /*<>*/ return [0, + caml_call1((0, Stdlib_Printf[4])(_k_), ___)] /*<>*/ ; + } + /*<>*/ if(slot[3] === slot[6]) var + _R_ = /*<>*/ slot[3], lines = - /*<>*/ slot[3] === slot[6] - ? /*<>*/ caml_call2 - (Stdlib_Printf[4], _h_, slot[3]) - : /*<>*/ caml_call3 - (Stdlib_Printf[4], _j_, slot[3], slot[6]), - _R_ = /*<>*/ slot[7], - _S_ = slot[4], - _T_ = slot[8] ? cst_inlined : cst$3, - _U_ = /*<>*/ slot[2], - _V_ = slot[9], - _W_ = info(slot[1]); - /*<>*/ return [0, - caml_call8 - (Stdlib_Printf[4], _i_, _W_, _V_, _U_, _T_, lines, _S_, _R_)] /*<>*/ ; - } - /*<>*/ if(slot[1]) - /*<>*/ return 0; - var _X_ = /*<>*/ info(0); - /*<>*/ return [0, - caml_call2(Stdlib_Printf[4], _k_, _X_)] /*<>*/ ; - /*<>*/ } + /*<>*/ /*<>*/ caml_call1 + ((0, Stdlib_Printf[4])(_h_), _R_); + else + var + _Y_ = /*<>*/ slot[6], + _Z_ = slot[3], + lines = + /*<>*/ /*<>*/ caml_call2 + ((0, Stdlib_Printf[4])(_j_), _Z_, _Y_); + var + _S_ = /*<>*/ slot[7], + _T_ = slot[4], + _U_ = slot[8] ? cst_inlined : cst$3, + _V_ = /*<>*/ slot[2], + _W_ = slot[9], + _X_ = info(slot[1]); + /*<>*/ return [0, + caml_call7 + ((0, Stdlib_Printf[4])(_i_), _X_, _W_, _V_, _U_, lines, _T_, _S_)] /*<>*/ ; + } function print_raw_backtrace(outchan, raw_backtrace){ var backtrace = /*<>*/ convert_raw_backtrace(raw_backtrace); /*<>*/ if(! backtrace) - /*<>*/ return caml_call2 - (Stdlib_Printf[1], outchan, _m_) /*<>*/ ; + /*<>*/ return (0, Stdlib_Printf[1])(outchan, _m_) /*<>*/ ; var a = /*<>*/ backtrace[1], _P_ = /*<>*/ a.length - 2 | 0, @@ -23054,8 +22750,8 @@ (i, /*<>*/ caml_check_bound(a, i)[1 + i]); /*<>*/ if(match){ var str = match[1]; - /*<>*/ caml_call3 - (Stdlib_Printf[1], outchan, _l_, str); + /*<>*/ caml_call1 + ((0, Stdlib_Printf[1])(outchan, _l_), str); } var _Q_ = /*<>*/ i + 1 | 0; if(_P_ === i) break; @@ -23077,7 +22773,7 @@ /*<>*/ return cst_Program_not_linked_with_g_; var a = /*<>*/ backtrace[1], - b = /*<>*/ caml_call1(Stdlib_Buffer[1], 1024), + b = /*<>*/ (0, Stdlib_Buffer[1])(1024), _M_ = /*<>*/ a.length - 2 | 0, _L_ = 0; if(_M_ >= 0){ @@ -23089,14 +22785,15 @@ (i, /*<>*/ caml_check_bound(a, i)[1 + i]); /*<>*/ if(match){ var str = match[1]; - /*<>*/ caml_call3(Stdlib_Printf[5], b, _n_, str); + /*<>*/ caml_call1 + ((0, Stdlib_Printf[5])(b, _n_), str); } var _N_ = /*<>*/ i + 1 | 0; if(_M_ === i) break; i = _N_; } } - /*<>*/ return caml_call1(Stdlib_Buffer[2], b) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[2])(b) /*<>*/ ; } function backtrace_slot_is_raise(param){ /*<>*/ return 0 === param[0] ? param[1] : param[1] /*<>*/ ; @@ -23158,11 +22855,11 @@ /*<>*/ for(;;){ var old_printers = - /*<>*/ caml_call1(Stdlib_Atomic[3], printers), + /*<>*/ (0, Stdlib_Atomic[3])(printers), new_printers = /*<>*/ [0, fn, old_printers], success = - /*<>*/ caml_call3 - (Stdlib_Atomic[6], printers, old_printers, new_printers), + /*<>*/ (0, Stdlib_Atomic[6]) + (printers, old_printers, new_printers), _I_ = /*<>*/ 1 - success; if(! _I_) return _I_; } @@ -23193,17 +22890,17 @@ cst_Fatal_error_exception_s]; function default_uncaught_exception_han(exn, raw_backtrace){ var _F_ = /*<>*/ to_string(exn); - /*<>*/ caml_call2(Stdlib_Printf[3], _o_, _F_); + /*<>*/ caml_call1((0, Stdlib_Printf[3])(_o_), _F_); /*<>*/ print_raw_backtrace(Stdlib[40], raw_backtrace); var status = /*<>*/ runtime.caml_ml_debug_info_status(0); /*<>*/ if(status < 0){ var - _G_ = /*<>*/ caml_call1(Stdlib[18], status), + _G_ = /*<>*/ (0, Stdlib[18])(status), _H_ = /*<>*/ caml_check_bound(errors, _G_)[1 + _G_]; - /*<>*/ caml_call1(Stdlib[53], _H_); + /*<>*/ (0, Stdlib[53])(_H_); } - /*<>*/ return caml_call1(Stdlib[63], Stdlib[40]) /*<>*/ ; + /*<>*/ return (0, Stdlib[63])(Stdlib[40]) /*<>*/ ; } var uncaught_exception_handler = @@ -23235,7 +22932,7 @@ ? empty_backtrace : /*<>*/ caml_get_exception_raw_backtra(0); /*<>*/ try{ - /*<>*/ caml_call1(Stdlib[103], 0); + /*<>*/ (0, Stdlib[103])(0); } catch(_E_){} /*<>*/ try{ @@ -23251,17 +22948,18 @@ raw_backtrace$0 = /*<>*/ caml_get_exception_raw_backtra(0), _x_ = /*<>*/ to_string(exn$0); - /*<>*/ caml_call2(Stdlib_Printf[3], _p_, _x_); + /*<>*/ caml_call1((0, Stdlib_Printf[3])(_p_), _x_); /*<>*/ print_raw_backtrace (Stdlib[40], raw_backtrace); var _y_ = /*<>*/ to_string(exn); - /*<>*/ caml_call2(Stdlib_Printf[3], _q_, _y_); + /*<>*/ caml_call1((0, Stdlib_Printf[3])(_q_), _y_); /*<>*/ print_raw_backtrace (Stdlib[40], raw_backtrace$0); var _z_ = - /*<>*/ /*<>*/ caml_call1 - (Stdlib[63], Stdlib[40]); + /*<>*/ /*<>*/ (0, + Stdlib[63]) + (Stdlib[40]); } var _B_ = _z_; } @@ -23270,8 +22968,8 @@ if(_w_ !== Stdlib[9]) throw caml_maybe_attach_backtrace(_w_, 0); var _B_ = - /*<>*/ caml_call1 - (Stdlib[53], cst_Fatal_error_out_of_memory_); + /*<>*/ (0, Stdlib[53]) + (cst_Fatal_error_out_of_memory_); } return _B_; } @@ -23321,6 +23019,7 @@ //# unitInfo: Provides: Stdlib__Fun //# unitInfo: Requires: Stdlib, Stdlib__Printexc +//# shape: Stdlib__Fun:[F(2),F(3),F(3),F(2),F(2),N] (function (globalThis){ "use strict"; @@ -23362,16 +23061,15 @@ "Stdlib.Fun.Finally_raised", runtime.caml_fresh_oo_id(0)], cst_Fun_Finally_raised = "Fun.Finally_raised: "; - /*<>*/ caml_call1 - (Stdlib_Printexc[9], - function(param){ + /*<>*/ (0, Stdlib_Printexc[9]) + (function(param){ /*<>*/ if(param[1] !== Finally_raised) /*<>*/ return 0; var exn = /*<>*/ param[2], - _a_ = /*<>*/ caml_call1(Stdlib_Printexc[1], exn); + _a_ = /*<>*/ (0, Stdlib_Printexc[1])(exn); /*<>*/ return [0, - caml_call2(Stdlib[28], cst_Fun_Finally_raised, _a_)] /*<>*/ ; + (0, Stdlib[28])(cst_Fun_Finally_raised, _a_)] /*<>*/ ; /*<>*/ }); var dummy = 0; function protect(finally$0, work){ @@ -23383,7 +23081,7 @@ catch(e$0){ var e = /*<>*/ caml_wrap_exception(e$0), - bt = /*<>*/ caml_call1(Stdlib_Printexc[12], 0), + bt = /*<>*/ (0, Stdlib_Printexc[12])(0), exn = /*<>*/ [0, Finally_raised, e]; caml_restore_raw_backtrace(exn, bt); throw caml_maybe_attach_backtrace(exn, 0); @@ -23395,7 +23093,7 @@ catch(work_exn$0){ var work_exn = /*<>*/ caml_wrap_exception(work_exn$0), - work_bt = /*<>*/ caml_call1(Stdlib_Printexc[12], 0); + work_bt = /*<>*/ (0, Stdlib_Printexc[12])(0); /*<>*/ finally_no_exn(0); /*<>*/ caml_restore_raw_backtrace(work_exn, work_bt); throw caml_maybe_attach_backtrace(work_exn, 0); @@ -23419,6 +23117,7 @@ //# unitInfo: Provides: Stdlib__Gc //# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Domain, Stdlib__Fun, Stdlib__Printf, Stdlib__Sys +//# shape: Stdlib__Gc:[F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),N] (function (globalThis){ "use strict"; @@ -23436,16 +23135,6 @@ ? f(a0, a1) : runtime.caml_call_gen(f, [a0, a1]); } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } var global_data = runtime.caml_get_global_data(), Stdlib_Atomic = global_data.Stdlib__Atomic; @@ -23530,34 +23219,53 @@ function eventlog_resume(param){ /*<>*/ return 0; /*<>*/ } function print_stat(c){ - var st = /*<>*/ runtime.caml_gc_stat(0); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _a_, st[4]); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _b_, st[5]); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _c_, st[14]); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _d_, st[17]); - /*<>*/ caml_call2(Stdlib_Printf[1], c, _e_); var + st = /*<>*/ runtime.caml_gc_stat(0), + _z_ = /*<>*/ st[4]; + caml_call1((0, Stdlib_Printf[1])(c, _a_), _z_); + var _A_ = /*<>*/ st[5]; + caml_call1((0, Stdlib_Printf[1])(c, _b_), _A_); + var _B_ = /*<>*/ st[14]; + caml_call1((0, Stdlib_Printf[1])(c, _c_), _B_); + var _C_ = /*<>*/ st[17]; + caml_call1((0, Stdlib_Printf[1])(c, _d_), _C_); + /*<>*/ (0, Stdlib_Printf[1])(c, _e_); + var + _D_ = /*<>*/ st[1], l1 = - /*<>*/ /*<>*/ caml_ml_string_length - ( /*<>*/ caml_call2(Stdlib_Printf[4], _f_, st[1])); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _g_, l1, st[1]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _h_, l1, st[2]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _i_, l1, st[3]); - /*<>*/ caml_call2(Stdlib_Printf[1], c, _j_); - var + /*<>*/ caml_ml_string_length + ( /*<>*/ caml_call1((0, Stdlib_Printf[4])(_f_), _D_)), + _E_ = /*<>*/ st[1]; + caml_call2((0, Stdlib_Printf[1])(c, _g_), l1, _E_); + var _F_ = /*<>*/ st[2]; + caml_call2((0, Stdlib_Printf[1])(c, _h_), l1, _F_); + var _G_ = /*<>*/ st[3]; + caml_call2((0, Stdlib_Printf[1])(c, _i_), l1, _G_); + /*<>*/ (0, Stdlib_Printf[1])(c, _j_); + var + _H_ = /*<>*/ st[15], l2 = - /*<>*/ /*<>*/ caml_ml_string_length - ( /*<>*/ caml_call2(Stdlib_Printf[4], _k_, st[15])); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _l_, l2, st[15]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _m_, l2, st[6]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _n_, l2, st[8]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _o_, l2, st[10]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _p_, l2, st[12]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _q_, l2, st[13]); - /*<>*/ caml_call2(Stdlib_Printf[1], c, _r_); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _s_, st[9]); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _t_, st[11]); - /*<>*/ return caml_call3(Stdlib_Printf[1], c, _u_, st[7]) /*<>*/ ; + /*<>*/ caml_ml_string_length + ( /*<>*/ caml_call1((0, Stdlib_Printf[4])(_k_), _H_)), + _I_ = /*<>*/ st[15]; + caml_call2((0, Stdlib_Printf[1])(c, _l_), l2, _I_); + var _J_ = /*<>*/ st[6]; + caml_call2((0, Stdlib_Printf[1])(c, _m_), l2, _J_); + var _K_ = /*<>*/ st[8]; + caml_call2((0, Stdlib_Printf[1])(c, _n_), l2, _K_); + var _L_ = /*<>*/ st[10]; + caml_call2((0, Stdlib_Printf[1])(c, _o_), l2, _L_); + var _M_ = /*<>*/ st[12]; + caml_call2((0, Stdlib_Printf[1])(c, _p_), l2, _M_); + var _N_ = /*<>*/ st[13]; + caml_call2((0, Stdlib_Printf[1])(c, _q_), l2, _N_); + /*<>*/ (0, Stdlib_Printf[1])(c, _r_); + var _O_ = /*<>*/ st[9]; + caml_call1((0, Stdlib_Printf[1])(c, _s_), _O_); + var _P_ = /*<>*/ st[11]; + caml_call1((0, Stdlib_Printf[1])(c, _t_), _P_); + var _Q_ = /*<>*/ st[7]; + return caml_call1((0, Stdlib_Printf[1])(c, _u_), _Q_) /*<>*/ ; } function allocated_bytes(param){ var @@ -23568,13 +23276,12 @@ /*<>*/ return (mi + ma - pro) * (Stdlib_Sys[9] / 8 | 0); } function delete_alarm(a){ - /*<>*/ return caml_call2(Stdlib_Atomic[4], a, 0) /*<>*/ ; + /*<>*/ return (0, Stdlib_Atomic[4])(a, 0) /*<>*/ ; } function create_alarm(f){ - var _y_ = /*<>*/ caml_call1(Stdlib_Atomic[1], 1); - /*<>*/ caml_call1 - (Stdlib_Domain[6], - function(param){ + var _y_ = /*<>*/ (0, Stdlib_Atomic[1])(1); + /*<>*/ (0, Stdlib_Domain[6]) + (function(param){ /*<>*/ return delete_alarm(_y_) /*<>*/ ; }); /*<>*/ return _y_; @@ -23616,6 +23323,7 @@ //# unitInfo: Provides: Stdlib__In_channel //# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Fun, Stdlib__Sys +//# shape: Stdlib__In_channel:[N,F(1),F(1),F(3),F(2),F(2),F(4),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(1),F(4),F(4),F(4),F(4),F(3),N,N,N,F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -23637,21 +23345,6 @@ ? f(a0, a1) : runtime.caml_call_gen(f, [a0, a1]); } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, @@ -23664,10 +23357,9 @@ open_gen = Stdlib[81]; function with_open(openfun, s, f){ var ic = /*<>*/ caml_call1(openfun, s); - /*<>*/ return caml_call2 - (Stdlib_Fun[5], - function(param){ - /*<>*/ return caml_call1(Stdlib[94], ic) /*<>*/ ; + /*<>*/ return (0, Stdlib_Fun[5]) + (function(param){ + /*<>*/ return (0, Stdlib[94])(ic) /*<>*/ ; }, function(param){ /*<>*/ return caml_call1(f, ic) /*<>*/ ; @@ -23680,8 +23372,11 @@ /*<>*/ return with_open(Stdlib[79], s, f) /*<>*/ ; } function with_open_gen(flags, perm, s, f){ - /*<>*/ return /*<>*/ with_open - ( /*<>*/ caml_call2(Stdlib[81], flags, perm), + var _y_ = /*<>*/ Stdlib[81]; + /*<>*/ return with_open + (function(_z_){ + /*<>*/ return _y_(flags, perm, _z_); + }, s, f) /*<>*/ ; } @@ -23693,7 +23388,7 @@ close_noerr = Stdlib[94]; function input_char(ic){ /*<>*/ try{ - var c = /*<>*/ caml_call1(Stdlib[82], ic); + var c = /*<>*/ (0, Stdlib[82])(ic); } catch(_x_){ var _w_ = /*<>*/ caml_wrap_exception(_x_); @@ -23704,7 +23399,7 @@ /*<>*/ } function input_byte(ic){ /*<>*/ try{ - var n = /*<>*/ caml_call1(Stdlib[87], ic); + var n = /*<>*/ (0, Stdlib[87])(ic); } catch(_v_){ var _u_ = /*<>*/ caml_wrap_exception(_v_); @@ -23715,7 +23410,7 @@ /*<>*/ } function input_line(ic){ /*<>*/ try{ - var s = /*<>*/ caml_call1(Stdlib[83], ic); + var s = /*<>*/ (0, Stdlib[83])(ic); } catch(_t_){ var _s_ = /*<>*/ caml_wrap_exception(_t_); @@ -23740,12 +23435,11 @@ && ( /*<>*/ caml_ba_dim_1(buf) - len | 0) >= ofs) /*<>*/ return caml_ml_input_bigarray (ic, buf, ofs, len) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_input_bigarray) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_input_bigarray) /*<>*/ ; } function really_input(ic, buf, pos, len){ /*<>*/ try{ - /*<>*/ caml_call4(Stdlib[85], ic, buf, pos, len); + /*<>*/ (0, Stdlib[85])(ic, buf, pos, len); /*<>*/ return _a_; } catch(_r_){ @@ -23778,12 +23472,12 @@ len = len$0; } } - /*<>*/ return caml_call1 - (Stdlib[1], cst_really_input_bigarray) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_really_input_bigarray) /*<>*/ ; } function really_input_string(ic, len){ /*<>*/ try{ - var s = /*<>*/ caml_call2(Stdlib[86], ic, len); + var s = /*<>*/ (0, Stdlib[86])(ic, len); } catch(_p_){ var _o_ = /*<>*/ caml_wrap_exception(_p_); @@ -23798,8 +23492,7 @@ /*<>*/ if(0 !== len$0){ var r = - /*<>*/ caml_call4 - (Stdlib[84], ic, buf, ofs$0, len$0); + /*<>*/ (0, Stdlib[84])(ic, buf, ofs$0, len$0); /*<>*/ if(0 !== r){ var len$1 = /*<>*/ len$0 - r | 0, @@ -23829,19 +23522,20 @@ : ofs < Stdlib_Sys[12] ? Stdlib_Sys[12] - : /*<>*/ caml_call1 - (Stdlib[2], cst_In_channel_input_all_chann), + : /*<>*/ (0, + Stdlib[2]) + (cst_In_channel_input_all_chann), new_buf = /*<>*/ caml_create_bytes(new_len$1); - /*<>*/ caml_call5 - (Stdlib_Bytes[11], buf, 0, new_buf, 0, ofs); + /*<>*/ (0, Stdlib_Bytes[11]) + (buf, 0, new_buf, 0, ofs); /*<>*/ return new_buf; /*<>*/ } function input_all(ic){ var chunk_size = /*<>*/ 65536; /*<>*/ try{ var - _k_ = /*<>*/ caml_call1(Stdlib[91], ic), - _l_ = /*<>*/ caml_call1(Stdlib[92], ic) - _k_ | 0, + _k_ = /*<>*/ (0, Stdlib[91])(ic), + _l_ = /*<>*/ (0, Stdlib[92])(ic) - _k_ | 0, initial_size = _l_; } catch(_n_){ @@ -23862,15 +23556,14 @@ nread = /*<>*/ read_upto(ic, buf, 0, initial_size$1); /*<>*/ if(nread < initial_size$1) - /*<>*/ return caml_call3 - (Stdlib_Bytes[8], buf, 0, nread) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[8])(buf, 0, nread) /*<>*/ ; /*<>*/ try{ - var c = /*<>*/ caml_call1(Stdlib[82], ic); + var c = /*<>*/ (0, Stdlib[82])(ic); } catch(_m_){ var _j_ = /*<>*/ caml_wrap_exception(_m_); if(_j_ === Stdlib[12]) - /*<>*/ return caml_call1(Stdlib_Bytes[44], buf) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[44])(buf) /*<>*/ ; /*<>*/ throw caml_maybe_attach_backtrace(_j_, 0); } var buf$2 = /*<>*/ ensure(buf, nread, 65537); @@ -23886,8 +23579,8 @@ /*<>*/ caml_ml_bytes_length(buf$1) - ofs | 0, r = /*<>*/ read_upto(ic, buf$1, ofs, rem); /*<>*/ if(r < rem) - /*<>*/ return caml_call3 - (Stdlib_Bytes[8], buf$1, 0, ofs + r | 0) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[8]) + (buf$1, 0, ofs + r | 0) /*<>*/ ; var ofs$0 = /*<>*/ ofs + rem | 0; buf$0 = buf$1; ofs = ofs$0; @@ -23895,7 +23588,7 @@ /*<>*/ } function input_lines(ic){ /*<>*/ try{ - var line = /*<>*/ caml_call1(Stdlib[83], ic); + var line = /*<>*/ (0, Stdlib[83])(ic); } catch(_h_){ var _e_ = /*<>*/ caml_wrap_exception(_h_); @@ -23908,7 +23601,7 @@ offset = 1; for(;;){ /*<>*/ try{ - var line$0 = /*<>*/ caml_call1(Stdlib[83], ic); + var line$0 = /*<>*/ (0, Stdlib[83])(ic); } catch(_g_){ var _f_ = /*<>*/ caml_wrap_exception(_g_); @@ -23925,7 +23618,7 @@ function fold_lines(f, accu, ic){ var accu$0 = /*<>*/ accu; for(;;){ - try{var line = /*<>*/ caml_call1(Stdlib[83], ic);} + try{var line = /*<>*/ (0, Stdlib[83])(ic);} catch(_d_){ var _c_ = /*<>*/ caml_wrap_exception(_d_); if(_c_ === Stdlib[12]) /*<>*/ return accu$0; @@ -23972,6 +23665,7 @@ //# unitInfo: Provides: Stdlib__Out_channel //# unitInfo: Requires: Stdlib, Stdlib__Fun +//# shape: Stdlib__Out_channel:[N,N,F(1),F(1),F(3),F(2),F(2),F(4),F(1),F(1),F(2),F(2),F(2),F(2),F(4),F(4),F(4),F(1),F(1),N,N,N,F(2),F(1),F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -23981,11 +23675,6 @@ ? f(a0) : runtime.caml_call_gen(f, [a0]); } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } var global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, @@ -23997,10 +23686,9 @@ open_gen = Stdlib[62]; function with_open(openfun, s, f){ var oc = /*<>*/ caml_call1(openfun, s); - /*<>*/ return caml_call2 - (Stdlib_Fun[5], - function(param){ - /*<>*/ return caml_call1(Stdlib[77], oc) /*<>*/ ; + /*<>*/ return (0, Stdlib_Fun[5]) + (function(param){ + /*<>*/ return (0, Stdlib[77])(oc) /*<>*/ ; }, function(param){ /*<>*/ return caml_call1(f, oc) /*<>*/ ; @@ -24013,8 +23701,11 @@ /*<>*/ return with_open(Stdlib[60], s, f) /*<>*/ ; } function with_open_gen(flags, perm, s, f){ - /*<>*/ return /*<>*/ with_open - ( /*<>*/ caml_call2(Stdlib[62], flags, perm), + var _a_ = /*<>*/ Stdlib[62]; + /*<>*/ return with_open + (function(_b_){ + /*<>*/ return _a_(flags, perm, _b_); + }, s, f) /*<>*/ ; } @@ -24043,8 +23734,7 @@ >= ofs) /*<>*/ return runtime.caml_ml_output_bigarray (oc, buf, ofs, len) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_output_bigarray) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_output_bigarray) /*<>*/ ; } var set_binary_mode = /*<>*/ Stdlib[78], @@ -24084,6 +23774,7 @@ //# unitInfo: Provides: Stdlib__Digest //# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Char, Stdlib__In_channel, Stdlib__Int, Stdlib__String +//# shape: Stdlib__Digest:[F(2),F(2),F(1),F(1),F(3),F(3),F(2),F(1),F(2),F(1),F(1),F(1),F(1),N,N,N,N] (function (globalThis){ "use strict"; @@ -24102,23 +23793,7 @@ caml_md5_chan = runtime.caml_md5_chan, caml_md5_string = runtime.caml_md5_string, caml_ml_string_length = runtime.caml_ml_string_length, - caml_string_get = runtime.caml_string_get; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } - var + caml_string_get = runtime.caml_string_get, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_In_channel = global_data.Stdlib__In_channel, @@ -24136,7 +23811,7 @@ var _l_ = /*<>*/ 10 <= n ? (97 + n | 0) - 10 | 0 : 48 + n | 0; - return caml_call1(Stdlib_Char[1], _l_) /*<>*/ ; + return (0, Stdlib_Char[1])(_l_) /*<>*/ ; } var len = /*<>*/ caml_ml_string_length(d), @@ -24158,7 +23833,7 @@ i = _k_; } } - /*<>*/ return caml_call1(Stdlib_Bytes[44], result) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[44])(result) /*<>*/ ; } function string_of_hex(s){ function digit(c){ @@ -24169,11 +23844,10 @@ else if(71 > c) /*<>*/ return (c - 65 | 0) + 10 | 0; } else if(9 >= c - 48 >>> 0) /*<>*/ return c - 48 | 0; - /*<>*/ return caml_call1(Stdlib[1], cst_Digest_of_hex) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Digest_of_hex) /*<>*/ ; } - /*<>*/ return caml_call2 - (Stdlib_String[2], - caml_ml_string_length(s) / 2 | 0, + /*<>*/ return (0, Stdlib_String[2]) + (caml_ml_string_length(s) / 2 | 0, function(i){ var i$0 = /*<>*/ 2 * i | 0, @@ -24186,14 +23860,13 @@ << 4) + _g_ | 0; - /*<>*/ return caml_call1(Stdlib_Char[1], _h_); + /*<>*/ return (0, Stdlib_Char[1])(_h_); }) /*<>*/ ; } function BLAKE2(X){ var _a_ = /*<>*/ X[1] < 1 ? 1 : 0, _b_ = _a_ || (64 < X[1] ? 1 : 0); if(_b_) - /*<>*/ caml_call1 - (Stdlib[1], cst_Digest_BLAKE2_wrong_hash_s); + /*<>*/ (0, Stdlib[1])(cst_Digest_BLAKE2_wrong_hash_s); var hash_length = /*<>*/ X[1], compare = Stdlib_String[10], @@ -24204,7 +23877,7 @@ } function bytes(b){ /*<>*/ return /*<>*/ string - ( /*<>*/ caml_call1(Stdlib_Bytes[44], b)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Bytes[44])(b)) /*<>*/ ; } function substring(str, ofs, len){ var _d_ = /*<>*/ ofs < 0 ? 1 : 0; @@ -24214,16 +23887,13 @@ var _f_ = len < 0 ? 1 : 0, _e_ = _f_ || ((caml_ml_string_length(str) - len | 0) < ofs ? 1 : 0); - if(_e_) - /*<>*/ caml_call1(Stdlib[1], cst_Digest_substring); + if(_e_) /*<>*/ (0, Stdlib[1])(cst_Digest_substring); /*<>*/ return caml_blake2_string (hash_length, cst, str, ofs, len) /*<>*/ ; } function subbytes(b, ofs, len){ /*<>*/ return /*<>*/ substring - ( /*<>*/ caml_call1(Stdlib_Bytes[44], b), - ofs, - len) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Bytes[44])(b), ofs, len) /*<>*/ ; } function channel(ic, toread){ var @@ -24238,19 +23908,15 @@ /*<>*/ return caml_blake2_final(ctx, hash_length) /*<>*/ ; var _c_ = - /*<>*/ caml_call2 - (Stdlib_Int[10], buf_size, toread$0), + /*<>*/ (0, Stdlib_Int[10])(buf_size, toread$0), n = - /*<>*/ caml_call4 - (Stdlib_In_channel[16], ic, buf, 0, _c_); + /*<>*/ (0, Stdlib_In_channel[16]) + (ic, buf, 0, _c_); /*<>*/ if(0 === n) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[12], 1); /*<>*/ /*<>*/ caml_blake2_update - (ctx, - /*<>*/ caml_call1(Stdlib_Bytes[44], buf), - 0, - n); + (ctx, /*<>*/ (0, Stdlib_Bytes[44])(buf), 0, n); var toread$1 = /*<>*/ toread$0 - n | 0; toread$0 = toread$1; } @@ -24259,41 +23925,36 @@ /*<>*/ for(;;){ var n$0 = - /*<>*/ caml_call4 - (Stdlib_In_channel[16], ic, buf, 0, buf_size); + /*<>*/ (0, Stdlib_In_channel[16]) + (ic, buf, 0, buf_size); /*<>*/ if(0 === n$0) /*<>*/ return caml_blake2_final(ctx, hash_length) /*<>*/ ; /*<>*/ /*<>*/ caml_blake2_update - (ctx, - /*<>*/ caml_call1(Stdlib_Bytes[44], buf), - 0, - n$0); + (ctx, /*<>*/ (0, Stdlib_Bytes[44])(buf), 0, n$0); } /*<>*/ } function file(filename){ - /*<>*/ return caml_call2 - (Stdlib_In_channel[5], - filename, + /*<>*/ return (0, Stdlib_In_channel[5]) + (filename, function(ic){ /*<>*/ return channel(ic, -1) /*<>*/ ; }) /*<>*/ ; } function output(chan, digest){ - /*<>*/ return caml_call2(Stdlib[66], chan, digest) /*<>*/ ; + /*<>*/ return (0, Stdlib[66])(chan, digest) /*<>*/ ; } function input(chan){ - /*<>*/ return caml_call2 - (Stdlib[86], chan, hash_length) /*<>*/ ; + /*<>*/ return (0, Stdlib[86])(chan, hash_length) /*<>*/ ; } function to_hex(d){ /*<>*/ if(caml_ml_string_length(d) !== hash_length) - /*<>*/ caml_call1(Stdlib[1], cst_Digest_to_hex); + /*<>*/ (0, Stdlib[1])(cst_Digest_to_hex); /*<>*/ return hex_of_string(d) /*<>*/ ; } function of_hex(s){ /*<>*/ if (caml_ml_string_length(s) !== (hash_length * 2 | 0)) - /*<>*/ caml_call1(Stdlib[1], cst_Digest_of_hex$0); + /*<>*/ (0, Stdlib[1])(cst_Digest_of_hex$0); /*<>*/ return string_of_hex(s) /*<>*/ ; } /*<>*/ return [0, @@ -24326,43 +23987,39 @@ } function bytes(b){ /*<>*/ return /*<>*/ string - ( /*<>*/ caml_call1(Stdlib_Bytes[44], b)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Bytes[44])(b)) /*<>*/ ; } function substring(str, ofs, len){ /*<>*/ if (0 <= ofs && 0 <= len && (caml_ml_string_length(str) - len | 0) >= ofs) /*<>*/ return caml_md5_string(str, ofs, len) /*<>*/ ; - /*<>*/ return caml_call1 - (Stdlib[1], cst_Digest_substring$0) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Digest_substring$0) /*<>*/ ; } function subbytes(b, ofs, len){ /*<>*/ return /*<>*/ substring - ( /*<>*/ caml_call1(Stdlib_Bytes[44], b), - ofs, - len) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Bytes[44])(b), ofs, len) /*<>*/ ; } function file(filename){ - /*<>*/ return caml_call2 - (Stdlib_In_channel[5], - filename, + /*<>*/ return (0, Stdlib_In_channel[5]) + (filename, function(ic){ /*<>*/ return caml_md5_chan(ic, -1) /*<>*/ ; }) /*<>*/ ; } function output(chan, digest){ - /*<>*/ return caml_call2(Stdlib[66], chan, digest) /*<>*/ ; + /*<>*/ return (0, Stdlib[66])(chan, digest) /*<>*/ ; } function input(chan){ - /*<>*/ return caml_call2(Stdlib[86], chan, 16) /*<>*/ ; + /*<>*/ return (0, Stdlib[86])(chan, 16) /*<>*/ ; } function to_hex(d){ /*<>*/ if(16 !== caml_ml_string_length(d)) - /*<>*/ caml_call1(Stdlib[1], cst_Digest_to_hex$0); + /*<>*/ (0, Stdlib[1])(cst_Digest_to_hex$0); /*<>*/ return hex_of_string(d) /*<>*/ ; } function of_hex(s){ /*<>*/ if(32 !== caml_ml_string_length(s)) - /*<>*/ caml_call1(Stdlib[1], cst_Digest_from_hex); + /*<>*/ (0, Stdlib[1])(cst_Digest_from_hex); /*<>*/ return string_of_hex(s) /*<>*/ ; } var @@ -24405,6 +24062,7 @@ //# unitInfo: Provides: Stdlib__Bigarray //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Sys +//# shape: Stdlib__Bigarray:[N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(1),N,N,N,N,N,N,N,F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(3),F(4)] (function (globalThis){ "use strict"; @@ -24571,8 +24229,7 @@ var _ac_ = /*<>*/ dims(arr), _ad_ = - /*<>*/ caml_call3 - (Stdlib_Array[18], caml_mul, 1, _ac_); + /*<>*/ (0, Stdlib_Array[18])(caml_mul, 1, _ac_); /*<>*/ return /*<>*/ caml_mul ( /*<>*/ kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), @@ -24746,8 +24403,8 @@ for(;;){ var row = /*<>*/ caml_check_bound(data, i)[1 + i]; /*<>*/ if(row.length - 1 !== dim2) - /*<>*/ caml_call1 - (Stdlib[1], cst_Bigarray_Array2_of_array_n); + /*<>*/ (0, Stdlib[1]) + (cst_Bigarray_Array2_of_array_n); var _E_ = /*<>*/ dim2 - 1 | 0, _D_ = 0; if(_E_ >= 0){ var j = _D_; @@ -24893,16 +24550,16 @@ for(;;){ var row = /*<>*/ caml_check_bound(data, i)[1 + i]; /*<>*/ if(row.length - 1 !== dim2) - /*<>*/ caml_call1 - (Stdlib[1], cst_Bigarray_Array3_of_array_n); + /*<>*/ (0, Stdlib[1]) + (cst_Bigarray_Array3_of_array_n); var _d_ = /*<>*/ dim2 - 1 | 0, _c_ = 0; if(_d_ >= 0){ var j = _c_; for(;;){ var col = /*<>*/ caml_check_bound(row, j)[1 + j]; /*<>*/ if(col.length - 1 !== dim3) - /*<>*/ caml_call1 - (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); + /*<>*/ (0, Stdlib[1]) + (cst_Bigarray_Array3_of_array_n$0); var _g_ = /*<>*/ dim3 - 1 | 0, _f_ = 0; if(_g_ >= 0){ var k = _f_; @@ -24933,26 +24590,30 @@ function array0_of_genarray(a){ /*<>*/ return 0 === caml_ba_num_dims(a) ? a - : /*<>*/ caml_call1 - (Stdlib[1], cst_Bigarray_array0_of_genarra) /*<>*/ ; + : /*<>*/ (0, + Stdlib[1]) + (cst_Bigarray_array0_of_genarra) /*<>*/ ; } function array1_of_genarray(a){ /*<>*/ return 1 === caml_ba_num_dims(a) ? a - : /*<>*/ caml_call1 - (Stdlib[1], cst_Bigarray_array1_of_genarra) /*<>*/ ; + : /*<>*/ (0, + Stdlib[1]) + (cst_Bigarray_array1_of_genarra) /*<>*/ ; } function array2_of_genarray(a){ /*<>*/ return 2 === caml_ba_num_dims(a) ? a - : /*<>*/ caml_call1 - (Stdlib[1], cst_Bigarray_array2_of_genarra) /*<>*/ ; + : /*<>*/ (0, + Stdlib[1]) + (cst_Bigarray_array2_of_genarra) /*<>*/ ; } function array3_of_genarray(a){ /*<>*/ return 3 === caml_ba_num_dims(a) ? a - : /*<>*/ caml_call1 - (Stdlib[1], cst_Bigarray_array3_of_genarra) /*<>*/ ; + : /*<>*/ (0, + Stdlib[1]) + (cst_Bigarray_array3_of_genarra) /*<>*/ ; } function reshape_0(a){ /*<>*/ return caml_ba_reshape(a, [0]) /*<>*/ ; @@ -25037,6 +24698,7 @@ //# unitInfo: Provides: Stdlib__Random //# unitInfo: Requires: Stdlib, Stdlib__Bigarray, Stdlib__Bytes, Stdlib__Digest, Stdlib__Domain, Stdlib__Int32, Stdlib__Int64, Stdlib__Nativeint, Stdlib__String, Stdlib__Sys +//# shape: Stdlib__Random:[F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(1),F(1),F(1),N,F(1),F(1),F(1)] (function (globalThis){ "use strict"; @@ -25073,11 +24735,6 @@ ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var global_data = runtime.caml_get_global_data(), serialization_prefix = "lxm1:", @@ -25119,21 +24776,16 @@ "Random.State.of_binary_string: expected a format compatible with OCaml "; function to_binary_string(s){ var buf = /*<>*/ caml_create_bytes(37); - /*<>*/ caml_call5 - (Stdlib_Bytes[12], - serialization_prefix, - 0, - buf, - 0, - serialization_prefix_len); + /*<>*/ (0, Stdlib_Bytes[12]) + (serialization_prefix, 0, buf, 0, serialization_prefix_len); var i = /*<>*/ 0; for(;;){ var _y_ = /*<>*/ runtime.caml_ba_get_1(s, i); - /*<>*/ caml_call3 - (Stdlib_Bytes[86], buf, 5 + (i * 8 | 0) | 0, _y_); + /*<>*/ (0, Stdlib_Bytes[86]) + (buf, 5 + (i * 8 | 0) | 0, _y_); var _z_ = /*<>*/ i + 1 | 0; if(3 === i) - /*<>*/ return caml_call1(Stdlib_Bytes[44], buf) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bytes[44])(buf) /*<>*/ ; /*<>*/ i = _z_; } /*<>*/ } @@ -25148,20 +24800,20 @@ || 1 - - /*<>*/ caml_call2 - (Stdlib_String[11], serialization_prefix, buf); + /*<>*/ (0, Stdlib_String[11]) + (serialization_prefix, buf); /*<>*/ if(_w_){ var _x_ = - /*<>*/ caml_call2 - (Stdlib[28], cst_Random_State_of_binary_str, Stdlib_Sys[46]); - /*<>*/ caml_call1(Stdlib[2], _x_); + /*<>*/ (0, Stdlib[28]) + (cst_Random_State_of_binary_str, Stdlib_Sys[46]); + /*<>*/ (0, Stdlib[2])(_x_); } var - i1 = /*<>*/ caml_call2(Stdlib_String[64], buf, 5), - i2 = /*<>*/ caml_call2(Stdlib_String[64], buf, 13), - i3 = /*<>*/ caml_call2(Stdlib_String[64], buf, 21), - i4 = /*<>*/ caml_call2(Stdlib_String[64], buf, 29); + i1 = /*<>*/ (0, Stdlib_String[64])(buf, 5), + i2 = /*<>*/ (0, Stdlib_String[64])(buf, 13), + i3 = /*<>*/ (0, Stdlib_String[64])(buf, 21), + i4 = /*<>*/ (0, Stdlib_String[64])(buf, 29); /*<>*/ return mk(i1, i2, i3, i4) /*<>*/ ; } function copy(src){ @@ -25182,23 +24834,23 @@ _t_ = /*<>*/ /*<>*/ caml_int64_of_int32 ( /*<>*/ runtime.caml_check_bound(seed, i)[1 + i]); - /*<>*/ caml_call3(Stdlib_Bytes[86], b, i * 8 | 0, _t_); + /*<>*/ (0, Stdlib_Bytes[86])(b, i * 8 | 0, _t_); var _u_ = /*<>*/ i + 1 | 0; if(_p_ === i) break; i = _u_; } } /*<>*/ caml_bytes_set(b, n * 8 | 0, 1); - var d1 = /*<>*/ caml_call1(Stdlib_Digest[4], b); + var d1 = /*<>*/ (0, Stdlib_Digest[4])(b); /*<>*/ caml_bytes_set(b, n * 8 | 0, 2); var - d2 = /*<>*/ caml_call1(Stdlib_Digest[4], b), - _q_ = /*<>*/ caml_call2(Stdlib_String[64], d2, 8), - _r_ = /*<>*/ caml_call2(Stdlib_String[64], d2, 0), - _s_ = /*<>*/ caml_call2(Stdlib_String[64], d1, 8); + d2 = /*<>*/ (0, Stdlib_Digest[4])(b), + _q_ = /*<>*/ (0, Stdlib_String[64])(d2, 8), + _r_ = /*<>*/ (0, Stdlib_String[64])(d2, 0), + _s_ = /*<>*/ (0, Stdlib_String[64])(d1, 8); /*<>*/ return /*<>*/ set (s, - /*<>*/ caml_call2(Stdlib_String[64], d1, 0), + /*<>*/ (0, Stdlib_String[64])(d1, 0), _s_, _r_, _q_) /*<>*/ ; @@ -25240,12 +24892,11 @@ function int$0(s, bound){ /*<>*/ if(1073741823 >= bound && 0 < bound) /*<>*/ return int_aux(s, bound, max_int31) /*<>*/ ; - /*<>*/ return caml_call1(Stdlib[1], cst_Random_int) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Random_int) /*<>*/ ; } function full_int(s, bound){ /*<>*/ if(0 >= bound) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Random_full_int) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Random_full_int) /*<>*/ ; var _n_ = /*<>*/ bound <= 1073741823 @@ -25271,7 +24922,7 @@ /*<>*/ } function int_in_range(s, min, max){ /*<>*/ if(max < min) - /*<>*/ caml_call1(Stdlib[1], cst_Random_int_in_range); + /*<>*/ (0, Stdlib[1])(cst_Random_int_in_range); /*<>*/ if(-1073741824 <= min && max <= 1073741823) /*<>*/ return int_in_range_aux (s, min, max, max_int31, 31) /*<>*/ ; @@ -25297,16 +24948,13 @@ /*<>*/ } function int32(s, bound){ /*<>*/ return caml_lessequal(bound, 0) - ? /*<>*/ caml_call1(Stdlib[1], cst_Random_int32) + ? /*<>*/ (0, Stdlib[1])(cst_Random_int32) : /*<>*/ int32aux(s, bound) /*<>*/ ; } function int32_in_range(s, min, max){ /*<>*/ if(caml_greaterthan(min, max)) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Random_int32_in_range) /*<>*/ ; - var - span = - /*<>*/ caml_call1(Stdlib_Int32[6], max - min | 0); + /*<>*/ return (0, Stdlib[1])(cst_Random_int32_in_range) /*<>*/ ; + var span = /*<>*/ (0, Stdlib_Int32[6])(max - min | 0); /*<>*/ if(! caml_lessequal(span, Stdlib_Int32[1])) /*<>*/ return min + int32aux(s, span) | 0 /*<>*/ ; /*<>*/ for(;;){ @@ -25345,17 +24993,17 @@ /*<>*/ } function int64(s, bound){ /*<>*/ return caml_lessequal(bound, _g_) - ? /*<>*/ caml_call1(Stdlib[1], cst_Random_int64) + ? /*<>*/ (0, Stdlib[1])(cst_Random_int64) : /*<>*/ int64aux(s, bound) /*<>*/ ; } function int64_in_range(s, min, max){ /*<>*/ if(caml_greaterthan(min, max)) - /*<>*/ return caml_call1 - (Stdlib[1], cst_Random_int64_in_range) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Random_int64_in_range) /*<>*/ ; var span = - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Int64[6], /*<>*/ caml_int64_sub(max, min)); + /*<>*/ /*<>*/ (0, + Stdlib_Int64[6]) + ( /*<>*/ caml_int64_sub(max, min)); /*<>*/ if(! caml_lessequal(span, Stdlib_Int64[1])) /*<>*/ return /*<>*/ caml_int64_add (min, /*<>*/ int64aux(s, span)) /*<>*/ ; @@ -25614,6 +25262,7 @@ //# unitInfo: Provides: Stdlib__Hashtbl //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Domain, Stdlib__Int, Stdlib__Random, Stdlib__Seq, Stdlib__String, Stdlib__Sys +//# shape: Stdlib__Hashtbl:[F(2),F(1),F(1),F(1),F(3),F(2),F(2),F(2),F(2),F(2),F(3),F(2),F(2),F(3),F(1),F(1),F(1),F(2),F(1),F(1),F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(2),F(3),F(4)] (function (globalThis){ "use strict"; @@ -25641,11 +25290,6 @@ ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } var global_data = runtime.caml_get_global_data(), _d_ = [0, 0], @@ -25662,9 +25306,9 @@ var Stdlib_String = global_data.Stdlib__String; function ongoing_traversal(h){ var - _an_ = /*<>*/ h.length - 1 < 4 ? 1 : 0, - _ao_ = _an_ || (h[4] < 0 ? 1 : 0); - return _ao_; + _at_ = /*<>*/ h.length - 1 < 4 ? 1 : 0, + _au_ = _at_ || (h[4] < 0 ? 1 : 0); + return _au_; /*<>*/ } function flip_ongoing_traversal(h){ /*<>*/ h[4] = - h[4] | 0; @@ -25678,16 +25322,16 @@ _f_ = /*<>*/ caml_sys_getenv("OCAMLRUNPARAM"), params = _f_; } - catch(_al_){ - var _a_ = /*<>*/ caml_wrap_exception(_al_); + catch(_ar_){ + var _a_ = /*<>*/ caml_wrap_exception(_ar_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); /*<>*/ try{ var _e_ = /*<>*/ caml_sys_getenv("CAMLRUNPARAM"), _c_ = _e_; } - catch(_am_){ - var _b_ = /*<>*/ caml_wrap_exception(_am_); + catch(_as_){ + var _b_ = /*<>*/ caml_wrap_exception(_as_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var _c_ = /*<>*/ cst; } @@ -25695,16 +25339,14 @@ } var randomized_default = - /*<>*/ caml_call2(Stdlib_String[15], params, 82), + /*<>*/ (0, Stdlib_String[15])(params, 82), randomized = - /*<>*/ caml_call1 - (Stdlib_Atomic[1], randomized_default); + /*<>*/ (0, Stdlib_Atomic[1])(randomized_default); function randomize(param){ - /*<>*/ return caml_call2 - (Stdlib_Atomic[4], randomized, 1) /*<>*/ ; + /*<>*/ return (0, Stdlib_Atomic[4])(randomized, 1) /*<>*/ ; } function is_randomized(param){ - /*<>*/ return caml_call1(Stdlib_Atomic[3], randomized) /*<>*/ ; + /*<>*/ return (0, Stdlib_Atomic[3])(randomized) /*<>*/ ; } var prng_key = @@ -25725,38 +25367,38 @@ random = /*<>*/ opt ? opt[1] - : /*<>*/ caml_call1(Stdlib_Atomic[3], randomized), + : /*<>*/ (0, Stdlib_Atomic[3])(randomized), s = /*<>*/ power_2_above(16, initial_size); /*<>*/ if(random) var - _ak_ = + _aq_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), seed = /*<>*/ /*<>*/ caml_call1 - (Stdlib_Random[19][4], _ak_); + (Stdlib_Random[19][4], _aq_); else var seed = /*<>*/ 0; /*<>*/ return [0, 0, caml_make_vect(s, 0), seed, s] /*<>*/ ; /*<>*/ } function clear(h){ - var _aj_ = /*<>*/ 0 < h[1] ? 1 : 0; - return _aj_ + var _ap_ = /*<>*/ 0 < h[1] ? 1 : 0; + return _ap_ ? (h [1] = 0, - /*<>*/ caml_call4 - (Stdlib_Array[8], h[2], 0, h[2].length - 1, 0)) - : _aj_ /*<>*/ ; + /*<>*/ (0, Stdlib_Array[8]) + (h[2], 0, h[2].length - 1, 0)) + : _ap_ /*<>*/ ; } function reset(h){ var len = /*<>*/ h[2].length - 1; /*<>*/ if (4 <= h.length - 1 - && len !== /*<>*/ caml_call1(Stdlib[18], h[4])){ + && len !== /*<>*/ (0, Stdlib[18])(h[4])){ /*<>*/ h[1] = 0; /*<>*/ h[2] = /*<>*/ caml_make_vect - ( /*<>*/ caml_call1(Stdlib[18], h[4]), 0); + ( /*<>*/ (0, Stdlib[18])(h[4]), 0); /*<>*/ return 0; } /*<>*/ return clear(h) /*<>*/ ; @@ -25785,10 +25427,10 @@ /*<>*/ } function copy(h){ var - _ag_ = /*<>*/ h[4], - _ah_ = h[3], - _ai_ = caml_call2(Stdlib_Array[14], copy_bucketlist, h[2]); - /*<>*/ return [0, h[1], _ai_, _ah_, _ag_]; + _am_ = /*<>*/ h[4], + _an_ = h[3], + _ao_ = (0, Stdlib_Array[14])(copy_bucketlist, h[2]); + /*<>*/ return [0, h[1], _ao_, _an_, _am_]; /*<>*/ } function length(h){ /*<>*/ return h[1]; @@ -25797,10 +25439,10 @@ var nsize = /*<>*/ ndata.length - 1, ndata_tail = /*<>*/ caml_make_vect(nsize, 0), - _aa_ = /*<>*/ odata.length - 2 | 0, - _$_ = 0; - if(_aa_ >= 0){ - var i$0 = _$_; + _ag_ = /*<>*/ odata.length - 2 | 0, + _af_ = 0; + if(_ag_ >= 0){ + var i$0 = _af_; for(;;){ var cell$1 = @@ -25825,39 +25467,39 @@ = cell$0; /*<>*/ cell = next; } - var _af_ = /*<>*/ i$0 + 1 | 0; - if(_aa_ === i$0) break; - i$0 = _af_; + var _al_ = /*<>*/ i$0 + 1 | 0; + if(_ag_ === i$0) break; + i$0 = _al_; } } /*<>*/ if(inplace){ - var _ac_ = /*<>*/ nsize - 1 | 0, _ab_ = 0; - if(_ac_ >= 0){ - var i = _ab_; + var _ai_ = /*<>*/ nsize - 1 | 0, _ah_ = 0; + if(_ai_ >= 0){ + var i = _ah_; for(;;){ var match$0 = /*<>*/ caml_check_bound(ndata_tail, i)[1 + i]; /*<>*/ if(match$0) /*<>*/ match$0[3] = 0; - var _ae_ = /*<>*/ i + 1 | 0; - if(_ac_ === i) break; - i = _ae_; + var _ak_ = /*<>*/ i + 1 | 0; + if(_ai_ === i) break; + i = _ak_; } } - var _ad_ = /*<>*/ 0; + var _aj_ = /*<>*/ 0; } else - var _ad_ = /*<>*/ inplace; - return _ad_; + var _aj_ = /*<>*/ inplace; + return _aj_; /*<>*/ } function resize(indexfun, h){ var odata = /*<>*/ h[2], osize = /*<>*/ odata.length - 1, nsize = /*<>*/ osize * 2 | 0, - ___ = /*<>*/ nsize < Stdlib_Sys[13] ? 1 : 0; - if(! ___) return ___; + _ae_ = /*<>*/ nsize < Stdlib_Sys[13] ? 1 : 0; + if(! _ae_) return _ae_; var ndata = /*<>*/ caml_make_vect(nsize, 0), inplace = /*<>*/ 1 - ongoing_traversal(h); @@ -25873,9 +25515,9 @@ /*<>*/ if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); /*<>*/ try{ - var d = h[2], _W_ = /*<>*/ d.length - 2 | 0, _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + var d = h[2], _aa_ = /*<>*/ d.length - 2 | 0, _$_ = 0; + if(_aa_ >= 0){ + var i = _$_; for(;;){ var param = @@ -25888,15 +25530,16 @@ /*<>*/ caml_call2(f, key, data); /*<>*/ param = next; } - var _Z_ = /*<>*/ i + 1 | 0; - if(_W_ === i) break; - i = _Z_; + var _ad_ = /*<>*/ i + 1 | 0; + if(_aa_ === i) break; + i = _ad_; } } var - _X_ = /*<>*/ 1 - old_trav, - _Y_ = _X_ ? /*<>*/ flip_ongoing_traversal(h) : _X_; - return _Y_; + _ab_ = /*<>*/ 1 - old_trav, + _ac_ = + _ab_ ? /*<>*/ flip_ongoing_traversal(h) : _ab_; + return _ac_; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); @@ -25913,9 +25556,9 @@ /*<>*/ if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); /*<>*/ try{ - var _R_ = d.length - 2 | 0, _Q_ = 0; - if(_R_ >= 0){ - var i = _Q_; + var _X_ = d.length - 2 | 0, _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ var slot$0 = /*<>*/ caml_check_bound(h[2], i)[1 + i], @@ -25947,15 +25590,15 @@ /*<>*/ prec[3] = 0; else /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; - var _U_ = /*<>*/ i + 1 | 0; - if(_R_ === i) break; - i = _U_; + var ___ = /*<>*/ i + 1 | 0; + if(_X_ === i) break; + i = ___; } } var - _S_ = /*<>*/ 1 - old_trav, - _T_ = _S_ ? /*<>*/ flip_ongoing_traversal(h) : _S_; - return _T_; + _Y_ = /*<>*/ 1 - old_trav, + _Z_ = _Y_ ? /*<>*/ flip_ongoing_traversal(h) : _Y_; + return _Z_; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); @@ -25973,10 +25616,10 @@ var d = h[2], accu$1 = /*<>*/ [0, init], - _N_ = /*<>*/ d.length - 2 | 0, - _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + _T_ = /*<>*/ d.length - 2 | 0, + _S_ = 0; + if(_T_ >= 0){ + var i = _S_; for(;;){ var accu$2 = /*<>*/ accu$1[1], @@ -25994,15 +25637,15 @@ accu = accu$0; } /*<>*/ accu$1[1] = accu; - var _P_ = i + 1 | 0; - if(_N_ === i) break; - i = _P_; + var _V_ = i + 1 | 0; + if(_T_ === i) break; + i = _V_; } } /*<>*/ if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); - var _O_ = /*<>*/ accu$1[1]; - return _O_; + var _U_ = /*<>*/ accu$1[1]; + return _U_; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); @@ -26026,18 +25669,16 @@ function stats(h){ var mbl = - /*<>*/ caml_call3 - (Stdlib_Array[18], - function(m, b){ - var _L_ = /*<>*/ bucket_length(0, b); - /*<>*/ return caml_call2(Stdlib_Int[11], m, _L_); + /*<>*/ (0, Stdlib_Array[18]) + (function(m, b){ + var _R_ = /*<>*/ bucket_length(0, b); + /*<>*/ return (0, Stdlib_Int[11])(m, _R_); }, 0, h[2]), histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0); - /*<>*/ caml_call2 - (Stdlib_Array[12], - function(b){ + /*<>*/ (0, Stdlib_Array[12]) + (function(b){ var l = /*<>*/ bucket_length(0, b); /*<>*/ histo[1 + l] = caml_check_bound(histo, l)[1 + l] + 1 | 0; @@ -26055,8 +25696,8 @@ var key = buck$0[1], data = buck$0[2], next = buck$0[3]; /*<>*/ return [0, [0, key, data], - function(_K_){ - /*<>*/ return aux(i$0, next, _K_); + function(_Q_){ + /*<>*/ return aux(i$0, next, _Q_); }] /*<>*/ ; } /*<>*/ if(i$0 === tbl_data.length - 1) @@ -26069,19 +25710,23 @@ buck$0 = buck$1; } /*<>*/ } - var _H_ = /*<>*/ 0, _I_ = 0; - return function(_J_){ - /*<>*/ return aux(_I_, _H_, _J_);} /*<>*/ ; + var _N_ = /*<>*/ 0, _O_ = 0; + return function(_P_){ + /*<>*/ return aux(_O_, _N_, _P_);} /*<>*/ ; /*<>*/ } function to_seq_keys(m){ - var _F_ = /*<>*/ to_seq(m); - /*<>*/ return caml_call2 - (Stdlib_Seq[29], function(_G_){ /*<>*/ return _G_[1];}, _F_) /*<>*/ ; + var _I_ = /*<>*/ to_seq(m); + function _J_(_M_){ /*<>*/ return _M_[1];} + var _K_ = /*<>*/ Stdlib_Seq[29]; + return function(_L_){ + /*<>*/ return _K_(_J_, _I_, _L_);} /*<>*/ ; } function to_seq_values(m){ var _D_ = /*<>*/ to_seq(m); - /*<>*/ return caml_call2 - (Stdlib_Seq[29], function(_E_){ /*<>*/ return _E_[2];}, _D_) /*<>*/ ; + function _E_(_H_){ /*<>*/ return _H_[2];} + var _F_ = /*<>*/ Stdlib_Seq[29]; + return function(_G_){ + /*<>*/ return _F_(_E_, _D_, _G_);} /*<>*/ ; } function MakeSeeded(H){ function key_index(h, key){ @@ -26304,18 +25949,16 @@ } /*<>*/ } function add_seq(tbl, i){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(param){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return add(tbl, k, v) /*<>*/ ; }, i) /*<>*/ ; } function replace_seq(tbl, i){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(param){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return replace(tbl, k, v) /*<>*/ ; }, @@ -26424,8 +26067,9 @@ ? /*<>*/ caml_hash (10, 100, h[3], key) & (h[2].length - 2 | 0) - : /*<>*/ caml_call1 - (Stdlib[1], cst_Hashtbl_unsupported_hash_t) /*<>*/ ; + : /*<>*/ (0, + Stdlib[1]) + (cst_Hashtbl_unsupported_hash_t) /*<>*/ ; } function add(h, key, data){ var @@ -26640,18 +26284,16 @@ } /*<>*/ } function add_seq(tbl, i){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(param){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return add(tbl, k, v) /*<>*/ ; }, i) /*<>*/ ; } function replace_seq(tbl, i){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(param){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return replace(tbl, k, v) /*<>*/ ; }, @@ -26667,7 +26309,7 @@ random = /*<>*/ opt ? opt[1] - : /*<>*/ caml_call1(Stdlib_Atomic[3], randomized), + : /*<>*/ (0, Stdlib_Atomic[3])(randomized), s = /*<>*/ power_2_above(16, h[2].length - 1); /*<>*/ if(random) var @@ -26730,6 +26372,7 @@ //# unitInfo: Provides: Stdlib__Weak //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Int, Stdlib__Obj, Stdlib__Sys +//# shape: Stdlib__Weak:[F(1),F(1),F(3),F(2),F(2),F(2),F(4),F(5),F(1)] (function (globalThis){ "use strict"; @@ -26759,11 +26402,6 @@ ? f(a0, a1, a2, a3) : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, @@ -26783,7 +26421,7 @@ var _J_ = /*<>*/ 0 <= l ? 1 : 0, _K_ = _J_ ? l <= Stdlib_Obj[23][15] ? 1 : 0 : _J_; - if(1 - _K_) /*<>*/ caml_call1(Stdlib[1], cst_Weak_create); + if(1 - _K_) /*<>*/ (0, Stdlib[1])(cst_Weak_create); /*<>*/ return runtime.caml_weak_create(l) /*<>*/ ; } function length(x){ @@ -26794,7 +26432,7 @@ _G_ = /*<>*/ 0 <= o ? 1 : 0, _H_ = _G_ ? o < /*<>*/ length(e) ? 1 : 0 : _G_, _I_ = /*<>*/ 1 - _H_; - return _I_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _I_ /*<>*/ ; + return _I_ ? /*<>*/ (0, Stdlib[1])(msg) : _I_ /*<>*/ ; } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -26832,7 +26470,7 @@ : _E_; /*<>*/ return _F_; } - /*<>*/ return caml_call1(Stdlib[1], cst_Weak_blit) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_Weak_blit) /*<>*/ ; } function fill(ar, ofs, len, x){ /*<>*/ if @@ -26889,9 +26527,8 @@ /*<>*/ } function fold(f, t, init){ var i = /*<>*/ 0; - /*<>*/ return caml_call3 - (Stdlib_Array[20], - function(b, accu$1){ + /*<>*/ return (0, Stdlib_Array[20]) + (function(b, accu$1){ var i$0 = /*<>*/ i, accu = accu$1; for(;;){ /*<>*/ if(length(b) <= i$0) @@ -26914,9 +26551,8 @@ } function iter(f, t){ var i = /*<>*/ 0; - /*<>*/ return caml_call2 - (Stdlib_Array[12], - function(b){ + /*<>*/ return (0, Stdlib_Array[12]) + (function(b){ var i$0 = /*<>*/ i; for(;;){ /*<>*/ if(length(b) <= i$0) @@ -26948,9 +26584,8 @@ /*<>*/ } function count(t){ var _v_ = /*<>*/ 0; - /*<>*/ return caml_call3 - (Stdlib_Array[20], - function(_w_, _x_){ + /*<>*/ return (0, Stdlib_Array[20]) + (function(_w_, _x_){ /*<>*/ return count_bucket(_v_, _w_, _x_); }, t[1], @@ -26976,19 +26611,15 @@ } var newsz = - /*<>*/ caml_call2 - (Stdlib_Int[10], - ((3 * sz | 0) / 2 | 0) + 3 | 0, - Stdlib_Sys[13] - 2 | 0); + /*<>*/ (0, Stdlib_Int[10]) + (((3 * sz | 0) / 2 | 0) + 3 | 0, Stdlib_Sys[13] - 2 | 0); /*<>*/ if(newsz <= sz) - /*<>*/ caml_call1 - (Stdlib[2], cst_Weak_Make_hash_bucket_cann); + /*<>*/ (0, Stdlib[2])(cst_Weak_Make_hash_bucket_cann); var newbucket$0 = /*<>*/ create(newsz), newhashes = /*<>*/ caml_make_vect(newsz, 0); /*<>*/ blit(bucket$0, 0, newbucket$0, 0, sz); - /*<>*/ caml_call5 - (Stdlib_Array[9], hashes, 0, newhashes, 0, sz); + /*<>*/ (0, Stdlib_Array[9])(hashes, 0, newhashes, 0, sz); /*<>*/ caml_call3(setter, newbucket$0, sz, d); /*<>*/ caml_check_bound(newhashes, sz)[1 + sz] = h; /*<>*/ caml_check_bound(t[1], index)[1 + index] = newbucket$0; @@ -27044,8 +26675,7 @@ /*<>*/ caml_check_bound(t[1], _o_)[1 + _o_] = newbucket; var _p_ = - /*<>*/ caml_call3 - (Stdlib_Array[6], hbucket, 0, prev_len), + /*<>*/ (0, Stdlib_Array[6])(hbucket, 0, prev_len), _q_ = /*<>*/ t[5]; /*<>*/ caml_check_bound(t[2], _q_)[1 + _q_] = _p_; } @@ -27066,15 +26696,14 @@ var oldlen = /*<>*/ t[1].length - 1, newlen = - /*<>*/ caml_call2 - (Stdlib_Int[10], ((3 * oldlen | 0) / 2 | 0) + 3 | 0, Stdlib_Sys[13]); + /*<>*/ (0, Stdlib_Int[10]) + (((3 * oldlen | 0) / 2 | 0) + 3 | 0, Stdlib_Sys[13]); /*<>*/ if(oldlen < newlen){ var newt = /*<>*/ create$0(newlen), i = /*<>*/ 0; - /*<>*/ caml_call2 - (Stdlib_Array[13], - function(j, ob){ + /*<>*/ (0, Stdlib_Array[13]) + (function(j, ob){ var oi = /*<>*/ i; for(;;){ /*<>*/ if(length(ob) <= oi) @@ -27229,17 +26858,13 @@ function stats(t){ var len = /*<>*/ t[1].length - 1, - lens = - /*<>*/ caml_call2(Stdlib_Array[14], length, t[1]); - /*<>*/ caml_call2 - (Stdlib_Array[35], runtime.caml_int_compare, lens); + lens = /*<>*/ (0, Stdlib_Array[14])(length, t[1]); + /*<>*/ (0, Stdlib_Array[35]) + (runtime.caml_int_compare, lens); var totlen = - /*<>*/ caml_call3 - (Stdlib_Array[18], - function(_g_, _f_){ /*<>*/ return _g_ + _f_ | 0;}, - 0, - lens), + /*<>*/ (0, Stdlib_Array[18]) + (function(_g_, _f_){ /*<>*/ return _g_ + _f_ | 0;}, 0, lens), _a_ = /*<>*/ len - 1 | 0, _c_ = /*<>*/ len / 2 | 0, _b_ = /*<>*/ caml_check_bound(lens, _a_)[1 + _a_], @@ -27281,6 +26906,7 @@ //# unitInfo: Provides: Stdlib__Format //# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Array, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Domain, Stdlib__Int, Stdlib__List, Stdlib__Queue, Stdlib__Seq, Stdlib__Stack, Stdlib__String +//# shape: Stdlib__Format:[F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(2),F(1),F(2),F(1),F(3),F(2),F(3),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),N,F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(3),F(2),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),N,F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(1),N,F(1),N,F(1),F(1),N,F(1),N,F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(5),F(4),F(4),F(4),F(2),F(4),F(4),F(4),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(2),F(3),F(2),F(2)] (function (globalThis){ "use strict"; @@ -27305,11 +26931,6 @@ ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } var dummy = 0, global_data = runtime.caml_get_global_data(), @@ -27350,8 +26971,7 @@ [248, "Stdlib.Format.String_tag", runtime.caml_fresh_oo_id(0)]; function pp_enqueue(state, token){ /*<>*/ state[13] = state[13] + token[3] | 0; - /*<>*/ return caml_call2 - (Stdlib_Queue[3], token, state[28]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Queue[3])(token, state[28]) /*<>*/ ; } var pp_infinity = /*<>*/ 1000000010, @@ -27374,11 +26994,11 @@ /*<>*/ state[11] = 0; /*<>*/ } function format_string(state, s){ - var _a__ = /*<>*/ s !== cst$16 ? 1 : 0; - /*<>*/ return _a__ + var _bs_ = /*<>*/ s !== cst$16 ? 1 : 0; + /*<>*/ return _bs_ ? /*<>*/ format_pp_text (state, caml_ml_string_length(s), s) - : _a__ /*<>*/ ; + : _bs_ /*<>*/ ; } function break_new_line(state, param, width){ var @@ -27391,7 +27011,7 @@ var indent = /*<>*/ (state[6] - width | 0) + offset | 0, real_indent = - /*<>*/ caml_call2(Stdlib_Int[10], state[8], indent); + /*<>*/ (0, Stdlib_Int[10])(state[8], indent); /*<>*/ state[10] = real_indent; /*<>*/ state[9] = state[6] - state[10] | 0; var n = /*<>*/ state[10]; @@ -27413,8 +27033,7 @@ switch(param){ case 0: var - match$3 = - /*<>*/ caml_call1(Stdlib_Stack[8], state[3]); + match$3 = /*<>*/ (0, Stdlib_Stack[8])(state[3]); /*<>*/ if(! match$3) /*<>*/ return; var @@ -27432,29 +27051,27 @@ add_tab(state[6] - state[9] | 0, tabs[1]); /*<>*/ return; case 1: - /*<>*/ caml_call1(Stdlib_Stack[5], state[2]); + /*<>*/ (0, Stdlib_Stack[5])(state[2]); /*<>*/ return; case 2: - /*<>*/ caml_call1(Stdlib_Stack[5], state[3]); + /*<>*/ (0, Stdlib_Stack[5])(state[3]); /*<>*/ return; case 3: var - match$4 = - /*<>*/ caml_call1(Stdlib_Stack[8], state[2]); + match$4 = /*<>*/ (0, Stdlib_Stack[8])(state[2]); /*<>*/ if(! match$4) /*<>*/ return pp_output_newline(state) /*<>*/ ; var width$0 = /*<>*/ match$4[1][2]; /*<>*/ return break_new_line(state, _a_, width$0) /*<>*/ ; case 4: var - _a8_ = + _bq_ = /*<>*/ state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _a8_) return _a8_; + if(! _bq_) return _bq_; var - match$1 = - /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); + match$1 = /*<>*/ (0, Stdlib_Queue[6])(state[28]); /*<>*/ if(! match$1) /*<>*/ return; var @@ -27466,8 +27083,7 @@ return; default: var - match$5 = - /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); + match$5 = /*<>*/ (0, Stdlib_Stack[5])(state[5]); /*<>*/ if(! match$5) /*<>*/ return; var @@ -27485,8 +27101,7 @@ fits = param[1], off = /*<>*/ breaks[2], before = breaks[1], - match$6 = - /*<>*/ caml_call1(Stdlib_Stack[8], state[2]); + match$6 = /*<>*/ (0, Stdlib_Stack[8])(state[2]); /*<>*/ if(! match$6) /*<>*/ return; var @@ -27537,8 +27152,7 @@ off$0 = /*<>*/ param[2], n = param[1], insertion_point = /*<>*/ state[6] - state[9] | 0, - match$8 = - /*<>*/ caml_call1(Stdlib_Stack[8], state[3]); + match$8 = /*<>*/ (0, Stdlib_Stack[8])(state[3]); /*<>*/ if(! match$8) /*<>*/ return; var @@ -27553,11 +27167,11 @@ /*<>*/ param$0 = tail; continue; } - var _a9_ = /*<>*/ head; + var _br_ = /*<>*/ head; } else - var _a9_ = /*<>*/ first; - var tab = /*<>*/ _a9_; + var _br_ = /*<>*/ first; + var tab = /*<>*/ _br_; break; } } @@ -27575,9 +27189,7 @@ off$1 = param[1], insertion_point$0 = /*<>*/ state[6] - state[9] | 0; /*<>*/ if(state[8] < insertion_point$0){ - var - match = - /*<>*/ caml_call1(Stdlib_Stack[8], state[2]); + var match = /*<>*/ (0, Stdlib_Stack[8])(state[2]); /*<>*/ if(match){ var match$0 = match[1], width = match$0[2], box_type = match$0[1]; /*<>*/ if @@ -27591,25 +27203,23 @@ width$2 = /*<>*/ state[9] - off$1 | 0, box_type$1 = /*<>*/ 1 === ty ? 1 : state[9] < size$0 ? ty : 5; - /*<>*/ return caml_call2 - (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Stack[3]) + ([0, box_type$1, width$2], state[2]) /*<>*/ ; case 4: var tbox = /*<>*/ param[1]; - /*<>*/ return caml_call2 - (Stdlib_Stack[3], tbox, state[3]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Stack[3])(tbox, state[3]) /*<>*/ ; default: var tag_name$0 = /*<>*/ param[1], marker$0 = /*<>*/ caml_call1(state[24], tag_name$0); /*<>*/ pp_output_string(state, marker$0); - /*<>*/ return caml_call2 - (Stdlib_Stack[3], tag_name$0, state[5]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Stack[3]) + (tag_name$0, state[5]) /*<>*/ ; } } function advance_left(state){ /*<>*/ for(;;){ - var - match = /*<>*/ caml_call1(Stdlib_Queue[9], state[28]); + var match = /*<>*/ (0, Stdlib_Queue[9])(state[28]); /*<>*/ if(! match) /*<>*/ return 0; var match$0 = /*<>*/ match[1], @@ -27617,11 +27227,11 @@ length = match$0[3], token = match$0[2], pending_count = /*<>*/ state[13] - state[12] | 0, - _a6_ = /*<>*/ 0 <= size ? 1 : 0, - _a7_ = - /*<>*/ _a6_ || (state[9] <= pending_count ? 1 : 0); - if(! _a7_) return _a7_; - /*<>*/ caml_call1(Stdlib_Queue[5], state[28]); + _bo_ = /*<>*/ 0 <= size ? 1 : 0, + _bp_ = + /*<>*/ _bo_ || (state[9] <= pending_count ? 1 : 0); + if(! _bp_) return _bp_; + /*<>*/ (0, Stdlib_Queue[5])(state[28]); var size$0 = /*<>*/ 0 <= size ? size : pp_infinity; /*<>*/ format_pp_token(state, size$0, token); /*<>*/ state[12] = length + state[12] | 0; @@ -27636,14 +27246,13 @@ (state, [0, size, [0, s], size]) /*<>*/ ; } function initialize_scan_stack(stack){ - /*<>*/ caml_call1(Stdlib_Stack[9], stack); + /*<>*/ (0, Stdlib_Stack[9])(stack); var queue_elem = /*<>*/ [0, unknown, _b_, 0]; - /*<>*/ return caml_call2 - (Stdlib_Stack[3], [0, -1, queue_elem], stack) /*<>*/ ; + /*<>*/ return (0, Stdlib_Stack[3]) + ([0, -1, queue_elem], stack) /*<>*/ ; } function set_size(state, ty){ - var - match = /*<>*/ caml_call1(Stdlib_Stack[8], state[1]); + var match = /*<>*/ (0, Stdlib_Stack[8])(state[1]); /*<>*/ if(! match) /*<>*/ return; var match$0 = /*<>*/ match[1], @@ -27652,14 +27261,14 @@ size = /*<>*/ queue_elem[1]; /*<>*/ if(left_total < state[12]) /*<>*/ return initialize_scan_stack(state[1]) /*<>*/ ; - var _a5_ = /*<>*/ queue_elem[2]; - if(typeof _a5_ !== "number") - switch(_a5_[0]){ + var _bn_ = /*<>*/ queue_elem[2]; + if(typeof _bn_ !== "number") + switch(_bn_[0]){ case 3: /*<>*/ if(1 - ty){ var x$0 = /*<>*/ state[13] + size | 0; /*<>*/ queue_elem[1] = x$0; - /*<>*/ caml_call1(Stdlib_Stack[5], state[1]); + /*<>*/ (0, Stdlib_Stack[5])(state[1]); } /*<>*/ return; case 1: @@ -27667,7 +27276,7 @@ /*<>*/ if(ty){ var x = /*<>*/ state[13] + size | 0; /*<>*/ queue_elem[1] = x; - /*<>*/ caml_call1(Stdlib_Stack[5], state[1]); + /*<>*/ (0, Stdlib_Stack[5])(state[1]); } /*<>*/ return; } @@ -27677,8 +27286,7 @@ /*<>*/ if(b) /*<>*/ set_size(state, 1); var elem = /*<>*/ [0, state[13], token]; - /*<>*/ return caml_call2 - (Stdlib_Stack[3], elem, state[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_Stack[3])(elem, state[1]) /*<>*/ ; } function pp_open_box_gen(state, indent, br_ty){ /*<>*/ state[14] = state[14] + 1 | 0; @@ -27688,54 +27296,53 @@ elem = /*<>*/ [0, size, [3, indent, br_ty], 0]; /*<>*/ return scan_push(state, 0, elem) /*<>*/ ; } - var _a4_ = /*<>*/ state[14] === state[15] ? 1 : 0; - if(! _a4_) return _a4_; + var _bm_ = /*<>*/ state[14] === state[15] ? 1 : 0; + if(! _bm_) return _bm_; var s = /*<>*/ state[16], x = /*<>*/ caml_ml_string_length(s); /*<>*/ return enqueue_string_as(state, x, s) /*<>*/ ; } function pp_close_box(state, param){ - var _a2_ = /*<>*/ 1 < state[14] ? 1 : 0; - if(_a2_){ + var _bk_ = /*<>*/ 1 < state[14] ? 1 : 0; + if(_bk_){ /*<>*/ if(state[14] < state[15]){ /*<>*/ pp_enqueue(state, [0, zero, 1, 0]); /*<>*/ set_size(state, 1); /*<>*/ set_size(state, 0); } /*<>*/ state[14] = state[14] - 1 | 0; - var _a3_ = 0; + var _bl_ = 0; } else - var _a3_ = /*<>*/ _a2_; - return _a3_; + var _bl_ = /*<>*/ _bk_; + return _bl_; /*<>*/ } function pp_open_stag(state, tag_name){ /*<>*/ if(state[22]){ - /*<>*/ caml_call2(Stdlib_Stack[3], tag_name, state[4]); + /*<>*/ (0, Stdlib_Stack[3])(tag_name, state[4]); /*<>*/ caml_call1(state[26], tag_name); } - var _a1_ = /*<>*/ state[23]; - if(! _a1_) return _a1_; + var _bj_ = /*<>*/ state[23]; + if(! _bj_) return _bj_; var token = /*<>*/ [5, tag_name]; /*<>*/ return pp_enqueue(state, [0, zero, token, 0]) /*<>*/ ; } function pp_close_stag(state, param){ /*<>*/ if(state[23]) /*<>*/ pp_enqueue(state, [0, zero, 5, 0]); - var _aZ_ = /*<>*/ state[22]; - if(_aZ_){ - var - match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); + var _bh_ = /*<>*/ state[22]; + if(_bh_){ + var match = /*<>*/ (0, Stdlib_Stack[5])(state[4]); /*<>*/ if(match){ var tag_name = match[1]; /*<>*/ return caml_call1(state[27], tag_name) /*<>*/ ; } - var _a0_ = /*<>*/ 0; + var _bi_ = /*<>*/ 0; } else - var _a0_ = /*<>*/ _aZ_; - return _a0_; + var _bi_ = /*<>*/ _bh_; + return _bi_; /*<>*/ } function pp_set_print_tags(state, b){ /*<>*/ state[22] = b; @@ -27777,21 +27384,20 @@ function pp_rinit(state){ /*<>*/ state[12] = 1; /*<>*/ state[13] = 1; - /*<>*/ caml_call1(Stdlib_Queue[11], state[28]); + /*<>*/ (0, Stdlib_Queue[11])(state[28]); /*<>*/ initialize_scan_stack(state[1]); - /*<>*/ caml_call1(Stdlib_Stack[9], state[2]); - /*<>*/ caml_call1(Stdlib_Stack[9], state[3]); - /*<>*/ caml_call1(Stdlib_Stack[9], state[4]); - /*<>*/ caml_call1(Stdlib_Stack[9], state[5]); + /*<>*/ (0, Stdlib_Stack[9])(state[2]); + /*<>*/ (0, Stdlib_Stack[9])(state[3]); + /*<>*/ (0, Stdlib_Stack[9])(state[4]); + /*<>*/ (0, Stdlib_Stack[9])(state[5]); /*<>*/ state[10] = 0; /*<>*/ state[14] = 0; /*<>*/ state[9] = state[6]; /*<>*/ return pp_open_box_gen(state, 0, 3) /*<>*/ ; } function pp_flush_queue(state, end_with_newline){ - /*<>*/ caml_call2 - (Stdlib_Stack[13], - function(param){ + /*<>*/ (0, Stdlib_Stack[13]) + (function(param){ /*<>*/ return pp_close_stag(state, 0) /*<>*/ ; }, state[4]); @@ -27807,10 +27413,10 @@ } /*<>*/ } function pp_print_as_size(state, size, s){ - var _aY_ = /*<>*/ state[14] < state[15] ? 1 : 0; - return _aY_ + var _bg_ = /*<>*/ state[14] < state[15] ? 1 : 0; + return _bg_ ? /*<>*/ enqueue_string_as(state, size, s) - : _aY_ /*<>*/ ; + : _bg_ /*<>*/ ; } function pp_print_as(state, isize, s){ /*<>*/ return pp_print_as_size(state, isize, s) /*<>*/ ; @@ -27821,24 +27427,24 @@ } function pp_print_bytes(state, s){ var - s$0 = /*<>*/ caml_call1(Stdlib_Bytes[6], s), + s$0 = /*<>*/ (0, Stdlib_Bytes[6])(s), isize = /*<>*/ runtime.caml_ml_bytes_length(s); /*<>*/ return pp_print_as_size(state, isize, s$0) /*<>*/ ; } function pp_print_int(state, i){ /*<>*/ return /*<>*/ pp_print_string - (state, /*<>*/ caml_call1(Stdlib_Int[12], i)) /*<>*/ ; + (state, /*<>*/ (0, Stdlib_Int[12])(i)) /*<>*/ ; } function pp_print_float(state, f){ /*<>*/ return /*<>*/ pp_print_string - (state, /*<>*/ caml_call1(Stdlib[35], f)) /*<>*/ ; + (state, /*<>*/ (0, Stdlib[35])(f)) /*<>*/ ; } function pp_print_bool(state, b){ /*<>*/ return /*<>*/ pp_print_string - (state, /*<>*/ caml_call1(Stdlib[30], b)) /*<>*/ ; + (state, /*<>*/ (0, Stdlib[30])(b)) /*<>*/ ; } function pp_print_char(state, c){ - var s = /*<>*/ caml_call2(Stdlib_String[1], 1, c); + var s = /*<>*/ (0, Stdlib_String[1])(1, c); /*<>*/ return pp_print_as_size(state, 1, s) /*<>*/ ; } function pp_print_nothing(state, param){ /*<>*/ return 0; @@ -27867,24 +27473,24 @@ /*<>*/ return caml_call1(state[18], 0) /*<>*/ ; } function pp_force_newline(state, param){ - var _aX_ = /*<>*/ state[14] < state[15] ? 1 : 0; - return _aX_ + var _bf_ = /*<>*/ state[14] < state[15] ? 1 : 0; + return _bf_ ? /*<>*/ enqueue_advance(state, [0, zero, 3, 0]) - : _aX_ /*<>*/ ; + : _bf_ /*<>*/ ; } function pp_print_if_newline(state, param){ - var _aW_ = /*<>*/ state[14] < state[15] ? 1 : 0; - return _aW_ + var _be_ = /*<>*/ state[14] < state[15] ? 1 : 0; + return _be_ ? /*<>*/ enqueue_advance(state, [0, zero, 4, 0]) - : _aW_ /*<>*/ ; + : _be_ /*<>*/ ; } function pp_print_custom_break(state, fits, breaks){ var after = /*<>*/ fits[3], width = fits[2], before = fits[1], - _aV_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aV_) return _aV_; + _bd_ = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! _bd_) return _bd_; var size = /*<>*/ - state[13] | 0, token = /*<>*/ [1, fits, breaks], @@ -27907,31 +27513,31 @@ } function pp_open_tbox(state, param){ /*<>*/ state[14] = state[14] + 1 | 0; - var _aU_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aU_) return _aU_; + var _bc_ = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! _bc_) return _bc_; var elem = /*<>*/ [0, zero, [4, [0, [0, 0]]], 0]; /*<>*/ return enqueue_advance(state, elem) /*<>*/ ; } function pp_close_tbox(state, param){ - var _aR_ = /*<>*/ 1 < state[14] ? 1 : 0; - if(_aR_){ - var _aS_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(_aS_){ + var _a$_ = /*<>*/ 1 < state[14] ? 1 : 0; + if(_a$_){ + var _ba_ = /*<>*/ state[14] < state[15] ? 1 : 0; + if(_ba_){ var elem = /*<>*/ [0, zero, 2, 0]; /*<>*/ enqueue_advance(state, elem); /*<>*/ state[14] = state[14] - 1 | 0; - var _aT_ = 0; + var _bb_ = 0; } else - var _aT_ = /*<>*/ _aS_; + var _bb_ = /*<>*/ _ba_; } else - var _aT_ = /*<>*/ _aR_; - return _aT_; + var _bb_ = /*<>*/ _a$_; + return _bb_; /*<>*/ } function pp_print_tbreak(state, width, offset){ - var _aQ_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aQ_) return _aQ_; + var _a__ = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! _a__) return _a__; var size = /*<>*/ - state[13] | 0, elem = /*<>*/ [0, size, [2, width, offset], width]; @@ -27941,16 +27547,16 @@ /*<>*/ return pp_print_tbreak(state, 0, 0) /*<>*/ ; } function pp_set_tab(state, param){ - var _aP_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aP_) return _aP_; + var _a9_ = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! _a9_) return _a9_; var elem = /*<>*/ [0, zero, 0, 0]; /*<>*/ return enqueue_advance(state, elem) /*<>*/ ; } function pp_set_max_boxes(state, n){ var - _aN_ = /*<>*/ 1 < n ? 1 : 0, - _aO_ = _aN_ ? (state[15] = n, 0) : _aN_; - return _aO_; + _a7_ = /*<>*/ 1 < n ? 1 : 0, + _a8_ = _a7_ ? (state[15] = n, 0) : _a7_; + return _a8_; /*<>*/ } function pp_get_max_boxes(state, param){ /*<>*/ return state[15]; @@ -27969,12 +27575,12 @@ /*<>*/ return n < 1000000010 ? n : 1000000009 /*<>*/ ; } function pp_set_max_indent(state, n$0){ - var _aM_ = /*<>*/ 1 < n$0 ? 1 : 0; - if(! _aM_) return _aM_; + var _a6_ = /*<>*/ 1 < n$0 ? 1 : 0; + if(! _a6_) return _a6_; var n$1 = /*<>*/ state[6] - n$0 | 0, - _aL_ = /*<>*/ 1 <= n$1 ? 1 : 0; - if(! _aL_) return _aL_; + _a5_ = /*<>*/ 1 <= n$1 ? 1 : 0; + if(! _a5_) return _a5_; var n = /*<>*/ pp_limit(n$1); /*<>*/ state[7] = n; /*<>*/ state[8] = state[6] - state[7] | 0; @@ -27984,20 +27590,20 @@ /*<>*/ return state[8]; /*<>*/ } function pp_set_margin(state, n){ - var _aJ_ = /*<>*/ 1 <= n ? 1 : 0; - if(! _aJ_) return _aJ_; + var _a3_ = /*<>*/ 1 <= n ? 1 : 0; + if(! _a3_) return _a3_; var n$0 = /*<>*/ pp_limit(n); /*<>*/ state[6] = n$0; /*<>*/ if(state[8] <= state[6]) var new_max_indent = /*<>*/ state[8]; else var - _aK_ = - /*<>*/ caml_call2 - (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), + _a4_ = + /*<>*/ (0, Stdlib_Int[11]) + (state[6] - state[7] | 0, state[6] / 2 | 0), new_max_indent = - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Int[11], _aK_, 1); + /*<>*/ /*<>*/ (0, Stdlib_Int[11]) + (_a4_, 1); /*<>*/ return pp_set_max_indent(state, new_max_indent) /*<>*/ ; } function validate_geometry(param){ @@ -28028,11 +27634,11 @@ /*<>*/ return pp_set_full_geometry(state, geometry) /*<>*/ ; var msg = /*<>*/ match[1], - _aI_ = - /*<>*/ caml_call2 - (Stdlib[28], cst_Format_pp_set_geometry, msg); + _a2_ = + /*<>*/ (0, Stdlib[28]) + (cst_Format_pp_set_geometry, msg); /*<>*/ throw caml_maybe_attach_backtrace - ([0, Stdlib[6], _aI_], 1); + ([0, Stdlib[6], _a2_], 1); /*<>*/ } function pp_safe_set_geometry(state, max_indent, margin){ var geometry = /*<>*/ [0, max_indent, margin]; @@ -28082,14 +27688,13 @@ /*<>*/ return caml_call3(state[17], cst$7, 0, 1) /*<>*/ ; } var - blank_line = - /*<>*/ caml_call2(Stdlib_String[1], 80, 32), + blank_line = /*<>*/ (0, Stdlib_String[1])(80, 32), _g_ = /*<>*/ [3, 0, 3]; function display_blanks(state, n){ var n$0 = /*<>*/ n; for(;;){ - var _aH_ = 0 < n$0 ? 1 : 0; - if(! _aH_) return _aH_; + var _a1_ = 0 < n$0 ? 1 : 0; + if(! _a1_) return _a1_; /*<>*/ if(80 >= n$0) /*<>*/ return caml_call3 (state[17], blank_line, 0, n$0) /*<>*/ ; @@ -28099,22 +27704,26 @@ } /*<>*/ } function pp_set_formatter_out_channel(state, oc){ - /*<>*/ state[17] = caml_call1(Stdlib[69], oc); + var _aU_ = /*<>*/ Stdlib[69]; + /*<>*/ state[17] = + function(_aY_, _aZ_, _a0_){ + /*<>*/ return _aU_(oc, _aY_, _aZ_, _a0_); + }; /*<>*/ state[18] = function(param){ - /*<>*/ return caml_call1(Stdlib[63], oc) /*<>*/ ; + /*<>*/ return (0, Stdlib[63])(oc) /*<>*/ ; }; /*<>*/ state[19] = - function(_aG_){ - /*<>*/ return display_newline(state, _aG_); + function(_aX_){ + /*<>*/ return display_newline(state, _aX_); }; /*<>*/ state[20] = - function(_aF_){ - /*<>*/ return display_blanks(state, _aF_); + function(_aW_){ + /*<>*/ return display_blanks(state, _aW_); }; /*<>*/ state[21] = - function(_aE_){ - /*<>*/ return display_blanks(state, _aE_); + function(_aV_){ + /*<>*/ return display_blanks(state, _aV_); }; /*<>*/ return 0; } @@ -28123,40 +27732,39 @@ /*<>*/ return cst$10; var s = /*<>*/ param[2], - _aD_ = /*<>*/ caml_call2(Stdlib[28], s, cst$8); - /*<>*/ return caml_call2(Stdlib[28], cst$9, _aD_) /*<>*/ ; + _aT_ = /*<>*/ (0, Stdlib[28])(s, cst$8); + /*<>*/ return (0, Stdlib[28])(cst$9, _aT_) /*<>*/ ; } function default_pp_mark_close_tag(param){ /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$13; var s = /*<>*/ param[2], - _aC_ = /*<>*/ caml_call2(Stdlib[28], s, cst$11); - /*<>*/ return caml_call2(Stdlib[28], cst$12, _aC_) /*<>*/ ; + _aS_ = /*<>*/ (0, Stdlib[28])(s, cst$11); + /*<>*/ return (0, Stdlib[28])(cst$12, _aS_) /*<>*/ ; } - function default_pp_print_open_tag(_aB_){ /*<>*/ return 0;} - function default_pp_print_close_tag(_aA_){return 0;} + function default_pp_print_open_tag(_aR_){ /*<>*/ return 0;} + function default_pp_print_close_tag(_aQ_){return 0;} function pp_make_formatter(f, g, h, i, j){ var - pp_queue = /*<>*/ caml_call1(Stdlib_Queue[2], 0), + pp_queue = /*<>*/ (0, Stdlib_Queue[2])(0), sys_tok = /*<>*/ [0, unknown, _g_, 0]; - /*<>*/ caml_call2(Stdlib_Queue[3], sys_tok, pp_queue); - var scan_stack = /*<>*/ caml_call1(Stdlib_Stack[2], 0); + /*<>*/ (0, Stdlib_Queue[3])(sys_tok, pp_queue); + var scan_stack = /*<>*/ (0, Stdlib_Stack[2])(0); /*<>*/ initialize_scan_stack(scan_stack); - /*<>*/ caml_call2 - (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); + /*<>*/ (0, Stdlib_Stack[3])([0, 1, sys_tok], scan_stack); var pp_margin = /*<>*/ 78, - _aw_ = /*<>*/ Stdlib[19], - _ax_ = caml_call1(Stdlib_Stack[2], 0), - _ay_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - _az_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0); + _aM_ = /*<>*/ Stdlib[19], + _aN_ = (0, Stdlib_Stack[2])(0), + _aO_ = /*<>*/ (0, Stdlib_Stack[2])(0), + _aP_ = /*<>*/ (0, Stdlib_Stack[2])(0); /*<>*/ return [0, scan_stack, - caml_call1(Stdlib_Stack[2], 0), - _az_, - _ay_, - _ax_, + (0, Stdlib_Stack[2])(0), + _aP_, + _aO_, + _aN_, pp_margin, 10, 68, @@ -28166,7 +27774,7 @@ 1, 1, 1, - _aw_, + _aM_, cst$14, f, g, @@ -28191,39 +27799,44 @@ /*<>*/ pp_make_formatter (output, flush, - function(_av_){ /*<>*/ return 0;}, - function(_au_){return 0;}, - function(_at_){return 0;}); + function(_aL_){ /*<>*/ return 0;}, + function(_aK_){return 0;}, + function(_aJ_){return 0;}); /*<>*/ ppf[19] = - function(_as_){ - /*<>*/ return display_newline(ppf, _as_); + function(_aI_){ + /*<>*/ return display_newline(ppf, _aI_); }; /*<>*/ ppf[20] = - function(_ar_){ - /*<>*/ return display_blanks(ppf, _ar_); + function(_aH_){ + /*<>*/ return display_blanks(ppf, _aH_); }; /*<>*/ ppf[21] = - function(_aq_){ - /*<>*/ return display_blanks(ppf, _aq_); + function(_aG_){ + /*<>*/ return display_blanks(ppf, _aG_); }; /*<>*/ return ppf; /*<>*/ } function formatter_of_out_channel(oc){ - /*<>*/ return /*<>*/ make_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), + var _aC_ = /*<>*/ Stdlib[69]; + /*<>*/ return make_formatter + (function(_aD_, _aE_, _aF_){ + /*<>*/ return _aC_(oc, _aD_, _aE_, _aF_); + }, function(param){ - /*<>*/ return caml_call1(Stdlib[63], oc) /*<>*/ ; + /*<>*/ return (0, Stdlib[63])(oc) /*<>*/ ; }) /*<>*/ ; } function formatter_of_buffer(b){ - /*<>*/ return /*<>*/ make_formatter - ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), - function(_ap_){ /*<>*/ return 0;}) /*<>*/ ; + var _ax_ = /*<>*/ Stdlib_Buffer[18]; + /*<>*/ return make_formatter + (function(_az_, _aA_, _aB_){ + /*<>*/ return _ax_(b, _az_, _aA_, _aB_); + }, + function(_ay_){ /*<>*/ return 0;}) /*<>*/ ; } var pp_buffer_size = /*<>*/ 512; function pp_make_buffer(param){ - /*<>*/ return caml_call1 - (Stdlib_Buffer[1], pp_buffer_size) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[1])(pp_buffer_size) /*<>*/ ; } var stdbuf = /*<>*/ pp_make_buffer(0), @@ -28251,18 +27864,18 @@ (Stdlib_Domain[10][3], str_formatter_key, str_formatter); function buffered_out_string(key, str, ofs, len){ var - _ao_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); - /*<>*/ return caml_call4 - (Stdlib_Buffer[18], _ao_, str, ofs, len) /*<>*/ ; + _aw_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); + /*<>*/ return (0, Stdlib_Buffer[18]) + (_aw_, str, ofs, len) /*<>*/ ; } function buffered_out_flush(oc, key, param){ var buf = /*<>*/ caml_call1(Stdlib_Domain[10][2], key), - len = /*<>*/ caml_call1(Stdlib_Buffer[7], buf), - str = /*<>*/ caml_call1(Stdlib_Buffer[2], buf); - /*<>*/ caml_call4(Stdlib[69], oc, str, 0, len); - /*<>*/ caml_call1(Stdlib[63], oc); - /*<>*/ return caml_call1(Stdlib_Buffer[8], buf) /*<>*/ ; + len = /*<>*/ (0, Stdlib_Buffer[7])(buf), + str = /*<>*/ (0, Stdlib_Buffer[2])(buf); + /*<>*/ (0, Stdlib[69])(oc, str, 0, len); + /*<>*/ (0, Stdlib[63])(oc); + /*<>*/ return (0, Stdlib_Buffer[8])(buf) /*<>*/ ; } var std_buf_key = @@ -28270,16 +27883,16 @@ (Stdlib_Domain[10][1], 0, function(param){ - /*<>*/ return caml_call1 - (Stdlib_Buffer[1], pp_buffer_size) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[1]) + (pp_buffer_size) /*<>*/ ; }), err_buf_key = /*<>*/ caml_call2 (Stdlib_Domain[10][1], 0, function(param){ - /*<>*/ return caml_call1 - (Stdlib_Buffer[1], pp_buffer_size) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[1]) + (pp_buffer_size) /*<>*/ ; }), std_formatter_key = /*<>*/ caml_call2 @@ -28287,36 +27900,35 @@ 0, function(param){ var - _ac_ = /*<>*/ Stdlib[39], + _ak_ = /*<>*/ Stdlib[39], ppf = /*<>*/ pp_make_formatter - (function(_al_, _am_, _an_){ + (function(_at_, _au_, _av_){ /*<>*/ return buffered_out_string - (std_buf_key, _al_, _am_, _an_); + (std_buf_key, _at_, _au_, _av_); }, - function(_ak_){ + function(_as_){ /*<>*/ return buffered_out_flush - (_ac_, std_buf_key, _ak_); + (_ak_, std_buf_key, _as_); }, - function(_aj_){ /*<>*/ return 0;}, - function(_ai_){return 0;}, - function(_ah_){return 0;}); + function(_ar_){ /*<>*/ return 0;}, + function(_aq_){return 0;}, + function(_ap_){return 0;}); /*<>*/ ppf[19] = - function(_ag_){ - /*<>*/ return display_newline(ppf, _ag_); + function(_ao_){ + /*<>*/ return display_newline(ppf, _ao_); }; /*<>*/ ppf[20] = - function(_af_){ - /*<>*/ return display_blanks(ppf, _af_); + function(_an_){ + /*<>*/ return display_blanks(ppf, _an_); }; /*<>*/ ppf[21] = - function(_ae_){ - /*<>*/ return display_blanks(ppf, _ae_); + function(_am_){ + /*<>*/ return display_blanks(ppf, _am_); }; - /*<>*/ caml_call1 - (Stdlib_Domain[6], - function(_ad_){ - /*<>*/ return pp_print_flush(ppf, _ad_); + /*<>*/ (0, Stdlib_Domain[6]) + (function(_al_){ + /*<>*/ return pp_print_flush(ppf, _al_); }); /*<>*/ return ppf; /*<>*/ }); @@ -28329,36 +27941,35 @@ 0, function(param){ var - _S_ = /*<>*/ Stdlib[40], + ___ = /*<>*/ Stdlib[40], ppf = /*<>*/ pp_make_formatter - (function(_$_, _aa_, _ab_){ + (function(_ah_, _ai_, _aj_){ /*<>*/ return buffered_out_string - (err_buf_key, _$_, _aa_, _ab_); + (err_buf_key, _ah_, _ai_, _aj_); }, - function(___){ + function(_ag_){ /*<>*/ return buffered_out_flush - (_S_, err_buf_key, ___); + (___, err_buf_key, _ag_); }, - function(_Z_){ /*<>*/ return 0;}, - function(_Y_){return 0;}, - function(_X_){return 0;}); + function(_af_){ /*<>*/ return 0;}, + function(_ae_){return 0;}, + function(_ad_){return 0;}); /*<>*/ ppf[19] = - function(_W_){ - /*<>*/ return display_newline(ppf, _W_); + function(_ac_){ + /*<>*/ return display_newline(ppf, _ac_); }; /*<>*/ ppf[20] = - function(_V_){ - /*<>*/ return display_blanks(ppf, _V_); + function(_ab_){ + /*<>*/ return display_blanks(ppf, _ab_); }; /*<>*/ ppf[21] = - function(_U_){ - /*<>*/ return display_blanks(ppf, _U_); + function(_aa_){ + /*<>*/ return display_blanks(ppf, _aa_); }; - /*<>*/ caml_call1 - (Stdlib_Domain[6], - function(_T_){ - /*<>*/ return pp_print_flush(ppf, _T_); + /*<>*/ (0, Stdlib_Domain[6]) + (function(_$_){ + /*<>*/ return pp_print_flush(ppf, _$_); }); /*<>*/ return ppf; /*<>*/ }); @@ -28382,8 +27993,8 @@ } function flush_buffer_formatter(buf, ppf){ /*<>*/ pp_flush_queue(ppf, 0); - var s = /*<>*/ caml_call1(Stdlib_Buffer[2], buf); - /*<>*/ caml_call1(Stdlib_Buffer[9], buf); + var s = /*<>*/ (0, Stdlib_Buffer[2])(buf); + /*<>*/ (0, Stdlib_Buffer[9])(buf); /*<>*/ return s; /*<>*/ } function flush_str_formatter(param){ @@ -28403,20 +28014,21 @@ function(param){ var buf = - /*<>*/ caml_call1 - (Stdlib_Buffer[1], pp_buffer_size), - output$0 = - /*<>*/ caml_call1(Stdlib_Buffer[18], buf); + /*<>*/ (0, Stdlib_Buffer[1]) + (pp_buffer_size), + _V_ = /*<>*/ Stdlib_Buffer[18]; + function output$0(_X_, _Y_, _Z_){ + /*<>*/ return _V_(buf, _X_, _Y_, _Z_); + } function flush$0(param){ var - _R_ = - /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + _W_ = /*<>*/ (0, Stdlib_Buffer[7])(buf); /*<>*/ /*<>*/ caml_call3 (output, - /*<>*/ caml_call1(Stdlib_Buffer[2], buf), + /*<>*/ (0, Stdlib_Buffer[2])(buf), 0, - _R_); - /*<>*/ caml_call1(Stdlib_Buffer[8], buf); + _W_); + /*<>*/ (0, Stdlib_Buffer[8])(buf); /*<>*/ return caml_call1(flush, 0) /*<>*/ ; } /*<>*/ return make_formatter @@ -28424,10 +28036,13 @@ }) /*<>*/ ; } function synchronized_formatter_of_out_(oc){ - /*<>*/ return /*<>*/ make_synchronized_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), + var _R_ = /*<>*/ Stdlib[69]; + /*<>*/ return make_synchronized_formatter + (function(_S_, _T_, _U_){ + /*<>*/ return _R_(oc, _S_, _T_, _U_); + }, function(param){ - /*<>*/ return caml_call1(Stdlib[63], oc) /*<>*/ ; + /*<>*/ return (0, Stdlib[63])(oc) /*<>*/ ; }) /*<>*/ ; } function make_symbolic_output_buffer(param){ /*<>*/ return [0, 0]; @@ -28437,7 +28052,7 @@ return 0; /*<>*/ } function get_symbolic_output_buffer(sob){ - /*<>*/ return caml_call1(Stdlib_List[10], sob[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_List[10])(sob[1]) /*<>*/ ; } function flush_symbolic_output_buffer(sob){ var items = /*<>*/ get_symbolic_output_buffer(sob); @@ -28452,9 +28067,7 @@ function f(s, i, n){ /*<>*/ return /*<>*/ add_symbolic_output_item (sob, - [0, - /*<>*/ caml_call3 - (Stdlib_String[16], s, i, n)]) /*<>*/ ; + [0, /*<>*/ (0, Stdlib_String[16])(s, i, n)]) /*<>*/ ; } function g(_Q_){ /*<>*/ return add_symbolic_output_item(sob, 0); @@ -28830,8 +28443,8 @@ function flush(param){ /*<>*/ /*<>*/ pp_print_string (ppf, - /*<>*/ caml_call3 - (Stdlib_String[16], s, left[1], right[1] - left[1] | 0)); + /*<>*/ (0, Stdlib_String[16]) + (s, left[1], right[1] - left[1] | 0)); /*<>*/ right[1]++; /*<>*/ left[1] = right[1]; return 0; @@ -28887,15 +28500,16 @@ } function compute_tag(output, tag_acc){ var - buf = /*<>*/ caml_call1(Stdlib_Buffer[1], 16), + buf = /*<>*/ (0, Stdlib_Buffer[1])(16), ppf = /*<>*/ formatter_of_buffer(buf); /*<>*/ caml_call2(output, ppf, tag_acc); /*<>*/ pp_print_flush(ppf, 0); - var len = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + var len = /*<>*/ (0, Stdlib_Buffer[7])(buf); /*<>*/ return 2 <= len - ? /*<>*/ caml_call3 - (Stdlib_Buffer[4], buf, 1, len - 2 | 0) - : /*<>*/ caml_call1(Stdlib_Buffer[2], buf) /*<>*/ ; + ? /*<>*/ (0, + Stdlib_Buffer[4]) + (buf, 1, len - 2 | 0) + : /*<>*/ (0, Stdlib_Buffer[2])(buf) /*<>*/ ; } function output_formatting_lit(ppf, fmting_lit){ /*<>*/ if(typeof fmting_lit === "number") @@ -28957,8 +28571,7 @@ var _E_ = /*<>*/ compute_tag(output_acc, acc$1), match$0 = - /*<>*/ caml_call1 - (CamlinternalFormat[20], _E_), + /*<>*/ (0, CamlinternalFormat[20])(_E_), bty = /*<>*/ match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty) /*<>*/ ; @@ -29017,14 +28630,13 @@ default: var msg = /*<>*/ acc[2], p$7 = acc[1]; /*<>*/ output_acc(ppf, p$7); - /*<>*/ return caml_call1(Stdlib[1], msg) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(msg) /*<>*/ ; } /*<>*/ output_acc(ppf, p$4); /*<>*/ return /*<>*/ pp_print_as_size (ppf, size$0, - /*<>*/ caml_call2 - (Stdlib_String[1], 1, c$0)) /*<>*/ ; + /*<>*/ (0, Stdlib_String[1])(1, c$0)) /*<>*/ ; } /*<>*/ output_acc(ppf, p$3); /*<>*/ return pp_print_char(ppf, c) /*<>*/ ; @@ -29065,8 +28677,7 @@ var _v_ = /*<>*/ compute_tag(strput_acc, acc$1), match$0 = - /*<>*/ caml_call1 - (CamlinternalFormat[20], _v_), + /*<>*/ (0, CamlinternalFormat[20])(_v_), bty = /*<>*/ match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty) /*<>*/ ; @@ -29136,14 +28747,13 @@ default: var msg = /*<>*/ acc[2], p$8 = acc[1]; /*<>*/ strput_acc(ppf, p$8); - /*<>*/ return caml_call1(Stdlib[1], msg) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(msg) /*<>*/ ; } /*<>*/ strput_acc(ppf, p$4); /*<>*/ return /*<>*/ pp_print_as_size (ppf, size$0, - /*<>*/ caml_call2 - (Stdlib_String[1], 1, c$0)) /*<>*/ ; + /*<>*/ (0, Stdlib_String[1])(1, c$0)) /*<>*/ ; } /*<>*/ strput_acc(ppf, p$3); /*<>*/ return pp_print_char(ppf, c) /*<>*/ ; @@ -29156,9 +28766,8 @@ } function kfprintf(k, ppf, param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[7], - function(acc){ + /*<>*/ return (0, CamlinternalFormat[7]) + (function(acc){ /*<>*/ output_acc(ppf, acc); /*<>*/ return caml_call1(k, ppf) /*<>*/ ; }, @@ -29167,16 +28776,12 @@ } function ikfprintf(k, ppf, param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[8], k, ppf, fmt) /*<>*/ ; + /*<>*/ return (0, CamlinternalFormat[8])(k, ppf, fmt) /*<>*/ ; } function ifprintf(ppf, param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[8], - function(_u_){ /*<>*/ return 0;}, - 0, - fmt) /*<>*/ ; + /*<>*/ return (0, CamlinternalFormat[8]) + (function(_u_){ /*<>*/ return 0;}, 0, fmt) /*<>*/ ; } function fprintf(ppf){ function _r_(_t_){ /*<>*/ return 0;} @@ -29185,9 +28790,8 @@ /*<>*/ } function printf(param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[7], - function(acc){ + /*<>*/ return (0, CamlinternalFormat[7]) + (function(acc){ /*<>*/ return /*<>*/ output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], std_formatter_key), @@ -29198,9 +28802,8 @@ } function eprintf(param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[7], - function(acc){ + /*<>*/ return (0, CamlinternalFormat[7]) + (function(acc){ /*<>*/ return /*<>*/ output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], err_formatter_key), @@ -29211,9 +28814,8 @@ } function kdprintf(k, param){ var fmt = /*<>*/ param[1]; - /*<>*/ return caml_call3 - (CamlinternalFormat[7], - function(acc){ + /*<>*/ return (0, CamlinternalFormat[7]) + (function(acc){ /*<>*/ return caml_call1 (k, function(ppf){ @@ -29240,8 +28842,7 @@ /*<>*/ return /*<>*/ caml_call1 (k, /*<>*/ flush_buffer_formatter(b, ppf)) /*<>*/ ; } - /*<>*/ return caml_call3 - (CamlinternalFormat[7], k$0, 0, fmt) /*<>*/ ; + /*<>*/ return (0, CamlinternalFormat[7])(k$0, 0, fmt) /*<>*/ ; } function sprintf(fmt){ /*<>*/ return ksprintf(id, fmt) /*<>*/ ; @@ -29256,8 +28857,7 @@ /*<>*/ return /*<>*/ caml_call1 (k, /*<>*/ flush_buffer_formatter(b, ppf)) /*<>*/ ; } - /*<>*/ return caml_call3 - (CamlinternalFormat[7], k$0, 0, fmt) /*<>*/ ; + /*<>*/ return (0, CamlinternalFormat[7])(k$0, 0, fmt) /*<>*/ ; } function asprintf(fmt){ /*<>*/ return kasprintf(id, fmt) /*<>*/ ; @@ -29272,11 +28872,9 @@ (Stdlib_Domain[10][2], err_formatter_key), 0) /*<>*/ ; } - /*<>*/ caml_call1 - (Stdlib[100], flush_standard_formatters); - /*<>*/ caml_call1 - (Stdlib_Domain[5], - function(param){ + /*<>*/ (0, Stdlib[100])(flush_standard_formatters); + /*<>*/ (0, Stdlib_Domain[5]) + (function(param){ /*<>*/ flush_standard_formatters(0); var fs = @@ -29477,6 +29075,7 @@ //# unitInfo: Provides: Stdlib__Scanf //# unitInfo: Requires: CamlinternalFormat, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Int, Stdlib__Printf, Stdlib__String +//# shape: Stdlib__Scanf:[N,N,F(2),F(2),F(2),F(2),F(1),F(1),F(3),F(3),F(3),F(3),F(2),F(1)] (function (globalThis){ "use strict"; @@ -29511,11 +29110,6 @@ ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } var global_data = runtime.caml_get_global_data(), cst$3 = cst$5, @@ -29601,8 +29195,8 @@ function token_string(ib){ var token_buffer = /*<>*/ ib[8], - tok = /*<>*/ caml_call1(Stdlib_Buffer[2], token_buffer); - /*<>*/ caml_call1(Stdlib_Buffer[8], token_buffer); + tok = /*<>*/ (0, Stdlib_Buffer[2])(token_buffer); + /*<>*/ (0, Stdlib_Buffer[8])(token_buffer); /*<>*/ ib[6] = ib[6] + 1 | 0; /*<>*/ return tok; /*<>*/ } @@ -29612,7 +29206,7 @@ /*<>*/ return width$0; /*<>*/ } function store_char(width, ib, c){ - /*<>*/ caml_call2(Stdlib_Buffer[12], ib[8], c); + /*<>*/ (0, Stdlib_Buffer[12])(ib[8], c); /*<>*/ return ignore_char(width, ib) /*<>*/ ; } var default_token_buffer_size = /*<>*/ 1024; @@ -29625,7 +29219,7 @@ 0, 0, next, - caml_call1(Stdlib_Buffer[1], default_token_buffer_size), + (0, Stdlib_Buffer[1])(default_token_buffer_size), iname] /*<>*/ ; /*<>*/ } function from_string(s){ @@ -29646,7 +29240,7 @@ function from_function(_aW_){return create(_a_, _aW_);} var len = /*<>*/ 1024; function scan_close_at_end(ic){ - /*<>*/ caml_call1(Stdlib[93], ic); + /*<>*/ (0, Stdlib[93])(ic); /*<>*/ throw caml_maybe_attach_backtrace(Stdlib[12], 1); /*<>*/ } function scan_raise_at_end(ic){ @@ -29667,7 +29261,7 @@ /*<>*/ if(eof[1]) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[12], 1); - /*<>*/ lim[1] = caml_call4(Stdlib[84], ic, buf, 0, len); + /*<>*/ lim[1] = (0, Stdlib[84])(ic, buf, 0, len); /*<>*/ return 0 === lim[1] ? (eof [1] @@ -29702,10 +29296,10 @@ if(typeof match === "number") /*<>*/ return 0; /*<>*/ if(0 === match[0]){ var ic = match[1]; - /*<>*/ return caml_call1(Stdlib[93], ic) /*<>*/ ; + /*<>*/ return (0, Stdlib[93])(ic) /*<>*/ ; } var ic$0 = /*<>*/ match[2]; - /*<>*/ return caml_call1(Stdlib[93], ic$0) /*<>*/ ; + /*<>*/ return (0, Stdlib[93])(ic$0) /*<>*/ ; } var Scan_failure = @@ -29802,19 +29396,21 @@ /*<>*/ } function bad_input_escape(c){ /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _d_, c)) /*<>*/ ; + ( /*<>*/ caml_call1 + ((0, Stdlib_Printf[4])(_d_), c)) /*<>*/ ; } function bad_token_length(message){ /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _e_, message)) /*<>*/ ; + ( /*<>*/ caml_call1 + ((0, Stdlib_Printf[4])(_e_), message)) /*<>*/ ; } function bad_hex_float(param){ /*<>*/ return bad_input(cst_not_a_valid_float_in_hexad) /*<>*/ ; } function character_mismatch(c, ci){ /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call3(Stdlib_Printf[4], _g_, c, ci)) /*<>*/ ; + ( /*<>*/ caml_call2 + ((0, Stdlib_Printf[4])(_g_), c, ci)) /*<>*/ ; } function check_char(ib, c$0){ /*<>*/ if(10 === c$0){ @@ -29862,7 +29458,8 @@ ? s !== "true" ? /*<>*/ bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _h_, s)) + ( /*<>*/ caml_call1 + ((0, Stdlib_Printf[4])(_h_), s)) : 1 : 0 /*<>*/ ; } @@ -29893,29 +29490,29 @@ var _aO_ = /*<>*/ token_string(ib), tok = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_0b, _aO_); + /*<>*/ /*<>*/ (0, Stdlib[28]) + (cst_0b, _aO_); break; case 3: var _aP_ = /*<>*/ token_string(ib), tok = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_0o, _aP_); + /*<>*/ /*<>*/ (0, Stdlib[28]) + (cst_0o, _aP_); break; case 4: var _aQ_ = /*<>*/ token_string(ib), tok = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_0u, _aQ_); + /*<>*/ /*<>*/ (0, Stdlib[28]) + (cst_0u, _aQ_); break; case 5: var _aR_ = /*<>*/ token_string(ib), tok = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_0x, _aR_); + /*<>*/ /*<>*/ (0, Stdlib[28]) + (cst_0x, _aR_); break; default: var @@ -29925,8 +29522,7 @@ var l = /*<>*/ caml_ml_string_length(tok); /*<>*/ if (0 !== l && 43 === /*<>*/ caml_string_get(tok, 0)) - /*<>*/ return caml_call3 - (Stdlib_String[16], tok, 1, l - 1 | 0) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[16])(tok, 1, l - 1 | 0) /*<>*/ ; /*<>*/ return tok; /*<>*/ } function token_float(ib){ @@ -29961,7 +29557,8 @@ var c = /*<>*/ checked_peek_char(ib); /*<>*/ if(9 < c - 48 >>> 0) /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _j_, c)) /*<>*/ ; + ( /*<>*/ caml_call1 + ((0, Stdlib_Printf[4])(_j_), c)) /*<>*/ ; var width$0 = /*<>*/ store_char(width, ib, c); /*<>*/ return scan_decimal_digit_star(width$0, ib) /*<>*/ ; } @@ -29971,8 +29568,8 @@ var c$0 = /*<>*/ checked_peek_char(ib); /*<>*/ if(! caml_call1(digitp, c$0)) /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call3 - (Stdlib_Printf[4], _k_, c$0, basis)) /*<>*/ ; + ( /*<>*/ caml_call2 + ((0, Stdlib_Printf[4])(_k_), c$0, basis)) /*<>*/ ; var width$3 = /*<>*/ store_char(width$2, ib, c$0), width = /*<>*/ width$3; @@ -30124,7 +29721,7 @@ var width$2 = /*<>*/ store_char(width$0, ib, c), precision$0 = - /*<>*/ caml_call2(Stdlib_Int[10], width$2, precision), + /*<>*/ (0, Stdlib_Int[10])(width$2, precision), width$3 = /*<>*/ width$2 - (precision$0 - scan_fractional_part(precision$0, ib) | 0) @@ -30137,8 +29734,7 @@ function lowercase(c){ /*<>*/ return 25 < c - 65 >>> 0 ? c - : /*<>*/ caml_call1 - (Stdlib[29], (c - 65 | 0) + 97 | 0) /*<>*/ ; + : /*<>*/ (0, Stdlib[29])((c - 65 | 0) + 97 | 0) /*<>*/ ; } var len = /*<>*/ caml_ml_string_length(str), @@ -30241,8 +29837,8 @@ /*<>*/ if(80 !== match && 112 !== match){ var precision$0 = - /*<>*/ caml_call2 - (Stdlib_Int[10], width$6, precision), + /*<>*/ (0, Stdlib_Int[10]) + (width$6, precision), width$10 = /*<>*/ width$6 - @@ -30318,8 +29914,7 @@ var width$1 = /*<>*/ store_char(width$0, ib, c), precision$0 = - /*<>*/ caml_call2 - (Stdlib_Int[10], width$1, precision), + /*<>*/ (0, Stdlib_Int[10])(width$1, precision), width_precision = /*<>*/ scan_fractional_part(precision$0, ib), frac_width = /*<>*/ precision$0 - width_precision | 0, @@ -30401,8 +29996,8 @@ /*<>*/ if(80 !== match && 112 !== match){ var precision$0 = - /*<>*/ caml_call2 - (Stdlib_Int[10], width$4, precision), + /*<>*/ (0, Stdlib_Int[10]) + (width$4, precision), width$9 = /*<>*/ width$4 - @@ -30497,8 +30092,8 @@ var c = /*<>*/ peek_char(ib); /*<>*/ return ib[1] ? /*<>*/ bad_input - ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _f_, message)) + ( /*<>*/ caml_call1 + ((0, Stdlib_Printf[4])(_f_), message)) : c /*<>*/ ; } function scan_backslash_char(width, ib){ @@ -30527,14 +30122,14 @@ b: { /*<>*/ if(0 <= c && 255 >= c){ - var _ab_ = /*<>*/ caml_call1(Stdlib[29], c); + var _ab_ = /*<>*/ (0, Stdlib[29])(c); break b; } var _ab_ = /*<>*/ bad_input - ( /*<>*/ caml_call4 - (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); + ( /*<>*/ caml_call3 + ((0, Stdlib_Printf[4])(_l_), c0, c1$0, c2$0)); } /*<>*/ return store_char(width - 2 | 0, ib, _ab_) /*<>*/ ; } @@ -30568,14 +30163,14 @@ b: { /*<>*/ if(0 <= c$0 && 255 >= c$0){ - var _aa_ = /*<>*/ caml_call1(Stdlib[29], c$0); + var _aa_ = /*<>*/ (0, Stdlib[29])(c$0); break b; } var _aa_ = /*<>*/ bad_input - ( /*<>*/ caml_call3 - (Stdlib_Printf[4], _m_, c1, c2)); + ( /*<>*/ caml_call2 + ((0, Stdlib_Printf[4])(_m_), c1, c2)); } /*<>*/ return store_char(width - 2 | 0, ib, _aa_) /*<>*/ ; case 0: @@ -30687,8 +30282,7 @@ if(_V_) var _W_ = - /*<>*/ caml_call2 - (CamlinternalFormat[1], char_set, c), + /*<>*/ (0, CamlinternalFormat[1])(char_set, c), _X_ = /*<>*/ _W_ ? c !== stp ? 1 : 0 : _W_; else var _X_ = /*<>*/ _V_; @@ -30722,7 +30316,8 @@ } var i = /*<>*/ char_count(ib); /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call3(Stdlib_Printf[4], _o_, i, s)) /*<>*/ ; + ( /*<>*/ caml_call2 + ((0, Stdlib_Printf[4])(_o_), i, s)) /*<>*/ ; } function width_of_pad_opt(pad_opt){ /*<>*/ if(! pad_opt) @@ -30734,15 +30329,12 @@ /*<>*/ if(6 === fmting) /*<>*/ return _p_; var - str = - /*<>*/ caml_call1(CamlinternalFormat[17], fmting), + str = /*<>*/ (0, CamlinternalFormat[17])(fmting), stp = /*<>*/ caml_string_get(str, 1), sub_str = - /*<>*/ /*<>*/ caml_call3 - (Stdlib_String[16], - str, - 2, - /*<>*/ caml_ml_string_length(str) - 2 | 0); + /*<>*/ /*<>*/ (0, + Stdlib_String[16]) + (str, 2, /*<>*/ caml_ml_string_length(str) - 2 | 0); /*<>*/ return [0, stp, sub_str]; /*<>*/ } function take_format_readers$0(counter, k, fmt){ @@ -30809,11 +30401,8 @@ var rest$13 = /*<>*/ fmt$0[3], fmtty = fmt$0[2], - _Q_ = - /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), - _R_ = - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _Q_); + _Q_ = /*<>*/ (0, CamlinternalFormat[21])(fmtty), + _R_ = /*<>*/ (0, CamlinternalFormatBasics[2])(_Q_); /*<>*/ if(counter >= 50) return caml_trampoline_return (take_fmtty_format_readers$0, [0, k, _R_, rest$13]) /*<>*/ ; @@ -30838,8 +30427,8 @@ rest$17 = fmt$0[2], fmt$1 = _S_[1][1], fmt$2 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$1, rest$17); + /*<>*/ (0, CamlinternalFormatBasics[3]) + (fmt$1, rest$17); /*<>*/ fmt$0 = fmt$2; } else{ @@ -30847,8 +30436,8 @@ rest$18 = /*<>*/ fmt$0[2], fmt$3 = _S_[1][1], fmt$4 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$3, rest$18); + /*<>*/ (0, CamlinternalFormatBasics[3]) + (fmt$3, rest$18); /*<>*/ fmt$0 = fmt$4; } break; @@ -30983,14 +30572,11 @@ rest = /*<>*/ fmtty$0[3], ty2 = fmtty$0[2], ty1 = fmtty$0[1], - _P_ = - /*<>*/ caml_call1(CamlinternalFormat[21], ty1), - ty = - /*<>*/ caml_call2 - (CamlinternalFormat[22], _P_, ty2), + _P_ = /*<>*/ (0, CamlinternalFormat[21])(ty1), + ty = /*<>*/ (0, CamlinternalFormat[22])(_P_, ty2), fmtty$10 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], ty, rest); + /*<>*/ (0, CamlinternalFormatBasics[1]) + (ty, rest); /*<>*/ fmtty$0 = fmtty$10; break; case 10: @@ -31110,8 +30696,8 @@ }; /*<>*/ return /*<>*/ pad_prec_scanf (ib, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$1, rest$3), + /*<>*/ (0, CamlinternalFormatBasics[3]) + (fmt$1, rest$3), readers, pad, 0, @@ -31127,8 +30713,8 @@ }; /*<>*/ return /*<>*/ pad_prec_scanf (ib, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$2, rest$4), + /*<>*/ (0, CamlinternalFormatBasics[3]) + (fmt$2, rest$4), readers, pad, 0, @@ -31161,8 +30747,7 @@ iconv = fmt$0[1], conv = /*<>*/ /*<>*/ integer_conversion_of_char - ( /*<>*/ caml_call1 - (CamlinternalFormat[16], iconv)), + ( /*<>*/ (0, CamlinternalFormat[16])(iconv)), scan$4 = /*<>*/ function(width, param, ib){ /*<>*/ return scan_int_conversion @@ -31187,8 +30772,7 @@ iconv$0 = fmt$0[1], conv$0 = /*<>*/ /*<>*/ integer_conversion_of_char - ( /*<>*/ caml_call1 - (CamlinternalFormat[16], iconv$0)), + ( /*<>*/ (0, CamlinternalFormat[16])(iconv$0)), scan$5 = /*<>*/ function(width, param, ib){ /*<>*/ return scan_int_conversion @@ -31213,8 +30797,7 @@ iconv$1 = fmt$0[1], conv$1 = /*<>*/ /*<>*/ integer_conversion_of_char - ( /*<>*/ caml_call1 - (CamlinternalFormat[16], iconv$1)), + ( /*<>*/ (0, CamlinternalFormat[16])(iconv$1)), scan$6 = /*<>*/ function(width, param, ib){ /*<>*/ return scan_int_conversion @@ -31239,8 +30822,7 @@ iconv$2 = fmt$0[1], conv$2 = /*<>*/ /*<>*/ integer_conversion_of_char - ( /*<>*/ caml_call1 - (CamlinternalFormat[16], iconv$2)), + ( /*<>*/ (0, CamlinternalFormat[16])(iconv$2)), scan$7 = /*<>*/ function(width, param, ib){ /*<>*/ return scan_int_conversion @@ -31313,8 +30895,8 @@ === c ? 4 : /*<>*/ bad_input - ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _n_, c)); + ( /*<>*/ caml_call1 + ((0, Stdlib_Printf[4])(_n_), c)); /*<>*/ return scan_string(0, m, ib) /*<>*/ ; }; /*<>*/ return pad_prec_scanf @@ -31327,9 +30909,8 @@ break; case 11: var rest$15 = /*<>*/ fmt$0[2], str$0 = fmt$0[1]; - /*<>*/ caml_call2 - (Stdlib_String[30], - function(_N_){ /*<>*/ return check_char(ib, _N_);}, + /*<>*/ (0, Stdlib_String[30]) + (function(_N_){ /*<>*/ return check_char(ib, _N_);}, str$0); /*<>*/ fmt$0 = rest$15; break; @@ -31349,8 +30930,7 @@ /*<>*/ try{ var _E_ = - /*<>*/ caml_call2 - (CamlinternalFormat[14], s, fmtty), + /*<>*/ (0, CamlinternalFormat[14])(s, fmtty), fmt$3 = _E_; } catch(exn$0){ @@ -31375,28 +30955,19 @@ /*<>*/ try{ var fmt$6 = - /*<>*/ caml_call2 - (CamlinternalFormat[13], 0, s$0) - [1], + /*<>*/ (0, CamlinternalFormat[13])(0, s$0)[1], fmt$7 = - /*<>*/ caml_call2 - (CamlinternalFormat[13], 0, s$0) - [1], - _G_ = - /*<>*/ caml_call1 - (CamlinternalFormat[21], fmtty$0), + /*<>*/ (0, CamlinternalFormat[13])(0, s$0)[1], + _G_ = /*<>*/ (0, CamlinternalFormat[21])(fmtty$0), _H_ = - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _G_), + /*<>*/ (0, CamlinternalFormatBasics[2])(_G_), fmt$8 = - /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$7, _H_), + /*<>*/ (0, CamlinternalFormat[12])(fmt$7, _H_), _I_ = - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], fmtty$0), + /*<>*/ (0, CamlinternalFormatBasics[2]) + (fmtty$0), _J_ = - /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$6, _I_), + /*<>*/ (0, CamlinternalFormat[12])(fmt$6, _I_), fmt$5 = fmt$8, fmt$4 = _J_; } @@ -31414,25 +30985,24 @@ [0, fmt$4, s$0], /*<>*/ make_scanf (ib, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$5, rest$18), + /*<>*/ (0, CamlinternalFormatBasics[3]) + (fmt$5, rest$18), readers)] /*<>*/ ; case 15: - /*<>*/ return caml_call1 - (Stdlib[1], cst_scanf_bad_conversion_a) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_scanf_bad_conversion_a) /*<>*/ ; case 16: - /*<>*/ return caml_call1 - (Stdlib[1], cst_scanf_bad_conversion_t) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_scanf_bad_conversion_t) /*<>*/ ; case 17: var rest$19 = /*<>*/ fmt$0[2], formatting_lit = fmt$0[1], _K_ = - /*<>*/ caml_call1 - (CamlinternalFormat[17], formatting_lit); - /*<>*/ caml_call2 - (Stdlib_String[30], - function(_M_){ /*<>*/ return check_char(ib, _M_);}, + /*<>*/ (0, CamlinternalFormat[17]) + (formatting_lit); + /*<>*/ (0, Stdlib_String[30]) + (function(_M_){ /*<>*/ return check_char(ib, _M_);}, _K_); /*<>*/ fmt$0 = rest$19; break; @@ -31444,8 +31014,8 @@ /*<>*/ check_char(ib, 123); var fmt$10 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$9, rest$20); + /*<>*/ (0, CamlinternalFormatBasics[3]) + (fmt$9, rest$20); /*<>*/ fmt$0 = fmt$10; } else{ @@ -31454,16 +31024,16 @@ /*<>*/ check_char(ib, 91); var fmt$12 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$11, rest$21); + /*<>*/ (0, CamlinternalFormatBasics[3]) + (fmt$11, rest$21); /*<>*/ fmt$0 = fmt$12; } break; case 19: var fmt_rest = /*<>*/ fmt$0[1]; /*<>*/ if(! readers) - /*<>*/ return caml_call1 - (Stdlib[1], cst_scanf_missing_reader) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_scanf_missing_reader) /*<>*/ ; var readers_rest = /*<>*/ readers[2], reader = readers[1], @@ -31528,8 +31098,7 @@ rest$26 = /*<>*/ fmt$0[2], ign = fmt$0[1], fmt$13 = - /*<>*/ caml_call2 - (CamlinternalFormat[6], ign, rest$26) + /*<>*/ (0, CamlinternalFormat[6])(ign, rest$26) [1], match$3 = /*<>*/ make_scanf(ib, fmt$13, readers); /*<>*/ if(! match$3) @@ -31538,8 +31107,8 @@ var arg_rest = /*<>*/ match$3[2]; /*<>*/ return arg_rest; default: - /*<>*/ return caml_call1 - (Stdlib[1], cst_scanf_bad_conversion_custo) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_scanf_bad_conversion_custo) /*<>*/ ; } } } @@ -31552,18 +31121,17 @@ /*<>*/ return [0, x$0, make_scanf(ib, fmt, readers)] /*<>*/ ; } /*<>*/ if(prec) - /*<>*/ return caml_call1 - (Stdlib[1], cst_scanf_bad_conversion) /*<>*/ ; + /*<>*/ return (0, Stdlib[1])(cst_scanf_bad_conversion) /*<>*/ ; /*<>*/ caml_call3(scan, Stdlib[19], Stdlib[19], ib); var x = /*<>*/ caml_call1(token, ib); /*<>*/ return [0, x, make_scanf(ib, fmt, readers)] /*<>*/ ; } /*<>*/ if(0 !== pad[0]) - /*<>*/ return caml_call1 - (Stdlib[1], cst_scanf_bad_conversion$2) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_scanf_bad_conversion$2) /*<>*/ ; /*<>*/ if(! pad[1]) - /*<>*/ return caml_call1 - (Stdlib[1], cst_scanf_bad_conversion$1) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_scanf_bad_conversion$1) /*<>*/ ; var w = /*<>*/ pad[2]; if(typeof prec !== "number"){ var p$0 = prec[1]; @@ -31572,8 +31140,8 @@ /*<>*/ return [0, x$2, make_scanf(ib, fmt, readers)] /*<>*/ ; } /*<>*/ if(prec) - /*<>*/ return caml_call1 - (Stdlib[1], cst_scanf_bad_conversion$0) /*<>*/ ; + /*<>*/ return (0, Stdlib[1]) + (cst_scanf_bad_conversion$0) /*<>*/ ; /*<>*/ caml_call3(scan, w, Stdlib[19], ib); var x$1 = /*<>*/ caml_call1(token, ib); /*<>*/ return [0, x$1, make_scanf(ib, fmt, readers)] /*<>*/ ; @@ -31581,7 +31149,7 @@ function kscanf_gen(ib, ef, af, param){ var str = /*<>*/ param[2], fmt = param[1]; function k(readers, f$1){ - /*<>*/ caml_call1(Stdlib_Buffer[9], ib[8]); + /*<>*/ (0, Stdlib_Buffer[9])(ib[8]); /*<>*/ try{ var args$1 = /*<>*/ make_scanf(ib, fmt, readers); } @@ -31592,12 +31160,11 @@ if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); var msg = exc[2], - _z_ = /*<>*/ caml_call1(Stdlib_String[25], str), - _A_ = caml_call2(Stdlib[28], _z_, cst$0), - _B_ = - /*<>*/ caml_call2(Stdlib[28], cst_in_format, _A_), - _C_ = /*<>*/ caml_call2(Stdlib[28], msg, _B_); - /*<>*/ return caml_call1(Stdlib[1], _C_) /*<>*/ ; + _z_ = /*<>*/ (0, Stdlib_String[25])(str), + _A_ = (0, Stdlib[28])(_z_, cst$0), + _B_ = /*<>*/ (0, Stdlib[28])(cst_in_format, _A_), + _C_ = /*<>*/ (0, Stdlib[28])(msg, _B_); + /*<>*/ return (0, Stdlib[1])(_C_) /*<>*/ ; } /*<>*/ return caml_call2(ef, ib, exc) /*<>*/ ; } @@ -31664,9 +31231,7 @@ var str = /*<>*/ token_string(ib); /*<>*/ try{ var - _x_ = - /*<>*/ caml_call2 - (CamlinternalFormat[15], str, format), + _x_ = /*<>*/ (0, CamlinternalFormat[15])(str, format), fmt = _x_; } catch(exn$0){ @@ -31684,21 +31249,19 @@ } function format_from_string(s, fmt){ var - _v_ = /*<>*/ caml_call1(Stdlib_String[25], s), - _w_ = caml_call2(Stdlib[28], _v_, cst$1); + _v_ = /*<>*/ (0, Stdlib_String[25])(s), + _w_ = (0, Stdlib[28])(_v_, cst$1); /*<>*/ return /*<>*/ sscanf_format - ( /*<>*/ caml_call2(Stdlib[28], cst$2, _w_), + ( /*<>*/ (0, Stdlib[28])(cst$2, _w_), fmt, function(x){ /*<>*/ return x; /*<>*/ }) /*<>*/ ; } function unescaped(s){ - var _u_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); + var _u_ = /*<>*/ (0, Stdlib[28])(s, cst$3); /*<>*/ return /*<>*/ caml_call1 - (sscanf - ( /*<>*/ caml_call2(Stdlib[28], cst$4, _u_), - _t_), + (sscanf( /*<>*/ (0, Stdlib[28])(cst$4, _u_), _t_), function(x){ /*<>*/ return x; /*<>*/ }) /*<>*/ ; @@ -31739,6 +31302,7 @@ //# unitInfo: Provides: Stdlib__Callback //# unitInfo: Requires: Stdlib, Stdlib__Obj +//# shape: Stdlib__Callback:[F(2),F(2)] (function (globalThis){ "use strict"; @@ -31762,6 +31326,7 @@ //# unitInfo: Provides: CamlinternalOO //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Map, Stdlib__Obj, Stdlib__Sys +//# shape: CamlinternalOO:[F(1),F(1),F(2),F(3),F(2),F(2),F(2),F(2),F(2),F(3),F(2),F(4),F(1),F(2),N,F(1),F(1),F(6),F(2),F(3),F(1),F(1),F(1),F(2),F(2),F(3),F(2),F(2),N,F(1)] (function (globalThis){ "use strict"; @@ -31792,11 +31357,6 @@ ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); } - function caml_call5(f, a0, a1, a2, a3, a4){ - return (f.l >= 0 ? f.l : f.l = f.length) === 5 - ? f(a0, a1, a2, a3, a4) - : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); - } var global_data = runtime.caml_get_global_data(), Assert_failure = global_data.Assert_failure, @@ -31840,11 +31400,11 @@ /*<>*/ } var compare = /*<>*/ caml_string_compare, - Vars = caml_call1(Stdlib_Map[1], [0, compare]), + Vars = (0, Stdlib_Map[1])([0, compare]), compare$0 = caml_string_compare, - Meths = caml_call1(Stdlib_Map[1], [0, compare$0]), + Meths = (0, Stdlib_Map[1])([0, compare$0]), compare$1 = runtime.caml_int_compare, - Labs = caml_call1(Stdlib_Map[1], [0, compare$1]), + Labs = (0, Stdlib_Map[1])([0, compare$1]), dummy_table = [0, 0, [0, 0], Meths[1], Labs[1], 0, 0, Vars[1], 0], table_count = [0, 0], dummy_met = /*<>*/ caml_obj_block(0, 0), @@ -31910,8 +31470,8 @@ var new_buck = /*<>*/ caml_make_vect(new_size, dummy_met); - /*<>*/ caml_call5 - (Stdlib_Array[9], array[2], 0, new_buck, 0, old_size); + /*<>*/ (0, Stdlib_Array[9]) + (array[2], 0, new_buck, 0, old_size); /*<>*/ array[2] = new_buck; var _ac_ = 0; } @@ -31953,9 +31513,8 @@ } /*<>*/ } function get_method_labels(table, names){ - /*<>*/ return caml_call2 - (Stdlib_Array[14], - function(_Z_){ + /*<>*/ return (0, Stdlib_Array[14]) + (function(_Z_){ /*<>*/ return get_method_label (table, _Z_); }, @@ -31978,8 +31537,7 @@ /*<>*/ try{ var _X_ = - /*<>*/ caml_call2 - (Stdlib_List[49], label, table[6]); + /*<>*/ (0, Stdlib_List[49])(label, table[6]); return _X_; } catch(_Y_){ @@ -31994,8 +31552,7 @@ function to_list(arr){ /*<>*/ return 0 === arr ? 0 - : /*<>*/ caml_call1 - (Stdlib_Array[10], arr) /*<>*/ ; + : /*<>*/ (0, Stdlib_Array[10])(arr) /*<>*/ ; } function narrow(table, vars, virt_meths, concr_meths){ var @@ -32003,17 +31560,15 @@ virt_meths$0 = /*<>*/ to_list(virt_meths), concr_meths$0 = /*<>*/ to_list(concr_meths), virt_meth_labs = - /*<>*/ caml_call2 - (Stdlib_List[20], - function(_V_){ + /*<>*/ (0, Stdlib_List[20]) + (function(_V_){ /*<>*/ return get_method_label (table, _V_); }, virt_meths$0), concr_meth_labs = - /*<>*/ caml_call2 - (Stdlib_List[20], - function(_U_){ + /*<>*/ (0, Stdlib_List[20]) + (function(_U_){ /*<>*/ return get_method_label (table, _U_); }, @@ -32026,8 +31581,8 @@ caml_call3 (Vars[24], function(lab, info, tvars){ - /*<>*/ return caml_call2 - (Stdlib_List[37], lab, vars$0) + /*<>*/ return (0, Stdlib_List[37]) + (lab, vars$0) ? /*<>*/ caml_call3 (Vars[2], lab, info, tvars) : tvars /*<>*/ ; @@ -32037,9 +31592,8 @@ var by_name = /*<>*/ [0, Meths[1]], by_label = /*<>*/ [0, Labs[1]]; - /*<>*/ caml_call3 - (Stdlib_List[28], - function(met, label){ + /*<>*/ (0, Stdlib_List[28]) + (function(met, label){ /*<>*/ by_name[1] = caml_call3(Meths[2], met, label, by_name[1]); var _P_ = /*<>*/ by_label[1]; @@ -32061,9 +31615,8 @@ }, concr_meths$0, concr_meth_labs); - /*<>*/ caml_call3 - (Stdlib_List[28], - function(met, label){ + /*<>*/ (0, Stdlib_List[28]) + (function(met, label){ /*<>*/ by_name[1] = caml_call3(Meths[2], met, label, by_name[1]); /*<>*/ by_label[1] = @@ -32075,12 +31628,11 @@ /*<>*/ table[3] = by_name[1]; /*<>*/ table[4] = by_label[1]; /*<>*/ table[6] = - caml_call3 - (Stdlib_List[27], - function(met, hm){ + (0, Stdlib_List[27]) + (function(met, hm){ var lab = /*<>*/ met[1]; - /*<>*/ return caml_call2 - (Stdlib_List[37], lab, virt_meth_labs) + /*<>*/ return (0, Stdlib_List[37]) + (lab, virt_meth_labs) ? hm : [0, met, hm] /*<>*/ ; }, @@ -32090,20 +31642,17 @@ } function widen(table){ var - match = - /*<>*/ caml_call1(Stdlib_List[6], table[5]), + match = /*<>*/ (0, Stdlib_List[6])(table[5]), vars = /*<>*/ match[6], virt_meths = match[5], saved_vars = match[4], saved_hidden_meths = match[3], by_label = match[2], by_name = match[1]; - /*<>*/ table[5] = - caml_call1(Stdlib_List[7], table[5]); + /*<>*/ table[5] = (0, Stdlib_List[7])(table[5]); /*<>*/ table[7] = - caml_call3 - (Stdlib_List[26], - function(s, v){ + (0, Stdlib_List[26]) + (function(s, v){ var _O_ = /*<>*/ caml_call2(Vars[17], v, table[7]); @@ -32115,12 +31664,11 @@ /*<>*/ table[3] = by_name; /*<>*/ table[4] = by_label; /*<>*/ table[6] = - caml_call3 - (Stdlib_List[27], - function(met, hm){ + (0, Stdlib_List[27]) + (function(met, hm){ var lab = /*<>*/ met[1]; - /*<>*/ return caml_call2 - (Stdlib_List[37], lab, virt_meths) + /*<>*/ return (0, Stdlib_List[37]) + (lab, virt_meths) ? hm : [0, met, hm] /*<>*/ ; }, @@ -32209,9 +31757,8 @@ } /*<>*/ } function get_variables(table, names){ - /*<>*/ return caml_call2 - (Stdlib_Array[14], - function(_y_){ + /*<>*/ return (0, Stdlib_Array[14]) + (function(_y_){ /*<>*/ return get_variable (table, _y_); }, @@ -32226,12 +31773,11 @@ /*<>*/ return new_table([0]) /*<>*/ ; var tags = - /*<>*/ caml_call2 - (Stdlib_Array[14], public_method_label, public_methods), + /*<>*/ (0, Stdlib_Array[14]) + (public_method_label, public_methods), table = /*<>*/ new_table(tags); - /*<>*/ caml_call2 - (Stdlib_Array[13], - function(i, met){ + /*<>*/ (0, Stdlib_Array[13]) + (function(i, met){ var lab = /*<>*/ (i * 2 | 0) + 2 | 0; /*<>*/ table[3] = caml_call3(Meths[2], met, lab, table[3]); @@ -32246,7 +31792,7 @@ /*<>*/ inst_var_count[1] = (inst_var_count[1] + table[1] | 0) - 1 | 0; /*<>*/ table[8] = - caml_call1(Stdlib_List[10], table[8]); + (0, Stdlib_List[10])(table[8]); var _x_ = /*<>*/ Stdlib_Sys[9]; return /*<>*/ resize (table, @@ -32275,9 +31821,8 @@ _s_ = /*<>*/ to_array(concr_meths), _t_ = /*<>*/ [0, - caml_call2 - (Stdlib_Array[14], - function(nm){ + (0, Stdlib_Array[14]) + (function(nm){ /*<>*/ return /*<>*/ get_method (cla, /*<>*/ get_method_label(cla, nm)) /*<>*/ ; @@ -32289,14 +31834,13 @@ /*<>*/ [0, [0, init], [0, - caml_call2 - (Stdlib_Array[14], - function(_w_){ + (0, Stdlib_Array[14]) + (function(_w_){ /*<>*/ return get_variable(cla, _w_); }, _u_), _t_]]; - /*<>*/ return caml_call1(Stdlib_Array[5], _v_) /*<>*/ ; + /*<>*/ return (0, Stdlib_Array[5])(_v_) /*<>*/ ; } function make_class(pub_meths, class_init){ var @@ -32891,6 +32435,7 @@ //# unitInfo: Provides: Stdlib__Oo //# unitInfo: Requires: CamlinternalOO +//# shape: Stdlib__Oo:[F(1),F(1),F(1)] (function (globalThis){ "use strict"; @@ -32909,6 +32454,7 @@ //# unitInfo: Provides: CamlinternalMod //# unitInfo: Requires: CamlinternalLazy, CamlinternalOO, Stdlib, Stdlib__Obj +//# shape: CamlinternalMod:[F(2),F(3)] (function (globalThis){ "use strict"; @@ -32977,15 +32523,16 @@ var _j_ = /*<>*/ caml_obj_tag(l); if(250 === _j_) return l[1]; if(246 !== _j_ && 244 !== _j_) return l; - return caml_call1(CamlinternalLazy[2], l); + return (0, CamlinternalLazy[2])(l); }]); var init = /*<>*/ l; break; default: var init = - /*<>*/ /*<>*/ caml_call1 - (CamlinternalOO[21], loc); + /*<>*/ /*<>*/ (0, + CamlinternalOO[21]) + (loc); } else if(0 === shape[0]) var @@ -33011,8 +32558,8 @@ var comps = shape[1]; /*<>*/ return init_mod_block(loc, comps) /*<>*/ ; } - /*<>*/ return caml_call1 - (Stdlib[2], cst_CamlinternalMod_init_mod_n) /*<>*/ ; + /*<>*/ return (0, Stdlib[2]) + (cst_CamlinternalMod_init_mod_n) /*<>*/ ; } function update_mod_block(comps$0, modu, n){ /*<>*/ if @@ -33070,8 +32617,8 @@ var comps = shape[1]; /*<>*/ return update_mod_block(comps, o, n) /*<>*/ ; } - /*<>*/ return caml_call1 - (Stdlib[2], cst_CamlinternalMod_update_mod) /*<>*/ ; + /*<>*/ return (0, Stdlib[2]) + (cst_CamlinternalMod_update_mod) /*<>*/ ; } var CamlinternalMod = /*<>*/ [0, init_mod, update_mod]; runtime.caml_register_global(8, CamlinternalMod, "CamlinternalMod"); @@ -33081,6 +32628,7 @@ //# unitInfo: Provides: Stdlib__Ephemeron //# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Array, Stdlib__Hashtbl, Stdlib__Int, Stdlib__List, Stdlib__Obj, Stdlib__Random, Stdlib__Seq, Stdlib__Sys +//# shape: Stdlib__Ephemeron:[N,N,N] (function (globalThis){ "use strict"; @@ -33129,7 +32677,7 @@ random = /*<>*/ opt ? opt[1] - : /*<>*/ caml_call1(Stdlib_Hashtbl[17], 0); + : /*<>*/ (0, Stdlib_Hashtbl[17])(0); a: b: { @@ -33149,7 +32697,7 @@ var _as_ = prng[1]; else{ if(246 !== _ar_ && 244 !== _ar_){var _as_ = prng; break a;} - var _as_ = caml_call1(CamlinternalLazy[2], prng); + var _as_ = (0, CamlinternalLazy[2])(prng); } var seed = @@ -33191,7 +32739,7 @@ var _al_ = /*<>*/ h[4], _am_ = h[3], - _an_ = caml_call1(Stdlib_Array[7], h[2]); + _an_ = (0, Stdlib_Array[7])(h[2]); /*<>*/ return [0, h[1], _an_, _am_, _al_]; /*<>*/ } function key_index(h, hkey){ @@ -33518,19 +33066,16 @@ function stats(h){ var mbl = - /*<>*/ caml_call3 - (Stdlib_Array[18], - function(m, b){ + /*<>*/ (0, Stdlib_Array[18]) + (function(m, b){ var _T_ = /*<>*/ bucket_length(0, b); - /*<>*/ return caml_call2 - (Stdlib_Int[11], m, _T_); + /*<>*/ return (0, Stdlib_Int[11])(m, _T_); }, 0, h[2]), histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0); - /*<>*/ caml_call2 - (Stdlib_Array[12], - function(b){ + /*<>*/ (0, Stdlib_Array[12]) + (function(b){ var l = /*<>*/ bucket_length(0, b); /*<>*/ histo[1 + l] = caml_check_bound(histo, l)[1 + l] + 1 | 0; @@ -33563,19 +33108,16 @@ var size = /*<>*/ [0, 0], mbl = - /*<>*/ caml_call3 - (Stdlib_Array[18], - function(m, b){ + /*<>*/ (0, Stdlib_Array[18]) + (function(m, b){ var _S_ = /*<>*/ bucket_length_alive(0, b); - /*<>*/ return caml_call2 - (Stdlib_Int[11], m, _S_); + /*<>*/ return (0, Stdlib_Int[11])(m, _S_); }, 0, h[2]), histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0); - /*<>*/ caml_call2 - (Stdlib_Array[12], - function(b){ + /*<>*/ (0, Stdlib_Array[12]) + (function(b){ var l = /*<>*/ bucket_length_alive(0, b); /*<>*/ size[1] = size[1] + l | 0; /*<>*/ histo[1 + l] = @@ -33590,18 +33132,16 @@ histo]; /*<>*/ } function add_seq(tbl, i){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(param){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return add(tbl, k, v) /*<>*/ ; }, i) /*<>*/ ; } function replace_seq(tbl, i){ - /*<>*/ return caml_call2 - (Stdlib_Seq[4], - function(param){ + /*<>*/ return (0, Stdlib_Seq[4]) + (function(param){ var v = /*<>*/ param[2], k = param[1]; /*<>*/ return replace(tbl, k, v) /*<>*/ ; }, @@ -33772,7 +33312,7 @@ /*<>*/ return 0; var h = /*<>*/ l[1], t = l[2]; /*<>*/ if(test_key(k, h)){ - /*<>*/ b[1] = caml_call2(Stdlib_List[13], acc, t); + /*<>*/ b[1] = (0, Stdlib_List[13])(acc, t); /*<>*/ return 0; } var @@ -33785,9 +33325,8 @@ function find(b, k){ var match = - /*<>*/ caml_call2 - (Stdlib_List[40], - function(_P_){ /*<>*/ return test_key(k, _P_);}, + /*<>*/ (0, Stdlib_List[40]) + (function(_P_){ /*<>*/ return test_key(k, _P_);}, b[1]); /*<>*/ if(! match) /*<>*/ return 0; @@ -33795,7 +33334,7 @@ /*<>*/ return get_data(e) /*<>*/ ; } function length(b){ - /*<>*/ return caml_call1(Stdlib_List[1], b[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_List[1])(b[1]) /*<>*/ ; } function clear(b){ /*<>*/ b[1] = 0; @@ -33990,7 +33529,7 @@ /*<>*/ return 0; var h = /*<>*/ l[1], t = l[2]; /*<>*/ if(test_keys(k1, k2, h)){ - /*<>*/ b[1] = caml_call2(Stdlib_List[13], acc, t); + /*<>*/ b[1] = (0, Stdlib_List[13])(acc, t); /*<>*/ return 0; } var @@ -34003,9 +33542,8 @@ function find$0(b, k1, k2){ var match = - /*<>*/ caml_call2 - (Stdlib_List[40], - function(_K_){ + /*<>*/ (0, Stdlib_List[40]) + (function(_K_){ /*<>*/ return test_keys(k1, k2, _K_); }, b[1]); @@ -34015,7 +33553,7 @@ /*<>*/ return get_data$0(e) /*<>*/ ; } function length$0(b){ - /*<>*/ return caml_call1(Stdlib_List[1], b[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_List[1])(b[1]) /*<>*/ ; } function clear$0(b){ /*<>*/ b[1] = 0; @@ -34294,7 +33832,7 @@ /*<>*/ return 0; var h = /*<>*/ l[1], t = l[2]; /*<>*/ if(test_keys$0(k, h)){ - /*<>*/ b[1] = caml_call2(Stdlib_List[13], acc, t); + /*<>*/ b[1] = (0, Stdlib_List[13])(acc, t); /*<>*/ return 0; } var @@ -34307,9 +33845,8 @@ function find$1(b, k){ var match = - /*<>*/ caml_call2 - (Stdlib_List[40], - function(_d_){ + /*<>*/ (0, Stdlib_List[40]) + (function(_d_){ /*<>*/ return test_keys$0(k, _d_); }, b[1]); @@ -34319,7 +33856,7 @@ /*<>*/ return get_data$1(e) /*<>*/ ; } function length$2(b){ - /*<>*/ return caml_call1(Stdlib_List[1], b[1]) /*<>*/ ; + /*<>*/ return (0, Stdlib_List[1])(b[1]) /*<>*/ ; } function clear$1(b){ /*<>*/ b[1] = 0; @@ -34353,6 +33890,7 @@ //# unitInfo: Provides: Stdlib__Filename //# unitInfo: Requires: Stdlib, Stdlib__Buffer, Stdlib__Domain, Stdlib__List, Stdlib__Printf, Stdlib__Random, Stdlib__String, Stdlib__Sys +//# shape: Stdlib__Filename:[N,N,N,F(2),F(1),F(1),F(2),F(2),F(2),F(1),F(1),F(1),F(1),F(1),N,F(3),F(5),F(4),F(1),F(1),F(1),F(5)] (function (globalThis){ "use strict"; @@ -34394,11 +33932,6 @@ ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); } - function caml_call4(f, a0, a1, a2, a3){ - return (f.l >= 0 ? f.l : f.l = f.length) === 4 - ? f(a0, a1, a2, a3) - : runtime.caml_call_gen(f, [a0, a1, a2, a3]); - } var global_data = runtime.caml_get_global_data(), cst$18 = cst$19, @@ -34450,8 +33983,7 @@ n = n$3; for(;;){ /*<>*/ if(0 > n) - /*<>*/ return caml_call3 - (Stdlib_String[16], name, 0, 1) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[16])(name, 0, 1) /*<>*/ ; /*<>*/ if(! caml_call2(is_dir_sep, name, n)) break; var n$0 = /*<>*/ n - 1 | 0; n = n$0; @@ -34459,11 +33991,10 @@ var p = /*<>*/ n + 1 | 0, n$1 = n; for(;;){ /*<>*/ if(0 > n$1) - /*<>*/ return caml_call3 - (Stdlib_String[16], name, 0, p) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[16])(name, 0, p) /*<>*/ ; /*<>*/ if(caml_call2(is_dir_sep, name, n$1)) - /*<>*/ return caml_call3 - (Stdlib_String[16], name, n$1 + 1 | 0, (p - n$1 | 0) - 1 | 0) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[16]) + (name, n$1 + 1 | 0, (p - n$1 | 0) - 1 | 0) /*<>*/ ; var n$2 = /*<>*/ n$1 - 1 | 0; n$1 = n$2; } @@ -34476,8 +34007,7 @@ n = n$5; for(;;){ /*<>*/ if(0 > n) - /*<>*/ return caml_call3 - (Stdlib_String[16], name, 0, 1) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[16])(name, 0, 1) /*<>*/ ; /*<>*/ if(! caml_call2(is_dir_sep, name, n)) break; var n$0 = /*<>*/ n - 1 | 0; n = n$0; @@ -34493,11 +34023,10 @@ var n$3 = /*<>*/ n$1; for(;;){ /*<>*/ if(0 > n$3) - /*<>*/ return caml_call3 - (Stdlib_String[16], name, 0, 1) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[16])(name, 0, 1) /*<>*/ ; /*<>*/ if(! caml_call2(is_dir_sep, name, n$3)) - /*<>*/ return caml_call3 - (Stdlib_String[16], name, 0, n$3 + 1 | 0) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[16]) + (name, 0, n$3 + 1 | 0) /*<>*/ ; var n$4 = /*<>*/ n$3 - 1 | 0; n$3 = n$4; } @@ -34507,44 +34036,43 @@ /*<>*/ } function is_relative(n){ var - _aH_ = /*<>*/ caml_ml_string_length(n) < 1 ? 1 : 0, - _aI_ = - _aH_ + _aG_ = /*<>*/ caml_ml_string_length(n) < 1 ? 1 : 0, + _aH_ = + _aG_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - /*<>*/ return _aI_; + /*<>*/ return _aH_; /*<>*/ } function is_implicit(n){ - var _aC_ = /*<>*/ is_relative(n); - /*<>*/ if(_aC_){ + var _aB_ = /*<>*/ is_relative(n); + /*<>*/ if(_aB_){ var - _aD_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aE_ = - _aD_ + _aC_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aD_ = + _aC_ || - ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2) + ( /*<>*/ (0, Stdlib_String[16])(n, 0, 2) !== cst$27 ? 1 : 0); - /*<>*/ if(_aE_) + /*<>*/ if(_aD_) var - _aF_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aG_ = - _aF_ + _aE_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aF_ = + _aE_ || - ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 3) + ( /*<>*/ (0, Stdlib_String[16])(n, 0, 3) !== cst$28 ? 1 : 0); else - var _aG_ = /*<>*/ _aE_; + var _aF_ = /*<>*/ _aD_; } else - var _aG_ = _aC_; - return _aG_; + var _aF_ = _aB_; + return _aF_; /*<>*/ } function check_suffix(name, suff){ - /*<>*/ return caml_call2 - (Stdlib_String[12], suff, name) /*<>*/ ; + /*<>*/ return (0, Stdlib_String[12])(suff, name) /*<>*/ ; } function chop_suffix_opt(suffix, filename){ var @@ -34554,19 +34082,19 @@ /*<>*/ return 0; var r = - /*<>*/ caml_call3 - (Stdlib_String[16], filename, len_f - len_s | 0, len_s); + /*<>*/ (0, Stdlib_String[16]) + (filename, len_f - len_s | 0, len_s); /*<>*/ return r === suffix ? [0, - /*<>*/ caml_call3 - (Stdlib_String[16], filename, 0, len_f - len_s | 0)] + /*<>*/ (0, Stdlib_String[16]) + (filename, 0, len_f - len_s | 0)] : 0 /*<>*/ ; } var dummy = /*<>*/ 0, - _h_ = [0, 7, 0], - _g_ = [0, 1, [0, 3, [0, 5, 0]]], - _f_ = [0, [2, 0, [4, 6, [0, 2, 6], 0, [2, 0, 0]]], "%s%06x%s"], + _g_ = [0, 7, 0], + _f_ = [0, 1, [0, 3, [0, 5, 0]]], + _e_ = [0, [2, 0, [4, 6, [0, 2, 6], 0, [2, 0, 0]]], "%s%06x%s"], cst_Filename_chop_extension = "Filename.chop_extension", cst_Filename_chop_suffix = "Filename.chop_suffix", _d_ = [0, cst$20, 0], @@ -34579,87 +34107,88 @@ cst_tmp = "/tmp"; try{ var - _j_ = /*<>*/ caml_sys_getenv("TMPDIR"), - temp_dir_name = _j_; + _i_ = /*<>*/ caml_sys_getenv("TMPDIR"), + temp_dir_name = _i_; } - catch(_aB_){ - var _a_ = /*<>*/ caml_wrap_exception(_aB_); + catch(_aA_){ + var _a_ = /*<>*/ caml_wrap_exception(_aA_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = /*<>*/ cst_tmp; } function quote(s){ var l = /*<>*/ caml_ml_string_length(s), - b = /*<>*/ caml_call1(Stdlib_Buffer[1], l + 20 | 0); - /*<>*/ caml_call2(Stdlib_Buffer[12], b, 39); - var _ay_ = /*<>*/ l - 1 | 0, _ax_ = 0; - if(_ay_ >= 0){ - var i = _ax_; + b = /*<>*/ (0, Stdlib_Buffer[1])(l + 20 | 0); + /*<>*/ (0, Stdlib_Buffer[12])(b, 39); + var _ax_ = /*<>*/ l - 1 | 0, _aw_ = 0; + if(_ax_ >= 0){ + var i = _aw_; for(;;){ /*<>*/ if(39 === caml_string_get(s, i)) - /*<>*/ caml_call2(Stdlib_Buffer[16], b, quotequote); + /*<>*/ (0, Stdlib_Buffer[16])(b, quotequote); else{ - var _aA_ = /*<>*/ caml_string_get(s, i); - /*<>*/ caml_call2(Stdlib_Buffer[12], b, _aA_); + var _az_ = /*<>*/ caml_string_get(s, i); + /*<>*/ (0, Stdlib_Buffer[12])(b, _az_); } - var _az_ = /*<>*/ i + 1 | 0; - if(_ay_ === i) break; - i = _az_; + var _ay_ = /*<>*/ i + 1 | 0; + if(_ax_ === i) break; + i = _ay_; } } - /*<>*/ caml_call2(Stdlib_Buffer[12], b, 39); - /*<>*/ return caml_call1(Stdlib_Buffer[2], b); + /*<>*/ (0, Stdlib_Buffer[12])(b, 39); + /*<>*/ return (0, Stdlib_Buffer[2])(b); } function quote_command(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if(caml_equal(stderr, stdout)) - var _am_ = /*<>*/ cst_2_1; + var _al_ = /*<>*/ cst_2_1; else var - _aw_ = /*<>*/ quote(f), - _am_ = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_2, _aw_); - var _an_ = /*<>*/ _am_; + _av_ = /*<>*/ quote(f), + _al_ = + /*<>*/ /*<>*/ (0, + Stdlib[28]) + (cst_2, _av_); + var _am_ = /*<>*/ _al_; } else - var _an_ = /*<>*/ cst$4; + var _am_ = /*<>*/ cst$4; /*<>*/ if(stdout) var f$0 = stdout[1], - _ao_ = /*<>*/ quote(f$0), - _ap_ = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst, _ao_); + _an_ = /*<>*/ quote(f$0), + _ao_ = + /*<>*/ /*<>*/ (0, + Stdlib[28]) + (cst, _an_); else - var _ap_ = /*<>*/ cst$3; - var _aq_ = /*<>*/ caml_call2(Stdlib[28], _ap_, _an_); + var _ao_ = /*<>*/ cst$3; + var _ap_ = /*<>*/ (0, Stdlib[28])(_ao_, _am_); /*<>*/ if(stdin) var f$1 = stdin[1], - _ar_ = /*<>*/ quote(f$1), - _as_ = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst$0, _ar_); + _aq_ = /*<>*/ quote(f$1), + _ar_ = + /*<>*/ /*<>*/ (0, + Stdlib[28]) + (cst$0, _aq_); else - var _as_ = /*<>*/ cst$2; + var _ar_ = /*<>*/ cst$2; var - _at_ = /*<>*/ caml_call2(Stdlib[28], _as_, _aq_), - _au_ = - /*<>*/ caml_call2 - (Stdlib_List[20], quote, [0, cmd, args]), - _av_ = - /*<>*/ caml_call2(Stdlib_String[7], cst$1, _au_); - /*<>*/ return caml_call2(Stdlib[28], _av_, _at_) /*<>*/ ; + _as_ = /*<>*/ (0, Stdlib[28])(_ar_, _ap_), + _at_ = + /*<>*/ (0, Stdlib_List[20])(quote, [0, cmd, args]), + _au_ = /*<>*/ (0, Stdlib_String[7])(cst$1, _at_); + /*<>*/ return (0, Stdlib[28])(_au_, _as_) /*<>*/ ; } - function basename(_al_){ + function basename(_ak_){ /*<>*/ return generic_basename - (is_dir_sep, current_dir_name, _al_); + (is_dir_sep, current_dir_name, _ak_); } - function dirname(_ak_){ + function dirname(_aj_){ /*<>*/ return generic_dirname - (is_dir_sep, current_dir_name, _ak_); + (is_dir_sep, current_dir_name, _aj_); } var Unix = @@ -34681,121 +34210,120 @@ function is_dir_sep$0(s, i){ var c = /*<>*/ caml_string_get(s, i), - _ah_ = /*<>*/ 47 === c ? 1 : 0; - if(_ah_) - var _ai_ = _ah_; + _ag_ = /*<>*/ 47 === c ? 1 : 0; + if(_ag_) + var _ah_ = _ag_; else - var _aj_ = 92 === c ? 1 : 0, _ai_ = _aj_ || (58 === c ? 1 : 0); - return _ai_; + var _ai_ = 92 === c ? 1 : 0, _ah_ = _ai_ || (58 === c ? 1 : 0); + return _ah_; /*<>*/ } function is_relative$0(n){ var - _ab_ = /*<>*/ caml_ml_string_length(n) < 1 ? 1 : 0, - _ac_ = - _ab_ + _aa_ = /*<>*/ caml_ml_string_length(n) < 1 ? 1 : 0, + _ab_ = + _aa_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - /*<>*/ if(_ac_){ + /*<>*/ if(_ab_){ var - _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ae_ = - _ad_ + _ac_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ad_ = + _ac_ || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - /*<>*/ if(_ae_) + /*<>*/ if(_ad_) var - _af_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _ag_ = - _af_ + _ae_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _af_ = + _ae_ || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _ag_ = /*<>*/ _ae_; + var _af_ = /*<>*/ _ad_; } else - var _ag_ = _ac_; - return _ag_; + var _af_ = _ab_; + return _af_; /*<>*/ } function is_implicit$0(n){ - var _U_ = /*<>*/ is_relative$0(n); - /*<>*/ if(_U_){ + var _T_ = /*<>*/ is_relative$0(n); + /*<>*/ if(_T_){ var - _V_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _W_ = - _V_ + _U_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _V_ = + _U_ || - ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2) + ( /*<>*/ (0, Stdlib_String[16])(n, 0, 2) !== cst$27 ? 1 : 0); - /*<>*/ if(_W_){ + /*<>*/ if(_V_){ var - _X_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Y_ = - _X_ + _W_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _X_ = + _W_ || - ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2) + ( /*<>*/ (0, Stdlib_String[16])(n, 0, 2) !== ".\\" ? 1 : 0); - /*<>*/ if(_Y_){ + /*<>*/ if(_X_){ var - _Z_ = caml_ml_string_length(n) < 3 ? 1 : 0, - ___ = - _Z_ + _Y_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _Z_ = + _Y_ || - ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 3) + ( /*<>*/ (0, Stdlib_String[16])(n, 0, 3) !== cst$28 ? 1 : 0); - /*<>*/ if(___) + /*<>*/ if(_Z_) var - _$_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aa_ = - _$_ + ___ = caml_ml_string_length(n) < 3 ? 1 : 0, + _$_ = + ___ || - ( /*<>*/ caml_call3 - (Stdlib_String[16], n, 0, 3) + ( /*<>*/ (0, Stdlib_String[16])(n, 0, 3) !== "..\\" ? 1 : 0); else - var _aa_ = /*<>*/ ___; + var _$_ = /*<>*/ _Z_; } else - var _aa_ = _Y_; + var _$_ = _X_; } else - var _aa_ = _W_; + var _$_ = _V_; } else - var _aa_ = _U_; - return _aa_; + var _$_ = _T_; + return _$_; /*<>*/ } function check_suffix$0(name, suff){ var - _R_ = + _Q_ = /*<>*/ caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_R_) + if(_Q_) var s = - /*<>*/ caml_call3 - (Stdlib_String[16], - name, + /*<>*/ (0, Stdlib_String[16]) + (name, /*<>*/ caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - _S_ = /*<>*/ caml_call1(Stdlib_String[27], suff), - _T_ = - /*<>*/ /*<>*/ caml_call1 - (Stdlib_String[27], s) - === _S_ + _R_ = /*<>*/ (0, Stdlib_String[27])(suff), + _S_ = + /*<>*/ /*<>*/ (0, + Stdlib_String[27]) + (s) + === _R_ ? 1 : 0; else - var _T_ = /*<>*/ _R_; - return _T_; + var _S_ = /*<>*/ _Q_; + return _S_; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ var @@ -34805,51 +34333,51 @@ /*<>*/ return 0; var r = - /*<>*/ caml_call3 - (Stdlib_String[16], filename, len_f - len_s | 0, len_s), - _Q_ = /*<>*/ caml_call1(Stdlib_String[27], suffix); - /*<>*/ return caml_call1(Stdlib_String[27], r) === _Q_ + /*<>*/ (0, Stdlib_String[16]) + (filename, len_f - len_s | 0, len_s), + _P_ = /*<>*/ (0, Stdlib_String[27])(suffix); + /*<>*/ return (0, Stdlib_String[27])(r) === _P_ ? [0, - /*<>*/ caml_call3 - (Stdlib_String[16], filename, 0, len_f - len_s | 0)] + /*<>*/ (0, Stdlib_String[16]) + (filename, 0, len_f - len_s | 0)] : 0 /*<>*/ ; } /*<>*/ try{ var - _i_ = /*<>*/ caml_sys_getenv("TEMP"), - temp_dir_name$0 = _i_; + _h_ = /*<>*/ caml_sys_getenv("TEMP"), + temp_dir_name$0 = _h_; } - catch(_P_){ - var _b_ = /*<>*/ caml_wrap_exception(_P_); + catch(_O_){ + var _b_ = /*<>*/ caml_wrap_exception(_O_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = /*<>*/ cst$5; } function quote$0(s){ var l = /*<>*/ caml_ml_string_length(s), - b = /*<>*/ caml_call1(Stdlib_Buffer[1], l + 20 | 0); - /*<>*/ caml_call2(Stdlib_Buffer[12], b, 34); + b = /*<>*/ (0, Stdlib_Buffer[1])(l + 20 | 0); + /*<>*/ (0, Stdlib_Buffer[12])(b, 34); function loop$0(counter, i){ var i$0 = /*<>*/ i; for(;;){ if(i$0 === l) - /*<>*/ return caml_call2(Stdlib_Buffer[12], b, 34) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[12])(b, 34) /*<>*/ ; var c = /*<>*/ caml_string_get(s, i$0); /*<>*/ if(34 === c){ - var _N_ = /*<>*/ 0; + var _M_ = /*<>*/ 0; if(counter >= 50) - return caml_trampoline_return(loop_bs, [0, _N_, i$0]) /*<>*/ ; + return caml_trampoline_return(loop_bs, [0, _M_, i$0]) /*<>*/ ; var counter$1 = /*<>*/ counter + 1 | 0; - return loop_bs(counter$1, _N_, i$0) /*<>*/ ; + return loop_bs(counter$1, _M_, i$0) /*<>*/ ; } /*<>*/ if(92 === c){ - var _O_ = /*<>*/ 0; + var _N_ = /*<>*/ 0; if(counter >= 50) - return caml_trampoline_return(loop_bs, [0, _O_, i$0]) /*<>*/ ; + return caml_trampoline_return(loop_bs, [0, _N_, i$0]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return loop_bs(counter$0, _O_, i$0) /*<>*/ ; + return loop_bs(counter$0, _N_, i$0) /*<>*/ ; } - /*<>*/ caml_call2(Stdlib_Buffer[12], b, c); + /*<>*/ (0, Stdlib_Buffer[12])(b, c); var i$1 = /*<>*/ i$0 + 1 | 0; i$0 = i$1; } @@ -34862,18 +34390,18 @@ var n$0 = /*<>*/ n, i$0 = i; for(;;){ if(i$0 === l){ - /*<>*/ caml_call2(Stdlib_Buffer[12], b, 34); + /*<>*/ (0, Stdlib_Buffer[12])(b, 34); /*<>*/ return add_bs(n$0) /*<>*/ ; } var match = /*<>*/ caml_string_get(s, i$0); /*<>*/ if(34 === match){ /*<>*/ add_bs((2 * n$0 | 0) + 1 | 0); - /*<>*/ caml_call2(Stdlib_Buffer[12], b, 34); - var _M_ = /*<>*/ i$0 + 1 | 0; + /*<>*/ (0, Stdlib_Buffer[12])(b, 34); + var _L_ = /*<>*/ i$0 + 1 | 0; if(counter >= 50) - return caml_trampoline_return(loop$0, [0, _M_]) /*<>*/ ; + return caml_trampoline_return(loop$0, [0, _L_]) /*<>*/ ; var counter$1 = /*<>*/ counter + 1 | 0; - return loop$0(counter$1, _M_) /*<>*/ ; + return loop$0(counter$1, _L_) /*<>*/ ; } /*<>*/ if(92 !== match){ /*<>*/ add_bs(n$0); @@ -34888,95 +34416,96 @@ } /*<>*/ } function add_bs(n){ - var _K_ = /*<>*/ 1; + var _J_ = /*<>*/ 1; if(n >= 1){ - var j = _K_; + var j = _J_; for(;;){ - /*<>*/ caml_call2(Stdlib_Buffer[12], b, 92); - var _L_ = /*<>*/ j + 1 | 0; + /*<>*/ (0, Stdlib_Buffer[12])(b, 92); + var _K_ = /*<>*/ j + 1 | 0; if(n === j) break; - j = _L_; + j = _K_; } } /*<>*/ } /*<>*/ loop(0); - /*<>*/ return caml_call1(Stdlib_Buffer[2], b) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[2])(b) /*<>*/ ; } function quote_cmd_filename(f){ /*<>*/ if (! - caml_call2 - (Stdlib_String[23], - function(param){ + (0, Stdlib_String[23]) + (function(param){ /*<>*/ if(34 !== param && 37 !== param) /*<>*/ return 0; /*<>*/ return 1; /*<>*/ }, f)) - /*<>*/ return caml_call2(Stdlib_String[15], f, 32) - ? /*<>*/ caml_call2 - (Stdlib_String[7], cst$7, [0, cst$6, [0, f, _c_]]) + /*<>*/ return (0, Stdlib_String[15])(f, 32) + ? /*<>*/ (0, + Stdlib_String[7]) + (cst$7, [0, cst$6, [0, f, _c_]]) : f /*<>*/ ; var - _J_ = - /*<>*/ caml_call2 - (Stdlib[28], cst_Filename_quote_command_bad, f); - /*<>*/ return caml_call1(Stdlib[2], _J_) /*<>*/ ; + _I_ = + /*<>*/ (0, Stdlib[28]) + (cst_Filename_quote_command_bad, f); + /*<>*/ return (0, Stdlib[2])(_I_) /*<>*/ ; } function quote_command$0(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if(caml_equal(stderr, stdout)) - var _w_ = /*<>*/ cst_2_1$0; + var _v_ = /*<>*/ cst_2_1$0; else var - _H_ = /*<>*/ quote_cmd_filename(f), - _w_ = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_2$0, _H_); - var _x_ = /*<>*/ _w_; + _G_ = /*<>*/ quote_cmd_filename(f), + _v_ = + /*<>*/ /*<>*/ (0, + Stdlib[28]) + (cst_2$0, _G_); + var _w_ = /*<>*/ _v_; } else - var _x_ = /*<>*/ cst$16; - var _y_ = /*<>*/ [0, _x_, _d_]; + var _w_ = /*<>*/ cst$16; + var _x_ = /*<>*/ [0, _w_, _d_]; if(stdout) var f$0 = stdout[1], - _z_ = /*<>*/ quote_cmd_filename(f$0), - _A_ = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst$8, _z_); + _y_ = /*<>*/ quote_cmd_filename(f$0), + _z_ = + /*<>*/ /*<>*/ (0, + Stdlib[28]) + (cst$8, _y_); else - var _A_ = /*<>*/ cst$15; - var _B_ = /*<>*/ [0, _A_, _y_]; + var _z_ = /*<>*/ cst$15; + var _A_ = /*<>*/ [0, _z_, _x_]; if(stdin) var f$1 = stdin[1], - _C_ = /*<>*/ quote_cmd_filename(f$1), - _D_ = - /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst$9, _C_); + _B_ = /*<>*/ quote_cmd_filename(f$1), + _C_ = + /*<>*/ /*<>*/ (0, + Stdlib[28]) + (cst$9, _B_); else - var _D_ = /*<>*/ cst$14; + var _C_ = /*<>*/ cst$14; var - _E_ = - /*<>*/ caml_call2(Stdlib_List[20], quote$0, args), - s = /*<>*/ caml_call2(Stdlib_String[7], cst$10, _E_), + _D_ = /*<>*/ (0, Stdlib_List[20])(quote$0, args), + s = /*<>*/ (0, Stdlib_String[7])(cst$10, _D_), b = - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Buffer[1], - /*<>*/ caml_ml_string_length(s) + 20 | 0); - /*<>*/ caml_call2 - (Stdlib_String[30], - function(c){ + /*<>*/ /*<>*/ (0, + Stdlib_Buffer[1]) + ( /*<>*/ caml_ml_string_length(s) + 20 | 0); + /*<>*/ (0, Stdlib_String[30]) + (function(c){ a: { /*<>*/ if(62 <= c){ - var _I_ = c - 63 | 0; - if(60 < _I_ >>> 0){ - if(62 <= _I_) break a; + var _H_ = c - 63 | 0; + if(60 < _H_ >>> 0){ + if(62 <= _H_) break a; } - else if(31 !== _I_) break a; + else if(31 !== _H_) break a; } else if(42 <= c){ @@ -34987,28 +34516,27 @@ switch(c - 33 | 0){case 2:case 3:case 6: break a; } } - /*<>*/ caml_call2(Stdlib_Buffer[12], b, 94); - /*<>*/ return caml_call2(Stdlib_Buffer[12], b, c) /*<>*/ ; + /*<>*/ (0, Stdlib_Buffer[12])(b, 94); + /*<>*/ return (0, Stdlib_Buffer[12])(b, c) /*<>*/ ; } - /*<>*/ return caml_call2(Stdlib_Buffer[12], b, c) /*<>*/ ; + /*<>*/ return (0, Stdlib_Buffer[12])(b, c) /*<>*/ ; }, s); var - _F_ = + _E_ = /*<>*/ [0, cst$11, - [0, caml_call1(Stdlib_Buffer[2], b), [0, _D_, _B_]]], - _G_ = + [0, (0, Stdlib_Buffer[2])(b), [0, _C_, _A_]]], + _F_ = /*<>*/ [0, cst$12, - [0, quote_cmd_filename(cmd), _F_]]; - /*<>*/ return caml_call2 - (Stdlib_String[7], cst$13, _G_) /*<>*/ ; + [0, quote_cmd_filename(cmd), _E_]]; + /*<>*/ return (0, Stdlib_String[7])(cst$13, _F_) /*<>*/ ; } function drive_and_path(s){ var - _s_ = /*<>*/ 2 <= caml_ml_string_length(s) ? 1 : 0; - if(_s_){ + _r_ = /*<>*/ 2 <= caml_ml_string_length(s) ? 1 : 0; + if(_r_){ var param = /*<>*/ caml_string_get(s, 0); a: { @@ -35018,31 +34546,29 @@ if(25 < param - 97 >>> 0) break b; } else if(65 > param) break b; - var _t_ = /*<>*/ 1; + var _s_ = /*<>*/ 1; break a; } - var _t_ = /*<>*/ 0; + var _s_ = /*<>*/ 0; } var - _u_ = - /*<>*/ _t_ + _t_ = + /*<>*/ _s_ ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _t_; + : _s_; } else - var _u_ = /*<>*/ _s_; - /*<>*/ if(! _u_) + var _t_ = /*<>*/ _r_; + /*<>*/ if(! _t_) /*<>*/ return [0, cst$17, s]; var - _v_ = - /*<>*/ /*<>*/ caml_call3 - (Stdlib_String[16], - s, - 2, - /*<>*/ caml_ml_string_length(s) - 2 | 0); + _u_ = + /*<>*/ /*<>*/ (0, + Stdlib_String[16]) + (s, 2, /*<>*/ caml_ml_string_length(s) - 2 | 0); /*<>*/ return [0, - caml_call3(Stdlib_String[16], s, 0, 2), - _v_] /*<>*/ ; + (0, Stdlib_String[16])(s, 0, 2), + _u_] /*<>*/ ; /*<>*/ } function dirname$0(s){ var @@ -35052,7 +34578,7 @@ dir = /*<>*/ generic_dirname (is_dir_sep$0, current_dir_name$0, path); - /*<>*/ return caml_call2(Stdlib[28], drive, dir) /*<>*/ ; + /*<>*/ return (0, Stdlib[28])(drive, dir) /*<>*/ ; } function basename$0(s){ var path = /*<>*/ drive_and_path(s)[2]; @@ -35076,13 +34602,13 @@ quote_command$0, basename$0, dirname$0]; - function basename$1(_r_){ + function basename$1(_q_){ /*<>*/ return generic_basename - (is_dir_sep$0, current_dir_name$1, _r_); + (is_dir_sep$0, current_dir_name$1, _q_); } - function dirname$1(_q_){ + function dirname$1(_p_){ /*<>*/ return generic_dirname - (is_dir_sep$0, current_dir_name$1, _q_); + (is_dir_sep$0, current_dir_name$1, _p_); } var Cygwin = @@ -35101,8 +34627,8 @@ quote_command, basename$1, dirname$1], - _e_ = Stdlib_Sys[4], - Sysdeps = _e_ !== "Cygwin" ? _e_ !== "Win32" ? Unix : Win32 : Cygwin, + match = Stdlib_Sys[4], + Sysdeps = match !== "Cygwin" ? match !== "Win32" ? Unix : Win32 : Cygwin, null$3 = Sysdeps[1], current_dir_name$2 = Sysdeps[2], parent_dir_name$2 = Sysdeps[3], @@ -35123,23 +34649,21 @@ (0 !== l && ! /*<>*/ is_dir_sep$1(dirname, l - 1 | 0)){ var - _p_ = - /*<>*/ caml_call2 - (Stdlib[28], dir_sep$2, filename); - /*<>*/ return caml_call2(Stdlib[28], dirname, _p_); + _o_ = /*<>*/ (0, Stdlib[28])(dir_sep$2, filename); + /*<>*/ return (0, Stdlib[28])(dirname, _o_); } - /*<>*/ return caml_call2 - (Stdlib[28], dirname, filename) /*<>*/ ; + /*<>*/ return (0, Stdlib[28])(dirname, filename) /*<>*/ ; } function chop_suffix(name, suff){ /*<>*/ return check_suffix$1(name, suff) - ? /*<>*/ caml_call3 - (Stdlib_String[16], - name, + ? /*<>*/ (0, + Stdlib_String[16]) + (name, 0, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0) - : /*<>*/ caml_call1 - (Stdlib[1], cst_Filename_chop_suffix) /*<>*/ ; + : /*<>*/ (0, + Stdlib[1]) + (cst_Filename_chop_suffix) /*<>*/ ; } function extension_len(name){ var @@ -35172,32 +34696,27 @@ var l = /*<>*/ extension_len(name); /*<>*/ return 0 === l ? cst$18 - : /*<>*/ caml_call3 - (Stdlib_String[16], - name, - caml_ml_string_length(name) - l | 0, - l) /*<>*/ ; + : /*<>*/ (0, + Stdlib_String[16]) + (name, caml_ml_string_length(name) - l | 0, l) /*<>*/ ; } function chop_extension(name){ var l = /*<>*/ extension_len(name); /*<>*/ return 0 === l - ? /*<>*/ caml_call1 - (Stdlib[1], cst_Filename_chop_extension) - : /*<>*/ caml_call3 - (Stdlib_String[16], - name, - 0, - caml_ml_string_length(name) - l | 0) /*<>*/ ; + ? /*<>*/ (0, + Stdlib[1]) + (cst_Filename_chop_extension) + : /*<>*/ (0, + Stdlib_String[16]) + (name, 0, caml_ml_string_length(name) - l | 0) /*<>*/ ; } function remove_extension(name){ var l = /*<>*/ extension_len(name); /*<>*/ return 0 === l ? name - : /*<>*/ caml_call3 - (Stdlib_String[16], - name, - 0, - caml_ml_string_length(name) - l | 0) /*<>*/ ; + : /*<>*/ (0, + Stdlib_String[16]) + (name, 0, caml_ml_string_length(name) - l | 0) /*<>*/ ; } var prng_key = @@ -35213,14 +34732,14 @@ & 16777215; /*<>*/ return /*<>*/ concat (temp_dir, - /*<>*/ caml_call4 - (Stdlib_Printf[4], _f_, prefix, rnd, suffix)) /*<>*/ ; + /*<>*/ caml_call3 + ((0, Stdlib_Printf[4])(_e_), prefix, rnd, suffix)) /*<>*/ ; } var current_temp_dir_name = /*<>*/ caml_call2 (Stdlib_Domain[10][1], - [0, function(_o_){ /*<>*/ return _o_;}], + [0, function(_n_){ /*<>*/ return _n_;}], function(param){ /*<>*/ return temp_dir_name$1; /*<>*/ }); @@ -35246,7 +34765,7 @@ /*<>*/ temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ runtime.caml_sys_close - ( /*<>*/ runtime.caml_sys_open(name, _g_, 384)); + ( /*<>*/ runtime.caml_sys_open(name, _f_, 384)); return name; } catch(e$0){ @@ -35259,10 +34778,10 @@ } } /*<>*/ } - function open_temp_file(_m_, _l_, opt, prefix, suffix){ + function open_temp_file(_l_, _k_, opt, prefix, suffix){ var - mode = /*<>*/ _m_ ? _m_[1] : _h_, - perms = _l_ ? _l_[1] : 384, + mode = /*<>*/ _l_ ? _l_[1] : _g_, + perms = _k_ ? _k_[1] : 384, temp_dir = opt ? opt[1] @@ -35275,11 +34794,11 @@ /*<>*/ temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ var - _n_ = + _m_ = /*<>*/ [0, name, - caml_call3(Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - return _n_; + (0, Stdlib[62])([0, 1, [0, 3, [0, 5, mode]]], perms, name)]; + return _m_; } catch(e$0){ var e = /*<>*/ caml_wrap_exception(e$0); @@ -35291,11 +34810,11 @@ } } /*<>*/ } - function temp_dir(_k_, opt, prefix, suffix){ + function temp_dir(_j_, opt, prefix, suffix){ var temp_dir = - /*<>*/ _k_ - ? _k_[1] + /*<>*/ _j_ + ? _j_[1] : /*<>*/ caml_call1 (Stdlib_Domain[10][2], current_temp_dir_name), perms = /*<>*/ opt ? opt[1] : 448, @@ -35350,6 +34869,7 @@ //# unitInfo: Provides: Stdlib__Complex //# unitInfo: Requires: Stdlib, Stdlib__Float +//# shape: Stdlib__Complex:[N,N,N,F(1),F(1),F(2),F(2),F(2),F(1),F(2),F(1),F(1),F(1),F(1),F(2),F(1),F(1),F(2)] (function (globalThis){ "use strict"; @@ -35488,6 +35008,7 @@ //# unitInfo: Provides: Stdlib__ArrayLabels //# unitInfo: Requires: Stdlib__Array +//# shape: Stdlib__ArrayLabels:[F(2),F(3),F(3),F(2),F(1),F(3),F(1),F(4),F(5),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(3),F(2),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(1),F(1),F(1),[]] (function (globalThis){ "use strict"; @@ -35588,6 +35109,7 @@ //# unitInfo: Provides: Stdlib__ListLabels //# unitInfo: Requires: Stdlib__List +//# shape: Stdlib__ListLabels:[F(1),F(2),F(2),F(1),F(2),F(1),F(1),F(2),F(2),F(1),F(2),F(2),F(2),F(1),F(1),F(3),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(3),F(3),F(4),F(4),F(2),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(1),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(3),F(1),F(1)] (function (globalThis){ "use strict"; @@ -35734,6 +35256,7 @@ //# unitInfo: Provides: Stdlib__BytesLabels //# unitInfo: Requires: Stdlib__Bytes +//# shape: Stdlib__BytesLabels:[F(2),F(2),N,F(1),F(1),F(1),F(3),F(3),F(3),F(4),F(5),F(5),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(2),F(2),F(1),F(1),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(2),F(3),F(3),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(1),F(1),F(2),F(1),F(1),F(1),F(2),F(3),F(1),F(2),F(3),F(1),F(2),F(3),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(1)] (function (globalThis){ "use strict"; @@ -35924,6 +35447,7 @@ //# unitInfo: Provides: Stdlib__StringLabels //# unitInfo: Requires: Stdlib__String +//# shape: Stdlib__StringLabels:[F(2),F(2),N,F(1),F(1),F(5),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(2),F(3),F(2),F(2),F(2),F(3),F(3),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(3),F(3),F(3),F(3),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(2)] (function (globalThis){ "use strict"; @@ -36069,6 +35593,7 @@ //# unitInfo: Provides: Stdlib__MoreLabels //# unitInfo: Requires: Stdlib__Hashtbl, Stdlib__Map, Stdlib__Set +//# shape: Stdlib__MoreLabels:[[F(2),F(1),F(1),F(1),F(3),F(2),F(2),F(2),F(2),F(2),F(3),F(2),F(2),F(3),F(1),F(1),F(1),F(2),F(1),F(1),F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(2),F(3),F(4)],[F(1)],[F(1)]] (function (globalThis){ "use strict"; @@ -36085,7 +35610,9 @@ (globalThis)); //# unitInfo: Provides: Stdlib__StdLabels -(function(globalThis){ +//# shape: Stdlib__StdLabels:[] +(function + (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, Stdlib_StdLabels = [0]; runtime.caml_register_global(0, Stdlib_StdLabels, "Stdlib__StdLabels"); @@ -36096,6 +35623,7 @@ //# unitInfo: Provides: Stdlib__Effect //# unitInfo: Requires: Stdlib, Stdlib__Callback, Stdlib__Printexc, Stdlib__Printf //# unitInfo: Effects_without_cps: true +//# shape: Stdlib__Effect:[N,N,[F(2),F(2),F(3),F(3),F(3)],N] (function (globalThis){ "use strict"; @@ -36113,11 +35641,6 @@ ? f(a0) : runtime.caml_call_gen(f, [a0]); } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } var global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, @@ -36136,24 +35659,21 @@ /*<>*/ return 0; var x = /*<>*/ param[2], - _i_ = /*<>*/ caml_call1(Stdlib_Printexc[26], x), - msg = /*<>*/ caml_call2(Stdlib_Printf[4], _a_, _i_); + _i_ = /*<>*/ (0, Stdlib_Printexc[26])(x), + msg = + /*<>*/ caml_call1((0, Stdlib_Printf[4])(_a_), _i_); /*<>*/ return [0, msg]; /*<>*/ } - /*<>*/ caml_call1(Stdlib_Printexc[9], printer); + /*<>*/ (0, Stdlib_Printexc[9])(printer); var Should_not_see_this = /*<>*/ [248, "Stdlib.Effect.Should_not_see_this__", caml_fresh_oo_id(0)]; - /*<>*/ caml_call2 - (Stdlib_Callback[2], - "Effect.Unhandled", - [0, Unhandled, Should_not_see_this]); - /*<>*/ caml_call2 - (Stdlib_Callback[2], - "Effect.Continuation_already_resumed", - Continuation_already_resumed); + /*<>*/ (0, Stdlib_Callback[2]) + ("Effect.Unhandled", [0, Unhandled, Should_not_see_this]); + /*<>*/ (0, Stdlib_Callback[2]) + ("Effect.Continuation_already_resumed", Continuation_already_resumed); function continue$0(k, v){ var _h_ = /*<>*/ caml_continuation_use_noexc(k); function _g_(x){ @@ -36232,7 +35752,7 @@ (f, /*<>*/ jsoo_effect_not_supported()) /*<>*/ ; } function error(param){ - /*<>*/ return caml_call1(Stdlib[2], cst_impossible) /*<>*/ ; + /*<>*/ return (0, Stdlib[2])(cst_impossible) /*<>*/ ; } function effc(eff, k, last_fiber){ /*<>*/ if(eff !== Initial_setup) diff --git a/toplevel/examples/lwt_toplevel/dune b/toplevel/examples/lwt_toplevel/dune index 13a6048862..052307ee95 100644 --- a/toplevel/examples/lwt_toplevel/dune +++ b/toplevel/examples/lwt_toplevel/dune @@ -88,6 +88,7 @@ %{bin:js_of_ocaml} --pretty --toplevel + --include-runtime %{read-strings:effects_flags.txt} %{dep:test_dynlink.cmo}))) diff --git a/toplevel/examples/lwt_toplevel/test_lib/a.ml b/toplevel/examples/lwt_toplevel/test_lib/a.ml index 4bd7f60d56..6568544f2b 100644 --- a/toplevel/examples/lwt_toplevel/test_lib/a.ml +++ b/toplevel/examples/lwt_toplevel/test_lib/a.ml @@ -6,3 +6,17 @@ let test () = let i = test_stubs () in flush_all (); Printf.printf "returned %d\n" i + +module rec Odd : sig + val odd : int -> bool +end = struct + let odd x = if x = 0 then false else Even.even (pred x) +end + +and Even : sig + val even : int -> bool +end = struct + let even x = if x = 0 then true else Odd.odd (pred x) +end + +let f a b = a + b diff --git a/toplevel/examples/lwt_toplevel/test_lib/b.ml b/toplevel/examples/lwt_toplevel/test_lib/b.ml index 4ee55cdc44..a9ec7269c3 100644 --- a/toplevel/examples/lwt_toplevel/test_lib/b.ml +++ b/toplevel/examples/lwt_toplevel/test_lib/b.ml @@ -1 +1,3 @@ let () = print_endline "This is B" + +let f a b = a + b From f4639105e7f100aa44c7f587c0baa4e63ac88dd1 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Fri, 25 Oct 2024 21:45:57 +0200 Subject: [PATCH 2/4] Compiler: consume hints for immutable blocks --- compiler/lib/ocaml_compiler.ml | 2 + compiler/lib/ocaml_compiler.mli | 2 + compiler/lib/parse_bytecode.ml | 120 +++- compiler/tests-compiler/gh747.ml | 2 +- compiler/tests-full/dune | 6 +- compiler/tests-full/stdlib.cma.expected.js | 676 ++++++++++----------- 6 files changed, 415 insertions(+), 393 deletions(-) diff --git a/compiler/lib/ocaml_compiler.ml b/compiler/lib/ocaml_compiler.ml index 11f6e6027e..b3fd088417 100644 --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml @@ -272,4 +272,6 @@ module Cmo_format = struct let imports (t : t) = t.cu_imports let force_link (t : t) = t.cu_force_link + + let hints_pos (t : t) = t.cu_hint end diff --git a/compiler/lib/ocaml_compiler.mli b/compiler/lib/ocaml_compiler.mli index 3cabd9d10c..77a4191655 100644 --- a/compiler/lib/ocaml_compiler.mli +++ b/compiler/lib/ocaml_compiler.mli @@ -68,4 +68,6 @@ module Cmo_format : sig val force_link : t -> bool val imports : t -> (string * string option) list + + val hints_pos : t -> int end diff --git a/compiler/lib/parse_bytecode.ml b/compiler/lib/parse_bytecode.ml index ebbdcd2e31..9d45e25744 100644 --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml @@ -323,6 +323,63 @@ end = struct StringSet.of_list (List.concat paths) end +module Hints = struct + module Primitive = struct + type boxed_integer = + | Pnativeint + | Pint32 + | Pint64 + + type native_repr = + | Same_as_ocaml_repr + | Unboxed_float + | Unboxed_integer of boxed_integer + | Untagged_immediate + + type description = + { prim_name : string (* Name of primitive or C function *) + ; prim_arity : int (* Number of arguments *) + ; prim_alloc : bool (* Does it allocates or raise? *) + ; prim_native_name : string (* Name of C function for the nat. code gen. *) + ; prim_native_repr_args : native_repr list + ; prim_native_repr_res : native_repr + } + [@@ocaml.warning "-unused-field"] + end + + type optimization_hint = + | Hint_immutable + | Hint_unsafe + | Hint_int of Primitive.boxed_integer + | Hint_array of Lambda.array_kind + | Hint_bigarray of + { unsafe : bool + ; elt_kind : Lambda.bigarray_kind + ; layout : Lambda.bigarray_layout + } + | Hint_primitive of Primitive.description + + module Int_table = Hashtbl.Make (Int) + + type t = { hints : optimization_hint Int_table.t } + + let create () = { hints = Int_table.create 17 } + + let read t ~orig ic = + let l : (int * optimization_hint) list = input_value ic in + + List.iter l ~f:(fun (pos, hint) -> Int_table.add t.hints ((pos + orig) / 4) hint) + + let read_section t ic = + let len = input_binary_int ic in + for _i = 0 to len - 1 do + let orig = input_binary_int ic in + read t ~orig ic + done + + let find t pc = Int_table.find_all t.hints pc +end + (* Block analysis *) (* Detect each block *) module Blocks : sig @@ -809,6 +866,7 @@ type compile_info = ; code : string ; limit : int ; debug : Debug.t + ; hints : Hints.t } let string_of_addr debug_data addr = @@ -831,9 +889,11 @@ let string_of_addr debug_data addr = in Printf.sprintf "%s:%s-%s %s" file (pos loc.loc_start) (pos loc.loc_end) kind) -let is_immutable _instr _infos _pc = (* We don't know yet *) Maybe_mutable +let is_immutable _instr infos pc = + let hints = Hints.find infos.hints pc in + if List.mem Hints.Hint_immutable ~set:hints then Immutable else Maybe_mutable -let rec compile_block blocks debug_data code pc state : unit = +let rec compile_block blocks hints debug_data code pc state : unit = match Addr.Map.find_opt pc !tagged_blocks with | Some old_state -> ( (* Check that the shape of the stack is compatible with the one used to compile the block *) @@ -865,7 +925,7 @@ let rec compile_block blocks debug_data code pc state : unit = let state = State.start_block pc state in tagged_blocks := Addr.Map.add pc state !tagged_blocks; let instr, last, state' = - compile { blocks; code; limit; debug = debug_data } pc state [] + compile { blocks; code; limit; debug = debug_data; hints } pc state [] in assert (not (Addr.Map.mem pc !compiled_blocks)); (* When jumping to a block that was already visited and the @@ -893,10 +953,11 @@ let rec compile_block blocks debug_data code pc state : unit = in compiled_blocks := Addr.Map.add pc (state, List.rev instr, last) !compiled_blocks; match last with - | Branch (pc', _) -> compile_block blocks debug_data code pc' (adjust_state pc') + | Branch (pc', _) -> + compile_block blocks hints debug_data code pc' (adjust_state pc') | Cond (_, (pc1, _), (pc2, _)) -> - compile_block blocks debug_data code pc1 (adjust_state pc1); - compile_block blocks debug_data code pc2 (adjust_state pc2) + compile_block blocks hints debug_data code pc1 (adjust_state pc1); + compile_block blocks hints debug_data code pc2 (adjust_state pc2) | Poptrap (_, _) -> () | Switch (_, _) -> () | Raise _ | Return _ | Stop -> () @@ -1223,7 +1284,7 @@ and compile infos pc state (instrs : instr list) = let params, state' = State.make_stack nparams state' in if debug_parser () then Format.printf ") {@."; let state' = State.clear_accu state' in - compile_block infos.blocks infos.debug code addr state'; + compile_block infos.blocks infos.hints infos.debug code addr state'; if debug_parser () then Format.printf "}@."; let args = State.stack_vars state' in let state'', _, _ = Addr.Map.find addr !compiled_blocks in @@ -1280,7 +1341,7 @@ and compile infos pc state (instrs : instr list) = let params, state' = State.make_stack nparams state' in if debug_parser () then Format.printf ") {@."; let state' = State.clear_accu state' in - compile_block infos.blocks infos.debug code addr state'; + compile_block infos.blocks infos.hints infos.debug code addr state'; if debug_parser () then Format.printf "}@."; let args = State.stack_vars state' in let state'', _, _ = Addr.Map.find addr !compiled_blocks in @@ -1698,9 +1759,9 @@ and compile infos pc state (instrs : instr list) = let it = Array.init isize ~f:(fun i -> base + gets code (base + i)) in let bt = Array.init bsize ~f:(fun i -> base + gets code (base + isize + i)) in Array.iter it ~f:(fun pc' -> - compile_block infos.blocks infos.debug code pc' state); + compile_block infos.blocks infos.hints infos.debug code pc' state); Array.iter bt ~f:(fun pc' -> - compile_block infos.blocks infos.debug code pc' state); + compile_block infos.blocks infos.hints infos.debug code pc' state); match isize, bsize with | _, 0 -> instrs, Switch (x, Array.map it ~f:(fun pc -> pc, [])), state | 0, _ -> @@ -1764,9 +1825,10 @@ and compile infos pc state (instrs : instr list) = , x , (handler_addr, State.stack_vars handler_state) ) ) !compiled_blocks; - compile_block infos.blocks infos.debug code handler_addr handler_state; + compile_block infos.blocks infos.hints infos.debug code handler_addr handler_state; compile_block infos.blocks + infos.hints infos.debug code body_addr @@ -1784,6 +1846,7 @@ and compile infos pc state (instrs : instr list) = let addr = pc + 1 in compile_block infos.blocks + infos.hints infos.debug code addr @@ -2465,7 +2528,7 @@ type one = ; debug : Debug.t } -let parse_bytecode ~includes code globals debug_data = +let parse_bytecode ~includes code globals hints debug_data = let immutable = ref Code.Var.Set.empty in let state = State.initial includes globals immutable in Code.Var.reset (); @@ -2475,7 +2538,7 @@ let parse_bytecode ~includes code globals debug_data = if not (Blocks.is_empty blocks') then ( let start = 0 in - compile_block blocks' debug_data code start state; + compile_block blocks' hints debug_data code start state; let immutable = !immutable in let blocks = Addr.Map.mapi @@ -2609,6 +2672,7 @@ let from_exe ?(debug = false) ic = let debug_data = Debug.create ~include_cmis debug in + let hints = Hints.create () in let toc = Toc.read ic in let primitives = read_primitives toc ic in let primitive_table = Array.of_list primitives in @@ -2654,6 +2718,11 @@ let from_exe not available.@."); if times () then Format.eprintf " read debug events: %a@." Timer.print t; + (try + ignore (Toc.seek_section toc ic "HINT"); + Hints.read_section hints ic + with Not_found -> ()); + let globals = make_globals (Array.length init_data) init_data primitive_table in (* Initialize module override mechanism *) List.iter override_global ~f:(fun (name, v) -> @@ -2669,7 +2738,7 @@ let from_exe Ocaml_compiler.Symtable.GlobalMap.iter symbols ~f:(fun id n -> globals.named_value.(n) <- Some (Ocaml_compiler.Symtable.Global.name id); globals.is_exported.(n) <- true); - let p = parse_bytecode ~includes code globals debug_data in + let p = parse_bytecode ~includes code globals hints debug_data in (* register predefined exception *) let body = List.fold_left predefined_exceptions ~init:[] ~f:(fun body (i, name) -> @@ -2775,6 +2844,7 @@ let from_exe (* As input: list of primitives + size of global table *) let from_bytes ~prims ~debug (code : bytecode) = let debug_data = Debug.create ~include_cmis:false true in + let hints = Hints.create () in let t = Timer.make () in if Debug.names debug_data then @@ -2792,7 +2862,7 @@ let from_bytes ~prims ~debug (code : bytecode) = t in let globals = make_globals 0 [||] prims in - let p = parse_bytecode ~includes:[] code globals debug_data in + let p = parse_bytecode ~includes:[] code globals hints debug_data in let gdata = Var.fresh_n "global_data" in let need_gdata = ref false in let find_name i = @@ -2931,7 +3001,7 @@ module Reloc = struct globals end -let from_compilation_units ~includes ~include_cmis ~debug_data l = +let from_compilation_units ~includes ~include_cmis ~hints ~debug_data l = let reloc = Reloc.create () in List.iter l ~f:(fun (compunit, code) -> Reloc.step1 reloc compunit code); List.iter l ~f:(fun (compunit, code) -> Reloc.step2 reloc compunit code); @@ -2940,7 +3010,7 @@ let from_compilation_units ~includes ~include_cmis ~debug_data l = let l = List.map l ~f:(fun (_, c) -> Bytes.to_string c) in String.concat ~sep:"" l in - let prog = parse_bytecode ~includes code globals debug_data in + let prog = parse_bytecode ~includes code globals hints debug_data in let gdata = Var.fresh_n "global_data" in let need_gdata = ref false in let body = @@ -2992,12 +3062,20 @@ let from_cmo ?(includes = []) ?(include_cmis = false) ?(debug = false) compunit seek_in ic compunit.Cmo_format.cu_debug; Debug.read_event_list debug_data ~crcs:[] ~includes ~orig:0 ic); if times () then Format.eprintf " read debug events: %a@." Timer.print t; - let p = from_compilation_units ~includes ~include_cmis ~debug_data [ compunit, code ] in + let hints = Hints.create () in + if Ocaml_compiler.Cmo_format.hints_pos compunit <> 0 + then ( + seek_in ic (Ocaml_compiler.Cmo_format.hints_pos compunit); + Hints.read hints ~orig:0 ic); + let p = + from_compilation_units ~includes ~include_cmis ~hints ~debug_data [ compunit, code ] + in Code.invariant p.code; p let from_cma ?(includes = []) ?(include_cmis = false) ?(debug = false) lib ic = let debug_data = Debug.create ~include_cmis debug in + let hints = Hints.create () in let orig = ref 0 in let t = ref 0. in let units = @@ -3010,12 +3088,16 @@ let from_cma ?(includes = []) ?(include_cmis = false) ?(debug = false) lib ic = then ( seek_in ic compunit.Cmo_format.cu_debug; Debug.read_event_list debug_data ~crcs:[] ~includes ~orig:!orig ic); + if Ocaml_compiler.Cmo_format.hints_pos compunit <> 0 + then ( + seek_in ic (Ocaml_compiler.Cmo_format.hints_pos compunit); + Hints.read hints ~orig:!orig ic); t := !t +. Timer.get t0; orig := !orig + compunit.Cmo_format.cu_codesize; compunit, code) in if times () then Format.eprintf " read debug events: %.2f@." !t; - let p = from_compilation_units ~includes ~include_cmis ~debug_data units in + let p = from_compilation_units ~includes ~include_cmis ~hints ~debug_data units in Code.invariant p.code; p diff --git a/compiler/tests-compiler/gh747.ml b/compiler/tests-compiler/gh747.ml index 3a218dfce1..31dbf047e3 100644 --- a/compiler/tests-compiler/gh747.ml +++ b/compiler/tests-compiler/gh747.ml @@ -222,7 +222,7 @@ end 1: 2: //# unitInfo: Provides: Test 3: //# unitInfo: Requires: Stdlib__Printf - 4: //# shape: Test:[N,N,[N],N,N,N,N,N,N,N,N,N,N,F(2),F(2),[F(4)]] + 4: //# shape: Test:[N,N,[N],N,N,N,N,N,N,N,N,N,[N,N],F(2),F(2),[F(4)]] 5: (function 6: (globalThis){ 7: "use strict"; diff --git a/compiler/tests-full/dune b/compiler/tests-full/dune index 5effacad3b..536a509421 100644 --- a/compiler/tests-full/dune +++ b/compiler/tests-full/dune @@ -1,7 +1,7 @@ (rule (targets stdlib.cma.js) (enabled_if - (= %{ocaml_version} "5.2.0")) + (and (> %{ocaml_version} "5.2") (< %{ocaml_version} "5.3"))) (action (run %{bin:js_of_ocaml} @@ -14,7 +14,7 @@ (rule (targets stdlib.cma.output.js) (enabled_if - (= %{ocaml_version} "5.2.0")) + (and (> %{ocaml_version} "5.2") (< %{ocaml_version} "5.3"))) (action (with-stdout-to %{targets} @@ -23,7 +23,7 @@ (rule (alias runtest) (enabled_if - (= %{ocaml_version} "5.2.0")) + (and (> %{ocaml_version} "5.2") (< %{ocaml_version} "5.3"))) (action (diff stdlib.cma.expected.js stdlib.cma.output.js))) diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 87bc792531..b2b2497a8a 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -350,7 +350,7 @@ //# unitInfo: Provides: Stdlib //# unitInfo: Requires: CamlinternalFormatBasics -//# shape: Stdlib:[F(1),F(1),N,N,N,N,N,N,N,N,N,N,N,N,N,F(2),F(2),F(1),N,N,F(1),N,N,N,N,N,N,F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),N,N,N,F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(3),F(1),F(1),F(2),F(2),F(2),F(4),F(4),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(1),F(2),F(1),F(1),F(3),F(1),F(1),F(4),F(4),F(2),F(1),F(1),F(1),F(2),F(1),F(1),F(1),F(1),F(2),N,F(1),F(2),F(1),F(1),F(1),F(4),F(1),N] +//# shape: Stdlib:[F(1),F(1),[N,N],N,N,N,N,N,N,N,N,N,N,N,N,F(2),F(2),F(1),N,N,F(1),N,N,N,N,N,N,F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),N,N,N,F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(3),F(1),F(1),F(2),F(2),F(2),F(4),F(4),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(1),F(2),F(1),F(1),F(3),F(1),F(1),F(4),F(4),F(2),F(1),F(1),F(1),F(2),F(1),F(1),F(1),F(1),F(2),[F(2),F(1),F(1),F(2),F(1),F(1)],F(1),F(2),F(1),F(1),F(1),F(4),F(1),N] (function (globalThis){ "use strict"; @@ -1112,7 +1112,7 @@ //# unitInfo: Provides: Stdlib__Sys //# unitInfo: Requires: Stdlib -//# shape: Stdlib__Sys:[N,F(1),N,N,[N],N,N,N,N,N,N,N,N,N,F(2),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(1),N,N,N,F(1),F(1),[F(2)]] +//# shape: Stdlib__Sys:[N,F(1),N,N,[N],N,N,N,N,N,N,N,N,N,F(2),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,[N,N],F(1),N,N,N,F(1),F(1),[F(2)]] (function (globalThis){ "use strict"; @@ -1121,8 +1121,8 @@ caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_wrap_exception = runtime.caml_wrap_exception, global_data = runtime.caml_get_global_data(), - ocaml_version = "5.2.0", - ocaml_release = [0, 5, 2, 0, 0], + ocaml_version = "5.2.1+dev0-2024-05-13", + ocaml_release = [0, 5, 2, 1, [0, [0, 0, "dev0-2024-05-13"]]], Stdlib = global_data.Stdlib, executable_name = /*<>*/ runtime.caml_sys_executable_name(0), @@ -1206,7 +1206,7 @@ Break, catch_break, ocaml_version, - 0, + 1, ocaml_release, runtime.caml_ml_enable_runtime_warnings, runtime.caml_ml_runtime_warnings_enabled, @@ -1218,7 +1218,7 @@ //# unitInfo: Provides: Stdlib__Obj //# unitInfo: Requires: Stdlib, Stdlib__Sys -//# shape: Stdlib__Obj:[F(1),F(2),F(3),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,[F(1),F(1),F(1)],N] +//# shape: Stdlib__Obj:[F(1),F(2),F(3),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,[F(1),F(1),F(1)],[F(1),F(1),F(2),F(2),F(3),F(2),F(2),F(5),F(1),F(1),F(2),F(1),F(1),F(2),N]] (function (globalThis){ "use strict"; @@ -1455,7 +1455,7 @@ //# unitInfo: Provides: CamlinternalLazy //# unitInfo: Requires: Stdlib, Stdlib__Obj -//# shape: CamlinternalLazy:[N,F(1),F(2)] +//# shape: CamlinternalLazy:[[N,N],F(1),F(2)] (function (globalThis){ "use strict"; @@ -1532,7 +1532,7 @@ //# unitInfo: Provides: Stdlib__Lazy //# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Obj -//# shape: Stdlib__Lazy:[N,F(2),F(1),F(1),F(2),F(1),F(1)] +//# shape: Stdlib__Lazy:[[N,N],F(2),F(1),F(1),F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -1623,7 +1623,7 @@ //# unitInfo: Provides: Stdlib__Seq //# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Atomic, Stdlib__Lazy -//# shape: Stdlib__Seq:[F(1),F(1),F(1),F(2),F(3),F(2),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(4),F(3),F(3),F(3),F(3),F(1),F(2),F(3),F(2),F(3),F(2),F(2),F(2),F(2),F(3),F(2),F(3),F(3),F(3),F(2),F(2),F(3),F(3),F(3),F(1),N,F(1),F(2),F(3),F(2),F(3),F(3),F(3),F(4),F(3),F(4),F(2),F(3),F(1),F(1),F(2),F(2),F(1),F(1),F(2)] +//# shape: Stdlib__Seq:[F(1),F(1),F(1),F(2),F(3),F(2),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(4),F(3),F(3),F(3),F(3),F(1),F(2),F(3),F(2),F(3),F(2),F(2),F(2),F(2),F(3),F(2),F(3),F(3),F(3),F(2),F(2),F(3),F(3),F(3),F(1),[N,N],F(1),F(2),F(3),F(2),F(3),F(3),F(3),F(4),F(3),F(4),F(2),F(3),F(1),F(1),F(2),F(2),F(1),F(1),F(2)] (function (globalThis){ "use strict"; @@ -7874,7 +7874,7 @@ //# unitInfo: Provides: Stdlib__Float //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Seq -//# shape: Stdlib__Float:[N,N,N,F(1),F(1),N,N,N,N,N,N,N,N,N,F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),N,N] +//# shape: Stdlib__Float:[N,N,N,F(1),F(1),N,N,N,N,N,N,N,N,N,F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),[F(1),F(2),F(3),F(2),F(1),F(2),F(3),F(3),F(2),F(1),F(3),F(1),F(4),F(5),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(2),F(2)],[F(1),F(2),F(3),F(2),F(1),F(2),F(3),F(3),F(2),F(1),F(3),F(1),F(4),F(5),F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(1),F(1),F(2),F(2)]] (function (globalThis){ "use strict"; @@ -9661,7 +9661,7 @@ //# unitInfo: Provides: Stdlib__Parsing //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Lexing, Stdlib__Obj -//# shape: Stdlib__Parsing:[F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),N,F(1),N,F(4),F(2),F(1),F(1)] +//# shape: Stdlib__Parsing:[F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),[N,N],F(1),[N,N],F(4),F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -12024,7 +12024,7 @@ //# unitInfo: Provides: Stdlib__Stack //# unitInfo: Requires: Stdlib__List, Stdlib__Seq -//# shape: Stdlib__Stack:[N,F(1),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(1),F(2),F(1)] +//# shape: Stdlib__Stack:[[N,N],F(1),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(1),F(2),F(1)] (function (globalThis){ "use strict"; @@ -12144,7 +12144,7 @@ //# unitInfo: Provides: Stdlib__Queue //# unitInfo: Requires: Stdlib__Seq -//# shape: Stdlib__Queue:[N,F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(2),F(1),F(2),F(1)] +//# shape: Stdlib__Queue:[[N,N],F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(2),F(1),F(2),F(1)] (function (globalThis){ "use strict"; @@ -13113,7 +13113,7 @@ //# unitInfo: Provides: Stdlib__Domain //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Condition, Stdlib__List, Stdlib__Mutex -//# shape: Stdlib__Domain:[F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),N] +//# shape: Stdlib__Domain:[F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),[F(2),F(1),F(2)]] (function (globalThis){ "use strict"; @@ -21575,7 +21575,7 @@ //# unitInfo: Provides: Stdlib__Arg //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Buffer, Stdlib__Int, Stdlib__List, Stdlib__Printf, Stdlib__String, Stdlib__Sys -//# shape: Stdlib__Arg:[F(3),F(3),F(5),F(5),F(5),F(3),N,N,F(2),F(2),F(2),N,F(1),F(1),F(2),F(2)] +//# shape: Stdlib__Arg:[F(3),F(3),F(5),F(5),F(5),F(3),[N,N],[N,N],F(2),F(2),F(2),N,F(1),F(1),F(2),F(2)] (function (globalThis){ "use strict"; @@ -22406,7 +22406,7 @@ //# unitInfo: Provides: Stdlib__Printexc //# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Buffer, Stdlib__Obj, Stdlib__Printf -//# shape: Stdlib__Printexc:[F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(1),F(1),F(1),N,F(1),F(2),F(1),F(1),F(1),F(1),F(1)] +//# shape: Stdlib__Printexc:[F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(1),F(1),F(1),[F(1),F(1),F(1),F(1),F(2)],F(1),F(2),F(1),F(1),F(1),F(1),F(1)] (function (globalThis){ "use strict"; @@ -23019,7 +23019,7 @@ //# unitInfo: Provides: Stdlib__Fun //# unitInfo: Requires: Stdlib, Stdlib__Printexc -//# shape: Stdlib__Fun:[F(2),F(3),F(3),F(2),F(2),N] +//# shape: Stdlib__Fun:[F(2),F(3),F(3),F(2),F(2),[N,N]] (function (globalThis){ "use strict"; @@ -23117,7 +23117,7 @@ //# unitInfo: Provides: Stdlib__Gc //# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Domain, Stdlib__Fun, Stdlib__Printf, Stdlib__Sys -//# shape: Stdlib__Gc:[F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),N] +//# shape: Stdlib__Gc:[F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),[[F(1),F(1),F(1),F(1),F(1)],F(3),F(1),F(1)]] (function (globalThis){ "use strict"; @@ -23221,51 +23221,51 @@ function print_stat(c){ var st = /*<>*/ runtime.caml_gc_stat(0), - _z_ = /*<>*/ st[4]; - caml_call1((0, Stdlib_Printf[1])(c, _a_), _z_); - var _A_ = /*<>*/ st[5]; - caml_call1((0, Stdlib_Printf[1])(c, _b_), _A_); - var _B_ = /*<>*/ st[14]; - caml_call1((0, Stdlib_Printf[1])(c, _c_), _B_); - var _C_ = /*<>*/ st[17]; - caml_call1((0, Stdlib_Printf[1])(c, _d_), _C_); + _y_ = /*<>*/ st[4]; + caml_call1((0, Stdlib_Printf[1])(c, _a_), _y_); + var _z_ = /*<>*/ st[5]; + caml_call1((0, Stdlib_Printf[1])(c, _b_), _z_); + var _A_ = /*<>*/ st[14]; + caml_call1((0, Stdlib_Printf[1])(c, _c_), _A_); + var _B_ = /*<>*/ st[17]; + caml_call1((0, Stdlib_Printf[1])(c, _d_), _B_); /*<>*/ (0, Stdlib_Printf[1])(c, _e_); var - _D_ = /*<>*/ st[1], + _C_ = /*<>*/ st[1], l1 = /*<>*/ caml_ml_string_length - ( /*<>*/ caml_call1((0, Stdlib_Printf[4])(_f_), _D_)), - _E_ = /*<>*/ st[1]; - caml_call2((0, Stdlib_Printf[1])(c, _g_), l1, _E_); - var _F_ = /*<>*/ st[2]; - caml_call2((0, Stdlib_Printf[1])(c, _h_), l1, _F_); - var _G_ = /*<>*/ st[3]; - caml_call2((0, Stdlib_Printf[1])(c, _i_), l1, _G_); + ( /*<>*/ caml_call1((0, Stdlib_Printf[4])(_f_), _C_)), + _D_ = /*<>*/ st[1]; + caml_call2((0, Stdlib_Printf[1])(c, _g_), l1, _D_); + var _E_ = /*<>*/ st[2]; + caml_call2((0, Stdlib_Printf[1])(c, _h_), l1, _E_); + var _F_ = /*<>*/ st[3]; + caml_call2((0, Stdlib_Printf[1])(c, _i_), l1, _F_); /*<>*/ (0, Stdlib_Printf[1])(c, _j_); var - _H_ = /*<>*/ st[15], + _G_ = /*<>*/ st[15], l2 = /*<>*/ caml_ml_string_length - ( /*<>*/ caml_call1((0, Stdlib_Printf[4])(_k_), _H_)), - _I_ = /*<>*/ st[15]; - caml_call2((0, Stdlib_Printf[1])(c, _l_), l2, _I_); - var _J_ = /*<>*/ st[6]; - caml_call2((0, Stdlib_Printf[1])(c, _m_), l2, _J_); - var _K_ = /*<>*/ st[8]; - caml_call2((0, Stdlib_Printf[1])(c, _n_), l2, _K_); - var _L_ = /*<>*/ st[10]; - caml_call2((0, Stdlib_Printf[1])(c, _o_), l2, _L_); - var _M_ = /*<>*/ st[12]; - caml_call2((0, Stdlib_Printf[1])(c, _p_), l2, _M_); - var _N_ = /*<>*/ st[13]; - caml_call2((0, Stdlib_Printf[1])(c, _q_), l2, _N_); + ( /*<>*/ caml_call1((0, Stdlib_Printf[4])(_k_), _G_)), + _H_ = /*<>*/ st[15]; + caml_call2((0, Stdlib_Printf[1])(c, _l_), l2, _H_); + var _I_ = /*<>*/ st[6]; + caml_call2((0, Stdlib_Printf[1])(c, _m_), l2, _I_); + var _J_ = /*<>*/ st[8]; + caml_call2((0, Stdlib_Printf[1])(c, _n_), l2, _J_); + var _K_ = /*<>*/ st[10]; + caml_call2((0, Stdlib_Printf[1])(c, _o_), l2, _K_); + var _L_ = /*<>*/ st[12]; + caml_call2((0, Stdlib_Printf[1])(c, _p_), l2, _L_); + var _M_ = /*<>*/ st[13]; + caml_call2((0, Stdlib_Printf[1])(c, _q_), l2, _M_); /*<>*/ (0, Stdlib_Printf[1])(c, _r_); - var _O_ = /*<>*/ st[9]; - caml_call1((0, Stdlib_Printf[1])(c, _s_), _O_); - var _P_ = /*<>*/ st[11]; - caml_call1((0, Stdlib_Printf[1])(c, _t_), _P_); - var _Q_ = /*<>*/ st[7]; - return caml_call1((0, Stdlib_Printf[1])(c, _u_), _Q_) /*<>*/ ; + var _N_ = /*<>*/ st[9]; + caml_call1((0, Stdlib_Printf[1])(c, _s_), _N_); + var _O_ = /*<>*/ st[11]; + caml_call1((0, Stdlib_Printf[1])(c, _t_), _O_); + var _P_ = /*<>*/ st[7]; + return caml_call1((0, Stdlib_Printf[1])(c, _u_), _P_) /*<>*/ ; } function allocated_bytes(param){ var @@ -23279,25 +23279,25 @@ /*<>*/ return (0, Stdlib_Atomic[4])(a, 0) /*<>*/ ; } function create_alarm(f){ - var _y_ = /*<>*/ (0, Stdlib_Atomic[1])(1); - /*<>*/ (0, Stdlib_Domain[6]) + var alarm = /*<>*/ (0, Stdlib_Atomic[1])(1); + /*<>*/ (0, Stdlib_Domain[6]) (function(param){ - /*<>*/ return delete_alarm(_y_) /*<>*/ ; + /*<>*/ return delete_alarm(alarm) /*<>*/ ; }); - /*<>*/ return _y_; - /*<>*/ } + /*<>*/ return alarm; + /*<>*/ } var null_tracker = /*<>*/ [0, - function(param){ /*<>*/ return 0; /*<>*/ }, - function(param){ /*<>*/ return 0; /*<>*/ }, - function(param){ /*<>*/ return 0; /*<>*/ }, - function(param){ /*<>*/ return 0; /*<>*/ }, - function(param){ /*<>*/ return 0; /*<>*/ }]; + function(param){ /*<>*/ return 0; /*<>*/ }, + function(param){ /*<>*/ return 0; /*<>*/ }, + function(param){ /*<>*/ return 0; /*<>*/ }, + function(param){ /*<>*/ return 0; /*<>*/ }, + function(param){ /*<>*/ return 0; /*<>*/ }]; function start(sampling_rate, opt, tracker){ - var callstack_size = /*<>*/ opt ? opt[1] : Stdlib[19]; - /*<>*/ return runtime.caml_memprof_start - (sampling_rate, callstack_size, tracker) /*<>*/ ; + var callstack_size = /*<>*/ opt ? opt[1] : Stdlib[19]; + /*<>*/ return runtime.caml_memprof_start + (sampling_rate, callstack_size, tracker) /*<>*/ ; } var Stdlib_Gc = @@ -23323,7 +23323,7 @@ //# unitInfo: Provides: Stdlib__In_channel //# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Fun, Stdlib__Sys -//# shape: Stdlib__In_channel:[N,F(1),F(1),F(3),F(2),F(2),F(4),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(1),F(4),F(4),F(4),F(4),F(3),N,N,N,F(2),F(1),F(1)] +//# shape: Stdlib__In_channel:[N,F(1),F(1),F(3),F(2),F(2),F(4),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(1),F(4),F(4),F(4),F(4),F(3),F(2),F(1),F(1),F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -23665,7 +23665,7 @@ //# unitInfo: Provides: Stdlib__Out_channel //# unitInfo: Requires: Stdlib, Stdlib__Fun -//# shape: Stdlib__Out_channel:[N,N,F(1),F(1),F(3),F(2),F(2),F(4),F(1),F(1),F(2),F(2),F(2),F(2),F(4),F(4),F(4),F(1),F(1),N,N,N,F(2),F(1),F(2),F(1),F(1)] +//# shape: Stdlib__Out_channel:[N,N,F(1),F(1),F(3),F(2),F(2),F(4),F(1),F(1),F(2),F(2),F(2),F(2),F(4),F(4),F(4),F(1),F(1),F(2),F(1),F(1),F(2),F(1),F(2),F(1),F(1)] (function (globalThis){ "use strict"; @@ -23774,7 +23774,7 @@ //# unitInfo: Provides: Stdlib__Digest //# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Char, Stdlib__In_channel, Stdlib__Int, Stdlib__String -//# shape: Stdlib__Digest:[F(2),F(2),F(1),F(1),F(3),F(3),F(2),F(1),F(2),F(1),F(1),F(1),F(1),N,N,N,N] +//# shape: Stdlib__Digest:[F(2),F(2),F(1),F(1),F(3),F(3),F(2),F(1),F(2),F(1),F(1),F(1),F(1),N,N,N,[N,F(2),F(2),F(1),F(1),F(3),F(3),F(2),F(1),F(2),F(1),F(1),F(1)]] (function (globalThis){ "use strict"; @@ -24062,7 +24062,7 @@ //# unitInfo: Provides: Stdlib__Bigarray //# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Sys -//# shape: Stdlib__Bigarray:[N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(1),N,N,N,N,N,N,N,F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(3),F(4)] +//# shape: Stdlib__Bigarray:[N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(1),N,N,[F(4),F(1),F(1)],[F(2),F(3),F(2),F(1),F(1),F(1),F(3)],[F(3),F(4),F(2),F(1),F(2),F(3)],[F(4),F(5),F(2),F(1),F(2),F(2),F(3)],[F(5),F(6),F(2),F(1),F(3),F(3),F(2),F(2),F(3)],F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(3),F(4)] (function (globalThis){ "use strict"; @@ -24698,7 +24698,7 @@ //# unitInfo: Provides: Stdlib__Random //# unitInfo: Requires: Stdlib, Stdlib__Bigarray, Stdlib__Bytes, Stdlib__Digest, Stdlib__Domain, Stdlib__Int32, Stdlib__Int64, Stdlib__Nativeint, Stdlib__String, Stdlib__Sys -//# shape: Stdlib__Random:[F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(1),F(1),F(1),N,F(1),F(1),F(1)] +//# shape: Stdlib__Random:[F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(1),F(1),F(1),[F(1),F(1),F(1),F(1),F(2),F(2),F(3),F(2),F(3),F(2),F(3),F(2),F(3),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1)],F(1),F(1),F(1)] (function (globalThis){ "use strict"; @@ -24719,23 +24719,7 @@ caml_lxm_next = runtime.caml_lxm_next, caml_mod = runtime.caml_mod, caml_notequal = runtime.caml_notequal, - caml_sys_random_seed = runtime.caml_sys_random_seed; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } - function caml_call2(f, a0, a1){ - return (f.l >= 0 ? f.l : f.l = f.length) === 2 - ? f(a0, a1) - : runtime.caml_call_gen(f, [a0, a1]); - } - function caml_call3(f, a0, a1, a2){ - return (f.l >= 0 ? f.l : f.l = f.length) === 3 - ? f(a0, a1, a2) - : runtime.caml_call_gen(f, [a0, a1, a2]); - } - var + caml_sys_random_seed = runtime.caml_sys_random_seed, global_data = runtime.caml_get_global_data(), serialization_prefix = "lxm1:", Stdlib_Domain = global_data.Stdlib__Domain, @@ -24754,7 +24738,7 @@ _d_ = runtime.caml_int64_create_lo_mi_hi(2, 0, 0), _e_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0); function create(param){ - /*<>*/ return caml_call3(Stdlib_Bigarray[20][1], 7, 0, 4) /*<>*/ ; + /*<>*/ return (0, Stdlib_Bigarray[20][1])(7, 0, 4) /*<>*/ ; } function set(s, i1, i2, i3, i4){ /*<>*/ /*<>*/ caml_ba_set_1 @@ -25088,102 +25072,85 @@ } var random_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], [0, split], mk_default); + /*<>*/ (0, Stdlib_Domain[10][1]) + ([0, split], mk_default); function bits$0(param){ /*<>*/ return /*<>*/ bits - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key)) /*<>*/ ; } function int$1(bound){ /*<>*/ return /*<>*/ int$0 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), bound) /*<>*/ ; } function full_int$0(bound){ /*<>*/ return /*<>*/ full_int - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), bound) /*<>*/ ; } function int_in_range$0(min, max){ /*<>*/ return /*<>*/ int_in_range - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), min, max) /*<>*/ ; } function int32$0(bound){ /*<>*/ return /*<>*/ int32 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), bound) /*<>*/ ; } function int32_in_range$0(min, max){ /*<>*/ return /*<>*/ int32_in_range - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), min, max) /*<>*/ ; } function nativeint$0(bound){ /*<>*/ return /*<>*/ nativeint - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), bound) /*<>*/ ; } function nativeint_in_range$0(min, max){ /*<>*/ return /*<>*/ nativeint_in_range - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), min, max) /*<>*/ ; } function int64$0(bound){ /*<>*/ return /*<>*/ int64 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), bound) /*<>*/ ; } function int64_in_range$0(min, max){ /*<>*/ return /*<>*/ int64_in_range - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), min, max) /*<>*/ ; } function float$1(scale){ /*<>*/ return /*<>*/ float$0 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), scale) /*<>*/ ; } function bool$0(param){ /*<>*/ return /*<>*/ bool - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key)) /*<>*/ ; } function bits32$0(param){ /*<>*/ return /*<>*/ bits32 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key)) /*<>*/ ; } function bits64$0(param){ - var - s = - /*<>*/ caml_call1(Stdlib_Domain[10][2], random_key); + var s = /*<>*/ (0, Stdlib_Domain[10][2])(random_key); /*<>*/ return caml_lxm_next(s) /*<>*/ ; } function nativebits$0(param){ /*<>*/ return /*<>*/ nativebits - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key)) /*<>*/ ; } function full_init(seed){ /*<>*/ return /*<>*/ reinit - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key), seed) /*<>*/ ; } function init(seed){ @@ -25195,18 +25162,14 @@ } function split$0(param){ /*<>*/ return /*<>*/ split - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key)) /*<>*/ ; } function get_state(param){ /*<>*/ return /*<>*/ copy - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Domain[10][2])(random_key)) /*<>*/ ; } function set_state(src){ - var - dst = - /*<>*/ caml_call1(Stdlib_Domain[10][2], random_key); + var dst = /*<>*/ (0, Stdlib_Domain[10][2])(random_key); /*<>*/ return caml_ba_blit(src, dst) /*<>*/ ; } var @@ -25350,8 +25313,8 @@ } var prng_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, Stdlib_Random[19][2]); + /*<>*/ (0, Stdlib_Domain[10][1]) + (0, Stdlib_Random[19][2]); function power_2_above(x, n){ var x$0 = /*<>*/ x; for(;;){ @@ -25371,11 +25334,11 @@ s = /*<>*/ power_2_above(16, initial_size); /*<>*/ if(random) var - _aq_ = - /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), + _aq_ = /*<>*/ (0, Stdlib_Domain[10][2])(prng_key), seed = - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Random[19][4], _aq_); + /*<>*/ /*<>*/ (0, + Stdlib_Random[19][4]) + (_aq_); else var seed = /*<>*/ 0; /*<>*/ return [0, 0, caml_make_vect(s, 0), seed, s] /*<>*/ ; @@ -26022,11 +25985,11 @@ add_seq = include[20], replace_seq = include[21]; function create(sz){ - /*<>*/ return caml_call2(_s_, _d_, sz) /*<>*/ ; + /*<>*/ return _s_(_d_, sz) /*<>*/ ; } function of_seq(i){ - var tbl = /*<>*/ caml_call2(_s_, _d_, 16); - /*<>*/ caml_call2(replace_seq, tbl, i); + var tbl = /*<>*/ _s_(_d_, 16); + /*<>*/ replace_seq(tbl, i); /*<>*/ return tbl; /*<>*/ } /*<>*/ return [0, @@ -26313,11 +26276,11 @@ s = /*<>*/ power_2_above(16, h[2].length - 1); /*<>*/ if(random) var - _g_ = - /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), + _g_ = /*<>*/ (0, Stdlib_Domain[10][2])(prng_key), seed = - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Random[19][4], _g_); + /*<>*/ /*<>*/ (0, + Stdlib_Random[19][4]) + (_g_); else var seed = /*<>*/ 4 <= h.length - 1 ? h[3] : 0; var @@ -26906,7 +26869,7 @@ //# unitInfo: Provides: Stdlib__Format //# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Array, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Domain, Stdlib__Int, Stdlib__List, Stdlib__Queue, Stdlib__Seq, Stdlib__Stack, Stdlib__String -//# shape: Stdlib__Format:[F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(2),F(1),F(2),F(1),F(3),F(2),F(3),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),N,F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(3),F(2),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),N,F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(1),N,F(1),N,F(1),F(1),N,F(1),N,F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(5),F(4),F(4),F(4),F(2),F(4),F(4),F(4),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(2),F(3),F(2),F(2)] +//# shape: Stdlib__Format:[F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(2),F(1),F(2),F(1),F(3),F(2),F(3),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),N,F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(3),F(2),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),[N,N],F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(1),F(1),N,F(1),N,F(1),F(1),N,F(1),N,F(1),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(5),F(4),F(4),F(4),F(2),F(4),F(4),F(4),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(2),F(3),F(2),F(2)] (function (globalThis){ "use strict"; @@ -27846,31 +27809,27 @@ /*<>*/ formatter_of_out_channel(Stdlib[40]), str_formatter = /*<>*/ formatter_of_buffer(stdbuf), stdbuf_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, pp_make_buffer); - /*<>*/ caml_call2 - (Stdlib_Domain[10][3], stdbuf_key, stdbuf); + /*<>*/ (0, Stdlib_Domain[10][1])(0, pp_make_buffer); + /*<>*/ (0, Stdlib_Domain[10][3])(stdbuf_key, stdbuf); var str_formatter_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], - 0, + /*<>*/ (0, Stdlib_Domain[10][1]) + (0, function(param){ /*<>*/ return /*<>*/ formatter_of_buffer - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], stdbuf_key)) /*<>*/ ; + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (stdbuf_key)) /*<>*/ ; }); - /*<>*/ caml_call2 - (Stdlib_Domain[10][3], str_formatter_key, str_formatter); + /*<>*/ (0, Stdlib_Domain[10][3]) + (str_formatter_key, str_formatter); function buffered_out_string(key, str, ofs, len){ - var - _aw_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); + var _aw_ = /*<>*/ (0, Stdlib_Domain[10][2])(key); /*<>*/ return (0, Stdlib_Buffer[18]) (_aw_, str, ofs, len) /*<>*/ ; } function buffered_out_flush(oc, key, param){ var - buf = /*<>*/ caml_call1(Stdlib_Domain[10][2], key), + buf = /*<>*/ (0, Stdlib_Domain[10][2])(key), len = /*<>*/ (0, Stdlib_Buffer[7])(buf), str = /*<>*/ (0, Stdlib_Buffer[2])(buf); /*<>*/ (0, Stdlib[69])(oc, str, 0, len); @@ -27879,25 +27838,22 @@ } var std_buf_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], - 0, + /*<>*/ (0, Stdlib_Domain[10][1]) + (0, function(param){ /*<>*/ return (0, Stdlib_Buffer[1]) (pp_buffer_size) /*<>*/ ; }), err_buf_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], - 0, + /*<>*/ (0, Stdlib_Domain[10][1]) + (0, function(param){ /*<>*/ return (0, Stdlib_Buffer[1]) (pp_buffer_size) /*<>*/ ; }), std_formatter_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], - 0, + /*<>*/ (0, Stdlib_Domain[10][1]) + (0, function(param){ var _ak_ = /*<>*/ Stdlib[39], @@ -27932,13 +27888,12 @@ }); /*<>*/ return ppf; /*<>*/ }); - /*<>*/ caml_call2 - (Stdlib_Domain[10][3], std_formatter_key, std_formatter); + /*<>*/ (0, Stdlib_Domain[10][3]) + (std_formatter_key, std_formatter); var err_formatter_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], - 0, + /*<>*/ (0, Stdlib_Domain[10][1]) + (0, function(param){ var ___ = /*<>*/ Stdlib[40], @@ -27973,23 +27928,22 @@ }); /*<>*/ return ppf; /*<>*/ }); - /*<>*/ caml_call2 - (Stdlib_Domain[10][3], err_formatter_key, err_formatter); + /*<>*/ (0, Stdlib_Domain[10][3]) + (err_formatter_key, err_formatter); function get_std_formatter(param){ - /*<>*/ return caml_call1 - (Stdlib_Domain[10][2], std_formatter_key) /*<>*/ ; + /*<>*/ return (0, Stdlib_Domain[10][2]) + (std_formatter_key) /*<>*/ ; } function get_err_formatter(param){ - /*<>*/ return caml_call1 - (Stdlib_Domain[10][2], err_formatter_key) /*<>*/ ; + /*<>*/ return (0, Stdlib_Domain[10][2]) + (err_formatter_key) /*<>*/ ; } function get_str_formatter(param){ - /*<>*/ return caml_call1 - (Stdlib_Domain[10][2], str_formatter_key) /*<>*/ ; + /*<>*/ return (0, Stdlib_Domain[10][2]) + (str_formatter_key) /*<>*/ ; } function get_stdbuf(param){ - /*<>*/ return caml_call1 - (Stdlib_Domain[10][2], stdbuf_key) /*<>*/ ; + /*<>*/ return (0, Stdlib_Domain[10][2])(stdbuf_key) /*<>*/ ; } function flush_buffer_formatter(buf, ppf){ /*<>*/ pp_flush_queue(ppf, 0); @@ -27999,18 +27953,15 @@ /*<>*/ } function flush_str_formatter(param){ var - stdbuf = - /*<>*/ caml_call1(Stdlib_Domain[10][2], stdbuf_key), + stdbuf = /*<>*/ (0, Stdlib_Domain[10][2])(stdbuf_key), str_formatter = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], str_formatter_key); + /*<>*/ (0, Stdlib_Domain[10][2])(str_formatter_key); /*<>*/ return flush_buffer_formatter (stdbuf, str_formatter) /*<>*/ ; } function make_synchronized_formatter(output, flush){ - /*<>*/ return caml_call2 - (Stdlib_Domain[10][1], - 0, + /*<>*/ return (0, Stdlib_Domain[10][1]) + (0, function(param){ var buf = @@ -28085,326 +28036,319 @@ } function open_hbox(v){ /*<>*/ return /*<>*/ pp_open_hbox - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function open_vbox(v){ /*<>*/ return /*<>*/ pp_open_vbox - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function open_hvbox(v){ /*<>*/ return /*<>*/ pp_open_hvbox - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function open_hovbox(v){ /*<>*/ return /*<>*/ pp_open_hovbox - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function open_box(v){ /*<>*/ return /*<>*/ pp_open_box - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function close_box(v){ /*<>*/ return /*<>*/ pp_close_box - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function open_stag(v){ /*<>*/ return /*<>*/ pp_open_stag - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function close_stag(v){ /*<>*/ return /*<>*/ pp_close_stag - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_as(isize, w){ var state = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key); + /*<>*/ (0, Stdlib_Domain[10][2])(std_formatter_key); /*<>*/ return pp_print_as_size(state, isize, w) /*<>*/ ; } function print_string(v){ /*<>*/ return /*<>*/ pp_print_string - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_bytes(v){ /*<>*/ return /*<>*/ pp_print_bytes - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_int(v){ /*<>*/ return /*<>*/ pp_print_int - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_float(v){ /*<>*/ return /*<>*/ pp_print_float - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_char(v){ /*<>*/ return /*<>*/ pp_print_char - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_bool(v){ /*<>*/ return /*<>*/ pp_print_bool - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_break(v, w){ /*<>*/ return /*<>*/ pp_print_break - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v, w) /*<>*/ ; } function print_cut(v){ /*<>*/ return /*<>*/ pp_print_cut - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_space(v){ /*<>*/ return /*<>*/ pp_print_space - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function force_newline(v){ /*<>*/ return /*<>*/ pp_force_newline - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_flush(v){ /*<>*/ return /*<>*/ pp_print_flush - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_newline(v){ /*<>*/ return /*<>*/ pp_print_newline - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_if_newline(v){ /*<>*/ return /*<>*/ pp_print_if_newline - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function open_tbox(v){ /*<>*/ return /*<>*/ pp_open_tbox - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function close_tbox(v){ /*<>*/ return /*<>*/ pp_close_tbox - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_tbreak(v, w){ /*<>*/ return /*<>*/ pp_print_tbreak - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v, w) /*<>*/ ; } function set_tab(v){ /*<>*/ return /*<>*/ pp_set_tab - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function print_tab(v){ /*<>*/ return /*<>*/ pp_print_tab - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function set_margin(v){ /*<>*/ return /*<>*/ pp_set_margin - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function get_margin(v){ var state = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key); + /*<>*/ (0, Stdlib_Domain[10][2])(std_formatter_key); /*<>*/ return state[6]; /*<>*/ } function set_max_indent(v){ /*<>*/ return /*<>*/ pp_set_max_indent - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function get_max_indent(v){ var state = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key); + /*<>*/ (0, Stdlib_Domain[10][2])(std_formatter_key); /*<>*/ return state[8]; /*<>*/ } function set_geometry(max_indent, margin){ /*<>*/ return /*<>*/ pp_set_geometry - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), max_indent, margin) /*<>*/ ; } function safe_set_geometry(max_indent, margin){ /*<>*/ return /*<>*/ pp_safe_set_geometry - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), max_indent, margin) /*<>*/ ; } function get_geometry(v){ /*<>*/ return /*<>*/ pp_get_geometry - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function update_geometry(v){ /*<>*/ return /*<>*/ pp_update_geometry - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function set_max_boxes(v){ /*<>*/ return /*<>*/ pp_set_max_boxes - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function get_max_boxes(v){ var state = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key); + /*<>*/ (0, Stdlib_Domain[10][2])(std_formatter_key); /*<>*/ return state[15]; /*<>*/ } function over_max_boxes(v){ /*<>*/ return /*<>*/ pp_over_max_boxes - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function set_ellipsis_text(v){ /*<>*/ return /*<>*/ pp_set_ellipsis_text - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function get_ellipsis_text(v){ var state = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key); + /*<>*/ (0, Stdlib_Domain[10][2])(std_formatter_key); /*<>*/ return state[16]; /*<>*/ } function set_formatter_out_channel(v){ /*<>*/ return /*<>*/ pp_set_formatter_out_channel - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function set_formatter_out_functions(v){ /*<>*/ return /*<>*/ pp_set_formatter_out_functions - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function get_formatter_out_functions(v){ /*<>*/ return /*<>*/ pp_get_formatter_out_functions - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function set_formatter_output_functions(v, w){ /*<>*/ return /*<>*/ pp_set_formatter_output_functi - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v, w) /*<>*/ ; } function get_formatter_output_functions(v){ /*<>*/ return /*<>*/ pp_get_formatter_output_functi - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function set_formatter_stag_functions(v){ /*<>*/ return /*<>*/ pp_set_formatter_stag_function - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function get_formatter_stag_functions(v){ /*<>*/ return /*<>*/ pp_get_formatter_stag_function - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function set_print_tags(v){ /*<>*/ return /*<>*/ pp_set_print_tags - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function get_print_tags(v){ var state = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key); + /*<>*/ (0, Stdlib_Domain[10][2])(std_formatter_key); /*<>*/ return state[22]; /*<>*/ } function set_mark_tags(v){ /*<>*/ return /*<>*/ pp_set_mark_tags - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function get_mark_tags(v){ var state = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key); + /*<>*/ (0, Stdlib_Domain[10][2])(std_formatter_key); /*<>*/ return state[23]; /*<>*/ } function set_tags(v){ /*<>*/ return /*<>*/ pp_set_tags - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), v) /*<>*/ ; } function pp_print_iter(opt, iter, pp_v, ppf, v){ @@ -28793,8 +28737,8 @@ /*<>*/ return (0, CamlinternalFormat[7]) (function(acc){ /*<>*/ return /*<>*/ output_acc - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (std_formatter_key), acc) /*<>*/ ; }, 0, @@ -28805,8 +28749,8 @@ /*<>*/ return (0, CamlinternalFormat[7]) (function(acc){ /*<>*/ return /*<>*/ output_acc - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], err_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (err_formatter_key), acc) /*<>*/ ; }, 0, @@ -28864,12 +28808,11 @@ } function flush_standard_formatters(param){ /*<>*/ /*<>*/ pp_print_flush - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2])(std_formatter_key), 0); /*<>*/ return /*<>*/ pp_print_flush - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], err_formatter_key), + ( /*<>*/ (0, Stdlib_Domain[10][2]) + (err_formatter_key), 0) /*<>*/ ; } /*<>*/ (0, Stdlib[100])(flush_standard_formatters); @@ -29075,7 +29018,7 @@ //# unitInfo: Provides: Stdlib__Scanf //# unitInfo: Requires: CamlinternalFormat, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Int, Stdlib__Printf, Stdlib__String -//# shape: Stdlib__Scanf:[N,N,F(2),F(2),F(2),F(2),F(1),F(1),F(3),F(3),F(3),F(3),F(2),F(1)] +//# shape: Stdlib__Scanf:[[N,F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1)],[N,N],F(2),F(2),F(2),F(2),F(1),F(1),F(3),F(3),F(3),F(3),F(2),F(1)] (function (globalThis){ "use strict"; @@ -32628,7 +32571,7 @@ //# unitInfo: Provides: Stdlib__Ephemeron //# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Array, Stdlib__Hashtbl, Stdlib__Int, Stdlib__List, Stdlib__Obj, Stdlib__Random, Stdlib__Seq, Stdlib__Sys -//# shape: Stdlib__Ephemeron:[N,N,N] +//# shape: Stdlib__Ephemeron:[[F(2),F(2),F(1),F(1),[F(1),F(3),F(2),F(2),F(1),F(1)]],[F(3),F(3),F(2),F(2),[F(1),F(4),F(3),F(3),F(1),F(1)]],[F(2),F(2),F(1),F(1),[F(1),F(3),F(2),F(2),F(1),F(1)]]] (function (globalThis){ "use strict"; @@ -32670,8 +32613,7 @@ CamlinternalLazy = global_data.CamlinternalLazy, Stdlib_Random = global_data.Stdlib__Random; function MakeSeeded(H){ - var - prng = [246, function(_at_){return caml_call1(Stdlib_Random[19][2], 0);}]; + var prng = [246, function(_at_){return (0, Stdlib_Random[19][2])(0);}]; function create(opt, initial_size){ var random = @@ -32701,8 +32643,9 @@ } var seed = - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Random[19][4], _as_); + /*<>*/ /*<>*/ (0, + Stdlib_Random[19][4]) + (_as_); } else var seed = /*<>*/ 0; @@ -33173,24 +33116,24 @@ stats_alive]; } function create(param){ - /*<>*/ return caml_call1(Stdlib_Obj[23][1], 1) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][1])(1) /*<>*/ ; } function get_key(t){ - var x = /*<>*/ caml_call2(Stdlib_Obj[23][3], t, 0); + var x = /*<>*/ (0, Stdlib_Obj[23][3])(t, 0); /*<>*/ return x; /*<>*/ } function set_key(t, k){ - /*<>*/ return caml_call3(Stdlib_Obj[23][5], t, 0, k) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][5])(t, 0, k) /*<>*/ ; } function check_key(t){ - /*<>*/ return caml_call2(Stdlib_Obj[23][7], t, 0) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][7])(t, 0) /*<>*/ ; } function get_data(t){ - var x = /*<>*/ caml_call1(Stdlib_Obj[23][9], t); + var x = /*<>*/ (0, Stdlib_Obj[23][9])(t); /*<>*/ return x; /*<>*/ } function set_data(t, d){ - /*<>*/ return caml_call2(Stdlib_Obj[23][11], t, d) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][11])(t, d) /*<>*/ ; } function make(key, data){ var eph = /*<>*/ create(0); @@ -33223,7 +33166,7 @@ /*<>*/ return caml_call2(H[1], k, k$0) ? 0 : 1 /*<>*/ ; } function set_key_data(c, k, d){ - /*<>*/ caml_call1(Stdlib_Obj[23][12], c); + /*<>*/ (0, Stdlib_Obj[23][12])(c); /*<>*/ set_key(c, k); /*<>*/ return set_data(c, d) /*<>*/ ; } @@ -33261,11 +33204,11 @@ clean = include[17], stats_alive = include[18]; function create(sz){ - /*<>*/ return caml_call2(_R_, _a_, sz) /*<>*/ ; + /*<>*/ return _R_(_a_, sz) /*<>*/ ; } function of_seq(i){ - var tbl = /*<>*/ caml_call2(_R_, _a_, 16); - /*<>*/ caml_call2(replace_seq, tbl, i); + var tbl = /*<>*/ _R_(_a_, 16); + /*<>*/ replace_seq(tbl, i); /*<>*/ return tbl; /*<>*/ } /*<>*/ return [0, @@ -33341,28 +33284,28 @@ return 0; /*<>*/ } function create$0(param){ - /*<>*/ return caml_call1(Stdlib_Obj[23][1], 2) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][1])(2) /*<>*/ ; } function get_key1(t){ - var x = /*<>*/ caml_call2(Stdlib_Obj[23][3], t, 0); + var x = /*<>*/ (0, Stdlib_Obj[23][3])(t, 0); /*<>*/ return x; /*<>*/ } function set_key1(t, k){ - /*<>*/ return caml_call3(Stdlib_Obj[23][5], t, 0, k) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][5])(t, 0, k) /*<>*/ ; } function get_key2(t){ - var x = /*<>*/ caml_call2(Stdlib_Obj[23][3], t, 1); + var x = /*<>*/ (0, Stdlib_Obj[23][3])(t, 1); /*<>*/ return x; /*<>*/ } function set_key2(t, k){ - /*<>*/ return caml_call3(Stdlib_Obj[23][5], t, 1, k) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][5])(t, 1, k) /*<>*/ ; } function get_data$0(t){ - var x = /*<>*/ caml_call1(Stdlib_Obj[23][9], t); + var x = /*<>*/ (0, Stdlib_Obj[23][9])(t); /*<>*/ return x; /*<>*/ } function set_data$0(t, d){ - /*<>*/ return caml_call2(Stdlib_Obj[23][11], t, d) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][11])(t, d) /*<>*/ ; } function make$1(key1, key2, data){ var eph = /*<>*/ create$0(0); @@ -33423,17 +33366,15 @@ /*<>*/ } function set_key_data(c, param, d){ var k2 = /*<>*/ param[2], k1 = param[1]; - /*<>*/ caml_call1(Stdlib_Obj[23][12], c); + /*<>*/ (0, Stdlib_Obj[23][12])(c); /*<>*/ set_key1(c, k1); /*<>*/ set_key2(c, k2); /*<>*/ return set_data$0(c, d) /*<>*/ ; } function check_key(c){ - var - _N_ = /*<>*/ caml_call2(Stdlib_Obj[23][7], c, 0); + var _N_ = /*<>*/ (0, Stdlib_Obj[23][7])(c, 0); /*<>*/ return _N_ - ? /*<>*/ caml_call2 - (Stdlib_Obj[23][7], c, 1) + ? /*<>*/ (0, Stdlib_Obj[23][7])(c, 1) : _N_ /*<>*/ ; } /*<>*/ return MakeSeeded @@ -33476,11 +33417,11 @@ clean = include[17], stats_alive = include[18]; function create(sz){ - /*<>*/ return caml_call2(_M_, _b_, sz) /*<>*/ ; + /*<>*/ return _M_(_b_, sz) /*<>*/ ; } function of_seq(i){ - var tbl = /*<>*/ caml_call2(_M_, _b_, 16); - /*<>*/ caml_call2(replace_seq, tbl, i); + var tbl = /*<>*/ _M_(_b_, 16); + /*<>*/ replace_seq(tbl, i); /*<>*/ return tbl; /*<>*/ } /*<>*/ return [0, @@ -33560,24 +33501,24 @@ return 0; /*<>*/ } function create$1(n){ - /*<>*/ return caml_call1(Stdlib_Obj[23][1], n) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][1])(n) /*<>*/ ; } function length$1(k){ - /*<>*/ return caml_call1(Stdlib_Obj[23][2], k) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][2])(k) /*<>*/ ; } function get_key$0(t, n){ - var x = /*<>*/ caml_call2(Stdlib_Obj[23][3], t, n); + var x = /*<>*/ (0, Stdlib_Obj[23][3])(t, n); /*<>*/ return x; /*<>*/ } function set_key$0(t, n, k){ - /*<>*/ return caml_call3(Stdlib_Obj[23][5], t, n, k) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][5])(t, n, k) /*<>*/ ; } function get_data$1(t){ - var x = /*<>*/ caml_call1(Stdlib_Obj[23][9], t); + var x = /*<>*/ (0, Stdlib_Obj[23][9])(t); /*<>*/ return x; /*<>*/ } function set_data$1(t, d){ - /*<>*/ return caml_call2(Stdlib_Obj[23][11], t, d) /*<>*/ ; + /*<>*/ return (0, Stdlib_Obj[23][11])(t, d) /*<>*/ ; } function make$3(keys, data){ var @@ -33689,7 +33630,7 @@ } /*<>*/ } function set_key_data(c, k, d){ - /*<>*/ caml_call1(Stdlib_Obj[23][12], c); + /*<>*/ (0, Stdlib_Obj[23][12])(c); var _q_ = /*<>*/ k.length - 2 | 0, _p_ = 0; if(_q_ >= 0){ var i = _p_; @@ -33712,8 +33653,7 @@ if(_n_) var _o_ = _n_; else{ - var - _m_ = /*<>*/ caml_call2(Stdlib_Obj[23][7], c, i); + var _m_ = /*<>*/ (0, Stdlib_Obj[23][7])(c, i); /*<>*/ if(_m_){ var i$0 = i - 1 | 0; i = i$0; @@ -33758,11 +33698,11 @@ clean = include[17], stats_alive = include[18]; function create(sz){ - /*<>*/ return caml_call2(_l_, _c_, sz) /*<>*/ ; + /*<>*/ return _l_(_c_, sz) /*<>*/ ; } function of_seq(i){ - var tbl = /*<>*/ caml_call2(_l_, _c_, 16); - /*<>*/ caml_call2(replace_seq, tbl, i); + var tbl = /*<>*/ _l_(_c_, 16); + /*<>*/ replace_seq(tbl, i); /*<>*/ return tbl; /*<>*/ } /*<>*/ return [0, @@ -33917,11 +33857,6 @@ caml_trampoline = runtime.caml_trampoline, caml_trampoline_return = runtime.caml_trampoline_return, caml_wrap_exception = runtime.caml_wrap_exception; - function caml_call1(f, a0){ - return (f.l >= 0 ? f.l : f.l = f.length) === 1 - ? f(a0) - : runtime.caml_call_gen(f, [a0]); - } function caml_call2(f, a0, a1){ return (f.l >= 0 ? f.l : f.l = f.length) === 2 ? f(a0, a1) @@ -34720,15 +34655,14 @@ } var prng_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, Stdlib_Random[19][2]); + /*<>*/ (0, Stdlib_Domain[10][1]) + (0, Stdlib_Random[19][2]); function temp_file_name(temp_dir, prefix, suffix){ var random_state = - /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), + /*<>*/ (0, Stdlib_Domain[10][2])(prng_key), rnd = - /*<>*/ caml_call1 - (Stdlib_Random[19][4], random_state) + /*<>*/ (0, Stdlib_Random[19][4])(random_state) & 16777215; /*<>*/ return /*<>*/ concat (temp_dir, @@ -34737,27 +34671,27 @@ } var current_temp_dir_name = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], - [0, function(_n_){ /*<>*/ return _n_;}], + /*<>*/ (0, Stdlib_Domain[10][1]) + ([0, function(_n_){ /*<>*/ return _n_;}], function(param){ /*<>*/ return temp_dir_name$1; /*<>*/ }); function set_temp_dir_name(s){ - /*<>*/ return caml_call2 - (Stdlib_Domain[10][3], current_temp_dir_name, s) /*<>*/ ; + /*<>*/ return (0, Stdlib_Domain[10][3]) + (current_temp_dir_name, s) /*<>*/ ; } function get_temp_dir_name(param){ - /*<>*/ return caml_call1 - (Stdlib_Domain[10][2], current_temp_dir_name) /*<>*/ ; + /*<>*/ return (0, Stdlib_Domain[10][2]) + (current_temp_dir_name) /*<>*/ ; } function temp_file(opt, prefix, suffix){ var temp_dir = /*<>*/ opt ? opt[1] - : /*<>*/ caml_call1 - (Stdlib_Domain[10][2], current_temp_dir_name), + : /*<>*/ (0, + Stdlib_Domain[10][2]) + (current_temp_dir_name), counter = /*<>*/ 0; for(;;){ var @@ -34785,8 +34719,9 @@ temp_dir = opt ? opt[1] - : /*<>*/ caml_call1 - (Stdlib_Domain[10][2], current_temp_dir_name), + : /*<>*/ (0, + Stdlib_Domain[10][2]) + (current_temp_dir_name), counter = /*<>*/ 0; for(;;){ var @@ -34815,8 +34750,9 @@ temp_dir = /*<>*/ _j_ ? _j_[1] - : /*<>*/ caml_call1 - (Stdlib_Domain[10][2], current_temp_dir_name), + : /*<>*/ (0, + Stdlib_Domain[10][2]) + (current_temp_dir_name), perms = /*<>*/ opt ? opt[1] : 448, counter = /*<>*/ 0; for(;;){ @@ -35623,7 +35559,7 @@ //# unitInfo: Provides: Stdlib__Effect //# unitInfo: Requires: Stdlib, Stdlib__Callback, Stdlib__Printexc, Stdlib__Printf //# unitInfo: Effects_without_cps: true -//# shape: Stdlib__Effect:[N,N,[F(2),F(2),F(3),F(3),F(3)],N] +//# shape: Stdlib__Effect:[[N,N],[N,N],[F(2),F(2),F(3),F(3),F(3)],[F(1),F(3),F(3),F(4)]] (function (globalThis){ "use strict"; From 536ff4dbf24fd95205454a0005c489bebf1776c4 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Fri, 25 Oct 2024 22:59:18 +0200 Subject: [PATCH 3/4] Compiler: consume hints for unsafe string/bytes/ba get/set --- compiler/lib/parse_bytecode.ml | 29 +++++++- compiler/tests-full/stdlib.cma.expected.js | 33 ++++---- runtime/js/bigarray.js | 59 +++++++++++++++ runtime/js/mlBytes.js | 87 +++++++++++++++++++--- 4 files changed, 177 insertions(+), 31 deletions(-) diff --git a/compiler/lib/parse_bytecode.ml b/compiler/lib/parse_bytecode.ml index 9d45e25744..d26230348e 100644 --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml @@ -1880,7 +1880,21 @@ and compile infos pc state (instrs : instr list) = let y = State.accu state in let z = State.peek 0 state in let x, state = State.fresh_var state in - + let prim = + match prim with + | "caml_ba_uint8_get16" + | "caml_ba_uint8_get32" + | "caml_ba_uint8_get64" + | "caml_string_get16" + | "caml_string_get32" + | "caml_string_get64" + | "caml_bytes_get16" + | "caml_bytes_get32" + | "caml_bytes_get64" -> + let hints = Hints.find infos.hints pc in + if List.mem Hints.Hint_unsafe ~set:hints then prim ^ "u" else prim + | _ -> prim + in if debug_parser () then Format.printf @@ -1903,7 +1917,18 @@ and compile infos pc state (instrs : instr list) = let z = State.peek 0 state in let t = State.peek 1 state in let x, state = State.fresh_var state in - + let prim = + match prim with + | "caml_ba_uint8_set16" + | "caml_ba_uint8_set32" + | "caml_ba_uint8_set64" + | "caml_bytes_set16" + | "caml_bytes_set32" + | "caml_bytes_set64" -> + let hints = Hints.find infos.hints pc in + if List.mem Hints.Hint_unsafe ~set:hints then prim ^ "u" else prim + | _ -> prim + in if debug_parser () then Format.printf diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index b2b2497a8a..395d0731e5 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -4740,11 +4740,13 @@ caml_bswap16 = runtime.caml_bswap16, caml_bytes_get = runtime.caml_bytes_get, caml_bytes_get16 = runtime.caml_bytes_get16, + caml_bytes_get16u = runtime.caml_bytes_get16u, caml_bytes_get32 = runtime.caml_bytes_get32, caml_bytes_get64 = runtime.caml_bytes_get64, caml_bytes_of_string = runtime.caml_bytes_of_string, caml_bytes_set = runtime.caml_bytes_set, caml_bytes_set16 = runtime.caml_bytes_set16, + caml_bytes_set16u = runtime.caml_bytes_set16u, caml_bytes_set32 = runtime.caml_bytes_set32, caml_bytes_set64 = runtime.caml_bytes_set64, caml_bytes_unsafe_get = runtime.caml_bytes_unsafe_get, @@ -5529,14 +5531,14 @@ function unsafe_get_uint16_le(b, i){ /*<>*/ return Stdlib_Sys[11] ? /*<>*/ caml_bswap16 - ( /*<>*/ caml_bytes_get16(b, i)) - : /*<>*/ caml_bytes_get16(b, i) /*<>*/ ; + ( /*<>*/ caml_bytes_get16u(b, i)) + : /*<>*/ caml_bytes_get16u(b, i) /*<>*/ ; } function unsafe_get_uint16_be(b, i){ /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_get16(b, i) + ? /*<>*/ caml_bytes_get16u(b, i) : /*<>*/ caml_bswap16 - ( /*<>*/ caml_bytes_get16(b, i)) /*<>*/ ; + ( /*<>*/ caml_bytes_get16u(b, i)) /*<>*/ ; } function get_int8(b, i){ var @@ -5600,17 +5602,17 @@ } function unsafe_set_uint16_le(b, i, x){ /*<>*/ if(Stdlib_Sys[11]){ - /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); + /*<>*/ caml_bytes_set16u(b, i, caml_bswap16(x)); /*<>*/ return; } - /*<>*/ caml_bytes_set16(b, i, x); + /*<>*/ caml_bytes_set16u(b, i, x); /*<>*/ } function unsafe_set_uint16_be(b, i, x){ /*<>*/ if(Stdlib_Sys[11]){ - /*<>*/ caml_bytes_set16(b, i, x); + /*<>*/ caml_bytes_set16u(b, i, x); /*<>*/ return; } - /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); + /*<>*/ caml_bytes_set16u(b, i, caml_bswap16(x)); /*<>*/ } function set_int16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] @@ -12354,9 +12356,6 @@ caml_bswap16 = runtime.caml_bswap16, caml_bytes_get = runtime.caml_bytes_get, caml_bytes_set = runtime.caml_bytes_set, - caml_bytes_set16 = runtime.caml_bytes_set16, - caml_bytes_set32 = runtime.caml_bytes_set32, - caml_bytes_set64 = runtime.caml_bytes_set64, caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, caml_create_bytes = runtime.caml_create_bytes, caml_int32_bswap = runtime.caml_int32_bswap, @@ -12823,10 +12822,10 @@ new_position = /*<>*/ position + 2 | 0; /*<>*/ if(length < new_position){ /*<>*/ resize(b, 2); - /*<>*/ caml_bytes_set16(b[1][1], b[2], x); + /*<>*/ runtime.caml_bytes_set16(b[1][1], b[2], x); } else - /*<>*/ caml_bytes_set16(buffer, position, x); + /*<>*/ runtime.caml_bytes_set16u(buffer, position, x); /*<>*/ b[2] = new_position; return 0; /*<>*/ } @@ -12839,10 +12838,10 @@ new_position = /*<>*/ position + 4 | 0; /*<>*/ if(length < new_position){ /*<>*/ resize(b, 4); - /*<>*/ caml_bytes_set32(b[1][1], b[2], x); + /*<>*/ runtime.caml_bytes_set32(b[1][1], b[2], x); } else - /*<>*/ caml_bytes_set32(buffer, position, x); + /*<>*/ runtime.caml_bytes_set32u(buffer, position, x); /*<>*/ b[2] = new_position; return 0; /*<>*/ } @@ -12855,10 +12854,10 @@ new_position = /*<>*/ position + 8 | 0; /*<>*/ if(length < new_position){ /*<>*/ resize(b, 8); - /*<>*/ caml_bytes_set64(b[1][1], b[2], x); + /*<>*/ runtime.caml_bytes_set64(b[1][1], b[2], x); } else - /*<>*/ caml_bytes_set64(buffer, position, x); + /*<>*/ runtime.caml_bytes_set64u(buffer, position, x); /*<>*/ b[2] = new_position; return 0; /*<>*/ } diff --git a/runtime/js/bigarray.js b/runtime/js/bigarray.js index 81de1e3047..ccd2c5a535 100644 --- a/runtime/js/bigarray.js +++ b/runtime/js/bigarray.js @@ -398,6 +398,14 @@ function caml_ba_get_generic(ba, i) { return ba.get(ofs); } + +//Provides: caml_ba_uint8_get16u +function caml_ba_uint8_get16u(ba, i0) { + var ofs = ba.offset(i0); + var b1 = ba.get(ofs); + var b2 = ba.get(ofs + 1); + return b1 | (b2 << 8); +} //Provides: caml_ba_uint8_get16 //Requires: caml_array_bound_error function caml_ba_uint8_get16(ba, i0) { @@ -408,6 +416,16 @@ function caml_ba_uint8_get16(ba, i0) { return b1 | (b2 << 8); } +//Provides: caml_ba_uint8_get32u +function caml_ba_uint8_get32u(ba, i0) { + var ofs = ba.offset(i0); + var b1 = ba.get(ofs + 0); + var b2 = ba.get(ofs + 1); + var b3 = ba.get(ofs + 2); + var b4 = ba.get(ofs + 3); + return (b1 << 0) | (b2 << 8) | (b3 << 16) | (b4 << 24); +} + //Provides: caml_ba_uint8_get32 //Requires: caml_array_bound_error function caml_ba_uint8_get32(ba, i0) { @@ -420,6 +438,21 @@ function caml_ba_uint8_get32(ba, i0) { return (b1 << 0) | (b2 << 8) | (b3 << 16) | (b4 << 24); } +//Provides: caml_ba_uint8_get64u +//Requires: caml_int64_of_bytes +function caml_ba_uint8_get64u(ba, i0) { + var ofs = ba.offset(i0); + var b1 = ba.get(ofs + 0); + var b2 = ba.get(ofs + 1); + var b3 = ba.get(ofs + 2); + var b4 = ba.get(ofs + 3); + var b5 = ba.get(ofs + 4); + var b6 = ba.get(ofs + 5); + var b7 = ba.get(ofs + 6); + var b8 = ba.get(ofs + 7); + return caml_int64_of_bytes([b8, b7, b6, b5, b4, b3, b2, b1]); +} + //Provides: caml_ba_uint8_get64 //Requires: caml_array_bound_error, caml_int64_of_bytes function caml_ba_uint8_get64(ba, i0) { @@ -458,6 +491,14 @@ function caml_ba_set_generic(ba, i, v) { return 0; } +//Provides: caml_ba_uint8_set16u +function caml_ba_uint8_set16u(ba, i0, v) { + var ofs = ba.offset(i0); + ba.set(ofs + 0, v & 0xff); + ba.set(ofs + 1, (v >>> 8) & 0xff); + return 0; +} + //Provides: caml_ba_uint8_set16 //Requires: caml_array_bound_error function caml_ba_uint8_set16(ba, i0, v) { @@ -468,6 +509,15 @@ function caml_ba_uint8_set16(ba, i0, v) { return 0; } +//Provides: caml_ba_uint8_set32u +function caml_ba_uint8_set32u(ba, i0, v) { + var ofs = ba.offset(i0); + ba.set(ofs + 0, v & 0xff); + ba.set(ofs + 1, (v >>> 8) & 0xff); + ba.set(ofs + 2, (v >>> 16) & 0xff); + ba.set(ofs + 3, (v >>> 24) & 0xff); + return 0; +} //Provides: caml_ba_uint8_set32 //Requires: caml_array_bound_error function caml_ba_uint8_set32(ba, i0, v) { @@ -480,6 +530,15 @@ function caml_ba_uint8_set32(ba, i0, v) { return 0; } +//Provides: caml_ba_uint8_set64u +//Requires: caml_int64_to_bytes +function caml_ba_uint8_set64u(ba, i0, v) { + var ofs = ba.offset(i0); + var v = caml_int64_to_bytes(v); + for (var i = 0; i < 8; i++) ba.set(ofs + i, v[7 - i]); + return 0; +} + //Provides: caml_ba_uint8_set64 //Requires: caml_array_bound_error, caml_int64_to_bytes function caml_ba_uint8_set64(ba, i0, v) { diff --git a/runtime/js/mlBytes.js b/runtime/js/mlBytes.js index 8566487548..51b7d599c9 100644 --- a/runtime/js/mlBytes.js +++ b/runtime/js/mlBytes.js @@ -254,29 +254,50 @@ function caml_string_get(s, i) { } //Provides: caml_string_get16 -//Requires: caml_string_unsafe_get, caml_string_bound_error +//Requires: caml_string_bound_error //Requires: caml_ml_string_length +//Requires: caml_string_get16u function caml_string_get16(s, i) { if (i >>> 0 >= caml_ml_string_length(s) - 1) caml_string_bound_error(); + return caml_string_get16u(s,i); +} + +//Provides: caml_string_get16u +//Requires: caml_string_unsafe_get +function caml_string_get16u(s, i) { var b1 = caml_string_unsafe_get(s, i), b2 = caml_string_unsafe_get(s, i + 1); return (b2 << 8) | b1; } //Provides: caml_bytes_get16 -//Requires: caml_bytes_unsafe_get, caml_bytes_bound_error +//Requires: caml_bytes_bound_error +//Requires: caml_bytes_get16u function caml_bytes_get16(s, i) { if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); + return caml_bytes_get16u(s,i) +} + +//Provides: caml_bytes_get16u +//Requires: caml_bytes_unsafe_get +function caml_bytes_get16u(s, i) { var b1 = caml_bytes_unsafe_get(s, i), b2 = caml_bytes_unsafe_get(s, i + 1); return (b2 << 8) | b1; } //Provides: caml_string_get32 -//Requires: caml_string_unsafe_get, caml_string_bound_error +//Requires: caml_string_bound_error //Requires: caml_ml_string_length +//Requires: caml_string_get32u function caml_string_get32(s, i) { if (i >>> 0 >= caml_ml_string_length(s) - 3) caml_string_bound_error(); + return caml_string_get32u(s,i); +} + +//Provides: caml_string_get32u +//Requires: caml_string_unsafe_get +function caml_string_get32u(s, i) { var b1 = caml_string_unsafe_get(s, i), b2 = caml_string_unsafe_get(s, i + 1), b3 = caml_string_unsafe_get(s, i + 2), @@ -285,9 +306,16 @@ function caml_string_get32(s, i) { } //Provides: caml_bytes_get32 -//Requires: caml_bytes_unsafe_get, caml_bytes_bound_error +//Requires: caml_bytes_bound_error +//Requires: caml_bytes_get32u function caml_bytes_get32(s, i) { if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); + return caml_bytes_get32u(s,i) +} + +//Provides: caml_bytes_get32u +//Requires: caml_bytes_unsafe_get +function caml_bytes_get32u(s, i) { var b1 = caml_bytes_unsafe_get(s, i), b2 = caml_bytes_unsafe_get(s, i + 1), b3 = caml_bytes_unsafe_get(s, i + 2), @@ -296,11 +324,18 @@ function caml_bytes_get32(s, i) { } //Provides: caml_string_get64 -//Requires: caml_string_unsafe_get, caml_string_bound_error -//Requires: caml_int64_of_bytes +//Requires: caml_string_bound_error //Requires: caml_ml_string_length +//Requires: caml_string_get64u function caml_string_get64(s, i) { if (i >>> 0 >= caml_ml_string_length(s) - 7) caml_string_bound_error(); + return caml_string_get64u(s,i); +} + +//Provides: caml_string_get64u +//Requires: caml_string_unsafe_get +//Requires: caml_int64_of_bytes +function caml_string_get64u(s, i) { var a = new Array(8); for (var j = 0; j < 8; j++) { a[7 - j] = caml_string_unsafe_get(s, i + j); @@ -309,10 +344,17 @@ function caml_string_get64(s, i) { } //Provides: caml_bytes_get64 -//Requires: caml_bytes_unsafe_get, caml_bytes_bound_error -//Requires: caml_int64_of_bytes +//Requires: caml_bytes_bound_error +//Requires: caml_bytes_get64u function caml_bytes_get64(s, i) { if (i >>> 0 >= s.l - 7) caml_bytes_bound_error(); + return caml_bytes_get64u(s,i) +} + +//Provides: caml_bytes_get64u +//Requires: caml_bytes_unsafe_get +//Requires: caml_int64_of_bytes +function caml_bytes_get64u(s, i) { var a = new Array(8); for (var j = 0; j < 8; j++) { a[7 - j] = caml_bytes_unsafe_get(s, i + j); @@ -343,9 +385,16 @@ function caml_string_set(s, i, c) { } //Provides: caml_bytes_set16 -//Requires: caml_bytes_bound_error, caml_bytes_unsafe_set +//Requires: caml_bytes_bound_error +//Requires: caml_bytes_set16u function caml_bytes_set16(s, i, i16) { if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); + return caml_bytes_set16u(s,i,i16); +} + +//Provides: caml_bytes_set16u +//Requires: caml_bytes_unsafe_set +function caml_bytes_set16u(s, i, i16) { var b2 = 0xff & (i16 >> 8), b1 = 0xff & i16; caml_bytes_unsafe_set(s, i + 0, b1); @@ -354,9 +403,16 @@ function caml_bytes_set16(s, i, i16) { } //Provides: caml_bytes_set32 -//Requires: caml_bytes_bound_error, caml_bytes_unsafe_set +//Requires: caml_bytes_bound_error +//Requires: caml_bytes_set32u function caml_bytes_set32(s, i, i32) { if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); + return caml_bytes_set32u(s,i,i32); +} + +//Provides: caml_bytes_set32u +//Requires: caml_bytes_unsafe_set +function caml_bytes_set32u(s, i, i32) { var b4 = 0xff & (i32 >> 24), b3 = 0xff & (i32 >> 16), b2 = 0xff & (i32 >> 8), @@ -369,10 +425,17 @@ function caml_bytes_set32(s, i, i32) { } //Provides: caml_bytes_set64 -//Requires: caml_bytes_bound_error, caml_bytes_unsafe_set -//Requires: caml_int64_to_bytes +//Requires: caml_bytes_bound_error +//Requires: caml_bytes_set64u function caml_bytes_set64(s, i, i64) { if (i >>> 0 >= s.l - 7) caml_bytes_bound_error(); + return caml_bytes_set64u(s,i,i64); +} + +//Provides: caml_bytes_set64u +//Requires: caml_bytes_unsafe_set +//Requires: caml_int64_to_bytes +function caml_bytes_set64u(s, i, i64) { var a = caml_int64_to_bytes(i64); for (var j = 0; j < 8; j++) { caml_bytes_unsafe_set(s, i + 7 - j, a[j]); From 2ca7dbfa350e019c4fa8908957b67a047128fea0 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Fri, 25 Oct 2024 23:24:30 +0200 Subject: [PATCH 4/4] Compiler: comsume hints for boxed int comparison --- compiler/lib/parse_bytecode.ml | 28 ++++++++++- compiler/tests-full/stdlib.cma.expected.js | 58 +++++++++------------- 2 files changed, 51 insertions(+), 35 deletions(-) diff --git a/compiler/lib/parse_bytecode.ml b/compiler/lib/parse_bytecode.ml index d26230348e..f8df4dd73c 100644 --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml @@ -1906,11 +1906,37 @@ and compile infos pc state (instrs : instr list) = y Var.print z; + let prim, y, z = + match prim with + | "caml_equal" + | "caml_notequal" + | "caml_lessthan" + | "caml_greaterthan" + | "caml_lessequal" + | "caml_greaterequal" -> ( + let prim_of_ext = function + | "caml_equal" -> Eq, y, z + | "caml_notequal" -> Neq, y, z + | "caml_lessthan" -> Lt, y, z + | "caml_lessequal" -> Le, y, z + | "caml_greaterequal" -> Le, z, y + | "caml_greaterthan" -> Lt, z, y + | _ -> assert false + in + match Hints.find infos.hints pc with + | [ Hints.Hint_int boxed ] -> ( + match boxed with + | Pnativeint -> prim_of_ext prim + | Pint32 -> prim_of_ext prim + | Pint64 -> Extern prim, y, z) + | _ -> Extern prim, y, z) + | _ -> Extern prim, y, z + in compile infos (pc + 2) (State.pop 1 state) - (Let (x, Prim (Extern prim, [ Pv y; Pv z ])) :: instrs) + (Let (x, Prim (prim, [ Pv y; Pv z ])) :: instrs) | C_CALL3 -> let prim = primitive_name state (getu code (pc + 1)) in let y = State.accu state in diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 395d0731e5..f1180ac7b2 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -8992,11 +8992,8 @@ "use strict"; var runtime = globalThis.jsoo_runtime, - caml_greaterequal = runtime.caml_greaterequal, caml_hash = runtime.caml_hash, caml_int_compare = runtime.caml_int_compare, - caml_lessequal = runtime.caml_lessequal, - caml_lessthan = runtime.caml_lessthan, caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_mul = runtime.caml_mul, caml_wrap_exception = runtime.caml_wrap_exception, @@ -9009,7 +9006,7 @@ function succ(n){ /*<>*/ return n + 1 | 0;} function pred(n){ /*<>*/ return n - 1 | 0;} function abs(n){ - /*<>*/ return caml_greaterequal(n, 0) ? n : - n | 0 /*<>*/ ; + /*<>*/ return 0 <= n ? n : - n | 0 /*<>*/ ; } function lognot(n){ /*<>*/ return n ^ -1;} var @@ -9023,9 +9020,7 @@ max_int$0 = /*<>*/ Stdlib[19], unsigned_to_int = /*<>*/ function(n){ - /*<>*/ if - (caml_greaterequal(n, 0) - && /*<>*/ caml_lessequal(n, max_int$0)) + /*<>*/ if(0 <= n && n <= max_int$0) /*<>*/ return [0, n]; /*<>*/ return 0; /*<>*/ }; @@ -9053,7 +9048,8 @@ /*<>*/ throw caml_maybe_attach_backtrace(_b_, 0); } /*<>*/ } - var compare = /*<>*/ caml_int_compare, equal = runtime.caml_equal; + var compare = /*<>*/ caml_int_compare; + function equal(x, y){ /*<>*/ return x === y ? 1 : 0;} function unsigned_compare(n, m){ var y = /*<>*/ m + 2147483648 | 0, @@ -9061,17 +9057,18 @@ /*<>*/ return caml_int_compare(x, y) /*<>*/ ; } function unsigned_lt(n, m){ - /*<>*/ return caml_lessthan - (n + 2147483648 | 0, m + 2147483648 | 0) /*<>*/ ; + /*<>*/ return (n + 2147483648 | 0) < (m + 2147483648 | 0) + ? 1 + : 0; } function min(x, y){ - /*<>*/ return caml_lessequal(x, y) ? x : y /*<>*/ ; + /*<>*/ return x <= y ? x : y /*<>*/ ; } function max(x, y){ - /*<>*/ return caml_greaterequal(x, y) ? x : y /*<>*/ ; + /*<>*/ return y <= x ? x : y /*<>*/ ; } function unsigned_div(n, d){ - /*<>*/ if(caml_lessthan(d, 0)) + /*<>*/ if(d < 0) /*<>*/ return unsigned_lt(n, d) ? zero : one /*<>*/ ; var q = /*<>*/ runtime.caml_div(n >>> 1 | 0, d) << 1, @@ -9276,11 +9273,8 @@ "use strict"; var runtime = globalThis.jsoo_runtime, - caml_greaterequal = runtime.caml_greaterequal, caml_hash = runtime.caml_hash, caml_int_compare = runtime.caml_int_compare, - caml_lessequal = runtime.caml_lessequal, - caml_lessthan = runtime.caml_lessthan, caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_mul = runtime.caml_mul, caml_wrap_exception = runtime.caml_wrap_exception, @@ -9292,7 +9286,7 @@ function succ(n){ /*<>*/ return n + 1 | 0;} function pred(n){ /*<>*/ return n - 1 | 0;} function abs(n){ - /*<>*/ return caml_greaterequal(n, 0) ? n : - n | 0 /*<>*/ ; + /*<>*/ return 0 <= n ? n : - n | 0 /*<>*/ ; } var size = /*<>*/ Stdlib_Sys[9], @@ -9301,9 +9295,7 @@ function lognot(n){ /*<>*/ return n ^ -1;} var max_int$0 = /*<>*/ Stdlib[19]; function unsigned_to_int(n){ - /*<>*/ if - (caml_greaterequal(n, 0) - && /*<>*/ caml_lessequal(n, max_int$0)) + /*<>*/ if(0 <= n && n <= max_int$0) /*<>*/ return [0, n]; /*<>*/ return 0; /*<>*/ } @@ -9332,17 +9324,18 @@ /*<>*/ return caml_int_compare(x, y) /*<>*/ ; } function unsigned_lt(n, m){ - /*<>*/ return caml_lessthan - (n - min_int | 0, m - min_int | 0) /*<>*/ ; + /*<>*/ return (n - min_int | 0) < (m - min_int | 0) + ? 1 + : 0; } function min(x, y){ - /*<>*/ return caml_lessequal(x, y) ? x : y /*<>*/ ; + /*<>*/ return x <= y ? x : y /*<>*/ ; } function max(x, y){ - /*<>*/ return caml_greaterequal(x, y) ? x : y /*<>*/ ; + /*<>*/ return y <= x ? x : y /*<>*/ ; } function unsigned_div(n, d){ - /*<>*/ if(caml_lessthan(d, 0)) + /*<>*/ if(d < 0) /*<>*/ return unsigned_lt(n, d) ? zero : one /*<>*/ ; var q = /*<>*/ runtime.caml_div(n >>> 1 | 0, d) << 1, @@ -24924,31 +24917,28 @@ var r = bits32(s) >>> 1 | 0, v = /*<>*/ caml_mod(r, n); - /*<>*/ if - (! caml_greaterthan(r - v | 0, (Stdlib_Int32[9] - n | 0) + 1 | 0)) + /*<>*/ if + (((Stdlib_Int32[9] - n | 0) + 1 | 0) >= (r - v | 0)) /*<>*/ return v; } /*<>*/ } function int32(s, bound){ - /*<>*/ return caml_lessequal(bound, 0) + /*<>*/ return bound <= 0 ? /*<>*/ (0, Stdlib[1])(cst_Random_int32) : /*<>*/ int32aux(s, bound) /*<>*/ ; } function int32_in_range(s, min, max){ - /*<>*/ if(caml_greaterthan(min, max)) + /*<>*/ if(max < min) /*<>*/ return (0, Stdlib[1])(cst_Random_int32_in_range) /*<>*/ ; var span = /*<>*/ (0, Stdlib_Int32[6])(max - min | 0); - /*<>*/ if(! caml_lessequal(span, Stdlib_Int32[1])) + /*<>*/ if(span > Stdlib_Int32[1]) /*<>*/ return min + int32aux(s, span) | 0 /*<>*/ ; /*<>*/ for(;;){ var r = /*<>*/ /*<>*/ caml_int64_to_int32 ( /*<>*/ caml_lxm_next(s)); - /*<>*/ if - (! - caml_lessthan(r, min) - && ! /*<>*/ caml_greaterthan(r, max)) + /*<>*/ if(r >= min && max >= r) /*<>*/ return r; } /*<>*/ }